due to my masterthesis I need my current project compiling under MacOSX. So I created a virtual machine with MacOSX since I don't own a Mac myself. I downloaded the current Irrlicht release 1.8 and tried to compile the tutorials with Xcode.
I noticed that all tutorials are build successfully but only work when using the EDT_SOFTWARE renderer. So I tried to compile examples from opengl-tutorial.org to assure that OpenGL is installed correctly. These tutorials work like charm.
When I try to launch the HelloWorld.app and watch it with a debugger it says me there is a EXC_BAD_ACCESS exception in CIrrDeviceMacOSX::storeMouseLocation()
Code: Select all
void CIrrDeviceMacOSX::storeMouseLocation()
{
int x,y;
if (Window != NULL)
{
NSPoint p;
p = [NSEvent mouseLocation];
p = [Window convertScreenToBase:p];
x = (int)p.x;
y = DeviceHeight - (int)p.y;
}
else
{
CGEventRef ourEvent = CGEventCreate(NULL);
CGPoint point = CGEventGetLocation(ourEvent);
CFRelease(ourEvent);
x = (int)point.x;
y = (int)point.y;
const core::position2di& curr = ((CCursorControl *)CursorControl)->getPosition(); //<-- HERE THE EXC_BAD_ACCESS OCCURS!!!!!
if (curr.X != x || curr.Y != y)
{
// In fullscreen mode, events are not sent regularly so rely on polling
irr::SEvent ievent;
ievent.EventType = irr::EET_MOUSE_INPUT_EVENT;
ievent.MouseInput.Event = irr::EMIE_MOUSE_MOVED;
ievent.MouseInput.X = x;
ievent.MouseInput.Y = y;
postEventFromUser(ievent);
}
}
((CCursorControl *)CursorControl)->updateInternalCursorPosition(x,y);
}
Code: Select all
IrrlichtDevice* device = createDevice( video::EDT_OPENGL, dimension2d<u32>(640,480), 16, false, false, false, 0);
The complete console output is:
Is this a known problem or am I doing anything wrong?Irrlicht Engine version 1.9.0
Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
No doublebuffering available.
(lldb)
EDIT: I'm using MacOSX 10.8.3