Loading problems...

don't worry! you've already done too much to help me! thank you very much! \^.^/
This was very helpfull. ^^

It seems the issue happen only with the browser version, and my checkpoints do appear :
Spoiler: console.log
Live2D 2.1.00_1 live2d_21.min.js:2:95504
profile : Desktop live2d_21.min.js:2:95354
[PROFILE_NAME] = Desktop live2d_21.min.js:2:95435
[USE_ADJUST_TRANSLATION] = false live2d_21.min.js:2:95435
[USE_CACHED_POLYGON_IMAGE] = false live2d_21.min.js:2:95435
[EXPAND_W] = 2 live2d_21.min.js:2:95435
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead
jQuery.js:4:22
Un AudioContext n’a pas pu démarrer automatiquement. Il doit être créé ou repris après un geste de l’utilisateur sur la page. ENGINE.js:1:47176
unreachable code after return statement
SCRIPTS.js:44397:5
Main constructor called Main_141.js:45396:13
gs.Application.onReady called Main_141.js:45827:11
start called Main_141.js:45798:13
setupApplication called Main_141.js:45646:13
setupApplication completed Main_141.js:45655:22
setupEffects called Main_141.js:45699:13
setupEffects completed Main_141.js:45703:22
setupVideo called Main_141.js:45677:13
createFrameCallback called Main_141.js:45737:13
setupVideo completed Main_141.js:45690:22
setupLive2D called Main_141.js:45712:13
[CSM]Live2D Cubism Core version: 04.00.0000 (67108864) Main_141.js:45717:26
[CSM]CubismFramework.startUp() is complete. Main_141.js:45717:26
[CSM]CubismFramework.initialize() is complete. Main_141.js:45717:26
setupLive2D completed Main_141.js:45728:22
setupInput called Main_141.js:45664:13
setupInput completed Main_141.js:45668:22
load called Main_141.js:45597:13
loadSystemData called Main_141.js:45438:13
loadSystemData completed Main_141.js:45442:22
gs.Application.onReady completed Main_141.js:45846:18
ERROR ENGINE.js:1:21836

error { target: XMLHttpRequest, isTrusted: true, lengthComputable: false, loaded: 0, total: 0, srcElement: XMLHttpRequest, eventPhase: 0, bubbles: false, cancelable: false, returnValue: true, … }
ENGINE.js:1:21857
ERROR ENGINE.js:1:21836

error { target: XMLHttpRequest, isTrusted: true, lengthComputable: false, loaded: 0, total: 0, srcElement: XMLHttpRequest, eventPhase: 0, bubbles: false, cancelable: false, returnValue: true, … }


Which brings a little insight. ^^

First off, it seems a bit chaotic in there, AudioContext needs a user gesture (This is because of new security norms that prevent a video or audio file to play without user input)
Instead of launching the video/audio right off the bat, wait for user input.


I'll look a bit into it, but it looks like the game is actually running
I added a custom scene and called it upon game launch, and it runs OK.
1722611839575.png
so was the problem really a "sound problem?"

by the way why would the browser version give problems when the game is not a browser version?

i apologise if it takes me a while to understand or i might be talking nonsense, but as i said my programming experience is very, very low XD
so was the problem really a "sound problem?"

by the way why would the browser version give problems when the game is not a browser version?

i apologise if it takes me a while to understand or i might be talking nonsense, but as i said my programming experience is very, very low XD
The game is made using Javascript language, so when you launch index.html, you play this in your browser.

When you launch Game.exe it's a standalone version (Though this has no built in console log system)

I'm still looking into what makes the game not run in the browser, but can you confirm if you use Game.exe (in the main folder) you have no issues?

I have to leave for now, but I'll keep on looking what I can come up with.
Basically, something is preventing DataManager.events.on to be "loaded", which results in a black screen since nothing is loaded, no sprite, no sound, no music, no ressources at all.

I'm pretty sure if I can get my head around why that part blocks, I should be able to "unlock" it 😀
But then again... simple things end up being difficult most of the time, I'll tell you when I find something.
I have always used game.exe and it is the one that gives me problems (especially because starting index gives me everything black right away)

basically, you have to figure out why DataManager.events.on is not loaded correctly?
as far as I can I will also continue to search within the limits of my abilities^"

i can't thank you enough! \both for the help and because I'm learning new things all the time 😀
Ok, so my approach was not good.

I assumed index.html worked the same as in RPG Maker series, but it doesn't exactly do.
I was able to "brute force" specific event conditions, but it stilll wouldn't work.

So, instead I focused on Game.exe, since it gives you an issue (Although it works for me)

Here are some issues :
Spoiler: Missing files
Images:
CANNOT LOAD IMAGE: Graphics/Icons/Japan.png
CANNOT LOAD IMAGE: Graphics/Icons/United-Kingdom.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/bg-generic.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/skin-tile.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/skin-stretch.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/dropshadow.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/skin-frame.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/Mobile/msg-diamond-small-off.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/Mobile/msg-diamond-small-on.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/Mobile/m-diamond-large-off.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/Mobile/m-diamond-large-on.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/Mobile/m-diamond-small-off.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/entrybox.png
CANNOT LOAD IMAGE: Graphics/Pictures/UI/selection.png
CANNOT LOAD IMAGE: Graphics/Pictures/Cose programma/CG Gallery/HomeThumb.png
CANNOT LOAD IMAGE: Graphics/Backgrounds/sfondi personali/sfondo nero.png

