ZELLMECHANIK-DRESDEN / ShapeOut

Shape-Out has been superseded by Shape-Out 2.
https://shapeout.readthedocs.io
GNU General Public License v2.0
5 stars 5 forks source link

Program crash after approx. 30-40 times plotting #187

Closed DerDeef closed 6 years ago

DerDeef commented 7 years ago

Hi Paul, this bug can be constisently repeated: load a data set, press 37 times apply in the plotting tab, ShapeOut "crashes" crashing means not completely freezing, but only the first two or three tabs in the menu are filled with content, the others are empty. Buttons can be pressed, but e.g. the saving dialog does not contain buttons...see screenshot

This is independent of the size or type of data set. Funny is, on my computer it occurs after 33x on two other computers after 37x. bug1

DerDeef commented 7 years ago

Philipps wrote you an Email. He is talking about the same problem.

chrherold commented 7 years ago

The reason seems to be memory leakage. There are about 13 Mb additional private memory assigned to the application per click on apply.

paulmueller commented 7 years ago

This is a known design problem in ShapeOut that is most-likely connected to the use of chaco. Ultimately, this will be fixed by #150.

maikherbig commented 6 years ago

I just tried a few older versions of shapeout: The problem starts at version 0.5.8. Earlier versions dont have this bug.

paulmueller commented 6 years ago

Thanks @maikherbig! for the record, these are the changes between 0.5.7 and 0.5.8:

https://github.com/ZELLMECHANIK-DRESDEN/ShapeOut/compare/0.5.7...0.5.8

I could not spot anything in the diffs. There are 33 commits, some of which have no builds on appveyor. It should be straight forward to download all of the successfull builds (click on green checkmark left of the commit hash to get to the appveyor build and then on "artifacts" to download) and see when the memory leak was introduced. I will have a look as soon as possible, which will probably be in January.

If you have time for the guessing game before that, please be my guess ;)

maikherbig commented 6 years ago

ShapeOut_0.5.7.dev11_win_32bit_setup.exe - works ShapeOut_0.5.7.dev12_win_32bit_setup.exe - crashes -> "switched from flatnotebook to notebook for better style " seems to induce the problem

paulmueller commented 6 years ago

Thanks again! Looks like this is related to wxPython then. I will look into it.

paulmueller commented 6 years ago

Update: I could not find anything in this commit that would introduce the memory leak: https://github.com/ZELLMECHANIK-DRESDEN/ShapeOut/commit/64a4bf26ca3c9029a6575beeae195fbe30748c8c

paulmueller commented 6 years ago

I managed to get rid of the memory leak (at least on Linux). It was caused by (a) a workaround for a weird panel-redrawing issue that does not seem to be existent anymore (b) a design issue when drawing plots (a new plotting container was created for each new analysis)

Please check out the development version and let me know whether this issue is now resolved:

https://ci.appveyor.com/project/paulmueller/shapeout/build/1.0.814/job/w7o9mlqr5bd0uohh/artifacts

maikherbig commented 6 years ago

I installed it and pushed apply like 70 times. Only in the filter-tab the refreshing of all the panels takes now a second, which is rather long but it all works :) After hitting "apply" 40 times in the filter-tab and also like 30 times in the plotting-tab and then quickly changing to the scatter plot-tab and clicking "downsampling" causes an error-popup (see image attached). But this is not a problem. One can easyly close the error and continue as usual. so_erorr

chrherold commented 6 years ago

Perfect, the memory leak when pressing apply is gone!

One thing I noticed when testing the new version is that after pressing apply the scrollbars, e.g. in the filter tab, disappear. They reappear after manual resizing of the window part. Do you see the same on Linux?

paulmueller commented 6 years ago

Please have another look: https://ci.appveyor.com/project/paulmueller/shapeout/build/1.0.817/job/llewqsmajntdwvyi/artifacts

chrherold commented 6 years ago

The scrollbar bug under Windows seems fixed. Great. Thank You.