<div dir="ltr">Hi Santiago,<br><div> thank you for the error report! now that we can reproduce it, it will be easier to solve it.</div><div> About the change you suggested, sadly we can not integrate it because it breaks other things related to how SUnit works.</div><div><br></div><div>Thanks!</div><div>Hernan.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 4, 2019 at 7:55 PM Santiago Dandois via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, everyone<div><br></div><div>I wanted to report a bug (which I found in unfortunately circumstances, during an exam). This can make the image freeze, and in some cases, you end up loosing your unsaved changes.</div><div><i><br></i></div><div><i>Reproducing the bug</i></div><div><br></div><div>To reproduce the bug, you can:</div><div>1. Create a class BugTests that sub-classifies TestCase</div><div>2. Make a test with the code:</div><div> self fail.</div><div>3. Run the test, which should open the debugger since the test fails.</div><div>4. Click "Restart"</div><div>5. Click "Through"</div><div><br></div><div>The system should hang.</div><div><br></div><div><i>Research made</i></div><div><i><br></i></div><div>After making some research, I found out that the problem comes from Process>>stepToHome: context method.</div><div><br></div><div>This method basically makes the suspendedContext to step many times in a loop, until the suspendedContext and aContext "home contexts" are the same. The problem comes when suspendingContexts execution signals an Exception, in which case, suspendedContext and aContext home are never equal. Luckily, there is "a really nice if" which, long story made short, checks if an UnhandledError has been signaled, in which case, the method returns the context in which was signaled.</div><div><br></div><div>Now, there is another issue. TestCase>>fail signals a TestFailure exception, which sub-classifies Exception, but as opposed to Error, the defaultAction is not to signal an UnhnadledError, but to to open the debugger.</div><div><br></div><div>It is for this reason, that the stepToHome loop never finishes.</div><div><br></div><div><i>Quick Solution</i></div><div><i><br></i></div><div>A quick solution I found was to change TestFailure>>defaultAction to be the same that Error>>defaultAction. However, with this solution, the problem will rise again every time a Exception implements its defaultAction method doing something else.</div><div><br></div><div>I've attached the change to TestFailure.</div><div><br></div><div>I hope you find this contribution useful.</div><div><br></div><div>Cheers, Santiago</div><div><br></div><div><br></div><div><br></div><div><br></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></span></strong></span></div><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></span></strong></span></div><div><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div></div></div></div></div>