<div dir="ltr"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-12 13:43 GMT+01:00 Nicolai Hess <span dir="ltr"><<a href="mailto:nicolaihess@gmail.com" target="_blank">nicolaihess@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-03-12 13:36 GMT+01:00 Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@<wbr>gmail.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"> <br><div dir="ltr">Couldn't it be that some Smalltalk memory has been relocated? (I'm thinking of the DisplayScreen bits)<br></div></blockquote><div><br><a href="http://forum.world.st/Too-frequent-crashes-tp4927143p4927722.html" target="_blank">http://forum.world.st/Too-<wbr>frequent-crashes-<wbr>tp4927143p4927722.html</a><br><br><br> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-12 12:53 GMT+01:00 Esteban Lorenzano <span dir="ltr"><<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"> <br><div style="word-wrap:break-word">Hi, <div><br></div><div>this is lockSurfaceFn: </div><div><br></div><div><div>createLockSurfaceFn</div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">    </span>^ FFICallback </div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">          </span>signature: #(void * (void *handle, int *pitch, int x, int y, int w, int h))</div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">              </span>block: [ :handle :pitch :x :y :w :h |</div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">                    </span>pitch signedLongAt: 1 put: (self get_stride: handle).</div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">                    </span>self get_data: handle ]</div></div><div><br></div><div>and</div><div><br></div><div><div>createUnlockSurfaceFn</div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">   </span>^ FFICallback </div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">          </span>signature: #(int (void *handle, int x, int y, int w, int h))</div><div><span style="white-space:pre-wrap" class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-tab-span">             </span>block: [ :handle :x :y :w :h | 0 "Do nothing” ]</div></div><div><br></div><div>cheers!</div><div>Esteban</div><div><br><div><blockquote type="cite"><div>On 12 Mar 2017, at 03:34, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:</div><br class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-interchange-newline"><div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" dir="ltr">Hi Esteban,<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 10, 2017 at 7:35 AM, Esteban Lorenzano<span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a><wbr>></span><span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><br>Hi,<br><br>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.<br></blockquote><div><br></div><div>My original theory is wrong.  As you suspected it is something to do with the callback in primitiveCopyBits via lockSurfaces & unlockSurfaces.  Can you tell me what the callback is and what code installs it into the lockSurfaceFn and unlockSurfaceFn?</div><div><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><br>And problem is showing very easy on 64bits (while in 32bits it takes time and is more random).<br><br>Here is the easiest way to reproduce it (in mac):<br><br>wget<span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span><a rel="noreferrer" href="http://files.pharo.org/get-files/60/pharo64-mac-latest.zip" target="_blank">files.pharo.org/get-files<wbr>/60/pharo64-mac-latest.zip</a><br>wget<span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span><a rel="noreferrer" href="http://files.pharo.org/get-files/60/pharo64.zip" target="_blank">files.pharo.org/get-files<wbr>/60/pharo64.zip</a><br>wget<span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span><a rel="noreferrer" href="http://files.pharo.org/get-files/60/sources.zip" target="_blank">files.pharo.org/get-files<wbr>/60/sources.zip</a><br>unzip pharo64-mac-latest.zip<br>unzip pharo64.zip<br>unzip sources.zip<br>./Pharo.app/Contents/MacOS/Pha<wbr>ro ./Pharo64-60438.image eval "VGTigerDemo runDemo"<br><br>eventually (like 5-6 seconds after, if not immediately), you will have a stack like this:<br><br>SmallInteger(Object)>>primitiv<wbr>eFailed:<br>SmallInteger(Object)>>primitiv<wbr>eFailed<br>SmallInteger(VMCallbackContext<wbr>64)>>primSignal:andReturnAs:fr<wbr>omContext:<br>GrafPort>>copyBits<br>GrafPort>>image:at:sourceRect:<wbr>rule:<br>FormCanvas>>image:at:sourceRec<wbr>t:rule:<br>FormCanvas(Canvas)>>drawImage:<wbr>at:sourceRect:<br>FormCanvas(Canvas)>>drawImage:<wbr>at:<br>VGTigerDemo>>runDemo<br>VGTigerDemo class>>runDemo<br>UndefinedObject>>DoIt<br>OpalCompiler>>evaluate<br>OpalCompiler(AbstractCompiler)<wbr>>>evaluate:<br>[ result := Smalltalk compiler evaluate: aStream.<br>self hasSessionChanged<br>       <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>ifFalse: [ self stdout<br>                       <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>print: result;<br>                       <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>lf ] ] in EvaluateCommandLineHandler>>ev<wbr>aluate: in Block: [ result := Smalltalk compiler evaluate: aStream....<br>BlockClosure>>on:do:<br>EvaluateCommandLineHandler>>ev<wbr>aluate:<br>EvaluateCommandLineHandler>>ev<wbr>aluateArguments<br>EvaluateCommandLineHandler>>ac<wbr>tivate<br>EvaluateCommandLineHandler class(CommandLineHandler class)>>activateWith:<br>[ aCommandLinehandler activateWith: commandLine ] in PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activateSu<wbr>bCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]<br>BlockClosure>>on:do:<br>PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activateSu<wbr>bCommand:<br>PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>handleSubc<wbr>ommand<br>PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>handleArgu<wbr>ment:<br>[ self<br>       <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>handleArgument:<br>               <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>(self arguments<br>                       <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>ifEmpty: [ '' ]<br>                       <span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span>ifNotEmpty: [ :arguments | arguments first ]) ] in PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activate in Block: [ self...<br>BlockClosure>>on:do:<br>PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activate<br>PharoCommandLineHandler>>activ<wbr>ate<br>PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:<br>[ super activateWith: aCommandLine ] in PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]<br><br>Any idea?<br><br>thanks!<br><span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979HOEnZb"><font color="#888888">Esteban</font></span></blockquote></div><br><br clear="all"><div><br></div>--<span class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979Apple-converted-space"> </span><br><div class="m_4759342666489130635gmail-m_-7780002836349848460m_-4906969583213588979gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></blockquote></div><br></div></div><br></blockquote></div><br></div>
<br></blockquote></div><br></div></div>
<br></blockquote></div><br></div>