Problem running OF app compiled via a Makefile on OS 10.9

I’ve just started using OF on OS X, 10.9. I can successfully compile an example, say, multiTextureShaderExample, from the command-line using the Makefile. Yet when I run it, nothing shows up except a generic bouncing icon and I get the following error in the Console:

3/9/14 5:07:51.400 PM open[14244]: There was an error parsing the Info.plist for the bundle at URL Contents/Info.plist -- file:///Users/nknouf/development/of_v0.8.0_osx_release/examples/gl/multiTextureShaderExample/bin/
 The data couldn’t be read because it isn’t in the correct format.
 <CFBasicHash 0x7fbf70411ad0 [0x7fff7a34ff00]>{type = immutable dict, count = 2,
entries =>
	0 : <CFString 0x7fff7a332e00 [0x7fff7a34ff00]>{contents = "NSDebugDescription"} = <CFString 0x7fbf704118a0 [0x7fff7a34ff00]>{contents = "Unexpected character ! at line 2"}
	1 : <CFString 0x7fff7a3353a0 [0x7fff7a34ff00]>{contents = "kCFPropertyListOldStyleParsingError"} = Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it isn’t in the correct format." (Malformed data byte group at line 1; invalid hex) UserInfo=0x7fbf70411a00 {NSDebugDescription=Malformed data byte group at line 1; invalid hex}

If I compile the same example using XCode, the program runs fine with the correct icon.

I’ve found that the two examples’ Info.plist’s differ dramatically. For the Makefile version:

<?xml version="1.0" encoding="UTF-8"?>
!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">

And for the XCode compiled version:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

There’s obviously major differences between the two, most notably with the CFBundleExecutable key. I’ve found that if I copy the XCode Info.plist to the Makefile-compiled bundle, and update the CFBundleExecutable, the app runs properly.

It’s been a long time since I’ve programmed on OS X, so I’m not sure which keys are important between the two. Can anyone suggest a way to properly generate this Info.plist with a Makefile? Would it involve some change to openFrameworks-Info.plist file in the root of the app folder?

Thanks so much!

1 Like

Okay, I’ve found the obvious problem here: there’s a “<” missing at the beginning of the Doctype! So I have two questions:

  • Where might this typo be coming from?
  • How might I be able to set CFBundleExecutable properly, without the “bin/” prefix and “.app” suffix?

This was fixed a while back in the master branch along with some other great fixes. If you are working at the level of Makefiles, I’d definitely recommend working from the master branch, rather than the releases as the releases are notoriously slow … that said, I think 0.8.1 is scheduled to drop soon.

for reference:

Thanks! Glad to see that this was fixed. I’m going to stay on 0.8.0 for the current project (as I’m also working on an RPi and don’t want to compile everything again), but will move to master for the next one…

hi there, think i am running into this problem as well (i build 0.8 games from the makefile)

just a quick question to see if our problems are the same – did the makefile version run for you but not others? that’s what i am seeing (i am still on OSX 10.8.4).

also, a broader question: are there any downsides to working from makefiles the whole time and then at the very end switching over to xcode when you are ready to release to the public?

So just to clarify – did the previous solution work for you?

Also, there shouldn’t be any problem using makefiles for development and then switching over to xcode for deployment. Both systems use clang / llvm, and mostly the same settings.

yes using xcode instead of the makefile worked for me. my exact problem was that when i built with the makefile the project worked on my system (10.8) but not on other people’s (10.9).

thanks so much for writing this up, saved my hide.