libload scenes and meshes = error?

Hey guys, I found another problem/bug while my current project “NAFS-Race”.
Could someone test it too?

I’d tried to load a scene and some meshes via libload, everything works fine until I’m ending the game engine.
Blender ends in a crash and stops working.
(Load-Test.blend loads the other two .blends)

Blender only crashes when both libload operations were executed before.
Only load scene or only load meshes doesn’t cause it.

It looks like a sort of libfree-error. :confused:

ZLOD_vs_LibLoad_iFlowProduction.zip (1.12 MB)

Greets,
iFlow

Using LibLoad in a own Python tread is not a common usage. I think Moguri never tested it against that.
If you use threads you must synchronize (Semaphor) each threaded against the other (Blender thread <> Python thread). In your script the memory will be freed and then the main Blender thread try’s to set the freed lod object (ZLOD_MT.py line 124).
You need to capture the ESC key or use the Python class destructor. If the game stopped then stop your thread and then stop blender.

You can use the async=true (asyncron loading in own thread) in the LibLoad to avoid these kind of crashes.
But you will still get an error in the console if you don’t stop correctly.
http://www.blender.org/documentation/blender_python_api_2_67_release/bge.logic.html?highlight=libload#bge.logic.LibLoad

But I think Blender should be also don’t crash on programming faults. I think Moguri can make a check like on the async load to avoid this crash.
So please write a bug report in the Blender Bug Tracker.
http://projects.blender.org/tracker/?atid=306&group_id=9&func=browse

Okay, It’s created.

http://projects.blender.org/tracker/index.php?func=detail&aid=35447&group_id=9&atid=306

Do you know why isn’t it possible to Assign a bug to a person in Game Engine Bug-Tracker?

Only developers can assign a report to a person.

The bug was fixed. :slight_smile:

–Closed–