![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: null Object parameter from filter Topic Summary: Created On: 25-Sep-2007 21:35 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Didn't see the smoking gun, but do see some problems with the DXL. Your first Attr DXL 'InLinks' has a serious bug that could easily cause a 'null object parameter' problem. The 'object(absNo, srcRef) command only finds Objects when they are currently displayed. Such objects aren't displayed when they are filtered out, and you are doing filtering out. You need a 'if (!null src_obj)' statement before using identifier src_obj. However, the offending lines are not a line 16, as in your original email. Rats. The 2nd AttrDXL 'OutLinks' has a similar problem. I'd stage Object trg_obj = target(l) and check to see if its null before using the identifier command. Both the above DXL also should use "obj.attrDXLName = " to set the value of the attribute. Also, attrDXL gets recalculated when the value is null. Thus, to prevent constant recalculation when the calculation results in null, attrDXL should routinely do the following: if (null Results) obj.attrDXLName = " " // turn null into a space else obj.attrDXLName = Results The Layout in 'Compliance View' Column: 4 has a similar problem, in what I count as line 15: its possible that while there is a link that you cannot see the 'sourceObject' and it may be null. Ditto for the next layout. Well, I was expecting to see some AttrDXL that did some odd filitering but don't see it. Perhaps those DXL errors are generated in a different linked module. Perhaps the Layouts above are opening new modules when they run, and they run due to a change in the filter that you are executing. Sorry, I'm still stumped. - Louie | |
![]() |
|
Sent this one to Telelogic, but I thought I'd ask here as well to see if anyone else has experienced this. Basically on some of our modules, the first time I create filter in the module, I get the following DXL error:
-R-E- DXL: <Line:16> null Object parameter was passed into argument position 1ffice -I- DXL: execution halted ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Have you tried using a different PC?
------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
quote: Yup...one my users actually found the error while running my script....had to picke one of the 700 modules that I didn't test...lol ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Post the DXL
|
|
![]() |
|
![]() |
|
quote: I don't think its my code, because I get the same error when I try to do the filter using the DOORS dialog box. In my code I've gotten it down to the the "set (m, f, accepted, rejected)" function call that causes the error. But like I said....The GUI gives me the same problem. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Scott,
I seem to remember from previous posts that you use a very customized DOORS startup. Can you reset it so that HOME isn't on the network? Maybe find another PC, install DOORS on it from scratch, connect to your database without any customization, and run the filter? My belief is that if you do the above, it will work. This is a client-side issue and not a database-side issue, it sounds to me. ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
quote: Tried a clean install of the client and still having the same issue......not a customization problem. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Wow. I'm very surprised by that.
So what if you have a view that already has a filter applied? Do you get an error message every time you switch to a view like that? I'm just asking out of curiosity. I'm all out of troubleshooting ideas and hope that Telelogic is able to figure this one out if someone else here can't. ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
By the way, I modified your code slightly so it would run, and ran it on DOORS 8.2 with no issues. It worked fine.
It's not a DXL problem, as I'm sure you know. ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
quote: I haven't tried switching to a view that has a filter yet. I'll give it a shot here in a few. I did fix the issue in my script, by using contains instead of contents when setting up the filter. I was only using contents previously, because the documentation said you could use regular expressions with "contents", but didn't specify if you could use them with "contains". I decided to just give it a try, knowing the poor documentation standards Telelogic has and it worked. Also sped the script up quite a bit, which is nice. It seems to only give me the error when in DXL I use the "contents" function or in the GUI when I use "Any string or text attribute", which are basically the same. If I pick a specific attribute on the GUI, i.e. Object Text, I don't get the error. As a note the default view does not have any filter applied to it. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
quote: Heh...well that was only part of the larger script, Louie requested the script and I figured it would be easier to just post the part that was causing the problem. The whole script worked fine, it just produced these errors. I was pretty confident it wasn't a script error as I was able to reproduce the error on the DOORS filter dialog. My biggest concern is a corrupt module, because I only received the errors on specific modules, the same ones every time. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Lets start again. You've got some DXL running in the module that has a problem. Run the attached DXL that finds all the AttrDXL, LayoutDXL, and Trigger DXL in the module. Post the results and we'll try to find the offending line.
- Louie Edited: 26-Sep-2007 at 20:34 by Louie Landale |
|
![]() |
|
![]() |
|
quote: Here's the results:
>>>>>>>>>>> Results Follow <<<<<<<<<<<<<< >>>>>>>>AttrDXL 'InLinks': /* Displays source tag for incoming links */ LinkRef lref string displaystr = "" bool first=true setCacheState_ on for lref in obj<-"*" do { if (!first) then displaystr = displaystr "\n" string sMod = fullName(source(lref)) // Get full Name Module srcModule = read(sMod, false) // Get the module Object src_obj = object(sourceAbsNo(lref), srcModule) // Get the source object displaystr = displaystr identifier src_obj first = false } setCacheState_ off obj."InLinks" = displaystr >>>>>>>>AttrDXL 'OutLinks': /* Displays target tags for outgoing links */ Link l string displaystr = "" bool first = true ModName_ targetMod setCacheState_ on for l in obj->"*" do { targetMod = target l if (!open(targetMod)) then read(fullName(targetMod),false) if (!first) then displaystr = displaystr "\n" displaystr = displaystr identifier target(l) first = false } setCacheState_ off obj."OutLinks" = displaystr >>>>>>>>LayoutDXL ' Full InLink Analysis' Column: 2 /* Use this dxl code to create a 'Req Tag' column in your view that shows the ObjectID only is the object is a requirement, or the absolute objet number (object ID without prefix) for a non requirement Script expects an object attribute called 'Req' with an enumerated type of [N,Y,D]. */ string s = obj."Req" if ( s != "N" ) { s = identifier(obj) } else { s = obj."Absolute Number" "" } display s >>>>>>>>LayoutDXL ' Full InLink Analysis' Column: 5 // Trace analysis across all modules (both open and closed) /* A first-level analysis of all in-links is performed - displaying the source module, source object identifier and other attribute information for each. If you intend to modify functionality then make a copy of the original file and change the include statement below. */
// includes #include <layout/actual/trace_all_detailed.inc> >>>>>>>>LayoutDXL ' Full OutLink Analysis' Column: 2 /* Use this dxl code to create a 'Req Tag' column in your view that shows the ObjectID only is the object is a requirement, or the absolute objet number (object ID without prefix) for a non requirement Script expects an object attribute called 'Req' with an enumerated type of [N,Y,D]. */ string s = obj."Req" if ( s != "N" ) { s = identifier(obj) } else { s = obj."Absolute Number" "" } display s >>>>>>>>LayoutDXL ' Full OutLink Analysis' Column: 5 // Impact analysis across all modules (both open and closed), including OLE objects in display /* A first-level analysis of all out-links is performed - displaying the target module, target object identifier and other attribute information for each. If the target object has no heading but has object text, any OLE objects in the text will be displayed. Note that having many OLE objects in a display can affect performance. If you intend to modify functionality then make a copy of the original file and change the include statement below. */
// includes #include <layout/actual/impact_all_detailed_ole.inc> >>>>>>>>LayoutDXL ' SD Peer Review' Column: 4 /* Use this dxl code to create a 'Req Tag' column in your view that shows the ObjectID only is the object is a requirement, or the absolute objet number (object ID without prefix) for a non requirement Script expects an object attribute called 'Req' with an enumerated type of [N,Y,D]. */ string s = obj."Req" if ( s != "N" ) { s = identifier(obj) } else { s = obj."Absolute Number" "" } display s >>>>>>>>LayoutDXL ' SD Peer Review' Column: 6 string s = obj."Change Reason" display s
>>>>>>>>LayoutDXL ' SD Traceability Review' Column: 2 /* Use this dxl code to create a 'Req Tag' column in your view that shows the ObjectID only is the object is a requirement, or the absolute objet number (object ID without prefix) for a non requirement Script expects an object attribute called 'Req' with an enumerated type of [N,Y,D]. */ string s = obj."Req" if ( s != "N" ) { s = identifier(obj) } else { s = obj."Absolute Number" "" } display s >>>>>>>>LayoutDXL ' SD Traceability Review' Column: 6 // Impact analysis across all modules (both open and closed), including OLE objects in display /* A first-level analysis of all out-links is performed - displaying the target module, target object identifier and other attribute information for each. If the target object has no heading but has object text, any OLE objects in the text will be displayed. Note that having many OLE objects in a display can affect performance. If you intend to modify functionality then make a copy of the original file and change the include statement below. */
// includes #include <layout/actual/impact_all_detailed_ole.inc> >>>>>>>>LayoutDXL 'Compliance View' Column: 4 string outputString = "" Object sourceObject LinkRef SWVCInLinkRef Link SWVCInLink ModName_ sourceModuleName Module sourceModule for SWVCInLinkRef in obj <- "/SmartDeck Cert1/2 Software/DCU/Verification Cases/DCU Verification Links" do { sourceModuleName = source ( SWVCInLinkRef ) sourceModule = read ( fullName ( sourceModuleName ) , false ) } for SWVCInLink in obj <- "/SmartDeck Cert1/2 Software/DCU/Verification Cases/DCU Verification Links" do { sourceObject = source ( SWVCInLink ) outputString = outputString sourceObject."Object Heading" "\n" } display outputString >>>>>>>>LayoutDXL 'Compliance View with MPS Req Tests' Column: 4 string outputString = "" Object sourceObject LinkRef SWVCInLinkRef Link SWVCInLink ModName_ sourceModuleName Module sourceModule for SWVCInLinkRef in obj <- "/SmartDeck Cert1/2 Software/DCU/Verification Cases/DCU Verification Links" do { sourceModuleName = source ( SWVCInLinkRef ) sourceModule = read ( fullName ( sourceModuleName ) , false ) } for SWVCInLink in obj <- "/SmartDeck Cert1/2 Software/DCU/Verification Cases/DCU Verification Links" do { sourceObject = source ( SWVCInLink ) outputString = outputString sourceObject."Object Heading" "\n" } display outputString >>>>>>>>TriggerDXL-Mod none found >>>>>>>>TriggerDXL-Prj 'ChngControl2': Object o = current Module m = current
if (canModify(o)) { // no need to run the script if user does not have write access if ((exists attribute "Review #") && (exists attribute "Change Reason")) { string reason = o."Change Reason" int rev = o."Review #" // commenting out review # check in case we want it back later - M.Space // if ((rev > 0) || (reason != null)) { DB d = create (current Module, "Input Required") DBE tf void okCB(DBE option) { // make sure usable text is entered string entry = get tf bool usable = true int i if (null entry) usable = false for (i=0; i<length(entry); i++) { if (!(isdigit entry)) { usable = false break } } if (usable && (intOf(entry)>0)) { string tempStr = "SCR" entry int len = length(tempStr) if (reason == null) { // just copy the text in if there wasn't text to begin with o."Change Reason" = tempStr } else { // check to see if it's the same SCR as last time (no need to duplicate) if (reason[0:len-1] != tempStr) { o."Change Reason" = tempStr "\n" reason // add new SCR to the beginning of the string } } o."Review #" = 0 set trigPreConPass release d hide d refresh (current Module) } else { string ackStr = "This requirement can only be changed by an SCR." ack ackStr set trigPreConFail } } void cnclCB(DBE cncl) { set trigPreConFail release d hide d } label(d, "Please specify SCR#: ") beside d tf = field(d, "", "0", 5, false) set (tf, okCB) void dummyCB (DB d){} below d DBE ok = button(d, "OK", okCB) beside d DBE cncl = button(d, "Cancel", cnclCB) close(d, false, dummyCB) block d // commenting out review # check in case we want it back later - M.Space //} } } >>>>>>>>TriggerDXL-Database none found ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
I'm not sure exactly when 'tempStringOf' is appropriate, but thought it was only when the resulting string was going be used outside a variable, such a print statement or assignment to an attr-value. In this case I suspect that the Filter 'f' will actually have the address of the buffer rather than the contents defined, and since the buffer is deleted before the 'set' command, the filter won't apply correctly.
As such, I'd be tempted to replace 'tempStringOf' with simply 'stringOf' when using the result in a call to 'contents'. Perhaps someone who really understands 'tempStringOf' will contradict me. - Louie |
|
![]() |
|
![]() |
|
I haven't had any with using tempStringOf like I have. The script still runs and does what it is supposed to do as well, I just get the error in the dialog box. My understanding of tempStringOf is that it won't add an entry in the String Table where as stringOf will. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
It's not entirely clear from me reading your post, Scott, but does this error come up from a clean start of DOORS? Not what I was talking about earlier, but rather does it only occur after the DXL gets run?
In other words, you boot up your PC, sign in, start DOORS, and in the GUI run the filter...do you get the error? If so, that points to module corruption. ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
quote: Aye, clean start of DOORS and the PC, create filter before running the DXL, still get the error. Weird thing is I archived one of the modules and sent it to Telelogic and they can not duplicate the problem..... ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Didn't see the smoking gun, but do see some problems with the DXL.
Your first Attr DXL 'InLinks' has a serious bug that could easily cause a 'null object parameter' problem. The 'object(absNo, srcRef) command only finds Objects when they are currently displayed. Such objects aren't displayed when they are filtered out, and you are doing filtering out. You need a 'if (!null src_obj)' statement before using identifier src_obj. However, the offending lines are not a line 16, as in your original email. Rats. The 2nd AttrDXL 'OutLinks' has a similar problem. I'd stage Object trg_obj = target(l) and check to see if its null before using the identifier command. Both the above DXL also should use "obj.attrDXLName = " to set the value of the attribute. Also, attrDXL gets recalculated when the value is null. Thus, to prevent constant recalculation when the calculation results in null, attrDXL should routinely do the following: if (null Results) obj.attrDXLName = " " // turn null into a space else obj.attrDXLName = Results The Layout in 'Compliance View' Column: 4 has a similar problem, in what I count as line 15: its possible that while there is a link that you cannot see the 'sourceObject' and it may be null. Ditto for the next layout. Well, I was expecting to see some AttrDXL that did some odd filitering but don't see it. Perhaps those DXL errors are generated in a different linked module. Perhaps the Layouts above are opening new modules when they run, and they run due to a change in the filter that you are executing. Sorry, I'm still stumped. - Louie |
|
![]() |
|
![]() |
|
Yes, tempStringOf doesn't put anything in the string table and that's the reason to use it; but if it needs to be in the string table. The attached shows what happens when you use tempStringOf to assign to a variable. Notice that string variable B gets modified when you change the buffer. I wonder what you'd get if you deleted(buf) and then printed B.
- Louie |
|
![]() |
|
![]() |
|
quote: AH HA!!!!!! Louie you nailed!!!! The InLinks DXL Attr line 16 is what was causing the problem. "displaystr = displaystr identifier src_obj". You may have miscounted because line 1 of the DXL is blank making it look like line 15 in the output. I put the if statement in there and it the problem is fixed..... ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
null Object parameter from filter
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.