Stability problem when loading a specific scene

I've got an issue that some players, (but not all, and not me specifically) seem to get game crashes when loading a specific scene in my game. The crash is that it seems to never finish loading.

The scene is quite a large one, being the core gameplay section. It's an apartment designed so that the player can move between multiple rooms, so while I've tried to separate out as much as I can into called scenes, it's also got quite a lot in it.

I'm concerned that maybe the way I've organised things is making it unstable somehow, although if so I don't really know what's wrong with it. I do know it loads rather slowly, but that's the best I can come up with.

Is there something that would be likely to cause this kind of a problem? I'm having trouble diagnosing it myself because I can't replicate it on my machine, and I don't have coding experience. Thanks for any help you can give.
My first recommendation is to gather all error messages, and if possible have your users send you screenshots of the console window.
I've had this happen, where sometimes something will load correctly, and sometimes it won't.
It's almost always because of a call or 'reference'.
For example, when loading a bitmap, if you immediately ask for the width, you may or may not get it. You may get 0. Sometimes the width of the bitmap hasn't read yet, because everything doesn't always load in exactly the same order.

To solve this, I use a function that basically checks if the data in question is 'ready', and sets a timeout to call itself again if the data isn't 'ready'.

In my example, I would, before doing what I needed to do with the bitmap, have a function that checks if it's width is = to 0. If it is, I know the bitmap property is not yet ready to read. So I set a timeout that calls that same function again, and eventually the data will be ready, and the rest of the program can proceed.

Find out what thing/s aren't loading by getting error codes and console error messages.
I'm willing to bet the error codes in the console say something like 'can't read property x of undefined'.
I haven't asked and kind of assumed you used JS, if you can, here's the function I use to ONLY run a function once an object or property exists

function whenAvailable(name, callback) {
var interval = 10; // ms
window.setTimeout(function() {
if (window[name]) {
callback(window[name]);
} else {
window.setTimeout(arguments.callee, interval);
}
}, interval);
}


The use of the window qualifier isn't fully necessary, I adapted this from a non RPG Maker JavaScript project.
My first recommendation is to gather all error messages, and if possible have your users send you screenshots of the console window.
I've had this happen, where sometimes something will load correctly, and sometimes it won't.
It's almost always because of a call or 'reference'.
For example, when loading a bitmap, if you immediately ask for the width, you may or may not get it. You may get 0. Sometimes the width of the bitmap hasn't read yet, because everything doesn't always load in exactly the same order.

To solve this, I use a function that basically checks if the data in question is 'ready', and sets a timeout to call itself again if the data isn't 'ready'.

In my example, I would, before doing what I needed to do with the bitmap, have a function that checks if it's width is = to 0. If it is, I know the bitmap property is not yet ready to read. So I set a timeout that calls that same function again, and eventually the data will be ready, and the rest of the program can proceed.

Find out what thing/s aren't loading by getting error codes and console error messages.
I'm willing to bet the error codes in the console say something like 'can't read property x of undefined'.
That sounds quite possible, although from everything I'm hearing there actually are no error messages. The game just gets stuck on the black loading screen forever, so I don't know what might be the particular tricky bit.
I would still have them check the console. Most of the errors I ever get only show up in the console, and don't actually crash the game
I would still have them check the console. Most of the errors I ever get only show up in the console, and don't actually crash the game
Pardon my ignorance, but how do I do that? I just did some quick googling but couldn't find how to access a console in game.

I haven't asked and kind of assumed you used JS, if you can, here's the function I use to ONLY run a function once an object or property exists

function whenAvailable(name, callback) {
var interval = 10; // ms
window.setTimeout(function() {
if (window[name]) {
callback(window[name]);
} else {
window.setTimeout(arguments.callee, interval);
}
}, interval);
}


The use of the window qualifier isn't fully necessary, I adapted this from a non RPG Maker JavaScript project.
And yeah, no, I don't know how to use JS. :/ That's one of the trickier problems with trying to fix something like this. I picked up the engine because it seemed like the easiest way to to manage things without any coding knowledge.
Well the console also won't come up for someone using the project in 'deployed' form. The console is only available in playtest mode. I looked on your profile to see if you had posted the project somewhere on this forum and couldn't find it, so are the people using it in playtest mode, or depolyed version?

