Re: [as3-signals] Error 1023 Stack overflow with as3-signals-v0.9-BETA

69 views
Skip to first unread message

Neil Manuell

unread,
Apr 18, 2013, 4:31:15 AM4/18/13
to as3-s...@googlegroups.com
Well, As the Signal Handler is dispatching the same Signal as it is listening too, its not really surprising that this is happening.
I imagine that the conditional is supposed to protect against this, but it is obviously at some point failing, and the condition is False twice in a row, and you are getting the StackOverFlow.

I suggest that what ever it is you are trying to do, there is probably a better and safer way of doing it.

Without more info, I can't really say more.

cheers


On 18 April 2013 09:24, Chetan Sachdev <cksa...@gmail.com> wrote:
I am using as3-signals-v0.9-BETA in a simple slide application. In my signal handler, I am dispatching the same signal again based on some conditions. The application throws an exception after a couple of hours on the signals dispatch method. Below is a stack trace:
Error: Error #1023: Stack overflow occurred.
 at com.chetansachdev.components::SlideDeck/onNextSlidePleaseEvent()[D:\cb-trunk\Solutions\Components\Slidelib\src\com\chetansachdev\components\SlideDeck.as:75]
 at org.osflash.signals::Slot/execute()[C:\Users\Robert\Documents\Flash\OSFlash\signals\as3-signals\src\org\osflash\signals\Slot.as:87]
 at org.osflash.signals::OnceSignal/dispatch()[C:\Users\Robert\Documents\Flash\OSFlash\signals\as3-signals\src\org\osflash\signals\OnceSignal.as:125]
 at com.touchguide.components::SlideDeck/onNextSlidePleaseEvent()[D:\cb-trunk\TouchSolutions\Components\Slidelib\src\com\touchguide\components\SlideDeck.as:89]
 at org.osflash.signals::Slot/execute()[C:\Users\Robert\Documents\Flash\OSFlash\signals\as3-signals\src\org\osflash\signals\Slot.as:87]
 at org.osflash.signals::OnceSignal/dispatch()[C:\Users\Robert\Documents\Flash\OSFlash\signals\as3-signals\src\org\osflash\signals\OnceSignal.as:125]
 ...
 ...

Method:
mysignal.add(mySignalHandler);

function mySignalHandler():void
{
    if(condition)
    {
       // do something here..
    }
    else
    {
        mysignal.dispatch();
    }
}


Can some one point me, what is wrong. When I am dispatching from the signal handler, is the stack getting created ? (I am not calling the method directly, I am dispatching a signal).

--
 
---
You received this message because you are subscribed to the Google Groups "as3-signals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to as3-signals...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Chetan Sachdev

unread,
Apr 19, 2013, 4:17:47 AM4/19/13
to as3-s...@googlegroups.com
Thanks for your answer Neil. After a couple of search, I found that there is no Async delaying, so the stack is getting created of my signal handler method. 
May I ask for a little help here.. I had explored your Finite state machine and I am looking for a Video recording of yours :) Could you share some of your presentations on Finite State Machines..

Thanks a lot in advance :)
Reply all
Reply to author
Forward
0 new messages