-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSInternalInconsistencyException creating window in test. OS X 10.6.6 #19
Comments
http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars Try using x11 driver (SDL_VIDEODRIVER=x11). If you want to use the default driver (Quartz), you need to run your program through SDLmain. In Go it's not easy. |
banthar, your comment helped me get sdl working in x11 on roughly the same hardware as bluehex. I'm interested in getting things running through Quartz as well, do you have any tips on where I should start looking? Or an explanation why it's not easy? Any information helps. |
To use GUI on Mac (and Windows), you need to initialize some stuff before your program starts. In SDL It's done through SDLmain module. It contains entry point for GUI programs. On windows it's WinMain, on Mac it's some Objective-C stuff. The problem is you cannot write SDLmain in Go. It has to be written in C/Objective-C. And it has to be the entry point of your executable, while Go already specifies it's own to make it's own initializations. Finally, the executable has to be marked as GUI. Basically, Go needs to add support for GUI programs. This requires some changes in go compiler and runtime. On windows some work is already done (http://code.google.com/p/go/source/detail?r=ef61c195ed), but I haven't heard anything about Mac. Maybe it's mentioned somewhere in Go docs, issues, or mailing list/irc archives. I don't know if any of this is accurate. You should probably talk to someone familiar with Macs. |
SDL 1.3 doesn't need a SDLmain function on OSX as far as I can tell, but the Go-SDL wrapper doesn't compile due to some API differences. |
A fix for this issue: https://github.com/0xe2-0x9a-0x9b/Go-SDL/commit/e4605f9fc41eb624d69a9d7e6e72e95b64e51e2a |
SDL 1.3 doesn't exist as far as I can tell O_O I initially had this issue, but then I downlloaded SDL2 and did configure, make, make install (I couldn't find any SDL 1.3) and now I get a different error:
Anyone know what's going on here? Had to revert back to 1.2 as apparently SDL + Mac OSX is a major problem :0 So back to this same issue. Is there an updated solution to this (this thread is years old)? Additionally this URL http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars is broken so I cannot follow to learn more about using x11 |
Also if it helps any, I am using it to try to compile some of the go-gl examples. I am able to compile some of them, like some of the NeHe ones, but this particular one is actually from github.com/go-gl/examples/sdl/gears - that's where I get this issue. As I play around more with the framework I will try to post back if I ever get the gears example working Thanks a bunch! |
Problem
When I run the GO-SDL test on OSX 10.6.6 I get a lot of errors about leaking objects due to no autorelease pool being in place, and then a crash trying to create the window.
Hardware / Software Overview
Model Name: MacBook Pro
Model Identifier: MacBookPro6,2
Processor Name: Intel Core i7
Processor Speed: 2.8 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache (per core): 256 KB
L3 Cache: 4 MB
Memory: 8 GB
Processor Interconnect Speed: 4.8 GT/s
Boot ROM Version: MBP61.0057.B0C
SMC Version (system): 1.58f16
Sudden Motion Sensor:
State: Enabled
System Version: Mac OS X 10.6.6 (10J567)
Kernel Version: Darwin 10.6.0
Boot Volume: Mac HD
Boot Mode: Normal
Secure Virtual Memory: Enabled
64-bit Kernel and Extensions: No
Time since boot: 15:54
Developer Information
Version: 4.0 (4A251a)
Location: /Xcode4
Applications:
Xcode: 4.0 (92)
Instruments: 3.0 (3524)
Dashcode: 3.0.2 (333)
SDKs:
Mac OS X:
10.5: (9L31a)
10.6: (4A251a)
iPhone OS:
4.2: (8C134)
iPhone Simulator:
3.2: (7W367a)
4.0: (8A400)
4.1: (8B117)
4.2: (8C134)
Go-SDL test output
The text was updated successfully, but these errors were encountered: