Page 1 of 1

Problem with Borland (now Embarcadero) Builder6

Posted: Tue Jul 19, 2011 5:22 pm
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.

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Tue Jul 19, 2011 7:39 pm
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.

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Tue Jul 19, 2011 11:17 pm
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.

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Tue Jul 19, 2011 11:35 pm
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.

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Wed Jul 20, 2011 9:15 am
by serengeor
have you recompiled irrlicht library? If no, you should try that.

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Wed Jul 20, 2011 11:08 am
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.

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Wed Jul 20, 2011 11:10 am
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...

Re: Problem with Borland (now Embarcadero) Builder6

Posted: Wed Jul 20, 2011 8:10 pm
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.