Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recycling after changing the tick specification of a block if it involves an expression results in a erroneous error #475

Open
petrelharp opened this issue Oct 6, 2024 · 2 comments

Comments

@petrelharp
Copy link
Collaborator

Open this script in SLiMgui:

initialize() {
	initializeMutationRate(1e-7);
	initializeMutationType("m1", 0.5, "f", 0.0);
	initializeGenomicElementType("g1", m1, 1.0);
	initializeGenomicElement(g1, 0, 99999);
	initializeRecombinationRate(1e-8);
	defineConstant("X", 10);
}

1 early() { sim.addSubpop("p1", 500); }

10 late() { sim.simulationFinished(); }

This runs fine. But change the last line to

10+1 late() { sim.simulationFinished(); }

and hit the Recycle button; and it produces the following error:

ERROR (SLiMEidosBlock::SLiMEidosBlock): no compound statement found for SLiMEidosBlock.

However, hitting OK and then hitting recycle again without changing anything produces no error and the simulation runs just fine.

This seems to consistently happen whenever I change a block whose tick specification. Sometimes the error is shown A LOT, for instance:
Screenshot from 2024-10-05 16-39-24

Running these scripts on the command line works fine; this is only in the GUI. I'm using GUI version 5.3, Qt 5.15.13, Git-SHA-1 f872f3d.

@bhaller
Copy link
Contributor

bhaller commented Oct 6, 2024

Wow, that's a weird one. Reproduces for me, in SLiMgui only (not in SLiMguiLegacy). I take it this is not blocking you in any way? If so, I'm gonna ignore it for a while, as I'm deep in the multi-chromosome weeds...

@petrelharp
Copy link
Collaborator Author

Not blocking, it's just weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants