On Oct 15, 2014, at 2:30 AM, Philippe de Rochambeau <phi...@free.fr> wrote:

> Hi,
> 
> here’s the TCL script that causes the crash I reported yesterday.
> 
> If you remove all comments, BRL-CAD doesn’t crash.

Aha, that’s the key.  Those line-continuation slashes at the end of the line 
make that all a one-liner and those comment characters are literally embedded 
in the middle of the definition (i.e., it is literally this: "put sk0.sk … SL { 
{ line S 0 E 1 } { line S 1 E 2 } #{ line S2 E 3} #{ line S 3 E 0 } }”).  That 
is a case of bad input giving a bad result.  Moreover, the put command was 
actually never intended to be a user command — it just sort of shook out as an 
easy cop-out way to perform some operations.  There really should be a sketch 
command that lets you create and edit sketches instead of having to resort to 
get/put. 

Regardless, it obviously still shouldn’t crash and we should fix it.  It should 
never crash.  Perhaps someone can test whether our latest version (any 
platform) still exhibits undesirable behavior on this case?

Preventing just the crash is probably easy.  The put command should be aborted, 
ideally with an informative message about invalid syntax/parsing.  I suspect 
the reason it’s crashing is because it’s creating a partially initialized 
sketch structure that is basically invalid.

Cheers!
Sean


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to