[Cuis-dev] Debugger Bug - Through can make system to hang up

Hernan Wilkinson hernan.wilkinson at 10pines.com
Thu Dec 5 04:38:31 PST 2019


Hi Santiago,
 thank you for the error report! now that we can reproduce it, it will be
easier to solve it.
 About the change you suggested, sadly we can not integrate it because it
breaks other things related to how SUnit works.

Thanks!
Hernan.

On Wed, Dec 4, 2019 at 7:55 PM Santiago Dandois via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi, everyone
>
> 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.
>
> *Reproducing the bug*
>
> To reproduce the bug, you can:
> 1. Create a class BugTests that sub-classifies TestCase
> 2. Make a test with the code:
>     self fail.
> 3. Run the test, which should open the debugger since the test fails.
> 4. Click "Restart"
> 5. Click "Through"
>
> The system should hang.
>
> *Research made*
>
> After making some research, I found out that the problem comes from
> Process>>stepToHome: context method.
>
> 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.
>
> 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.
>
> It is for this reason, that the stepToHome loop never finishes.
>
> *Quick Solution*
>
> 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.
>
> I've attached the change to TestFailure.
>
> I hope you find this contribution useful.
>
> Cheers, Santiago
>
>
>
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191205/849beb21/attachment.htm>


More information about the Cuis-dev mailing list