Mantis - Squeak
Viewing Issue Advanced Details
7585 VM minor sometimes 12-14-10 21:43 12-15-10 23:43
henriksp  
lewis  
normal  
assigned 4.1  
open  
none    
none  
0007585: VM may crash when the JPEGPlugin is invoked from several threads at once
I've been able to reproduce the crash on Windows in 1.0, 1.1, 1.2 beta and Squeak 4.1 images (release and trunk) using the Squeak 4.1.1 VM.

My test was (using the attached image):
FileStream oldFileNamed: 'trouble.jpg' do: [:img | imageStream := RWBinaryOrTextStream with: img binary contents].
50 timesRepeat: [[
       ImageReadWriter formFromStream: imageStream] forkAt: Processor userBackgroundPriority ].
 trouble.jpg [^] (1,334,645 bytes) 12-14-10 21:43

Notes
(0013985)
lewis   
12-15-10 23:43   
I tried this with a unix VM on Linux, and did not get a VM crash. I certainly would not expect the test to work properly, since it has multiple processes operating on a single stream with no semaphore protection. But it should not crash the VM either.