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: module not closed: invalid module
Topic Summary: DXL script error
Created On: 11-Dec-2007 11:27
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 Reik Schroeder, on Tuesday, December 11, 2007 1:40 PM

Answer:
Hi Lisa,

it seems that the module you want to close is already closed.
The attached code will reproduce the error when any module is opened.

Greetings
Reik
 11-Dec-2007 11:27
User is offline View Users Profile Print this message


Lisa Carver

Posts: 61
Joined: 15-Jun-2005

Hi there

Has anyone come across this error before please?
I can't figure out why I am getting this.

My script loops through the modules in the database, performs actions, and closes them. It appears to get to the end, and throw this error.
I've not had this before with similar loops.

Any help appreciated.

Thanks
Report this to a Moderator Report this to a Moderator
 11-Dec-2007 11:36
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Answer Answer
Hi Lisa,

it seems that the module you want to close is already closed.
The attached code will reproduce the error when any module is opened.

Greetings
Reik

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


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 11-Dec-2007 13:41
User is offline View Users Profile Print this message


Lisa Carver

Posts: 61
Joined: 15-Jun-2005

Hi there

I think that explains it, looking at the code again.

Many thanks
Report this to a Moderator Report this to a Moderator
 11-Dec-2007 20:34
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Know that when you open a formal module, even invisibly, you also open all the link modules associated with outlinks from that module. When you close the formal module the link module is also closed.

Actually, there is a 'count' of open references for the link module which increases with each open formal module keeping it open. When you open a formal the count is incremented for each of its link modules. When you close the formal the count is decremented, when it reaches zero its closed also.

So, if you loop through 'all' the modules in the database you are also looping through the open link modules. But they may close when you close a formal and I believe that will mess up the loop.

Instead, try something like the attached, which stages the modules you care about in a Skip.

- Louie
Report this to a Moderator Report this to a Moderator
 12-Dec-2007 16:11
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I routinely check that the module handle is non-null and that the module is open before closing it.

// Something like this
if (!null m)
{
if (open(module fullName m))
{
close(m)
}
}

Before using any variable of type Module, Item, Object etc you should check for null.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.