Last week I've been trying to have a simpler way to reproduce it (still on the way BTW). @pavel-krivanek had handed us originally the following script that reproduces it with a high degree of certainty, but it depends on opening Calypso (which opens new processes...):
```smalltalk 20 timesRepeat: [ClyFullBrowser openOnMethod: SourceSansProRegular class>>#fontContents ].
1 to: 20 do: [ :i | Smalltalk snapshot: true andQuit: false ]. ``` I've been trying to reduce it into something not depending on Calypso nor Pharo's startup. I got the following script that is longer to run, and does not reproduce the problem as often as Pavel's one.
```smalltalk 2000 timesRepeat: [ [ 1000 timesRepeat: [ [ (1 to: 100000) collect: [ :e | e ** 17 ] ] forkAt: 38 ] ] fork ].
1 to: 20 do: [ :i | Smalltalk snapshotPrimitive]. ``` The good thing about this last script is that is shows also that the problem has nothing to do with the startup mechanism and whatever is running in it.
Enabling the leak checker starts shows output when snapshotting, but once the leak is produced it's too late, the objects leaking are already corrupted.