What are the common causes for script lockup?

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Quite often when i'm trying to get a script to work just right, it "locks up". In other words, can't input anything, no menus appear, nothing except the need to Alt-F4.

I know there's some obvious reason why a script lockup happens, but I thought it might be good to make this thread to try and get some answers to what i'm sure that plenty of budding developers run into from time to time.

What are the most common causes for this?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
When a scene de-activates a window, but never activates another window.


Perhaps due to missing use case, forgot to implement, or other reasons.


When a script runs itself into an infinite loop.


This is possible with events as well since you have the loop command.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to Learning Ruby and RGSSx. Please be sure to post your threads in the correct forum next time. Thank you.


Good topic. I can't think of any other reasons off the top of my head.
 
Last edited by a moderator:

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Yep. Unintentional infinite loop. The bane of a novice eventer/scripter's existence.

I wonder if this will end up getting pinned or something o_O
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
another thing maybe broken update method.

it can happen sometimes when someone forget to use super when rewriting update method for child class.

ex:

Code:
Scene_Example < Scene_Equip  def update    puts "example"  endend
 

OM3GA-Z3RO

Wounded Seraphim
Veteran
Joined
Nov 19, 2013
Messages
826
Reaction score
181
Primarily Uses
Hmm I think I have something very similar to this.

In one of my test events I wish to make it that you can't save or enter your menu at this certain moment but you need to walk to continue the scene, now the problem here is that when I issue a command for a event to disable Menu and Save or just Menu, you can't move or do anything, is that another reason for a script lockup?
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
It seems like having autorun events can be quite tempermental on that sort of thing, Omega-Zero.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
OM3GA-Z3RO, it sounds like you're asking for help, not contributing to the topic (because you haven't identified a cause). This is not a thread to ask for help.


A game can lock if you have an autorun event that's not turned off, even if it's doing nothing. But that's an event design issue, not a script issue.
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
"Exit Event Processing"

The event option that time forgot?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Exit Event Processing does not work for autorun or parallel processing events. Let's get back to the topic, please.
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Doh. I actually thought that had something to do with lockups. Apologies.

So, basically, the causes seem to be:

Infinite Loops

Not putting an end to autorun or parallel processes through some means(i.e, a switch or variable)

That's what he have so far, right?
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,283
Reaction score
323
First Language
English
Oh. Right.

  • Infinite Loops
  • Unanswered Autoruns/Parallel Processes
  • Deactivating windows without opening another one.
 

OM3GA-Z3RO

Wounded Seraphim
Veteran
Joined
Nov 19, 2013
Messages
826
Reaction score
181
Primarily Uses
OM3GA-Z3RO, it sounds like you're asking for help, not contributing to the topic (because you haven't identified a cause). This is not a thread to ask for help.

A game can lock if you have an autorun event that's not turned off, even if it's doing nothing. But that's an event design issue, not a script issue.
Oh no, not at all, if I was asking for help I would go to the right place, I was just checking if this is caused by a script lock, like one of the RPGM's main scripts but I was thinking of something else then.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top