CreateMesh error

Advanced game related topics
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

CreateMesh error

Post 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)

:(
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: CreateMesh error

Post by Comtois »

Have a look at Ogre.log in your folder , may be you will find some informations ?
Please correct my english
http://purebasic.developpez.com/
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: CreateMesh error

Post by Fred »

Do you have opened a screen ? Does the manualmesh.pb example works ?
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: CreateMesh error

Post by rsts »

Got code?

cheers
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: CreateMesh error

Post 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
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: CreateMesh error

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: CreateMesh error

Post 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 :)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: CreateMesh error

Post by Fred »

If you think a runtime debugger check is missing, just post a small sample showing your problem and we will add it.
Post Reply