Blender Crash on simple script

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…

def hudload():
 g = bge.logic
 path = g.expandPath("//") #the path of the runtime/blend
 sep = os.path.sep
 filepath = path + "Data" + sep + "Scenes" + sep + "HUD" + ".blend"
 try:
  g.LibLoad(filepath,"Scene")
 except:
  g.addScene("HUD",1)

So, what’s the problem? May it be a bug of 2.55 (33479)?

Maybe there is a name conflict?

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.

That is the same thing i thought.

Would you try if it crashes on your system too? (i haven’t another pc…)

Here the archive with the blend.
The module with the script is Hud_Bar.py

Deleted HG1

It crashes as well, without an error message

I’m on Vista

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)