[Vm-dev] BUG? A problem with callbacks that shows up in 64bits (but is on 32bits too)

LEnglish LEnglish5 at cox.net
Fri Mar 10 15:52:08 UTC 2017


I mentioned to Eliot  ages ago that I saw what may have been a similar bug when I accidentally called the 32-bit version of OpenGL using 64-bit parameter variables. Nothing crashed, but things became *very* strange, with entire bits of functionality in Squeak itself simply ceasing to function.

I’ve been quite sick for the past few years, so I never followed up (sorry Elliot) in trying to figure out what exactly I had done to trigger the erratic behavior.

L

> On Mar 10, 2017, at 08:35, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> 
> 
> Hi, 
> 
> I’m tumbling into an error in Pharo, because we use callbacks intensively, in Athens(cairo)-to-World conversion in particular, and people is sending always their crash reports… we made the whole conversion a lot more robust since problems started to arise, but now I hit a wall I cannot solve: I think problem is in something in callbacks. 
> 
> And problem is showing very easy on 64bits (while in 32bits it takes time and is more random). 
> 
> Here is the easiest way to reproduce it (in mac): 
> 
> wget files.pharo.org/get-files/60/pharo64-mac-latest.zip 
> wget files.pharo.org/get-files/60/pharo64.zip
> wget files.pharo.org/get-files/60/sources.zip
> unzip pharo64-mac-latest.zip 
> unzip pharo64.zip 
> unzip sources.zip
> ./Pharo.app/Contents/MacOS/Pharo ./Pharo64-60438.image eval "VGTigerDemo runDemo"
> 
> eventually (like 5-6 seconds after, if not immediately), you will have a stack like this: 
> 
> SmallInteger(Object)>>primitiveFailed:
> SmallInteger(Object)>>primitiveFailed
> SmallInteger(VMCallbackContext64)>>primSignal:andReturnAs:fromContext:
> GrafPort>>copyBits
> GrafPort>>image:at:sourceRect:rule:
> FormCanvas>>image:at:sourceRect:rule:
> FormCanvas(Canvas)>>drawImage:at:sourceRect:
> FormCanvas(Canvas)>>drawImage:at:
> VGTigerDemo>>runDemo
> VGTigerDemo class>>runDemo
> UndefinedObject>>DoIt
> OpalCompiler>>evaluate
> OpalCompiler(AbstractCompiler)>>evaluate:
> [ result := Smalltalk compiler evaluate: aStream.
> self hasSessionChanged
> 	ifFalse: [ self stdout
> 			print: result;
> 			lf ] ] in EvaluateCommandLineHandler>>evaluate: in Block: [ result := Smalltalk compiler evaluate: aStream....
> BlockClosure>>on:do:
> EvaluateCommandLineHandler>>evaluate:
> EvaluateCommandLineHandler>>evaluateArguments
> EvaluateCommandLineHandler>>activate
> EvaluateCommandLineHandler class(CommandLineHandler class)>>activateWith:
> [ aCommandLinehandler activateWith: commandLine ] in PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
> BlockClosure>>on:do:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
> PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
> PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
> [ self
> 	handleArgument:
> 		(self arguments
> 			ifEmpty: [ '' ]
> 			ifNotEmpty: [ :arguments | arguments first ]) ] in PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self...
> BlockClosure>>on:do:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activate
> PharoCommandLineHandler>>activate
> PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
> [ super activateWith: aCommandLine ] in PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]
> 
> Any idea?
> 
> thanks!
> Esteban



More information about the Vm-dev mailing list