Page 1 of 1

Loop aborts with no message why

Posted: Mon Nov 17, 2008 3:03 pm
by RodBarnes
Below is a simplified model of the job I began with (wish we could upload a DSX). I removed everything except the loop itself so that it could be demonstrated. Maybe someone is willing to try this and see if they can duplicate the behavior I am seeing -- or explain to me what I am missing as to why it is doing this. :? It is probably something obvious...

What happens when I run this, is that it aborts at iteration #257 with nothing more than the abort message. No indication of the stage that failed or anything else. When it does abort, it doesn't go through either of the nested conditions. I've tried various changes in the conditions and such but nothing seems to make a difference.

StartLoop (Start Loop, numeric): From = 1, Step = 1, To = 500

SetVar (User Variables): Value = @NULL

ChkNull (Nested Condition): Trigger null - IsNull(SetVar.Value), Trigger not_null - Otherwise

ChkZero (Nested Condition): Trigger GT_zero - SetVar.Value > 0, Trigger zero - Otherwise

Next (End Loop)

Continue (Sequence, Any)

Done (Sequence, All)


Vars

Code: Select all

StartLoop @---- Next @-- Continue
    |                      @    @
    |                      |     \
    |                      |    zero
    |                      |       \
    |                     null    ChkZero -- GT_zero -------@ Done
    |                      |       @
    |                      |      /
    |                      |   not_null
    @                      |    /
 SetVar ----------------@ ChkNull

Posted: Mon Nov 17, 2008 4:52 pm
by chulett
Hmmm... loop #257... one past #256... sounds suspiciously like an overflow problem to me. And it is! And there's a patch for it! Woohoo! :wink:

Details here including the eCase number to ask about.

Posted: Mon Nov 17, 2008 4:55 pm
by RodBarnes
Thanks, Craig. I noticed that same oddity (256 + 1) because, during earlier testing, I was able to get it to abort at 129 (128 + 1). I'll check out the patch.
chulett wrote:Hmmm... loop #257... one past #256... sounds suspiciously like an overflow problem to me. And it is! And there's a patch for it! Woohoo! :wink:

Details here including the eCase number to ask about.

Posted: Mon Nov 17, 2008 5:07 pm
by chulett
Only bit of fun with the fix is that it is a client-side patch that affects the code generated when the Sequence is compiled. That means if someone that doesn't have the patch ever compiles the job, it will go right back to being broken.