<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 2, 2012 at 9:50 AM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><br><br><div class="gmail_quote">On Sat, Apr 28, 2012 at 3:02 AM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This bug was fixed by John McIntosh and added to VMMaker trunk in<br>
VMMaker-dtl.192 (9 October 2010). John&#39;s fix needs to be merged back<br>
into the oscog branch for the Cog VMs. Currently this issue affects<br>
interpreter VMs built prior to October 2010, and all current Cog VMs.<br>
<br>
Details at <a href="http://bugs.squeak.org/view.php?id=7691" target="_blank">http://bugs.squeak.org/view.php?id=7691</a><br>
<br>
P?hi,<br>
<br>
Thank you for tracking this problem down. If you would like to see<br>
the Smalltalk source code that corresponds to your fix, try loading<br>
VMMaker (from <a href="http://source.squeak.org" target="_blank">source.squeak.org</a>). In that package you will find class<br>
JPEGReadWriter2Plugin. This is the class that is translated into the<br>
C code module that you fixed. There are four lines of code that you<br>
changed in the JPEGReadWriter2Plugin2.c module, and these in the methods<br>
#primJPEGWriteImage:onByteArray:form:quality:progressiveJPEG:errorMgr:<br>
and #primJPEGReadImage:fromByteArray:onForm:doDithering:errorMgr:<br>
which are the Smalltalk methods that are translated into the C function<br>
primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr() and<br>
primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr().<br>
<br>
In this case, the source code is actually C code embedded in the<br>
Smalltalk method, but the patch still needs to be applied here<br>
because the C module is alway generated from the Smalltalk, and<br>
a patch to the generated C module would be overwritten whenever the<br>
code is regenerated.<br>
 </blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for reporting this!<br>
