wxMax + glCanvas+ Snow Leopard Problem?

BlitzMax Forums/Brucey's Modules/wxMax + glCanvas+ Snow Leopard Problem?

Pete Rigz(Posted 2010) [#1]
Anyone else getting this problem on snow leopard?: If you run anything with a glCanvas you get the following errors output to debug (even in release mode)

Tue Jul 20 22:03:49 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Tue Jul 20 22:03:49 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Tue Jul 20 22:03:49 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Tue Jul 20 22:03:49 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Tue Jul 20 22:03:54 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Tue Jul 20 22:03:54 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Tue Jul 20 22:03:55 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer
Tue Jul 20 22:03:55 peter-rigbys-macbook.local glmax2d.debug[335] <Error>: kCGErrorIllegalArgument: CGSCopyRegion : Null pointer

And upon quitting, the null pointer error comes up in a dialogue. The null pointer error will also be spammed to the output window whenever you try and move the window. You can test with the glmax2d sample. Bug in wxMax or just my Mac? I did try a rebuild of the modules too.


Nigel Brown(Posted 2010) [#2]
Yes I am getting the same error using a wxGLCanvas. I also get the same error running the sample code from the wx folder as well this must be a problem in the library.

I am using OSX v10.6.4 with xcode v3.2.4 latest wx Libraries.

Did you have any luck in solving it?


Nigel Brown(Posted 2010) [#3]
glmax2d.bmx from the samples menu works under Windows but fails with the errors reported above under OSX. Googling arround I can see others have reported this error using other software packages. I have been unable to get a hint on how to fix so far. Will keep looking.


Nigel Brown(Posted 2010) [#4]
change:

canvas = MyCanvas(New MyCanvas.Create(Self,-1 GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER))

to:

canvas = MyCanvas(New MyCanvas.Create(Self,-1 GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER,0,0,640,480))

in glmax2d.bmx and the clock will redraw correctly under OSX, still getting the error, kCGErrorIllegalArgument: CGSCopyRegion : Null pointer. Where is the pointer that is incorrect??? Only when dragging the window, not when dragging something over the window? Its seems that unless you supply the window dimensions it fails to re-draw.


Nigel Brown(Posted 2010) [#5]
Stranger and stranger, it would seem if you pass width and height varaibles on the PC nothing is re-drawn. So OSX pass W/H and on PC don't?


Pete Rigz(Posted 2010) [#6]
On the PC I don't have any issues at all, and on the Mac it's only a minor issue as the errors don't stop the program from running, and there's no noticeable difference once it's compiled into an exe. Still, a bit worrying none the less though :)