System stack errors

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
okay i want to know is wha tthe easiest way is to find system stack error. i dont know why but they keep happening to me. i look for duplicates but never find them! is slowing my game creating processs down every freaking day and i am sick of it. every time it happens i can never find the certain script duplicate and i just copy everything into a new project.

could it be from notetags
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
It could be from anything.

The usual culprits are due to simple errors:

1. Duplicate scripts (pasting it twice by accident or otherwise). Since integration with other scripts involves frequently aliasing methods, having duplicate scripts means you will have an aliased method calling itself.

2. Duplicate method names. This often occurs when a scripter begins writing more than one script working with the same set of methods (eg: multiple Actor-related scripts maybe). They might use the same alias name and then the methods would just end up calling themselves. This also occurs when you alias a method in one class, and then alias the same method in a child class using the same name, such as

class Game_Battler < Game_BattlerBase alias :th_custom_initialize :initialize def initialize th_custom_initialize # stuff end endclass Game_Actor < Game_Battler alias :th_custom_initialize :initialize def initialize(actor_id) th_custom_initialize() # actor-specific stuff end endUsually this only happens once cause most scripters learn not to do it again after they encounter it.Everything else would need to be dealt with on an individual basis.

"Notetags" themselves don't do anything since they are just strings. It's when a note-tag causes a script to run certain pieces of code which are vulnerable to infinite loops.

There are several pieces of vulnerable code in the default project that would run into issues if you are not careful, particularly the "refresh" methods in Game_BattlerBase which are called during the initialization: if you happen to need to refresh while it is refreshing, well, there's your infinite loop.

The Class Graphics script, for example, is vulnerable to this refresh problem.

I've caught some cases, but there could be more issues that I didn't think of.
 
Last edited by a moderator:

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
Everything else would need to be dealt with on an individual basis.

"Notetags" themselves don't do anything since they are just strings. It's when a note-tag causes a script to run certain pieces of code which are vulnerable to infinite loops.

There are several pieces of vulnerable code in the default project that would run into issues if you are not careful, particularly the "refresh" methods in Game_BattlerBase which are called during the initialization: if you happen to need to refresh while it is refreshing, well, there's your infinite loop.

The Class Graphics script, for example, is vulnerable to this refresh problem.

I've caught some cases, but there could be more issues that I didn't think of.
when i replace this with main

#==============================================================================

# ** Main

#------------------------------------------------------------------------------

# This processing is executed after module and class definition is finished.

#==============================================================================

begin

rgss_main do

begin

SceneManager.run

rescue RGSSReset

Graphics.transition(10)

retry

end

end

rescue SystemExit

exit

rescue Exception => error

scripts_name = load_data('Data/Scripts.rvdata2')

scripts_name.collect! {|script| script[1] }

backtrace = []

error.backtrace.each_with_index {|line,i|

if line =~ /{(.*)}(.*)/

backtrace << (scripts_name[$1.to_i] + $2)

elsif line.start_with?(':1:')

break

else

backtrace << line

end

}

error_line = backtrace.first

backtrace[0] = ''

print error_line, ": ", error.message, " (#{error.class})", backtrace.join("\n\tfrom "), "\n"

raise error.class, "Error ocurred, check the debug console for more information.", [error.backtrace.first]

end

like you do it says i get "Game_ActionResult:38"
 

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
actually its a problem with class graphics your script

i really need this script or something that does the same thing.

so what exactly should i do

(thanks for putting up with my lack of scripting so far)
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Just follow the steps and then screenshot the error.


You should show the top of the error.
 
Last edited by a moderator:

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
what and where do i place it.

when i have class graphics in i get an error at line 2730 in the script "battle Symphony"

Code:
 #--------------------------------------------------------------------------  # alias method: clear_hit_flags  #--------------------------------------------------------------------------  alias bes_clear_hit_flags clear_hit_flags  def clear_hit_flags    return unless @calc <- (LINE 30)    bes_clear_hit_flags    @temp_missed = @temp_evaded = @temp_critical = nil  end
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Did you read the post where I say "add"?
 
Last edited by a moderator:

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
well i did and in the console i get a ton of crap and none of its really "repeated" or following a pattern
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Increase it to 200 or 500 then. Maybe 100 is too small. If you're getting system stack error then a pattern must emerge at some point.


Otherwise you'll have to upload your project so others can look at the issue.
 
Last edited by a moderator:

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
sorry for posting twice, couldn't find that "attach files" in the edit

okay i found the repeat 

^^^^ (from cmd - from cmd)
 
Last edited by a moderator:

Funplayer

Self proclaimed sponge.
Veteran
Joined
Oct 9, 2013
Messages
120
Reaction score
35
First Language
English
Primarily Uses
I know this forum post is rather old, but the assistance it provided me was very useful.  Thank you kindly to everyone who posted and assisted here.  I found I had labelled one of my script's aliases with the same identifier as another alias from the same method of the same script, in another script page.  I searched for a while trying to figure out which method/call/proc/etc was causing my stack overflow with no luck.  

I turned to the forums and I found this back trace post, with that back trace script.  I converted it to encompass the main inside RGSS2, and boom I found my issue immediately.  I never thought the alias would call another alias with the same identifier, instead of its locally positioned script alias.  Its honestly never something I considered would happen.  I'm guessing the script interpreter has no syntax exceptions for this error.

Thanks everyone who posted here, you all assisted in fixing my issue.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top