Horrido, Can you also provide the stack associated with the segmentation fault? Usually the VM captures the signal and dumps the current stack at the moment of the crash in stdout. You'll find the same stack in the file crash.dmp.
On Thu, Jun 1, 2017 at 6:51 AM, Ben Coman <b...@openinworld.com> wrote: > > > On Wed, May 31, 2017 at 10:23 PM, horrido <horrido.hobb...@gmail.com> > wrote: > >> I have a puzzling bug. I've narrowed the scenario down to this code: >> >> Cranky»initA >> a := ((StringMorph contents: '####') color: Color white) position: (0@0 >> ). >> m addMorph: a >> >> Cranky»initialize >> f := Form fromFileNamed: 'hot_air_balloon_mysticmorning.jpg'. >> m := ImageMorph new. >> m form: f. >> self initA. >> m openInWindowLabeled: 'Cranky'. >> delay := (Delay forSeconds: 5). >> [ [ true ] whileTrue: [ a contents: 0 asString. delay wait ] fork >> >> I can run this application for hours and hours with no problem. However, >> if >> I run it for a while and then close the application and then save/exit the >> image, the next time I start the image, there is some likelihood it will >> crash dump. The probability is something like 5-10%. >> >> Interestingly, if I remove the statement... >> >> a contents: 0 asString. >> >> from the infinite loop, I've not been able to replicate the crash. Is >> there >> something wrong with the way I'm updating the contents of the StringMorph? >> > > Can you try a few other variations... > [ [ true ] whileTrue: [ 0 asString. delay wait ] fork. > [ [ true ] whileTrue: [ a contents: '0'. delay wait ] fork. > [ [ true ] whileTrue: [ a contents: '0'. ] forkAt: 20. > > cheers -ben > > -- Guille Polito Research Engineer French National Center for Scientific Research - *http://www.cnrs.fr* <http://www.cnrs.fr> *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13