Crash at startup on brand new project! Does not point to any script being the cause! Please Help!

I literally created a brand new project not even an hour ago and I wanted to see the layout of my title screen to see if I need to move some things around on the title screen graphic and my brand new project crashes immediately.

And get this, it does not even report what script is causing the crash!

It does not say that any script is causing it. It is literally crashing for no reason.


Here is the crash dump:

Code:
2023-12-22 11:26:08 -0500
NoMethodError
empty?
undefined method `empty?' for nil:NilClass
{0126}:114:in `develop'
{0126}:81:in `block in update'
{0126}:81:in `times'
{0126}:81:in `update'
{0126}:156:in `update_basic'
{0100}:41:in `update'
{0100}:14:in `main'
{0135}:7:in `run'
{0139}:7:in `block in <main>'
:1:in `block in rgss_main'
:1:in `loop'
:1:in `rgss_main'
{0139}:7:in `<main>'
ruby:in `eval'


Does anybody know what the problem could be?
It's almost impossible to tell off-hand, but the only default game object that has an empty? method is Game_Event, so what you could do as an initial troubleshooting measure is go to that method in the script editor (line 159) and before line 160 add

puts "Debug: event's .empty? method called"

And then see if that shows up just before the crash when you playtest with the console on, in which case you'll know it's an event causing it.
All adding that did was cause a syntax error on startup before anything loaded. and no crash dump

1703265318289.png




Are you absolutely sure that is what I am supposed to add. I tried it several ways. I tried it at the beginning of the line, at the end of the line, I tried replacing the entire line, I tried parts of what you told me to put. They all give me syntax error.

Perhaps that was meant for MV or MZ?


Edit: Let me guess, judging based on length of time without responses, everybody is clueless. It should work. My game is breaking for literally no reason. And the debug code I was given should work, but it is broken for me for no reason.


Edit 2: It appears to be a system crash. I commented out lines 159 to 161 and tested. It literally changed nothing with the crash. Literally same crash down to the crash dump.
First of all what's the name of script #126 that has the develop method?
And what does the line 114 say there?
I assume it is this script: https://forums.rpgmakerweb.com/inde...nerate-a-map-from-a-black-white-image.157071/

By TheoAllen as I removed scripts one by one and found it to be the culprit.

Even by itself below materials, the game crashes with that script.

But the thing is, the script works flawlessly in literally every other project that I have created (I have used this script in four different projects, included Moltres Rider's RPG which has no shortage of scripts)

I even tried copying the entire code from Moltres Rider's RPG because it is confirmed working in that game and still crash in this game.

114 in that script says this:
Ruby:
  def sub_id
    # Directions:
    # [7,8,9]
    # [4,5,6]
    # [1,2,3]
    case @neighbor.values
    # Directions (-1: Doesnt matter | 0: Not exist | 1: Exist)
    # At:[ 1, 2, 3, 4, 6, 7, 8, 9]
    when [-1, 0,-1, 0, 0,-1, 0,-1]; return 47
    when [-1, 0,-1, 1, 0,-1, 0,-1]; return 45
    when [-1, 0,-1, 0, 0,-1, 1,-1]; return 44
    when [-1, 0,-1, 0, 1,-1, 0,-1]; return 43
    when [-1, 1,-1, 0, 0,-1, 0,-1]; return 42
    when [-1, 0,-1, 0, 1,-1, 1, 0]; return 41
    when [-1, 0,-1, 0, 1,-1, 1, 1]; return 40
    when [-1, 0,-1, 1, 0, 0, 1,-1]; return 39
    when [-1, 0,-1, 1, 0, 1, 1,-1]; return 38
    when [ 0, 1,-1, 1, 0,-1, 0,-1]; return 37
    when [ 1, 1,-1, 1, 0,-1, 0,-1]; return 36
    when [-1, 1, 0, 0, 1,-1, 0,-1]; return 35
    when [-1, 1, 1, 0, 1,-1, 0,-1]; return 34    
    when [-1, 0,-1, 1, 1,-1, 0,-1]; return 33
    when [-1, 1,-1, 0, 0,-1, 1,-1]; return 32
    when [-1, 0,-1, 1, 1, 0, 1, 0]; return 31
    when [-1, 0,-1, 1, 1, 1, 1, 0]; return 30
    when [-1, 0,-1, 1, 1, 0, 1, 1]; return 29
    when [-1, 0,-1, 1, 1, 1, 1, 1]; return 28
    when [ 0, 1,-1, 1, 0, 0, 1,-1]; return 27
    when [ 1, 1,-1, 1, 0, 0, 1,-1]; return 26
    when [ 0, 1,-1, 1, 0, 1, 1,-1]; return 25
    when [ 1, 1,-1, 1, 0, 1, 1,-1]; return 24
    when [ 0, 1, 0, 1, 1,-1, 0,-1]; return 23
    when [ 0, 1, 1, 1, 1,-1, 0,-1]; return 22
    when [ 1, 1, 0, 1, 1,-1, 0,-1]; return 21
    when [ 1, 1, 1, 1, 1,-1, 0,-1]; return 20
    when [-1, 1, 0, 0, 1,-1, 1, 0]; return 19
    when [-1, 1, 0, 0, 1,-1, 1, 1]; return 18
    when [-1, 1, 1, 0, 1,-1, 1, 0]; return 17
    when [-1, 1, 1, 0, 1,-1, 1, 1]; return 16
    when [ 0, 1, 0, 1, 1, 0, 1, 0]; return 15
    when [ 0, 1, 0, 1, 1, 1, 1, 0]; return 14
    when [ 0, 1, 0, 1, 1, 0, 1, 1]; return 13
    when [ 0, 1, 0, 1, 1, 1, 1, 1]; return 12
    when [ 0, 1, 1, 1, 1, 0, 1, 0]; return 11
    when [ 0, 1, 1, 1, 1, 1, 1, 0]; return 10
    when [ 0, 1, 1, 1, 1, 0, 1, 1]; return 9
    when [ 0, 1, 1, 1, 1, 1, 1, 1]; return 8
    when [ 1, 1, 0, 1, 1, 0, 1, 0]; return 7
    when [ 1, 1, 0, 1, 1, 1, 1, 0]; return 6
    when [ 1, 1, 0, 1, 1, 0, 1, 1]; return 5
    when [ 1, 1, 0, 1, 1, 1, 1, 1]; return 4
    when [ 1, 1, 1, 1, 1, 0, 1, 0]; return 3
    when [ 1, 1, 1, 1, 1, 1, 1, 0]; return 2
    when [ 1, 1, 1, 1, 1, 0, 1, 1]; return 1
    when [ 1, 1, 1, 1, 1, 1, 1, 1]; return 0
    else
      return 0
    end
  end
Even by itself below materials, the game crashes with that script.
It likely has a dependency on another script.
Does it say in the header if it requires another script?
No dependencies. That script was created for me early this year when I requested it. I have used it by itself in the past

The script is in the link so you should be able to see the header.
All adding that did was cause a syntax error on startup before anything loaded. and no crash dump

View attachment 289133



Are you absolutely sure that is what I am supposed to add. I tried it several ways. I tried it at the beginning of the line, at the end of the line, I tried replacing the entire line, I tried parts of what you told me to put. They all give me syntax error.

Perhaps that was meant for MV or MZ?


Edit: Let me guess, judging based on length of time without responses, everybody is clueless. It should work. My game is breaking for literally no reason. And the debug code I was given should work, but it is broken for me for no reason.


Edit 2: It appears to be a system crash. I commented out lines 159 to 161 and tested. It literally changed nothing with the crash. Literally same crash down to the crash dump.
The only way it would have output that error would be if you hadn't put the debug line in quotes.
Also "literally a brand-new project" is one that has no scripts added to it. You made it sound like it was the default engine that was causing this with nothing else installed.

The problem can't be anything in the code you pasted, because nothing there is trying to call an empty? method on an object.
I was not aware that the quotes were required too.

About this script though, why all of a sudden it makes the game break when I have used it flawlessly in four other projects? Not only that, I am constantly using it in other projects.

The exact link to the script is: https://raw.githubusercontent.com/theoallen/RGSS3/master/Free/MapGenerator.rb
I was not aware that the quotes were required too.

About this script though, why all of a sudden it makes the game break when I have used it flawlessly in four other projects? Not only that, I am constantly using it in other projects.

The exact link to the script is: https://raw.githubusercontent.com/theoallen/RGSS3/master/Free/MapGenerator.rb
What you'll need to do is a global script search for ".empty?" (without the quotes) then paste the output.
Here are output

1703271065049.png

1703271111162.png
For develop is not a very common method name, searching for that method name could be useful as well. Remember that empty? was placed inside the develop method.
I figured something out. I think I am good now (I hope)

Seeing that backtrace was not giving information on where the fault was and I know it does on other games, I looked at Moltres Rider's RPG and saw I had a completely different backtrace script

so I replaced it in The Legend of the Beautiful Eagle hoping to get a better answer,

and what do you know, no crash! The only thing that is different was a different backtrace script!

Now could there be a conflict with a terrain generator and one of the dozen backtrace scripts out there?
The second to last line states that the map generator script contains an empty?
but the link to the script you gave above does NOT contain such a line.

so either you're using a different mapgenerator script, or modified it somewhere.

my guess is you modified it in the wrong way, causing the error.
please try with the original script if it works.
Maybe because the backtrace called an array that didn't exist as of yet?

Don't ignore what I've been telling you. You gotta find the develop method first.

Ruby:
def develop
The second to last line states that the map generator script contains an empty?
but the link to the script you gave above does NOT contain such a line.

so either you're using a different mapgenerator script, or modified it somewhere.

my guess is you modified it in the wrong way, causing the error.
please try with the original script if it works.
That is not the same script. That is the Hime script to export maps to png
Just read what I said in my 2 previous posts here...

NoMethodError
empty?
undefined method `empty?' for nil:NilClass
{0126}:114:in `develop'
Actually, the mystery seems to be solved here:

index.php


The last entry is your main suspect.

Original thread: https://forums.rpgmakerweb.com/threads/crash-at-startup-on-brand-new-project-does-not-point-to-any-script-being-the-cause-please-help.164064/