Audio:
resources/app/resources/Audio/Sounds/[object object1].wav (This is probably a wrong path parsing from a plugin or script you are using)

There is also a heck of alot of errors of WebGL

Since the game works for me (and your testers I believ), but not for you, it could be that the accumulation of errors in the logs are too much to handle for your hardware. Do you have an older PC? You mentioned testing it on multiple pc, do they all have relatively old hardware?

It could be that the deployment was corrupted in some way also, seeing there are many missing files, maybe you removed or renamed some?

Also, seeing as this is an Electron app, you can call the console log while launching Game.exe (Which should be much more helpfull, as I can't seem to reproduce your error with Game.exe)

Could you launch Game.exe, and press CTRL + Shift + I this will open a Devtool similar to a regular console, it should look like this :
1722674719876.png

Plz try this with Game.exe, and share the logs when your game crash (or freeze, or slow down, or black screen), Also keep an eye on CPU and RAM usage when it happens plz.


Last, are you using custom scripts/plugins? if so which ones and if they are free, can you share them?
wow! that's a lot of information 😮 thanks!

those images that don't load, I think I removed them when I cleaned up the game files because I wasn't using them, they're all program images I should be able to recover from other projects and import them, could that solve the problem?

the audio file on the other hand i never removed anything and that [object object1] i have no idea what it is 😳

no, all the PCs I've tested it on are up to 3 years old and where I mainly work is an MSI Katana GF66 ( some beta testers have much less powerful and older PCs than mine) but if it works for you too without the slightest problem it could really be my PC ( even if I don't understand why it gives me problems on all of them.)

No, I don't use plugins or downloaded scripts, it's all done with the basic programme.

thanks for the info on the console, i'll start testing the game soon!
OK, I tested the game now and took a screenshot of the console when it crashed and how much memory and CPU it marked in the task manager

from what I understand the problems are always those of loading some images that I removed from the base program and a variable that I can't seem to load in the Main...or at least I think these are the problems ^^"

now I wanted to try to reinsert the images and see if they still create all these errors, but for the variable I have no idea which one I mean.

anyway thanks for telling me how to open the console, at least I will be able to use it more and learn how it works ^^
I'm sorry I can't get my head around what is wrong.
The $gameVariable issue point toward : this.params.scriptFunc = eval("(function(){" + this.params.script + "})");

Meaning it's probably a scope issue, as in, $gameVariables is not available at that point.
Since eval() is supposed to be deprecated, yet is used, I'm going to assume this issue is software related, because it makes no sens to me.

