iDevice Build Error

When I try to build an iPad/iPhone app, Corona throws an error and I have to force quit the application. I followed the dated instruction on building to iOS from the docs, but I feel they are missing something. Here is the error:

  
2011-12-21 20:39:23.520 Corona Simulator[11288:2403] \*\*\* -[NSPlaceholderString initWithUTF8String:]: NULL cString  
2011-12-21 20:39:23.522 Corona Simulator[11288:2403] (  
 0 CoreFoundation 0x9794bd87 \_\_raiseError + 231  
 1 libobjc.A.dylib 0x956f6149 objc\_exception\_throw + 155  
 2 CoreFoundation 0x978b3619 +[NSException raise:format:arguments:] + 137  
 3 CoreFoundation 0x978b3589 +[NSException raise:format:] + 57  
 4 Foundation 0x94491396 -[NSString initWithUTF8String:] + 90  
 5 Corona Simulator 0x0003082a Corona Simulator + 194602  
 6 Corona Simulator 0x0003053a Corona Simulator + 193850  
 7 Corona Simulator 0x0002b75e Corona Simulator + 173918  
 8 Corona Simulator 0x0002c285 Corona Simulator + 176773  
 9 Corona Simulator 0x00013b2f Corona Simulator + 76591  
 10 Corona Simulator 0x0000d590 Corona Simulator + 50576  
 11 CoreFoundation 0x978a1091 -[NSObject performSelector:withObject:] + 65  
 12 AppKit 0x96b1fcb3 -[NSApplication sendAction:to:from:] + 232  
 13 AppKit 0x96b1fb90 -[NSControl sendAction:to:] + 102  
 14 AppKit 0x96b1fa93 -[NSCell \_sendActionFrom:] + 160  
 15 AppKit 0x96b1ee50 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2295  
 16 AppKit 0x96ba2351 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 501  
 17 AppKit 0x96b1d893 -[NSControl mouseDown:] + 943  
 18 AppKit 0x96ae67b1 -[NSWindow sendEvent:] + 7533  
 19 AppKit 0x96a7e6ff -[NSApplication sendEvent:] + 4788  
 20 AppKit 0x96a0fc82 -[NSApplication run] + 1007  
 21 AppKit 0x96ca418a NSApplicationMain + 1054  
 22 Corona Simulator 0x00002875 Corona Simulator + 6261  
)  

And here is my Settings file

settings =  
{  
 orientation =  
 {  
 default = "landscapeRight",  
 content = "landscapeRight",  
 supported =  
 {  
 "landscapeRight"  
 }  
 },  
   
 iphone =  
 {  
 plist =  
 {  
 UIAppFonts =   
 {  
 "feast.ttf"  
 }  
 }  
 }  
}  

Any help would be awesome :slight_smile: [import]uid: 54716 topic_id: 19492 reply_id: 319492[/import]

What error are you getting?

Those build.settings appear fine.

Are you using any non English characters in the name at all?

Peach :slight_smile: [import]uid: 52491 topic_id: 19492 reply_id: 75223[/import]

Hi Peach,

