![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: The DEFVAL of DEATH!!! Topic Summary: Just accessing the defval property crashes system. Created On: 27-Jun-2007 17:09 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: The "NULL STRING" of DEATH!!!! Telelogic support has seen this problem before and pointed out that if the null string at LINE #8 is removed, then the problem do not occur. So changing the defval call from... deathVariable = ad.defval "" // <- THE NULL STRING OF DEATH!!! ....to.... deathVariable = ad.defval // <- NO "NULL STRING" IS GOOD I checked this workaround out and it works on my system (no more crashing even when selecting "EDIT->ATTRIBUTE"). Many thanks to the posters for their input. | |
![]() |
|
Module mm = current
AttrDef ad for ad in mm do { string deathVariable = "" string aname = ad.name "" if (ad.defval) { //If I uncomment the next line, the system crashes at the print line!!! //deathVariable = ad.defval "" // <- THE DEFVAL OF DEATH } if (ad.module) { if (ad.defval) { print "Attribute: " aname ":\tvalue=" (mm.aname "") "\n" //<-CRASHES HERE! } } } I have a module in which running the above code (with Line#8 commented out) it will work fine. However, when the "ad.defval" call is added (just uncomment line #8), the system crashes. Another bizarre thing is that it does not crashes at line 8 but at line 12. Am I doing something wrong here? That's why this post is named "the defval of death". //Notes // 1) Uncommment the deathVariable at line#8 and the module crashes at line #12! // 2) The session is completely corrupted, you need to restart in order to set things straight. // 3) Doors disappears completely. No way to capture the error message. // 4) Notice that the deathVariable is not used anywhere else in the program. //if you get this // -R-E- DXL: <Line:4> null Attribute Def do loop parameter was passed // -I- DXL: execution halted // you need to open a module in order to run the code |
|
![]() |
|
![]() |
|
Submit a bug report. And run it again with the line uncommented so it fails, but this time at the beginning of your loop print out the name of the attribute. That way you know which attribute it is failing on and can report it.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Hi David,
Thanks for responding so quickly. However, you might have miss the part of post at the bottom (under notes) that mentioned that DOORS disappears completely. That is, the DOORS session vanish completely. So it is impossible to find out which attribute was being accessed when the error occurred. However, I would like to know if your system behaved the same way. I know I am asking alot as nobody like their system to crash (even temporarly). Again, thanks for the quick response. Regards, Norberto |
|
![]() |
|
![]() |
|
Log the name of each attribute to a log file.
I ran it with two attributes that have default values (both enumerated string attributes). I didn't get a crash but for some reason, the default value of each that I got was "31 December 1969". Of course neither attribute was a module level attribute. I use DOORS 8.1. I would definitely submit this as a bug. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 27-Jun-2007 at 18:35 by David Pechacek |
|
![]() |
|
![]() |
|
One thing that does happen is after I run your code with line 8 uncommented, and I go to Edit->Attribute, DOORS has an unexpected error occur with the following trace.
Unfortunately the files are encrypted so I can't debug it at all. I'll be submitting a bug report. MBU_AACT--R-E- DXL: <standard/column/AttributesTabRefresh.inc:75> An unexpected error has occurred: doors.exe caused an EXCEPTION_ACCESS_VIOLATION in module doors.exe at 001B:005C24F8 Backtrace: <standard/column/AttributesTab.inc:186> <standard/column/showColsAttrTypesDialog.dxl:291> <standard/column/EditAttributes.dxl:10> -R-F- DXL: <standard/column/AttributesTabRefresh.inc:75> internal error, please submit a bug report Backtrace: <standard/column/AttributesTab.inc:186> <standard/column/showColsAttrTypesDialog.dxl:291> <standard/column/EditAttributes.dxl:10> -R-E- DXL: <standard/column/AttributesTabRefresh.inc:75> An unexpected error has occurred: Unspecified Failure Backtrace: <standard/column/AttributesTab.inc:186> <standard/column/showColsAttrTypesDialog.dxl:291> <standard/column/EditAttributes.dxl:10> -I- DXL: execution halted ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
I also submitted a bug report.
Telelogic support were not able to reproduce my symptoms. However, they got your symptoms, where Doors crashes when they select "Edit->Attribute" after running the death code. It is consistant behavior. I am guessing that we may have different version of Doors. My version is 8.1.0.6 Build 81112. My guy is escalating the issue to the next support level. Lucky for us, restarting the DOORS session make the crashing problem go away. Thanks one more time for looking into this issue. |
|
![]() |
|
![]() |
|
You have the same version of DOORS as me. I just didn't have any module level attributes with a default value.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Attached code is easier to read than embedded code.
I tweaked the code, see at the bottom of this post.. If DOORS exixts completely, then change my print deathVariable to an infoBox command. Root Cause: I have noticed with considerable chagrin that property addrdef 'defval' is type bool (does the attr have a default value), and its ALSO of type whatever the type of the attribute is, perhaps string, bool, or real. As the comments say (v8.1 DXL manual page 374 Attr Def properties, 'always assign the result to a variable of the correct type for the attribute'. In this case, your 'deathVariable = ad.defval ""' fails because ad.defval is the wrong type; in my case it should be boolean. Its hard to believe the original QSS wrote that into DOORS, but its somewhat believable that they haven't done anything about it in order to preserve backward compatibility. I created a module level boolean attribute aa with a default value of false. I ran the code. I notice that there is one print statement before the exception violation, and it shows attribute 'aa' has default value [31 December 1969], which is a very curious value for a boolean attribute. Obviously, DXL is getting confused over direct-indirect addressing of incorrectly typed data. Once it does that the dxl is doomed. Now I wrote a function GetDefVal to retrieve the default value of an attribute, if any. See attached. I notice it returns 'true' for the aa attribute above; I don't know what to do about that. The root cause of that is because when "ad.defval' is typed boolean, it returns whether the attribute has a default value (true), and not what that boolean default value is (false). THAT's the bug, there is no way to retrieve the default value of a boolean attribute. - Louie // -------- Tweaked Code --------- Module mm = current AttrDef ad for ad in mm do { string deathVariable = "" string aname = ad.name "" if (ad.defval) { //If I uncomment the next line, the system crashes at the print line!!! deathVariable = ad.defval "" // <- THE DEFVAL OF DEATH print aname "\t[" deathVariable "]\n" } if (ad.module) { if (ad.defval) { print "Attribute: " aname ":\tvalue=" (mm.aname "") "\n" //<-CRASHES HERE! } } } |
|
![]() |
|
![]() |
|
Hi @all,
Louie is right, that the problem is caused by a type mismatch. Doors is really sensitiv with that topic, esspecially with string and int. You should know that all types beginning with a capital letter are handled like pointers - all beginning with small letter are basic types. @Louie: It is possible to get default value of boolean attribute, but only with "hack" ![]() So we can save the time of support team to handle the more critical things ![]() Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
The "NULL STRING" of DEATH!!!!
Telelogic support has seen this problem before and pointed out that if the null string at LINE #8 is removed, then the problem do not occur. So changing the defval call from... deathVariable = ad.defval "" // <- THE NULL STRING OF DEATH!!! ....to.... deathVariable = ad.defval // <- NO "NULL STRING" IS GOOD I checked this workaround out and it works on my system (no more crashing even when selecting "EDIT->ATTRIBUTE"). Many thanks to the posters for their input. |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
The DEFVAL of DEATH!!!
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.