When running the attached game demo with UPBGE 0.2.4, a crash happens in different ways depending on the OS: BGEz_LandGen.zip
Ubuntu: Crash when hitting the ground, or roughly ~10 seconds in.
Windows (youle): Crash after ~10 seconds.
Fred/K.S. is using 0.2.0 and he seems to have no issues (windows).
@youle31 said this was a libload bug. I believe him.
I said, if it is a libload bug, we shouldn't use libload :P
LibLoad is a very important feature that allows the developers to efficiently manage what is needed and what is not. We should use LibLoad!
This bug has been fixed by panzergame in last master, however, this file still crashes. This is possibly related to: https://github.com/UPBGE/blender/commit/fb1f17288108154a7c1eeed950d9de41cd9c6bf8 but i didn't test to revert yet.
Just wanted to add something here because I am not clear whether it is addressed by the commit. Unlike what happens in Blender I can't get UPBGE 0.24 to free a library that is added with libLoad (rather than libNew).
Compare results in Blender with UPBGE of this code:
from bge import logic, events
def loadTest(cont):
freeWarmUp()
logic.LibLoad("//Test.blend","Scene")
print("libraries 5:",logic.LibList())
def loadWarmUp(cont):
print("libraries 1:",logic.LibList())
logic.LibLoad("//WarmUp.blend","Scene")
print("libraries 2:",logic.LibList())
def freeWarmUp():
print("libraries 3:",logic.LibList())
path = logic.expandPath("//WarmUp.blend")
logic.LibFree(path)
print("should free Warm Up",path)
print("libraries 4:",logic.LibList())
--
IN BLENDER 2.79 - it works giving:
Blender Game Engine Started
libraries 1: []
libraries 2: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
libraries 3: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
should free Warm Up C:\Users\michPC2\Documents\WarmUp.blend
libraries 4: []
libraries 5: ['C:\\Users\\michPC2\\Documents\\Test.blend']
Blender Game Engine Finished
IN UPBGE 0.24 - the WarmUp Library persists even though all the objects are released in runtime:
Blender Game Engine Started
libraries 1: []
libraries 2: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
libraries 3: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
should free Warm Up C:\Users\michPC2\Documents\WarmUp.blend
libraries 4: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
libraries 5: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend', 'C:\\Users\\michPC2\\Documents\\Test.blend']
Blender Game Engine Finished
@youle31 pointed me to: https://github.com/UPBGE/blender/commit/fb1f17288108154a7c1eeed950d9de41cd9c6bf8
This file works OK in current 0.2.5 in windows.
Thanks for reporting. Closing now.