Re: Found Bug But Not Sure How to Proceed To Fix
Jeremy Landry <[email protected]> Fri, 2 Mar 2018 13:09:25 -0800
| Newsgroups | gmane.comp.lang.smalltalk.squeak.squeakland |
|---|---|
| Message-ID | <CAMYa41mT3kXEiC=y1g2AZntvDR-JTbOXiN6k19w4Tx+hJbMmZQ@mail.gmail.com> |
--===============0911884576804548963== Content-Type: multipart/alternative; boundary="001a113f80e41f580905667464c6" --001a113f80e41f580905667464c6 Content-Type: text/plain; charset="UTF-8" Thanks for the tip. I was finding myself in WarpBlt (nothing I messed with was causing any changes there!) Throwing in random values definitely makes a change here. On Fri, Mar 2, 2018 at 12:19 PM, Bob Arning <[email protected]> wrote: > TransformationMorph>>computeBounds > self hasSubmorphs ifTrue: > [bounds _ (transform localBoundsToGlobal: > (Rectangle merging: > (self submorphs collect: [:m | m fullBounds]))) > truncated > expandBy: 1]. > fullBounds _ bounds. > > Note the expandBy: 1 > > On 3/2/18 1:59 PM, Jeremy Landry wrote: > > Actually to add a little more insight if possible, you can create bug with > the following actions: > > make a new playfield > make 2 new rectangles and place them into the playfield. > Rotate one of them 90 degrees. > Turn gridding on in the playfield. > > The rotated and unscaled rectangle will not align with the non-rotated one > with gridding. Something about making a bitmap copy is offsetting the > values, my guess is there's a rounding problem that is popping up on these > objects, thus scale and rotation get offset for some reason, and > specifically changes the origin by 1@-1 somewhere...it causes graphical > glitches leaving 'garbage' with playfield indicators when the object that > has the indicator is moved and also shows up with rotated ellipses. What > is the common thread through them all? What method are they all accessing? > > On Fri, Mar 2, 2018 at 10:45 AM, Jeremy Landry <[email protected]> wrote: > >> You will also notice if you rotate any shape, it becomes a bit map. >> Scale it and you will see that problem re-occur even with built-in >> objects. Could it be the masking offset, too? that causes this? I'm >> still investigating, but I'm not sure how to step through 'already working' >> things specifically related to what I'm trying to look at. >> >> On Fri, Mar 2, 2018 at 10:42 AM, Jeremy Landry <[email protected]> wrote: >> >>> Hi, it only appears when scaling a morph. Here is example...it is my >>> belief (how does one step through code with debugger if there's no bug >>> happening?); >>> >>> Whatever code is common that scales morphs is being offset incorrectly. >>> The first image shows the 'garbage' left behind by playfield indicator if >>> that option is set. It seems it was only tested in 'holders' and thus >>> likely not picked up during 'intended' use. >>> >>> Next, two pictures show scaling as where the misalignment starts. This >>> might be why you could not recreate bug; resizing rectangle changes >>> rectangle morph extent, whereas scaling is a differnet piece of code and >>> therefore different outcome. >>> >>> Image included. This works with *anything* scaled. >>> https://imgur.com/a/6zEWq >>> >>> On Fri, Mar 2, 2018 at 10:20 AM, Bob Arning <[email protected]> >>> wrote: >>> >>>> I tried to recreate your example and could not. How did you create the >>>> two morphs in your example? Are you certain the read/gray morph does not >>>> have some transparent pixels along the top and left? >>>> >>>> On 3/2/18 12:50 PM, Jeremy Landry wrote: >>>> >>>> I did a little more digging, just for the record...and it turns out >>>> it's scaling error. No matter what, scaling offsets morphs by 1@-1. >>>> I'm still looking for where this occurs and why. So far, injecting >>>> intentionally bad values into bordered morph and sketch classes hasn't >>>> produced any change. It 'feels' like most of that code isn't even used, >>>> but then again, I might not have genuinely created a new object with that >>>> code and system might have been giving me what was already in system... >>>> >>>> >>>> On Fri, Mar 2, 2018 at 7:15 AM, Bert Freudenberg <[email protected]> >>>> wrote: >>>> >>>>> That bug tracker is pretty much dead, since all ongoing development >>>>> moved to squeak.org. >>>>> >>>>> The plan was to make a new Etoys release based on the latest Squeak >>>>> source base, but we have not have enough developer time to make that >>>>> actually happen. >>>>> >>>>> - Bert - >>>>> >>>>> On 1 March 2018 at 06:03, Nicco Kunzmann (rambler) < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I found a bug tracker on the squeakland site: >>>>>> http://tracker.squeakland.org/secure/Dashboard.jspa >>>>>> >>>>>> I think, you can describe the problem there as an issue and hand in >>>>>> the fix. >>>>>> They may also know how to guide you further if the code base is >>>>>> somewhere else. >>>>>> If you have problems there (login, no response), I guess, this >>>>>> mailing list is one place to ask for help. >>>>>> >>>>>> Best, >>>>>> Nicco >>>>>> >>>>>> >>>>>> On 03/01/2018 03:34 AM, Jeremy Landry wrote: >>>>>> >>>>>> Hi, while working on a project needing precise alignment of >>>>>> sketches/bitmaps and rectangles using playfield 'use gridding', it seems >>>>>> that there's a difference of detected origin. >>>>>> >>>>>> Here's a screenshot with magnifier showing the discrepency. >>>>>> https://imgur.com/a/tcaRu >>>>>> >>>>>> I'm quite certain this bug is the one that causes bad redrawing, >>>>>> especially when showing a cursor move when 'indicate cursor' is activated >>>>>> in a playfield. >>>>>> >>>>>> If I correct this bug inside of a project, will it load into an image >>>>>> where it has not been fixed and be fixed? >>>>>> >>>>>> I haven't actually fixed the bug yet, but didn't want to waste time >>>>>> on it if the fix will not travel with the project. >>>>>> >>>>>> Thanks in advance for any input. >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> squeakland mailing listsqueakland-bD51WKytQuId/fn+uklp/[email protected]://lists.squeakland.org/mailman/listinfo/squeakland >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> squeakland mailing list >>>>>> squeakland-bD51WKytQuId/fn+uklp/[email protected] >>>>>> http://lists.squeakland.org/mailman/listinfo/squeakland >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> squeakland mailing list >>>>> squeakland-bD51WKytQuId/fn+uklp/[email protected] >>>>> http://lists.squeakland.org/mailman/listinfo/squeakland >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> squeakland mailing listsqueakland-bD51WKytQuId/fn+uklp/[email protected]://lists.squeakland.org/mailman/listinfo/squeakland >>>> >>>> >>>> >>>> _______________________________________________ >>>> squeakland mailing list >>>> squeakland-bD51WKytQuId/fn+uklp/[email protected] >>>> http://lists.squeakland.org/mailman/listinfo/squeakland >>>> >>>> >>> >> > > --001a113f80e41f580905667464c6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks for the tip.=C2=A0 I was finding myself in WarpBlt = (nothing I messed with was causing any changes there!)<div><br></div><div>T= hrowing in random values definitely makes a change here.=C2=A0=C2=A0</div><= div><br><div><br></div><div><br></div></div></div><div class=3D"gmail_extra= "><br><div class=3D"gmail_quote">On Fri, Mar 2, 2018 at 12:19 PM, Bob Arnin= g <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"= _blank">[email protected]</a>></span> wrote:<br><blockquote class=3D= "gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding= -left:1ex"> =20 =20 =20 <div text=3D"#000000" bgcolor=3D"#FFFFFF"> <p><font face=3D"Georgia">TransformationMorph>><wbr>computeBounds= <br> =C2=A0=C2=A0=C2=A0 self hasSubmorphs ifTrue:<br> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 [bounds _ (transform localBou= ndsToGlobal:<br> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 =C2=A0=C2=A0=C2=A0 (Rectangle merging:<br> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (self submorphs collect: [:= m | m fullBounds]))) truncated<br> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 expandBy: 1].<br> =C2=A0=C2=A0=C2=A0 fullBounds _ bounds.</font></p> <p><font face=3D"Georgia">Note the expandBy: 1</font><br> </p><div><div class=3D"h5"> <br> <div class=3D"m_1967303026115661652moz-cite-prefix">On 3/2/18 1:59 PM, = Jeremy Landry wrote:<br> </div> <blockquote type=3D"cite"> <div dir=3D"ltr">Actually to add a little more insight if possible, you can create bug with the following actions: <div><br> </div> <div>make a new playfield</div> <div>make 2 new rectangles and place them into the playfield.</div> <div>Rotate one of them 90 degrees.</div> <div>Turn gridding on in the playfield.</div> <div><br> </div> <div>The rotated and unscaled rectangle will not align with the non-rotated one with gridding.=C2=A0 Something about making a bitmap copy is offsetting the values, my guess is there's a rounding problem that is popping up on these objects, thus scale and rotation get offset for some reason, and specifically changes the origin by 1@-1 somewhere...it causes graphical glitches leaving 'garbage' with playfield indic= ators when the object that has the indicator is moved and also shows up with rotated ellipses.=C2=A0 What is the common thread through them all?=C2=A0 What method are they all accessing?</div> </div> <div class=3D"gmail_extra"><br> <div class=3D"gmail_quote">On Fri, Mar 2, 2018 at 10:45 AM, Jeremy Landry <span dir=3D"ltr"><<a href=3D"mailto:[email protected]"= target=3D"_blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord= er-left:1px #ccc solid;padding-left:1ex"> <div dir=3D"ltr">You will also notice if you rotate any shape, it becomes a bit map.=C2=A0 Scale it and you will see that problem re-occur even with built-in objects.=C2=A0 Could it b= e the masking offset, too?=C2=A0 that causes this?=C2=A0 I'= m still investigating, but I'm not sure how to step through 'already working' things specifically related to what= I'm trying to look at.</div> <div class=3D"m_1967303026115661652HOEnZb"> <div class=3D"m_1967303026115661652h5"> <div class=3D"gmail_extra"><br> <div class=3D"gmail_quote">On Fri, Mar 2, 2018 at 10:42 AM, Jeremy Landry <span dir=3D"ltr"><<a href=3D"mail= to:[email protected]" target=3D"_blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0= .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir=3D"ltr">Hi, it only appears when scaling a morph.=C2=A0 Here is example...it is my belief (how does one step through code with debugger if there's no bug happening?); <div><br> </div> <div>Whatever code is common that scales morphs is being offset incorrectly. The first image shows the 'garbage' left behind by playfi= eld indicator if that option is set.=C2=A0 It seems i= t was only tested in 'holders' and thus lik= ely not picked up during 'intended' use.=C2= =A0=C2=A0</div> <div><br> </div> <div>Next, two pictures show scaling as where the misalignment starts.=C2=A0 This might be why you could not recreate bug; resizing rectangle changes rectangle morph extent, whereas scaling is a differnet piece of code and therefore different outcome.</div> <div><br> </div> <div>Image included.=C2=A0 This works with *anythin= g* scaled.=C2=A0=C2=A0</div> <div><a href=3D"https://imgur.com/a/6zEWq" target= =3D"_blank">https://imgur.com/a/6zEWq</a><br> </div> </div> <div class=3D"m_1967303026115661652m_3011170771951225= 968HOEnZb"> <div class=3D"m_1967303026115661652m_30111707719512= 25968h5"> <div class=3D"gmail_extra"><br> <div class=3D"gmail_quote">On Fri, Mar 2, 2018 at 10:20 AM, Bob Arning <span dir=3D"ltr"><= ;<a href=3D"mailto:[email protected]" target=3D"_blank">arning315@comca= st.net</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"ma= rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div text=3D"#000000" bgcolor=3D"#FFFFFF"> <p><font face=3D"Georgia">I tried to recreate your example and could not. How did you create the two morphs in your example? Are you certain the read/gray morph does not have some transparent pixels along the top and left?</font><br> </p> <div> <div class=3D"m_1967303026115661652m_30= 11170771951225968m_3198776054015858061h5"> <br> <div class=3D"m_1967303026115661652m_= 3011170771951225968m_3198776054015858061m_-5490095820042152389moz-cite-pref= ix">On 3/2/18 12:50 PM, Jeremy Landry wrote:<br> </div> <blockquote type=3D"cite"> <div dir=3D"ltr">I did a little more digging, just for the record...and it turns out it'= s scaling error.=C2=A0 No matter what, scaling offsets morphs by 1@-1.=C2=A0 I'm still look= ing for where this occurs and why.=C2=A0 So far, injecting intentionally bad values into bordered morph and sketch classes hasn't produced any change.=C2=A0 It 'feels' = like most of that code isn't even used, but then again, I might not have genuinely created a new object with that code and system might have been giving me what was already in system... <div><br> </div> </div> <div class=3D"gmail_extra"><br> <div class=3D"gmail_quote">On Fri, Mar 2, 2018 at 7:15 AM, Bert Freudenberg <span dir=3D"l= tr"><<a href=3D"mailto:[email protected]" target=3D"_blank">bert@freu= denbergs.de</a>></span> wrote:<br> <blockquote class=3D"gmail_quot= e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir=3D"ltr"> <div class=3D"gmail_default= " style=3D"font-family:arial,helvetica,sans-serif;font-size:small;color:#00= 0000">That bug tracker is pretty much dead, since all ongoing development moved to <a href=3D"http:= //squeak.org" target=3D"_blank">squeak.org</a>.</div> <div class=3D"gmail_default= " style=3D"font-family:arial,helvetica,sans-serif;font-size:small;color:#00= 0000"><br> </div> <div class=3D"gmail_default= " style=3D"font-family:arial,helvetica,sans-serif;font-size:small;color:#00= 0000">The plan was to make a new Etoys release based on the latest Squeak source base, but we have not have enough developer time to make that actually happen.</di= v> <span class=3D"m_1967303026= 115661652m_3011170771951225968m_3198776054015858061m_-5490095820042152389HO= EnZb"><font color=3D"#888888"> <div class=3D"gmail_def= ault" style=3D"font-family:arial,helvetica,sans-serif;font-size:small;color= :#000000"><br> </div> <div class=3D"gmail_def= ault" style=3D"font-family:arial,helvetica,sans-serif;font-size:small;color= :#000000">- Bert -</div> </font></span> <div> <div class=3D"m_196730302= 6115661652m_3011170771951225968m_3198776054015858061m_-5490095820042152389h= 5"> <div class=3D"gmail_ext= ra"><br> <div class=3D"gmail_q= uote">On 1 March 2018 at 06:03, Nicco Kunzmann (rambler) <span dir= =3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">= [email protected]</a>></span> wrote:<br> <blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex"> <div text=3D"#000= 000" bgcolor=3D"#FFFFFF"> Hi,<br> <br> I found a bug tracker on the squeakland site:<br> <a href=3D"http:/= /tracker.squeakland.org/secure/Dashboard.jspa" target=3D"_blank">http://tra= cker.squeakland.org/<wbr>secure/Dashboard.jspa</a><br> <br> I think, you can describe the problem there as an issue and hand in the fix.<br> They may also know how to guide you further if the code base is somewhere else.<br> If you have problems there (login, no response), I guess, this mailing list is one place to ask for help.<br> <br> Best,<br> Nicco <div> <div class=3D"m_1= 967303026115661652m_3011170771951225968m_3198776054015858061m_-549009582004= 2152389m_-6539519090481828637h5"><br> <br> <div class=3D"m_1= 967303026115661652m_3011170771951225968m_3198776054015858061m_-549009582004= 2152389m_-6539519090481828637m_-1252469366745025355moz-cite-prefix">On 03/01/2018 03:34 AM, Jeremy Landry wrote:<br> </div> </div> </div> <blockquote type= =3D"cite"> <div> <div class=3D"m_1= 967303026115661652m_3011170771951225968m_3198776054015858061m_-549009582004= 2152389m_-6539519090481828637h5"> <div dir=3D"ltr">= Hi, while working on a project needing precise alignment of sketches/bitmaps and rectangles using playfield 'us= e gridding', it seems that there's a difference of detected origin. <div><br> </div> <div>Here's a screenshot with magnifier showing the discrepency.=C2= =A0=C2=A0</div> <div> <span><a hr= ef=3D"https://imgur.com/a/tcaRu" target=3D"_blank">https://imgur.com/a/tcaR= u</a></span> <br> </div> <div><br> </div> <div>I'm quit= e certain this bug is the one that causes bad redrawing, especially when showing a cursor move when 'indicat= e cursor' is activated in a playfield.</div> <div><br> </div> <div>If I correct this bug inside of a project, will it load into an image where it has not been fixed and be fixed?</di= v> <div><br> </div> <div>I haven'= t actually fixed the bug yet, but didn't want to waste time on it if the fix will not travel with the project.=C2=A0=C2= =A0</div> <div><br> </div> <div>Thanks in advance for any input.</div> </div> <br> <fieldset class= =3D"m_1967303026115661652m_3011170771951225968m_3198776054015858061m_-54900= 95820042152389m_-6539519090481828637m_-1252469366745025355mimeAttachmentHea= der"></fieldset> <br> </div> </div> <pre>____________= __________________<wbr>_________________ squeakland mailing list <a class=3D"m_1967303026115661652m_3011170771951225968m_3198776054015858061= m_-5490095820042152389m_-6539519090481828637m_-1252469366745025355moz-txt-l= ink-abbreviated" href=3D"mailto:squeakland-bD51WKytQuId/fn+uklp/[email protected]" target=3D"= _blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<wbr>g</a> <a class=3D"m_1967303026115661652m_3011170771951225968m_3198776054015858061= m_-5490095820042152389m_-6539519090481828637m_-1252469366745025355moz-txt-l= ink-freetext" href=3D"http://lists.squeakland.org/mailman/listinfo/squeakla= nd" target=3D"_blank">http://lists.squeakland.org/ma<wbr>ilman/listinfo/squ= eakland</a> </pre> </blockquote> <br> </div> <br> ______________________________<wbr>_________________<br> squeakland mailing list<br> <a href=3D"mailto= :squeakland-bD51WKytQuId/fn+uklp/[email protected]" target=3D"_blank">squeakland-bD51WKytQuIw/NuX6OR/[email protected]= land.or<wbr>g</a><br> <a href=3D"http:/= /lists.squeakland.org/mailman/listinfo/squeakland" rel=3D"noreferrer" targe= t=3D"_blank">http://lists.squeakland.org/ma<wbr>ilman/listinfo/squeakland</= a><br> <br> </blockquote> </div> <br> </div> </div> </div> </div> <br> ______________________________<wbr>_________________<br> squeakland mailing list<br> <a href=3D"mailto:squeakland@= lists.squeakland.org" target=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<wbr>= g</a><br> <a href=3D"http://lists.squea= kland.org/mailman/listinfo/squeakland" rel=3D"noreferrer" target=3D"_blank"= >http://lists.squeakland.org/ma<wbr>ilman/listinfo/squeakland</a><br> <br> </blockquote> </div> <br> </div> <br> <fieldset class=3D"m_19673030261156= 61652m_3011170771951225968m_3198776054015858061m_-5490095820042152389mimeAt= tachmentHeader"></fieldset> <br> <pre>______________________________= <wbr>_________________ squeakland mailing list <a class=3D"m_1967303026115661652m_3011170771951225968m_3198776054015858061= m_-5490095820042152389moz-txt-link-abbreviated" href=3D"mailto:squeakland@l= ists.squeakland.org" target=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<wbr>g= </a> <a class=3D"m_1967303026115661652m_3011170771951225968m_3198776054015858061= m_-5490095820042152389moz-txt-link-freetext" href=3D"http://lists.squeaklan= d.org/mailman/listinfo/squeakland" target=3D"_blank">http://lists.squeaklan= d.org/ma<wbr>ilman/listinfo/squeakland</a> </pre> </blockquote> <br> </div> </div> </div> <br> ______________________________<wbr>________= _________<br> squeakland mailing list<br> <a href=3D"mailto:[email protected]= nd.org" target=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<wbr>g</a><br> <a href=3D"http://lists.squeakland.org/mail= man/listinfo/squeakland" rel=3D"noreferrer" target=3D"_blank">http://lists.= squeakland.org/ma<wbr>ilman/listinfo/squeakland</a><br> <br> </blockquote> </div> <br> </div> </div> </div> </blockquote> </div> <br> </div> </div> </div> </blockquote> </div> <br> </div> </blockquote> <br> </div></div></div> </blockquote></div><br></div> --001a113f80e41f580905667464c6-- --===============0911884576804548963== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kc3F1ZWFrbGFu ZCBtYWlsaW5nIGxpc3QKc3F1ZWFrbGFuZEBsaXN0cy5zcXVlYWtsYW5kLm9yZwpodHRwOi8vbGlz dHMuc3F1ZWFrbGFuZC5vcmcvbWFpbG1hbi9saXN0aW5mby9zcXVlYWtsYW5kCg== --===============0911884576804548963==--