Invalid display and invalid context

I’ll try re-installing x-code and see if that helps…

Right, the frameworks were still there in the projects, literally straight out of the juce download.
We’ll see if a re-install of x-code fixes anything.
I don’t think it’s any environmental variables–I get the same problem as other users.
I’ll say something if a new install of x-code doesn’t fix it.

Try an Apple OpenGL sample too. That will remove juce from the equation.

Did you try to install Mesa or something that could have overwritten some Apple OpenGL stuff?

Bruce

I tried the re-install of x-code.
That didn’t help.
Yes, I did install Mesa separately–and it works fine.
I never know where stuff gets written or where stuff needs to be not written, so it’s entirely possible that Mac could have put something somewhere that got overwritten.
I don’t know anything about Apple OpenGL stuff.
I’d love to test that though.
Have any leads for me on where I could get a test Apple OpenGL program other than the juce demo which doesn’t work for me?
Thanks,
Sean

You should have a /Developer/Examples/OpenGL/ folder.

http://www.lmgtfy.com/?q=Apple+OpenGL+Sample+code

Looks like your Mesa install overwrote something. There isn’t generally a reason to install Mesa on the Mac - standard Xcode has full OpenGl and GLUT support.

Bruce

I tried building the first one of those that I found and it gives me a problem that I have seen quite frequently, complaining about libiconv.2.dylib. I tried copying all the libiconv.2.dylib files from my non-iphone /Developer folders to /usr/lib/, and from /opt/local/lib (from port), but the error still occurs. Is it possible that this library could stop my OpenGL from working without explicitly complaining about it? Is there a way to get the original version of the library? I’ll try Deleting the unnecessary English.lproj BS and see if I can get things to work that way. Also, I’ll try some other examples too.

Building target “CocoaGL” of project “CocoaGL” with configuration “Debug” — (1 error)
cd /Developer/Examples/OpenGL/Cocoa/CocoaGL
setenv ICONV /usr/bin/iconv
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings --validate --inputencoding MACINTOSH --outputencoding UTF-16 English.lproj/InfoPlist.strings --outdir /Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj
English.lproj/InfoPlist.strings: warning: the specified encoding is MACINTOSH, but file contents appear to be UTF-16; treating as UTF-16
dyld: lazy symbol binding failed: Symbol not found: _iconv_open
Referenced from: /usr/bin/iconv
Expected in: /usr/lib/libiconv.2.dylib

dyld: Symbol not found: _iconv_open
Referenced from: /usr/bin/iconv
Expected in: /usr/lib/libiconv.2.dylib

sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
sh: line 1: 82913 Trace/BPT trap /usr/bin/iconv --from-code=“UTF-16” --to-code=“UTF-16” “English.lproj/InfoPlist.strings” > "/Developer/Examples/OpenGL/Cocoa/CocoaGL/build/Debug/CocoaGL.app/Contents/Resources/English.lproj/InfoPlist.strings"
Build failed (1 error)

So I tried deleting the English BS and compile just fine, but the example OpenGL doesn’t work either. I wonder how I can fix the Mac OpenGL on this machine when a reinstall of x-code doesn’t do it.

It looks like you have the wrong version of iconv. It’s not in the SDK, so it’s part of your OS. Well, I suppose technically your iconv and iconv shared libraries don’t match?

Not sure what could have happened, but maybe something else overwrote them. You may have to reinstall the OS!

Anyway, it’s a good clue that something’s messed up on your system, but is orthogonal to this issue. Try a different Apple example - others don’t seem to use iconv.

Bruce

PS - possibly the OpenGL problem is related - some helpful install overwrote some system files. Can you run binaries/apps that use OpenGL?

Ok, this is interesting. The other example OpenGL programs work just fine–just not CocoaGL or juce demo. Both of those give the same errors of invalid context and invalid display. I bet it’s something broken about this mac’s OpenGL framework. I’ll send mac an email and see if they get back to me. Oh, and I got iconv fixed with port.

I installed Snow Leopard from scratch and now everything works just fine.
Thanks for all your help!