Jump to content
Cidiomar

Custom Main – Full Error Backtrace [UPDATED]

Recommended Posts

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:

rgss3_normal_backtrace_ss.png

 

 

Full Backtrace with this Script:

full_backtrace_ss.png

 

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 by Cidiomar

Share this post


Link to post
Share on other sites

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

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 by Cidiomar

Share this post


Link to post
Share on other sites

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×