Problem with Borland (now Embarcadero) Builder6

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
allec
Posts: 3
Joined: Sun Jul 17, 2011 10:31 am

Problem with Borland (now Embarcadero) Builder6

Post by allec »

Good evening

A few years ago, i spent some time trying IrrLicht (version 0.8 at that time) with Borland Builder6, and it was - and is still - working properly. I could compile and use most of the examples provided.

Now that i have more time available, i would like to start again with IrrLicht, now version 1.7
Since i did not manage to compile example 02 (Quake3Map), i went step-by-step, and discovered that "createDevice()" works properly, but as soon as i add the next command "device->getVideoDriver()", i can compile without error, but when i run the .exe, i get an error "Access violation at adress 101356C7 in module Irrlicht.dll".

I could not find any clue.
Does anybody have an idea ?
Thank you.
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Re: Problem with Borland (now Embarcadero) Builder6

Post by Iyad »

Are you sure that the device was successfully created? Try to check it's value with a debugger, and where *device is pointing.
#include <Iyad.h>
allec
Posts: 3
Joined: Sun Jul 17, 2011 10:31 am

Re: Problem with Borland (now Embarcadero) Builder6

Post by allec »

Yes i am quite sure that the device was created : I check it as follow

Code: Select all

IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9, core::dimension2d<u32>(800,600), 32, false, true, false, 0);
if (!device) ShowMessage("Error");
else    ShowMessage("Ok");
video::IVideoDriver* driver = device->getVideoDriver();
Each time, i get Ok.
HerrAlmanack
Posts: 52
Joined: Mon Jun 13, 2011 3:50 pm

Re: Problem with Borland (now Embarcadero) Builder6

Post by HerrAlmanack »

that just checks for a non-zero value, it could still be a corrupted pointer. try doing a simple output call like

Code: Select all

 
 device->isWindowActive();
 
this will at least help you narrow down to whether the problem is the device.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Problem with Borland (now Embarcadero) Builder6

Post by serengeor »

have you recompiled irrlicht library? If no, you should try that.
Working on game: Marrbles (Currently stopped).
allec
Posts: 3
Joined: Sun Jul 17, 2011 10:31 am

Re: Problem with Borland (now Embarcadero) Builder6

Post by allec »

I have changed my code to :

Code: Select all

 IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9, core::dimension2d<u32>(800,600), 32, false, true, false, 0);
  bool ret1 = device->isWindowActive();
  bool ret2 = device->isWindowFocused();
  bool ret3 = device->isDriverSupported(EDT_DIRECT3D9);
  if(ret1 && ret2 && ret3) ShowMessage("OK");
  else    ShowMessage("Not ok");
  device->getVideoDriver();
When i run it, i first get the OK message, and then the error message.
So it seems that the device provided is valid, while the error message is generated by the function "getVideoDriver()"


Recompilation : I have tried to recompile the dll 1.7 source code with Builder6, but i got a lot of errors, so i gave up.
Besides, the instructions provided with the source code say :

"The complete source of the Irrlicht Engine can be found in this directory.
Please note that YOU DO NOT NEED THIS SOURCE to develop 3d applications with
the Irrlicht Engine. Instead, please use the .dll in the \bin directory, the
.lib in the \lib directory and the header files in the \include directory."


which is what i did.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Re: Problem with Borland (now Embarcadero) Builder6

Post by Sylence »

You don't need the source to develop the application but to debug the engine. If you use the source you can easily step into the engine to see exactly where and why it crashes...
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Problem with Borland (now Embarcadero) Builder6

Post by hybrid »

Moreover, binary compatibility is only assured for the compiler the engine was compiled with. This is MSVC or gcc. As you can see, borland throws up on many things, so it could be a problem with the pre-compiled lib as well. But indeed, having a debug version of Irrlicht would definitely help.
Post Reply