Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Skip List causing DXL runtime error w/o error line
Topic Summary: Skiplist of modules is run through, but no error line given when script exits at runtime
Created On: 18-Nov-2005 00:31
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by jason haury, on Tuesday, November 22, 2005 11:18 PM

Answer:
Thanks for the feedback Reik!

I re-implemented my whole script replacing the skiplists with arrays and even input files, but nothing worked. However, just minutes ago I found the solution. Apparently, DOORS will only run so many iterations of any combinations of loops, after which point it simply exits (as we saw in my script). To get around this, I simply added this one line:

pragma runLim, 2500000

Now it's all fixed!

Jason
 18-Nov-2005 00:31
User is offline View Users Profile Print this message


jason haury

Posts: 10
Joined: 13-Oct-2005

  • Hi All,
  • Essentially, I have a skiplist (using "createString") where the key is some Module nickname, and then the full name of the actual module (path and all). This skiplist serves as an input list to the main script which processes each module listed in the skiplist. I have several simple functions that count various "Stability" metrics on each of the modules in the skiplist. Each of these functions is passed a Module and returns an int. For example, my function shallCount() counts how many objects in the module have a "shall" in them (i.e.: "requirements"), and my function modifiedCount() returns how many requirements have been modified since the last baseline. There are 5 such functions, all of which are about 12 lines of code. The results of each function are reported to a CSV file, thus, I can tell where in the reporting process the script barfs.
  • So, all of the DXL is normally run in "batch" mode from a commandline. You can see an example of my functions, and also my main() (note that "report" is our homegrown syntax that just reports to a file).
  • Here's the problem I'm running into: as the script is running, it will exit with the following error:
  • -I- DXL: execution halted
  • No line number, no error discription, no nothin'. Here are some things I've come across in trying to debug this:
    1. I can take all of the functions that are run on each of the modules, and copy/paste that code into a DXL window when the module is opened manually, and the functions work perfetly
    2. If the script were to crash, say, on the 10th element in the skiplist, and I then comment out the first 9 elements that processed properly, then re-run the script, the "problem module" all of a sudden works fine
    3. If I comment out some given function and also the line in my main where I call the function, then often the script will crash at some different point (say, at the 13th module in the skiplist instead of the 10th).
    4. I checked to see that each item loaded into the skiplist was valid since put() returns a bool, I could make sure the skiplist creation was successful
    5. After putting a lot of "print" lines in my code to see exactly where the crash happened, it seems to die once it gets to the "for o in mod" loop of the functions. (as seen below)
    6. Are there any known problems with skiplists that would cause such behavior? Since the functions work on every module when run from a DXL window, that tells me the functions are fine. Since the point at which the script dies varies based on what modules in the skiplist are commented out, or what functions are commented out, it seems like the problem is something internal to the skiplist datastructure.
    7. Any clues? Jason

      Edited: 18-Nov-2005 at 00:40 by jason haury
  • Report this to a Moderator Report this to a Moderator
     21-Nov-2005 10:10
    User is offline View Users Profile Print this message


    Reik Schroeder

    Posts: 361
    Joined: 28-Jul-2003

    Hi Jason,

    I had a look into your code and found only some little things.
    May be, you should declare lastMod as Date ?!
    I'm not really sure, how the autodeclare mechanism in DOORs is working

    And in main function you loop through mySkipList and then use (string key srs_modules)
    --> usually this should run into an error (use of key function outside loop ?!).

    May be that helps to solve your problem,

    greetings
    Reik

    -------------------------
    Evosoft GmbH
    for Siemens Industry Sector


    Berlin, Germany
    Report this to a Moderator Report this to a Moderator
     22-Nov-2005 23:18
    User is offline View Users Profile Print this message


    jason haury

    Posts: 10
    Joined: 13-Oct-2005

    Answer Answer
    Thanks for the feedback Reik!

    I re-implemented my whole script replacing the skiplists with arrays and even input files, but nothing worked. However, just minutes ago I found the solution. Apparently, DOORS will only run so many iterations of any combinations of loops, after which point it simply exits (as we saw in my script). To get around this, I simply added this one line:

    pragma runLim, 2500000

    Now it's all fixed!

    Jason

    Edited: 22-Nov-2005 at 23:19 by jason haury
    Report this to a Moderator Report this to a Moderator
     23-Nov-2005 14:03
    User is offline View Users Profile Print this message


    Paul Worrall

    Posts: 87
    Joined: 30-Sep-2003

    Thanks for posting the solution Jason, I had tried to replicate your problem but without success.
    Report this to a Moderator Report this to a Moderator
     28-Nov-2005 19:53
    User is offline View Users Profile Print this message


    Louie Landale

    Posts: 2070
    Joined: 12-Sep-2002

    When running normally you'd get a DXL timeout dialog, offering to cancel, continue, or continue doubling the timeout. Batch mode offers no such user interaction so it ends.

    Production code should perhaps have "pragma runLim, 0" which means no timeout, although while debugging you may want a time out to help find infinite loop bugs.

    - Louie
    Report this to a Moderator Report this to a Moderator
    Statistics
    20925 users are registered to the Telelogic DOORS forum.
    There are currently 1 users logged in.
    The most users ever online was 15 on 15-Jan-2009 at 16:36.
    There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
    You have posted 0 messages to this forum. 0 overall.

    FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.