- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Fatal JMP16 bug
This isn't a question, just brining awareness to an issue that I recently noticed within my scripts since moving to JMP16 -- namely, I'd assume that Is Namespace( ... )
would not return a truthy value for a deleted namespace, but it does in JMP16.2 (but not in JMP14.3)
Because of this, the following script crashes JMP16.2:
ns = New Namespace();
ns:ns = New Namespace();
ns:ns << Delete Namespace();
Show( Is Namespace( ns:ns ) );
If( Is Namespace( ns:ns ),
ns:ns:__item__ = 4;
);
I've needed to modify my scripts to the equivalent of this to get around the issue:
ns = New Namespace();
ns:ns = New Namespace();
ns:ns << Delete Namespace();
Show( Is Namespace( ns:ns ) );
If( Is Namespace( ns:ns ) & !Is Missing( ns:ns << Get Name ),
ns:ns:__item__ = 4;
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Thanks very much for this information. A JMP developer has investigated and logged the issues you found so that they can be corrected in a future release!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Has this been reported to the JMP Support folks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Yeah, I reported it today as well. I'll post here any updates -- but I assume that the team is probably aware of the issue already.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Nice catch! Hope it isn't too late for the next 17 beta.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Namespace Exists() seems to return 0 for deleted namespace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
@jthi , it does for a bare namespace, but not when giving a scoped namespace as this shows:
ns = New Namespace();
ns:ns = New Namespace();
ns:ns << Delete Namespace();
Show( Is Namespace( ns:ns ) );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
I meant Namespace Exists() which seems to differ from Is Namespace (or maybe I'm missing something here)
Names Default To Here(1);
Clear Log();
Delete Namespaces();
ns = New Namespace();
ns:ns = New Namespace();
Show(Namespace Exists(ns:ns), Is Namespace(ns:ns));
ns:ns << Delete Namespace();
Show(Namespace Exists(ns:ns), Is Namespace(ns:ns));
/*Namespace Exists(ns:ns) = 1;
Is Namespace(ns:ns) = 1;
Namespace Exists(ns:ns) = 0;
Is Namespace(ns:ns) = 1;*/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Haha, I didn't read your post very carefully! You're right that this does seem to work, but I have a vague feeling that I didn't use this method for some reason in my code, although I cannot remember why right now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Actually I just remembered why -- Namespace Exists
will look at the value of the variable and tell you whether the value can represent a namespace, whereas Is Namespace
should tell whether the variable is directly a namespace or namespace reference:
Because of this, this code fails:
ns = New Namespace( "test ns" );
ns:item = "variable";
ns name = "test ns";
If( Namespace Exists( ns name ),
Show( ns name:item )
);
Whereas this doesn't:
ns = New Namespace( "test ns" );
ns:item = "variable";
ns name = "test ns";
If( Is Namespace( ns name ),
Show( ns name:item )
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Fatal JMP16 bug
Thanks for finding this. I was able to replicate this and I have submitted the report to JMP support for investigate.
Dan
JMP Product Management.