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: Suspected Bug for locking/unlocking in combination with links
Topic Summary:
Created On: 3-Sep-2008 16:40
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.
 3-Sep-2008 16:40
User is offline View Users Profile Print this message


Tobias Gündel

Posts: 5
Joined: 25-Jul-2007

Hello all,

I have tried to update some linked requirements to get the content from the head requirement there. So I created a module containing one section with three requirements (one which is filled and two to update).

Heading
- Req 1 (Inlink from Req 2, Req 3)
- Req 2 (Outlink from Req 1)
- Req 3 (Outlink from Req 1)

My code works fine until I tried it a second time. Since I used a DXL attribute Doors directly exited without a hint or error message. After this I reduced my code step by step to get the critical part. I identified the following part (still crashes when executing from Req 1). Anyone have an idea?

Thanks for your advice.

Edited: 3-Sep-2008 at 16:51 by Tobias Gündel
Report this to a Moderator Report this to a Moderator
 3-Sep-2008 21:11
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

This is attr-DXL?

You should use variable 'obj' instead of 'current Object'.

You need to make sure the source module is open before attempting to access the source object. In this case your variable 'oLinked' can easily be undefined, yet you don't check for that. Maybe these objects have more than the links than you described.

You are using Attr-DXL to unlock and save sections in another module??? Why on earth would you do that?

You don't seem to check if the source module is open Shareable; as is required for the lock-unlock commands.

I'm not too familiar with the lock-unlock commands, but you seem to be first locking the source object's section and then unlocking it. These commands will only work when there are in fact shared sections defined in the module.

I see no results from your DXL to place as the Attr-DXL value; obj.attrDXLName = <Results>.

Don't know why DOORS would exit without any ceremony. Consider placing 'noError' before the suspect code and then string ErrMess = lastError() afterwards, in an attempt to trap the errors.

- Louie
Report this to a Moderator Report this to a Moderator
 4-Sep-2008 07:23
User is offline View Users Profile Print this message


Tobias Gündel

Posts: 5
Joined: 25-Jul-2007

Hello,

I first used Attr-DXL, but Doors exited without any hint. So I run the code on the object (in this case Req 1) instead (so this is why there is a current object) and like I said I created a module containing my linked objects (which have only the Links I described) to avoid opening other modules with LinkRef (of course the complete code includes it). This module was prepared with share sections and was opened shareable.

If you ran the code manually you get the following error:

-R-E- DXL: <Line:4> An unexpected error has occurred: doors.exe caused an EXCEPTION_ACCESS_VIOLATION in module doors.exe at 001B:004C8999

-I- DXL: execution halted


and regarding to the Diagnostic lock:

DOORS: ASSERTION FAILED, Line 69, c:\ccm\ccm_wa\ukedersdb\ERS_Silver\silver_win32_sqa\products\DOORS\src\data\linkref.cpp: !"Internal error: linkref has a null tree"


I would not be such concerned since it works the first time...

PS: I only used a DXL- Attr for testing purpose, later the code will be triggered.


EDIT: The error occurs only if the source and target objects are in the same section otherwise it works fine.

Edited: 4-Sep-2008 at 07:40 by Tobias Gündel
Report this to a Moderator Report this to a Moderator
 4-Sep-2008 16:21
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Just a wild guess, but perhaps the lock and unlock commands somehow change the 'Current Object'. Add the following before the loop and at the bottom of the loop: print "Current = " identifier(currrent Object) "\n".

If it changes, then you should change your loop parameter as follows:
Object oCurr = current
for lnk in oCurr <-"*" do

- Louie
Report this to a Moderator Report this to a Moderator
 5-Sep-2008 08:16
User is offline View Users Profile Print this message


Tobias Gündel

Posts: 5
Joined: 25-Jul-2007

@Louie
Thanks for the hint, but unfortunatly it doesn't work

---

I opened a case and will report Telelogics answer.
Report this to a Moderator Report this to a Moderator
 5-Sep-2008 08:40
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

Tobias, I have no idea what it is you are trying to do, but my advice is NEVER change data automatically in another module, especially using attribute DXL. This is dangerous stuff. Just do changes in your current module and open others read-only.

Anyway, with regards to your code:

I suspect that messing with objects within the in-link loop is the cause of the errors. My experiments suggest that lock() and unlock() do not change the current object, but who knows what is going on in the depths of doors with regards to how it deals with links...

Change your code so that you get a list of source objects in a sklip list, then loop through the skip list.
Also, you should check for the section being locked before attempting to lock it, i.e. call isLockedByUser() then if not locked call lock().

P.S Bet you a penny that Telelogic's answer is the same as mine :-)

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com

Edited: 5-Sep-2008 at 08:43 by Tony Goodman
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.