<br></blockquote><div><br>Hi Dave. Thanks for tacking care.<br>Do you know how to integrate this into Cog branch?<br></div></div></blockquote><div><br></div><div>I do :)  I&#39;ll do it at my next check-in, which should be in a couple of days.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><br>do you have a changeset or what was actually changed ?<br><br>thanks<br><br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Dave<br>
<div><div><br>
<br>
On Fri, Apr 27, 2012 at 08:32:35AM -0400, David T. Lewis wrote:<br>
&gt;<br>
&gt; P?hi,<br>
&gt;<br>
&gt; Excellent! Thank you very much.<br>
&gt;<br>
&gt; I put this on Mantis also: <a href="http://bugs.squeak.org/view.php?id=7691" target="_blank">http://bugs.squeak.org/view.php?id=7691</a><br>
&gt;<br>
&gt; The fix is for the Slang in VMMaker, so we will need to apply it there.<br>
&gt; I&#39;ll look into it over the weekend if nobody has gotten to it sooner :)<br>
&gt;<br>
&gt; Bravo for fixing an old and serious bug!<br>
&gt;<br>
&gt; Dave<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Apr 27, 2012 at 10:02:43AM +0200, P?hi Andr?s wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; I have found the origin of various crashes in the Squeak VM, which is related to the JPEGReadWriter2Plugin.<br>
&gt; &gt; The hunt begun with Juan&#39;s Cuis 4.0 release, see the emails exchanged below and the description.<br>
&gt; &gt;<br>
&gt; &gt; I have attached the fixed C source, but the fix should go in the VM sources, because the code is<br>
&gt; &gt; generated as I see. Please include the fix in the VM sources.<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt; Andras Pahi<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt; From: Juan Vuletich (mail lists)<br>
&gt; &gt; To: P?hi Andr?s<br>
&gt; &gt; Sent: Thursday, April 26, 2012 9:26 PM<br>
&gt; &gt; Subject: Re: Cuis 4.0 crash on startup<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Wow P?hi! This is great! Please send all this to the vm-dev mail list, and ask for it to be included (or directions to do it yourself).<br>
&gt; &gt;<br>
&gt; &gt; It is my bug in the end... I wrote JPEGReadWriter2Plugin about 10 years ago...<br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt;<br>
&gt; &gt; Juan Vuletich<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Quoting P?hi Andr?s &lt;<a href="mailto:pahia@t-online.hu" target="_blank">pahia@t-online.hu</a>&gt;:<br>
&gt; &gt;<br>
&gt; &gt;   Hi,<br>
&gt; &gt;<br>
&gt; &gt;   Replace the winbuild/src/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c file with the attached file,<br>
&gt; &gt;   recompile the Squeak VM and Cuis 4.0 rocks. In the plugin there was a 1 off access in the formBits array.<br>
&gt; &gt;   Because the code is generated, it needs to be corrected in the VM sources.<br>
&gt; &gt;<br>
&gt; &gt;   How can I got there ?<br>
&gt; &gt;<br>
&gt; &gt;   Executing several times World buildMagnifiedBackgroundImage in Cuis 3.3 crashed the Squeak VM.<br>
&gt; &gt;   I exported the background image data, converted from JPEG to other format (BMP/PNG) and set the new<br>
&gt; &gt;   format image to World backgroundImageData:. Everything worked as expected.<br>
&gt; &gt;   I replaced the formBits array accesses in JPEGReadWriter2Plugin2.c with my routines, checking the indices<br>
&gt; &gt;   and reporting off-array access attempts. Then I fixed the places in the C source.<br>
&gt; &gt;<br>
&gt; &gt;   Regards,<br>
&gt; &gt;   Andras Pahi<br>
&gt; &gt;   ----- Original Message -----<br>
&gt; &gt;     From: Juan Vuletich (mail lists)<br>
&gt; &gt;     To: P?hi Andr?s<br>
&gt; &gt;     Sent: Thursday, April 26, 2012 12:47 PM<br>
&gt; &gt;     Subject: Re: Cuis 4.0 crash on startup<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;     Great. Thanks. You might ask for help or directions in the vm-dev mail list. I&#39;m sure that several people are at least aware of the bug.<br>
&gt; &gt;<br>
&gt; &gt;     Cheers,<br>
&gt; &gt;<br>
&gt; &gt;     Juan Vuletich<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;     Quoting P?hi Andr?s &lt;<a href="mailto:pahia@t-online.hu" target="_blank">pahia@t-online.hu</a>&gt;:<br>
&gt; &gt;<br>
&gt; &gt;       Hi,<br>
&gt; &gt;       Thank you for your reply. I will dig into the issues with the Windows VM.<br>
&gt; &gt;       Regards,<br>
&gt; &gt;       Andras Pahi<br>
&gt; &gt;         ----- Original Message -----<br>
&gt; &gt;         From: Juan Vuletich (mail lists)<br>
&gt; &gt;         To: P?hi Andr?s<br>
&gt; &gt;         Sent: Thursday, April 26, 2012 11:59 AM<br>
&gt; &gt;         Subject: Re: Cuis 4.0 crash on startup<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;         Hi P?hi,<br>
&gt; &gt;<br>
&gt; &gt;         There is some problem with that Windows VM, not limited to Cuis. If you google &quot;Squeak VM 4.1.1 windows crash&quot; you&#39;ll find many results, for example <a href="http://bugs.squeak.org/view.php?id=7585" target="_blank">http://bugs.squeak.org/view.php?id=7585</a> <a href="http://bugs.squeak.org/bug_view_advanced_page.php?bug_id=7686" target="_blank">http://bugs.squeak.org/bug_view_advanced_page.php?bug_id=7686</a> and <a href="http://bugs.squeak.org/view.php?id=7523" target="_blank">http://bugs.squeak.org/view.php?id=7523</a> .<br>


&gt; &gt;<br>
&gt; &gt;         I&#39;m not involved in the development of the Windows VM, all I can do is recommend using Cog until this is fixed somehow.<br>
&gt; &gt;<br>
&gt; &gt;         Regards,<br>
&gt; &gt;<br>
&gt; &gt;         Juan Vuletich<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;         Quoting P?hi Andr?s &lt;<a href="mailto:pahia@t-online.hu" target="_blank">pahia@t-online.hu</a>&gt;:<br>
&gt; &gt;<br>
&gt; &gt;           Hi,<br>
&gt; &gt;           I have just gave a shoot on Cuis 4.0 using SqueakVM 4.1.1 on Windows.<br>
&gt; &gt;           It even does not start, the crash dump is attached, but with the latest<br>
&gt; &gt;           Cog VM it runs fine.<br>
&gt; &gt;           I checked the older Cuis 3.3 image with the same SqueakVM, it runs fine.<br>
&gt; &gt;           Regards,<br>
&gt; &gt;           Andras Pahi<br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt; Juan Vuletich<br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>
</div>