Page 1 of 1

CreateMesh error

Posted: Mon Dec 21, 2009 4:50 am
by IdeasVacuum
CreateMesh(#MeshModel, 10)

If InitEngine3D() is successful, does anyone know what can make CreateMesh fail with:

[ERROR] Invalid memory access (read error at address 0)

:(

Re: CreateMesh error

Posted: Mon Dec 21, 2009 9:01 am
by Comtois
Have a look at Ogre.log in your folder , may be you will find some informations ?

Re: CreateMesh error

Posted: Mon Dec 21, 2009 9:58 am
by Fred
Do you have opened a screen ? Does the manualmesh.pb example works ?

Re: CreateMesh error

Posted: Mon Dec 21, 2009 3:08 pm
by rsts
Got code?

cheers

Re: CreateMesh error

Posted: Mon Dec 21, 2009 8:47 pm
by IdeasVacuum
Comtois wrote:Have a look at Ogre.log in your folder , may be you will find some informations ?
Strangely (to me at least), #PB4.40 does not produce an Ogre.log file, whereas I did have one from #PB4.31

Re: CreateMesh error

Posted: Mon Dec 21, 2009 8:57 pm
by IdeasVacuum
rsts wrote:Got code?

cheers
A ton of code, which has led to the issue by way of how the code is organized. It boils-down to this, InitEngine3D() should be initialized just before the Window is defined. I had the initialization at the top of my "Main.pb" (home of global values) and the Window Form built via a procedure in a separate .pb file (the project has several .pb files, I got used to organizing code into logical files in this way using C/CPP). So, I have moved InitEngine3D() into the procedure itself and that has removed the fault. To me, the compiler should "see" all the .pb files as one file, but I'm finding that although it does so for "regular window apps", it's less forgiving when the Ogre engine is involved.

Re: CreateMesh error

Posted: Mon Dec 21, 2009 10:09 pm
by IdeasVacuum
Fred wrote:Do you have opened a screen ? Does the manualmesh.pb example works ?
Hello Fred. Most of the time I do have a screen opened and the ManualMesh.pb sample works fine. As I have explained in my reply to rsts, I seem to have corrected the problem.

However, the biggest problem is PB's ease of use. It's too easy to use! Why is that a problem? Well, I am a PB newbie that has spent too much time using C/CPP etc, and find that I can build apps in PB very quickly. That leads to issues because I'm running before I can walk :)

Re: CreateMesh error

Posted: Tue Dec 22, 2009 9:57 am
by Fred
If you think a runtime debugger check is missing, just post a small sample showing your problem and we will add it.