LibLoad problems

LibLoad seems unstable on Linux.

Place both files in the same directory. Run test.blend in the BGE. It’ll load cube2.blend which contains a single cube and nothing else. It’ll then free it after 60 ticks (1 sec). And then it’ll load it again, and it repeats itself. When I run this test it crashes randomly. It’ll get through a couple iterations and then crash afterwards. Sometimes it does a core dump, other times it says invalid pointer, segfault or corrupted double link list.

I’ve tried adjusting the number of ticks - still crashes
With or without logic bricks attached to cube2 - still crashes
Tried placing cube2 it on a different layer - still crashes
Tried placing cube2 in a different scene - still crashes
Tried changing the physics type - still crashes

I’m on Linux 64-bit using 2.67b.

EDIT:
It does not seem to have this problem on Windows 7 64-bit. The test runs indefinitely.

Attachments

cube2.blend (422 KB)test.blend (508 KB)

Please open a bug in the bug tracker.

I’ve hit a problem with libload a couple of times, mainly where freeing is involved.
My solution is that instead of relying on loading and freeing to switch levels, is to restart the scene, or the whole game for each level. This also makes sure that there are no lingering datablocks from anywhere else. It does rely on storing the level number somewhere else though, I just use a text file for that though,

@Monster
Will do.

@sdfgeoff
Unfortunately, I can’t restart the entire game.