I see your ram is limited to barely 4GB, did you try and increase your virtual memory? (Avdanced windows settings => Performance -> Settings => Advanced => Virtual Memory -> Modify => Automatic ?

Other than that, I think it might be best to report this to customer service, or hope for someone with more knowledge to come by.

Everything points toward data being unavailable at certain point in the load (Main class) and Component_CommandInterpreter.prototype.commandScript being unable to get data from $gameVariables, probably dued to scope issues

It doesn't help I never used VNM either ^^
I'm sorry I can't get my head around what is wrong.
The $gameVariable issue point toward : this.params.scriptFunc = eval("(function(){" + this.params.script + "})");

Meaning it's probably a scope issue, as in, $gameVariables is not available at that point.
Since eval() is supposed to be deprecated, yet is used, I'm going to assume this issue is software related, because it makes no sens to me.

I see your ram is limited to barely 4GB, did you try and increase your virtual memory? (Avdanced windows settings => Performance -> Settings => Advanced => Virtual Memory -> Modify => Automatic ?

Other than that, I think it might be best to report this to customer service, or hope for someone with more knowledge to come by.

Everything points toward data being unavailable at certain point in the load (Main class) and Component_CommandInterpreter.prototype.commandScript being unable to get data from $gameVariables, probably dued to scope issues

It doesn't help I never used VNM either ^^
don't worry! thanks to you I learnt a lot!
and anyway if both you and my beta testers are working, maybe the problem is also a bit in my system! XD

no, i had no idea my RAM was so limited .-. i'll definitely expand it thanks for the info!

I'll try to ask for specific info also on the program's discord, but I don't know if this error will ever be corrected ^^" (in fact I don't even know if the developers are working on it anymore ^^")

anyway i managed to fix the errors caused by the missing images, now only a few remain related to index and to this variable which is apparently not found ^^".

anyway thank you very much, you've been very kind!
do you mind if i add your nickname in the game's special thanks? 🙂
I think I managed to find all the codes where it gives me an error, the problem is that even though I understand which line the error is in I don't know what to correct D:
Thanks for the files, however I don't think I understand what's going on.

Sorry for the false hope 🙁
replacing the code, crash before the actual game starts
Yeah I figured it out, I thought of handling $gameVariables, but it will use all globals, not just $gameVariables.

As said in my edit post, I'm at a loss, I don't understand what's going on.

Instead of this handling, just replace with this :

CoffeeScript:
    commandScript: ->
        try
            if [email protected]
                console.log("Script called = ",params.script)
                @params.scriptFunc = eval("(function(){" + @params.script + "})")

            @params.scriptFunc()
        catch ex
            console.log(ex)

The console.log will tell us what script was called when $gameVariables was undefined.

But I'm running out of ideas.
the game does not start in the programme test but exported it does, the error now has a different number (no longer on line 356, but 314) and shows me after = in the main.
do you think it might be worth something?

anyway don't worry if we don't get to the bottom of it, you helped me solve a lot of problems and taught me a lot XD
the game does not start in the programme test but exported it does, the error now has a different number (no longer on line 356, but 314) and shows me after = in the main.
do you think it might be worth something?

anyway don't worry if we don't get to the bottom of it, you helped me solve a lot of problems and taught me a lot XD


So, I ran the code on my end and got this :
Spoiler: Script called
// Salva la traccia musicale corrente e la sua posizione
var currentBGM = AudioManager._currentBgm;
var currentPosition = AudioManager._bgmBuffer ? AudioManager._bgmBuffer.seek() : 0;
$gameVariables.setValue(1, currentBGM);
$gameVariables.setValue(2, currentPosition);

// Cambia scena
SceneManager.goto(Scene_Map);

// Riprendi la traccia musicale nella nuova scena
var savedBGM = $gameVariables.value(1);
var savedPosition = $gameVariables.value(2);
AudioManager.playBgm(savedBGM, savedPosition);

So, at least we know that this error occurs because $gameVariables is not defined at that point.
Can you track this particular event in your game?

It could be that the issue lies in the fact this event is trying to set the audio during a Scene Transition, where the global $gameVariables is unavailble (or out of reach)

If you find the event that does this, try and reset the audio on the new event, instead of the same event after the "Next scene" push.
Or add a few wait frames?



As for the script, in Component_CommandInterpreter_1.js

line 5943 :

CoffeeScript:
    commandScript: ->
        try
            if [email protected]
                console.log("Script called = ",params.script)
                @params.scriptFunc = eval("(function(){" + @params.script + "})")

            @params.scriptFunc()
        catch ex
            console.log(ex)

It should look like this currently, the previous code was faulty logic.

Also found a new missing image :
CANNOT LOAD IMAGE: Graphics/Backgrounds/sfondi personali/Catral/Catral foresta/luci guida labirinto/luce destra.png
wait, then could the mistake really be the music and scene changes?

because Visual Novel maker doesn't keep the music from one scene to another unless "save previos" is activated on the change scene command, but it has always given a lot of problems but in my game there are several because I need to keep the music from one scene to another ...

I don't know if it helps but in the meantime I'll pass on the Audio manager script, in the meantime I'll try to find the one you gave me
wait, then could the mistake really be the music and scene changes?

because Visual Novel maker doesn't keep the music from one scene to another unless "save previos" is activated on the change scene command, but it has always given a lot of problems but in my game there are several because I need to keep the music from one scene to another ...

I don't know if it helps but in the meantime I'll pass on the Audio manager script, in the meantime I'll try to find the one you gave me
The issue occurs when the scene is changing, every time.
So yes, it most likely is an issue based on the scene changing.

My guess is that during the scene changing, the global $gameVariable is not accessible, and seeing the script calls for immediat bgm update, during the scene change, maybe this is the issue.

If you find the event that does this, add a few waiting frames between Scene Change and Resume BGM.
I hope this should fix the issue, your event does this :
- Save BGM
- Save BGM Position
- Change Scene
- Resume BGM from its position

But try with
- Add wait frames 5
between change scene and resume bgm
this is the scene where the error first appeared to me, but even with stop and wait the error remains.
since I thought the music might be the problem, I had initially tried to create a plugin to create plug and play commands where I could save the audio track, but obviously given my poor code writing skills it didn't work ^^"
do you think it's possible to create something that can record that variable and call it up at every scene change?
For the script, I can do this, but I need to know how scripting work in VNM. ^^
If it's just javascript or coffee script it's pretty easy to write.

Would be something like this :
CoffeeScript:
# Salva la traccia musicale corrente e la sua posizione
currentBGM = AudioManager._currentBgm
currentPosition = if AudioManager._bgmBuffer then AudioManager._bgmBuffer.seek() else 0

# Cambia scena
SceneManager.goto(Scene_Map)

# Riprendi la traccia musicale nella nuova scena dopo un breve ritardo
setTimeout ->
    AudioManager.playBgm(currentBGM, currentPosition)
, 50
But how does scripting work in VNM? can you just call for a script?
Can you set this script in a common event, and call the common event?

Like I said, I never used VNM ^^


Can you show me what the common events are doing?

Original thread: https://forums.rpgmakerweb.com/threads/loading-problems.170787/