ScriptUO

Scripting Resources & Utilities => ScriptUO Application => Bug discussion => Topic started by: 12TimesOver on July 01, 2008, 06:03:23 AM

Title: Version 181 crash
Post by: 12TimesOver on July 01, 2008, 06:03:23 AM
Task: Running Syntax Checker on Cyberpope's Mining Radar 4.1c
Issue: While running the Syntax Checker ScriptUO crashed
Error: Standard Microsoft "App has encountered an error, do you want to report to Microsoft" with the Debug button. Clicking Debug gives the error "An unhandled exception ('System.FormatException') occurred in ScriptUO_v181.exe"

I went ahead and Debugged using Visual Studio 2005 Debugger (included with SQL 2005) but not really helpful:
Code: [Select]
System.FormatException was unhandled
Message: Input string was not in a correct format.


Contents of ScriptUO Debug Panel (CP's script "issues"):
Code: [Select]
Method count: 55
Command count: 55
*** Pass 1 - Label accounting:
*** Warning - Tag +Examples: - Line 1223 already exists.  First occurance: 1219
*** Error - Subroutine DBarea - Line 3480 nested without return.
*** Warning - Tag ;purpose: - Line 3904 already exists.  First occurance: 3823
*** Warning - Tag ;@returns: - Line 3907 already exists.  First occurance: 3825
*** Warning - Tag ;purpose: - Line 3991 already exists.  First occurance: 3823
*** Warning - Tag ;@returns: - Line 3994 already exists.  First occurance: 3825
*** Warning - SUBROUTINE fwipe - Line 4266 unused
*** Warning - GOTO #menubutton - Line 1644 has no matching tag
*** Warning - GOTO #menubutton - Line 2272 has no matching tag
*** Warning - GOTO !_filesub - Line 4286 has no matching tag
Subroutine labels = 52
Tag labels = 62
342 Code block(s).
9 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]
** Error - Line 450: Invalid integer argument for command STR DEL
** Error - Line 868: Unknown command ****SUB
** Error - Line 889: Unknown command ****SUB
** Error - Line 938: Unknown command *****SUB
** Error - Line 941: Invalid integer argument for command STR DEL
** Error - Line 946: Invalid integer argument for command STR DEL
** Error - Line 1053: Invalid integer argument for command STR DEL

Title: Re: Version 181 crash
Post by: TrailMyx on July 01, 2008, 08:43:58 AM
Thank you.  That's one of the few I didn't cover with the exception handler.  Actually there are a couple more now that the code is executing each line from the syntax checker.  I'll add a little bit of defensive code. 
Title: Re: Version 181 crash
Post by: TrailMyx on July 01, 2008, 08:52:44 AM
Actually, I already had code in there for that exception, but I had it commented out for some reason.  Weird.  Anyhow, it's fixed.  Thanks for finding that.
Title: Re: Version 181 crash
Post by: 12TimesOver on July 01, 2008, 09:31:13 AM
No problem 't all.

I did just notice that this issue came up only when syntax-checking larger scripts. I repeated it on Spewy's miner and Roadkills Ultratamer to name a few. However, I could not recreate with your Claw script.

Actually, I guess on that note, there really isn't enough data to point to size.

Was this related to the number of messages (errors and warnings) that are discovered by the syntax checker or is it something else completely?
Title: Re: Version 181 crash
Post by: TrailMyx on July 01, 2008, 12:04:33 PM
Actually this was related to a specific EUO command, one of the "menu" variants.  So it's just up to the commands people use.  There was one of the parse checks that wasn't enclosed in a try/catch handler.  Most everything else is, but that one was dangling there because I was debugging another issue at one point and forgot to reinstate the exception handling.