Cidiomar 39 Posted April 21, 2012 (edited) Custom Main – Full Error Backtrace Cidiomar R. Dias Jr Introduction This script helps with error handling showing full backtrace, so you can find the root of the error easily. For ruby programmers, a full backtrace is an basic feature, but RGSS3 lacks it. So I've aprimorated mine and now I'm posting. If you don't know what it mean, backtrace is the function stack footprint, so whith this you can know where your script passed and where is the error. RGSS3 shows only the error section and line, but don't explain the function that called the one with error and not the antecessors. Screenshots RGSS3 Normal Backtrace: Full Backtrace with this Script: How to Use: Replace the Main script (the last script in the list) by this one, and done! Script: http://rgss3help.tk/?p=196 Author Notes: Script Updated, you can read about in: http://rgss3help.tk/?p=208 And download by the permanent link: http://rgss3help.tk/?p=196 bye o/ Edited April 23, 2012 by Cidiomar 2 Share this post Link to post Share on other sites
ze1 6 Posted April 22, 2012 Oh, that's really useful! I always missed something like this when debugging my scripts. =) Share this post Link to post Share on other sites
Cidiomar 39 Posted April 22, 2012 thanks! Due to a problem with the Crayon plugin in my blog, I need to know if this script caused some error, can you test? Share this post Link to post Share on other sites
Ginolamantino 6 Posted April 22, 2012 Oh yeah! That rocks! That makes debugging process lot easier! How many "antecessors" does it show? Share this post Link to post Share on other sites
Cidiomar 39 Posted April 23, 2012 (edited) How I say It's full. But due to RGSS3 is really bad coded, (Yoji Ojima probably is better with Ruby with in C =( ), it's possible that if the backtrace is large, nothing will be shown. I need to know how Game.exe passes to RPG Maker error section and line, and i need to check If it really happen or not. EDIT: I've tested, and yes, it happen D= The modified script is in this link: http://codepad.org/vSeR9Jox With an LOL_MAX_STACK of 44 everything is perfect, if it is 45 or more, than crashes =( Now I'll check how error is handled in debug mode. Edited April 23, 2012 by Cidiomar Share this post Link to post Share on other sites
Ginolamantino 6 Posted April 23, 2012 I think that it's hard to reach that much lines of backtrack. The most common path is main > SceneManager > SceneTitle > SceneMap > SceneBattle > WindowSomething which is 6 backtracks. 39 to go for a crashy crash! Share this post Link to post Share on other sites
Cidiomar 39 Posted April 23, 2012 The updated script can show as many lines rWindows console can show. But the old one is more cool.... I'll use an MessageBox with Win32API or with DL::CFunc directly to do the work, but I need to know how to passa error section and line to RPGMaker VXAce in debug mode to do that =/ Share this post Link to post Share on other sites
ze1 6 Posted April 25, 2012 A suggestion I have is to have an option to print a log of the backtrace to a text file. This is because if you don't print the log, you'll only have the backtrace available while the error dialog open (or if you take a screenshot)... and you can't edit scripts with the dialog open. Share this post Link to post Share on other sites
Cidiomar 39 Posted April 27, 2012 A suggestion I have is to have an option to print a log of the backtrace to a text file. This is because if you don't print the log, you'll only have the backtrace available while the error dialog open (or if you take a screenshot)... and you can't edit scripts with the dialog open. It's easy, I'll do this, thanks. Share this post Link to post Share on other sites