I decided to split my game from a single file in multiple files, so now i’m substituting the “addScene” with LibLoad… I made a new blender file, appended the HUD scene, and saved it. Then, i made a controller run this module function on startup. But when i press P, blender freezes for a few seconds and then crashes. Trying to comment the code i discovered that the error is in LibLoad, but i already use this function in another script, and it never raised up problems, so it’s not a bug in the function and the problem must be the file. But the file only contain the same scene that is inside the main blend and worked when loaded with addScene…
Remeber this feature is quite new to the BGE. I suggest to open a ticket in the bug tracker. Blender shouldn’t crash, it should return an error message if there are problems.
Now I found a solution for the problem. You must enable “first start” on the last python module controller (scripts.Loader_Module.firstload). You cannot run two LibLoad at he same time.
As far as i know, each frame the sensors(if positive) send a pulse to the connected controller, and, since python isn’t multithreaded, the python/module controller are executed one by one. Once all the controller are executed, the ge goes to the next frame.
Btw, thank you for the effort and help! I’ll open a bug report anyway(if the problem is really this one,i think they should put a warning, or postpone one of the 2 libload to the next frame, or something like this, not just let blender crashes)