First, I realize BlitzMax dlls are uncharted territory, so I may be dealing with a totally unknown problem.
I compiled my 3D engine into a dll, and am calling it from BlitzPlus. I wrote a BlitzPlus program to load a scene and render it in a loop. After about 5 minutes of running, the program suddenly quits with no error message and no explanation.
By commenting out lines of code, I determined that my MoveEntity() command will cause the program to quit, after a few minutes of running. With the command commented out, the program does not quit unexpectedly. I tested this many times over more than one day.
The decls entry for the function looks like this:
and the function source code looks like this:
I'm rather baffled by this behavior. My best guess is there is an issue with memory allocation or function return values, since the error is inconsistent.
Any ideas?
I compiled my 3D engine into a dll, and am calling it from BlitzPlus. I wrote a BlitzPlus program to load a scene and render it in a loop. After about 5 minutes of running, the program suddenly quits with no error message and no explanation.
By commenting out lines of code, I determined that my MoveEntity() command will cause the program to quit, after a few minutes of running. With the command commented out, the program does not quit unexpectedly. I tested this many times over more than one day.
The decls entry for the function looks like this:
MoveEntity(entity%,x#,y#,z#)
and the function source code looks like this:
Function dll_MoveEntity(HEntity,x#,y#,z#) GCEnter() entity:TEntity=TEntity(HandleToObject(HEntity)) If entity entity.move(x,y,z) Else Notify "Entity does not exist." EndIf EndFunction
I'm rather baffled by this behavior. My best guess is there is an issue with memory allocation or function return values, since the error is inconsistent.
Any ideas?