![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: EXCEPTION_ACCESS_VIOLATION Topic Summary: Exception being thrown by "for stdObj in current Module do" Created On: 22-Jan-2009 16:43 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Ron, Thanks! I will try that. Peace and Blessings, Nikki Louie - thanks for your comments as well. | |
![]() |
|
Hey! I'm getting the following error when running my script:
line 141: for stdObj in current Module do An unexpected error has occured: doors.exe caused an EXCEPTION_ACCESS_VIOLATION in door.exe at 001B:004B 79A6 Then the Dignostic Log appears. The script goes through a module which contains the path of other modules. It goes to those other modules and see if it has a certian attribute. If it doesn't then a message is printed that that specific module doesn't have the attribute. It work fine on a smaller list of modules but on the all inclusive list (which is about twice or more as long) but gets part way through and throws the exception. The point where it breaks is different almost each time which leads me to believe that it is running out of memory and that is causing the exception to be thrown at diffewrent points in its processing. Anybody have a similar situation? Anyway to fix it? Thanks! Peace and Blessings, Nikki |
|
![]() |
|
![]() |
|
Loop through your objects and shove the module names into a skip list.
Then loop through the skip list to open modules. remember to close each module after you have finished with it. Check that the module names are correct before attempting to open the module. You can do this using bool module(string name). Make sure that the module containing the names does not contain its own name! ------------------------- Tony Goodman Smart DXL limited www.smartdxl.com |
|
![]() |
|
![]() |
|
The 'current' module changes often when you open other modules. I'd say it changes 'irratically' because I haven't done the work to narrow down exactly when the current module changes (and I suspect it changes differently now than it doe back in v6 days).
Anyway, your loop has a major flaw, using 'current Module'. If the current module changes inside the loop, such as when opening another module, then when the loop gets back to the top the whole thing is messed up. That's like "For every passenger in My car" and then inside the loop selling the car and buying a new one; what does it mean to try to get the NEXT passenger in the NEW car? Instead use "For every passenger in the Toyota". Use: [Module mCurr = current; for obj in mCurr do{...}]. - Louie Aaaahhhh. SW engineers will recall the axium "Don't modify the loop variable inside the loop". No duh. |
|
![]() |
|
![]() |
|
Thanks, Tony!
All that you suggested is already being done. Is it possible that memory is just running out because of the size of the list? I don't get the exception on a smaller subset of the list. Peace and Blessings, Nikki |
|
![]() |
|
![]() |
|
Nikkia, I have a question for you. Is there any reason that you keep a module open after processing? Try closing modules when you don't need the module open any longer, then memory problem isn't as big of an issue.
|
|
![]() |
|
![]() |
|
Ron,
Each module is being closed after use. I think it has to do with the pure size of the list and that a stmt was printed after each module was processed. I just figured out yesterday that the violation doesn't occur when the print stmt is taken off for the same size list. Peace and Blessings, Nikki |
|
![]() |
|
![]() |
|
Suggest get rid of print statement and write output to a file which you can process at a later time.
Also, use buffers instead of strings to minimize use of memory. |
|
![]() |
|
![]() |
|
Ron,
Thanks! I will try that. Peace and Blessings, Nikki Louie - thanks for your comments as well. |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
EXCEPTION_ACCESS_VIOLATION
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.