In playtest, you can open the console by hitting F8
Oh crap, I just realized this is in VN Maker, not MV. I'm so sorry, I was browsing the plugin support threads, and forgot I accessed this thread from the forum's main page.
I am actually not familiar with VN, I'm so sorry ><

standardplayer, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

Well the console also won't come up for someone using the project in 'deployed' form. The console is only available in playtest mode. I looked on your profile to see if you had posted the project somewhere on this forum and couldn't find it, so are the people using it in playtest mode, or depolyed version?

In playtest, you can open the console by hitting F8
Deployed version, yeah. Is there a way to export it in a playtest mode?

In the meantime, I'll try to do a little bit of testing myself with the console open. (Actually, it seems to use F12?)

EDIT: Oh, and I just saw your point about you actually talking about MV after I posted the last thing.
Hi, that could be some kind of loading or access error or the player's PC is not capable to play that scene for some reason. I assume you develop on Windows and the players having that issues are using Windows too? If so, try to send them the Debug version of NW.js player to enable the debug window which will probably give us the reason for the black screen.

I think easiest would be, assuming you and your players use Windows, to go into VN Maker's installation folder and there go into the OfflinePlayer folder. There, select all files and copy everything(everything!) into the exported folder of your game and say "Yes" if there are any overwrite-files question coming up. Then delete Game.exe and rename nw.exe into Game.exe. With that, debug window will then open pressing F12 on Windows. So send that to your customers to get the debug log from them and then send it to us.

But that only works if your game is not encrypted.
Hi, that could be some kind of loading or access error or the player's PC is not capable to play that scene for some reason. I assume you develop on Windows and the players having that issues are using Windows too? If so, try to send them the Debug version of NW.js player to enable the debug window which will probably give us the reason for the black screen.

I think easiest would be, assuming you and your players use Windows, to go into VN Maker's installation folder and there go into the OfflinePlayer folder. There, select all files and copy everything(everything!) into the exported folder of your game and say "Yes" if there are any overwrite-files question coming up. Then delete Game.exe and rename nw.exe into Game.exe. With that, debug window will then open pressing F12 on Windows. So send that to your customers to get the debug log from them and then send it to us.

But that only works if your game is not encrypted.
Thanks very much for the reply. I'll get one or two players on board who've encountered the error to be testers, and then try this tomorrow.
Hi, that could be some kind of loading or access error or the player's PC is not capable to play that scene for some reason. I assume you develop on Windows and the players having that issues are using Windows too? If so, try to send them the Debug version of NW.js player to enable the debug window which will probably give us the reason for the black screen.

I think easiest would be, assuming you and your players use Windows, to go into VN Maker's installation folder and there go into the OfflinePlayer folder. There, select all files and copy everything(everything!) into the exported folder of your game and say "Yes" if there are any overwrite-files question coming up. Then delete Game.exe and rename nw.exe into Game.exe. With that, debug window will then open pressing F12 on Windows. So send that to your customers to get the debug log from them and then send it to us.

But that only works if your game is not encrypted.
I'm getting a very strange version of this problem now.

I've been seeing the scene in question stall the Windows version when loading the scene, even on my own system. (Not in the test build, though.)

I followed your instructions above to make a debug version, (pretty sure I did everything you said) just so I could debug it myself, but that had two problems. First, pressing F12 didn't bring up the debug window and second - weirder - the bug doesn't actually happen in this altered version.

I notice in the debug.log I have a lot of lines saying this, however:

[1007/193459.411:ERROR:settings.cc(263)] Settings version is not 1

Thinking maybe it's something specifically to do with the export, I tried exporting it to Win32. When I get up to the scene there, the game just outright crashed to desktop. I checked the debug.log there and it had only this line:

[1007/235557.862:ERROR:http_transport_win.cc(175)] WinHttpCrackUrl: The URL does not use a recognized protocol (0x2ee6)

Original thread: https://forums.rpgmakerweb.com/threads/stability-problem-when-loading-a-specific-scene.113880/