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: DXL Exception_Access_Violation
Topic Summary: DXL random error
Created On: 14-Oct-2004 14:06
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 Louie Landale, on Monday, October 18, 2004 6:21 PM

Answer:
Be sure to open the baseline with explicit "Module", rather than letting it default to the 'current' one. Anyway, its possible I suppose that the baseline loop is getting confused. Two conditions come to mind [1] if you close the baseline within the loop. I don't THINK that will cause a problem, but it might. [2] you have another for baseline loop somewhere within the outside baseline loop. This WILL cause your exception violation since it resets the loop (golly, that took me 3 days to find once...). Look through your sub-functions. [3] you are changing the current module somewhere within the loop. Opening a baseline might do that. [4] "m" is really a baseline; don't know what a for b in b will do.

My votes are [] inner baseline loop, and [] current module problems.

Try this:
Skip skpBaselines = create
for b in m do
{ put(skpBaselines, b, b)
}
for b in skpBaselines do
{ open this baseline, yaddy yaddy
}
delete(skpBaselines)

- Louie
 14-Oct-2004 14:06
User is offline View Users Profile Print this message


Michelle Lee

Posts: 21
Joined: 14-Oct-2004

Hi,

I wrote a DXL scripts to go through a bunch of modules and their baselines to collect metrics. However I always (50% of the time, randomly) run into the following error:

An unexpected error has occurred: doors.exe caused an EXCEPTION_ACCESS_VIOLATION in module doors.exe

And always at the same line:

for b in m {                       //<-- THIS LINE!
...
...
}

Anybody has any idea what caused it and how to fix it?

Thanks!
Michelle
Report this to a Moderator Report this to a Moderator
 14-Oct-2004 14:40
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

The line should be

for b in m do {

though it should have caused a syntax error and not execute...odd!
Report this to a Moderator Report this to a Moderator
 14-Oct-2004 14:55
User is offline View Users Profile Print this message


Michelle Lee

Posts: 21
Joined: 14-Oct-2004

Oh you're right, it is

for b in m do{
}

I just made a typo because I manually typed in that line.

So back to the exception problem...
Report this to a Moderator Report this to a Moderator
 14-Oct-2004 15:28
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Just a wild stab in the dark...

if you're trying to write your metrics into a results module, the loading of a baseline will change the current module to that baseline, so any functions that imply "the current module" may be trying to write to the baseline.

However, I don't think you've given enough info/real code for anyone to help debug.


Edited: 14-Oct-2004 at 15:29 by Antonio Norkus
Report this to a Moderator Report this to a Moderator
 14-Oct-2004 17:06
User is offline View Users Profile Print this message


Michelle Lee

Posts: 21
Joined: 14-Oct-2004

I guess I wasn't looking for anybody to really debug my code but more like throw out possible cause for the error. I wouldn't want to paste my 1000 lines of code on this forum and put the burden on everybody.
With that said... here's the logic of my code:

Module currMod = current
...
...
for b in m do{
     //open baseline
     //collect metric
     // write output in currMod
}

I know the logic of my code is correct because when it doesn't crash my program (the other 50% of the time)... all the outputs are correct. Both the location of the output and the values of the output are correct. Just that every once in a while it would give me that EXCEPTION_ACCESS_VIOLATION error.

My guess is it has something to do with memory management... since I'm opening a lot of modules and their baselines in the code. I made sure I close all modules that I loaded... and deleted all skip lists. But that still didn't help.

Any ideas...?
Report this to a Moderator Report this to a Moderator
 14-Oct-2004 18:05
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

I doubt that this is a memory management issue.

The other day I got one with a line like...

string s = o."Object Test"

For some reason it didn't tell me that the attribute didn't exist, and just threw an exception instead.

Are you checking that m is not null before the for loop?
Report this to a Moderator Report this to a Moderator
 14-Oct-2004 18:25
User is offline View Users Profile Print this message


Michelle Lee

Posts: 21
Joined: 14-Oct-2004

Do I check it like this?

// get target module handle
m = read(targetAbsModName, false)
    
(current ModuleRef__) = m
       
if(m== null)
     ack "NULL!"

for b in m do
{
     ...
}

If yes then it still doesn't fix the problem. I have a related questions.. is there anyway to check if baseline b is loaded after the "for b in m do.." line? What if my program is trying to access the baseline before DOORS has a chance to open the baseline?

Thanks for all your replies!
Report this to a Moderator Report this to a Moderator
 15-Oct-2004 14:09
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
Be sure to open the baseline with explicit "Module", rather than letting it default to the 'current' one. Anyway, its possible I suppose that the baseline loop is getting confused. Two conditions come to mind [1] if you close the baseline within the loop. I don't THINK that will cause a problem, but it might. [2] you have another for baseline loop somewhere within the outside baseline loop. This WILL cause your exception violation since it resets the loop (golly, that took me 3 days to find once...). Look through your sub-functions. [3] you are changing the current module somewhere within the loop. Opening a baseline might do that. [4] "m" is really a baseline; don't know what a for b in b will do.

My votes are [] inner baseline loop, and [] current module problems.

Try this:
Skip skpBaselines = create
for b in m do
{ put(skpBaselines, b, b)
}
for b in skpBaselines do
{ open this baseline, yaddy yaddy
}
delete(skpBaselines)

- Louie
Report this to a Moderator Report this to a Moderator
 18-Oct-2004 18:23
User is offline View Users Profile Print this message


Michelle Lee

Posts: 21
Joined: 14-Oct-2004

Thank you so much Louie, your skip list solved my error. I guess somewhere along the inner loop DOORS got confused and lost track of which module it's in. The weird thing is it happens only 50% of the time and not all the time. But doesn't matter.. at least now it stop crashing.

Thanks! I really appreciate your help.

Michelle
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.