not hijacking the original poster because it is my doubt also but isn`t missing some commas after that brackets in the final of the code?

[lua]UIAppFonts =
{
“feast.ttf”
}
} – here one comma
} }[/lua]

Thank you! :wink:

Rodrigo. [import]uid: 89165 topic_id: 19492 reply_id: 75231[/import]

Yes, well, kind of - it should have commas but these settings will still work fine. (Just built to confirm using these and switching out the font name with one I had on hand, all fine.)

Peach :slight_smile: [import]uid: 52491 topic_id: 19492 reply_id: 75253[/import]

@Peach, Thank you for the info! I appreciate that.

So, the problem of him would be the font name? :\

TY!
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 19492 reply_id: 75264[/import]

Hey Peach,

That large blot of text from the terminal is the only sort of error I get. After that pops up, the dialog box that connects to Corona just stays open. I left it on for about two hours yesterday until I figured out that something was wrong.

Can I use numbers in the name? And what is wrong with my font? Is it the name of the font or the type of font? [import]uid: 54716 topic_id: 19492 reply_id: 75308[/import]

Nevermind its not the font, I completely removed the UIAppFonts table and I got the same output to the terminal. [import]uid: 54716 topic_id: 19492 reply_id: 75311[/import]

Numbers in the name are fine and no, it isn’t a font issue, so long as the font is in the file it’s all good.

When was the last time you successfully built the project? (Or is this the first time?)

What “blot” are you getting in the terminal? [import]uid: 52491 topic_id: 19492 reply_id: 75414[/import]

This is my first time building to iOS. I have always been able to build to Android.

Here is the “blot” from the terminal:

[code]

2011-12-21 20:39:23.520 Corona Simulator[11288:2403] *** -[NSPlaceholderString initWithUTF8String:]: NULL cString
2011-12-21 20:39:23.522 Corona Simulator[11288:2403] (
0 CoreFoundation 0x9794bd87 __raiseError + 231
1 libobjc.A.dylib 0x956f6149 objc_exception_throw + 155
2 CoreFoundation 0x978b3619 +[NSException raise:format:arguments:] + 137
3 CoreFoundation 0x978b3589 +[NSException raise:format:] + 57
4 Foundation 0x94491396 -[NSString initWithUTF8String:] + 90
5 Corona Simulator 0x0003082a Corona Simulator + 194602
6 Corona Simulator 0x0003053a Corona Simulator + 193850
7 Corona Simulator 0x0002b75e Corona Simulator + 173918
8 Corona Simulator 0x0002c285 Corona Simulator + 176773
9 Corona Simulator 0x00013b2f Corona Simulator + 76591
10 Corona Simulator 0x0000d590 Corona Simulator + 50576
11 CoreFoundation 0x978a1091 -[NSObject performSelector:withObject:] + 65
12 AppKit 0x96b1fcb3 -[NSApplication sendAction:to:from:] + 232
13 AppKit 0x96b1fb90 -[NSControl sendAction:to:] + 102
14 AppKit 0x96b1fa93 -[NSCell _sendActionFrom:] + 160
15 AppKit 0x96b1ee50 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2295
16 AppKit 0x96ba2351 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 501
17 AppKit 0x96b1d893 -[NSControl mouseDown:] + 943
18 AppKit 0x96ae67b1 -[NSWindow sendEvent:] + 7533
19 AppKit 0x96a7e6ff -[NSApplication sendEvent:] + 4788
20 AppKit 0x96a0fc82 -[NSApplication run] + 1007
21 AppKit 0x96ca418a NSApplicationMain + 1054
22 Corona Simulator 0x00002875 Corona Simulator + 6261
)
[/code] [import]uid: 54716 topic_id: 19492 reply_id: 75582[/import]

Have you been able to successfully build this particular app for Android? (With a modified build.settings file, obviously.)

Peach :slight_smile: [import]uid: 52491 topic_id: 19492 reply_id: 75647[/import]

Hey Peach,
Actually, I use the same build.settings file for my Android builds. I recently build to Android again this morning. [import]uid: 54716 topic_id: 19492 reply_id: 75650[/import]

Oh OK, sorry, I assumed your Android build.settings would have Android info in it. (As in, like a market build would do.)

The Android build worked fine, or no? [import]uid: 52491 topic_id: 19492 reply_id: 75738[/import]

The Android builds work perfectly fine. [import]uid: 54716 topic_id: 19492 reply_id: 75846[/import]

I’m not overly experienced with Android and I can’t think of anything off hand that would cause this.

I assume you’ve built for iOS previously? Does building sample apps work for iOS?

I’m going to see if I can grab another member of the team to see if they have any ideas about this.

Peach :slight_smile: [import]uid: 52491 topic_id: 19492 reply_id: 75908[/import]

You didn’t say what build you’re using but here are some general things you can try.

  1. Rename the build.settings file so it’s not included in the build and see if you can build for iOS. If that works, then something in your build.settings file is incorrect. If it fails on iOS, it’s generally something in the plist area. Missing commas is a another thing that causes the builds to fail.

  2. iOS builds are more sensitive to characters in the app name. Try building with “abc” as the app name and see if that makes a difference. I would stick with A-Z, a-z, 0-9, underscore and dash in the application name. [import]uid: 7559 topic_id: 19492 reply_id: 76019[/import]

Hey Tom,

I changed the name of my build.settings and even removed it. I also changed the name to abc and both times I received the same error.

And the building.settings file I posted is the exact same one I am using. I have even tried removing the entire iPhone table and I still get the error.

Thanks [import]uid: 54716 topic_id: 19492 reply_id: 78345[/import]

So you are saying that if you remove the build.settings file and use “abc” as the Application Name, you still get see Corona crashing on iOS builds?

What build are you using?
If you are using build 704, have you tried using 591?
What Mac OS are you using?
Are you able to build for the Xcode simulator?

-Tom [import]uid: 7559 topic_id: 19492 reply_id: 78508[/import]

Yes, when i remove the build.settings file and use abc for the name I still get the error. I just noticed that I can also reload the app and still use the app while trying to build for the device and get the error. I have to force quit corona in order to get the build window to go away.

When I build without the build.settings file I get the following:

2012-01-08 10:02:37.607 Corona Simulator[17106:2403] \*\*\* -[NSPlaceholderString initWithUTF8String:]: NULL cString  
2012-01-08 10:02:37.609 Corona Simulator[17106:2403] (  
 0 CoreFoundation 0x9794bd87 \_\_raiseError + 231  
 1 libobjc.A.dylib 0x956f6149 objc\_exception\_throw + 155  
 2 CoreFoundation 0x978b3619 +[NSException raise:format:arguments:] + 137  
 3 CoreFoundation 0x978b3589 +[NSException raise:format:] + 57  
 4 Foundation 0x94491396 -[NSString initWithUTF8String:] + 90  
 5 Corona Simulator 0x0003082a Corona Simulator + 194602  
 6 Corona Simulator 0x0003053a Corona Simulator + 193850  
 7 Corona Simulator 0x0002b75e Corona Simulator + 173918  
 8 Corona Simulator 0x0002c285 Corona Simulator + 176773  
 9 Corona Simulator 0x00013b2f Corona Simulator + 76591  
 10 Corona Simulator 0x0000d590 Corona Simulator + 50576  
 11 CoreFoundation 0x978a1091 -[NSObject performSelector:withObject:] + 65  
 12 AppKit 0x96b1fcb3 -[NSApplication sendAction:to:from:] + 232  
 13 AppKit 0x96b1fb90 -[NSControl sendAction:to:] + 102  
 14 AppKit 0x96b1fa93 -[NSCell \_sendActionFrom:] + 160  
 15 AppKit 0x96b1ee50 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2295  
 16 AppKit 0x96ba2351 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 501  
 17 AppKit 0x96b1d893 -[NSControl mouseDown:] + 943  
 18 AppKit 0x96ae67b1 -[NSWindow sendEvent:] + 7533  
 19 AppKit 0x96a7e6ff -[NSApplication sendEvent:] + 4788  
 20 AppKit 0x96a0fc82 -[NSApplication run] + 1007  
 21 AppKit 0x96ca418a NSApplicationMain + 1054  
 22 Corona Simulator 0x00002875 Corona Simulator + 6261  
)  
  

I could have sworn that I tried building for Xcode before…but Xcode works.

I am using Build: 2011.696. Should I try 704 or 591?

I am using Mac OSX 10.7.2. [import]uid: 54716 topic_id: 19492 reply_id: 78515[/import]

Okay, I knew I wasn’t crazy. That one time that it built for Xcode I forgot to use my code signing identity. I get the same error as when building for the device when using the key.

So…what could be wrong with my key.

And the first time I successfully built to the simulator, it opened up in the iOS simulator right away. But every time after that it said opening and installing in to the simulator, but the iOS simulator opens but nothing pops up - not even the device. All I get is a black screen. I was so happy a few minutes ago :((((( How do I open a specific app in the simulator? [import]uid: 54716 topic_id: 19492 reply_id: 78523[/import]

I don’t think it should make a difference, but could you try building with 704 and 591?
Please note that build 704 no longer requires a provisioning file for Xcode simulator builds so if your app works in the Xcode simulator with build 704, that could point to a problem with the provisioning file.

Can you build any of the Corona sample apps? This would validate that the code signing is working and your Xcode setup is working.

You can start the Xcode (iOS) simulator and run any app that was installed on the simulator. It simulates a real iOS device.

What version of Xcode are you using?

The fact that the build window is hanging and you are not using a build.setting file and you are using a simple app name, could indicate there is an asset (image or sound file) that is causing problems in creating the final app package. This is the portion that is different between Android and iOS builds. In the past, Corona hanging like this occurs because of errors in the build.settings file or illegal characters in the App name.

If you feel comfortable sending me the project, I could do a quick look at it. It would be nice to understand why this is failing. tom at anscamobile.com

[import]uid: 7559 topic_id: 19492 reply_id: 78529[/import]