Harminv crashes with long simulation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-meep |
New
|
Undecided
|
Unassigned |
Bug Description
The runWithHarminv() function in python-meep 1.4.2 (on Ubuntu 11.10 amd64) sometimes results in crashes. However, Harminv always runs the simulation and writes out correctly found modes before the crash.
The crash reason is hard to find out for me; however it is related to the resolution and the simulated time. Changing the parameters, I observed three different errors of:
*** glibc detected *** python: free(): invalid next size (normal): 0x000000000176b160 ***
or
*** glibc detected *** python: free(): invalid next size (fast): 0x0000000001a62160 ***
or
*** glibc detected *** python: double free or corruption (!prev): 0x00000000014d6420 ***
Attached is a _working_ example. To trigger the crash, increase the parameter pTimeAfterSources (at line 114) to (120. / srcFreq)
Note that this bug is somewhat complementary to the rounding error of Harminv #947797, which limits the _minimum_ simulation time to be higher than 1.