Device Build Crash, Daily Build 753...TextCandy related?

Any ideas what might be causing this? (The Notices are from print statements, but I don’t recognize the Lua and SpriteSheet error…I’m using TextCandy, which involves a Sprite Sheet I believe.

>
Feb 28 09:21:42 unknown kernel[0] : launchd[172] Builtin profile: container (sandbox)
Feb 28 09:21:42 unknown kernel[0] : launchd[172] Container: /private/var/mobile/Applications/DA66E921-5D5A-4E18-A2E4-A1F355987F3B [69] (sandbox)
Feb 28 09:21:42 unknown UIKitApplication:com.lot49.blocfallfree[0x968f][172] : topLeft.x 0 topLeft.y 0
Feb 28 09:21:42 unknown UIKitApplication:com.lot49.blocfallfree[0x968f][172] : bottomRight.x 320 bottomRight.y 480
Feb 28 09:21:42 unknown UIKitApplication:com.lot49.blocfallfree[0x968f][172] : 320 480
Feb 28 09:21:42 unknown UIKitApplication:com.lot49.blocfallfree[0x968f][172] : --> TEXT FX SYSTEM READY.
Feb 28 09:21:42 unknown UIKitApplication:com.lot49.blocfallfree[0x968f][172] : Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to call field ‘newSpriteSheetFromData’ (a nil value)
>
Feb 28 09:22:43 unknown SpringBoard[15] : Posting ‘com.apple.iokit.hid.displayStatus’ notifyState=0
Feb 28 09:22:43 unknown SpringBoard[15] : MultitouchHID: detection mode: 3->255 [import]uid: 1560 topic_id: 22561 reply_id: 322561[/import]

need to post code. cant’ tell either… :frowning:

c [import]uid: 24 topic_id: 22561 reply_id: 89931[/import]

Hmm, I did another build after resaving the sprite sheet file (in case it had been corrupted somehow) and got an error that looks more like a sandboxing issue…it runs fine in the Corona simulator.

Feb 28 12:09:22 unknown amfid[274] : entitlement ‘keychain-access-groups’ has value not permitted by a provisioning profile
Feb 28 12:09:22 unknown amfid[274] : entitlement ‘application-identifier’ has value not permitted by a provisioning profile
Feb 28 12:09:22 unknown amfid[274] : entitlement ‘keychain-access-groups’ has value not permitted by a provisioning profile
Feb 28 12:09:22 unknown amfid[274] : entitlement ‘application-identifier’ has value not permitted by a provisioning profile
Feb 28 12:09:23 unknown kernel[0] : launchd[273] Builtin profile: container (sandbox)
Feb 28 12:09:23 unknown kernel[0] : launchd[273] Container: /private/var/mobile/Applications/DA66E921-5D5A-4E18-A2E4-A1F355987F3B [69] (sandbox)
Feb 28 12:09:23 unknown UIKitApplication:com.lot49.blocfallfree[0x8995][273] : --> TEXT FX SYSTEM READY.
Feb 28 12:09:23 unknown UIKitApplication:com.lot49.blocfallfree[0x8995][273] : Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to call field ‘newSpriteSheetFromData’ (a nil value)
The line in question appears to be:
local Sheet = sprite.newSpriteSheetFromData( imageFile, Data )

Has anything changed in iOS to require an additional directory parameter that was optional before?

The API syntax is:
sprite.newSpriteSheetFromData( spriteSheetImageFile, [baseDir,] coordinateData )
at
http://developer.anscamobile.com/reference/index/spritenewspritesheetfromdata
[import]uid: 1560 topic_id: 22561 reply_id: 89951[/import]

Nothing has changed with build 753 that should affects Sprites. Can you tell us what build you started seeing problems? I’m assuming this was working code that now doesn’t work with the new build.

Does this fail on both simulator and device? [import]uid: 7559 topic_id: 22561 reply_id: 89952[/import]

The entitlement errors look like a problem with your provisioning file. Have you downloaded a new iOS provisioning file lately?

The error with sprite.newSpriteSheetFromData indicates it can’t find that function (or the sprite namespace).

I built the HorseAnimation sample (using sprite.newSpriteSheetFromData) and it ran fine on an iPad. This is with build 753. [import]uid: 7559 topic_id: 22561 reply_id: 89955[/import]

It runs fine in the Corona simulator. But not when built for iOS device.

I can send the project file if that would be helpful.

The line that seems to be failing, from a Text Candy library:
local Sheet = sprite.newSpriteSheetFromData( imageFile, Data )
is followed by a print statement that should output an error message if no file is found.

It does not issue a print statement and works in the simulator, so I’m guessing there’s something that’s build-specific that is preventing the spite sheet file from being accessed. [import]uid: 1560 topic_id: 22561 reply_id: 89957[/import]

The provisioning issue seems to be transient. But I do suspect it has something to do with file paths, sandboxing, and directories. This is the console output from just trying to launch the app again:

Feb 28 13:09:14 unknown UIKitApplication:com.lot49.blocfallfree[0xf539][307] : --> TEXT FX SYSTEM READY.
Feb 28 13:09:14 unknown UIKitApplication:com.lot49.blocfallfree[0xf539][307] : Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to call field ‘newSpriteSheetFromData’ (a nil value)
Feb 28 13:09:15 unknown kernel[0] : launchd[307] Builtin profile: container (sandbox)
Feb 28 13:09:15 unknown kernel[0] : launchd[307] Container: /private/var/mobile/Applications/DA66E921-5D5A-4E18-A2E4-A1F355987F3B [69] (sandbox) [import]uid: 1560 topic_id: 22561 reply_id: 89966[/import]

What Corona build did this problem start? Your title suggests it’s a problem with build 753 so please try using other builds to see when the problem occurred.

Have you tried building and running the Sprite demos shipped with Corona?
[import]uid: 7559 topic_id: 22561 reply_id: 89970[/import]

I tried it with an earlier version of Corona, 751 I think but I thought the issue had to do with gameNetwork initialization. It was when I rebuilt with 753 and removed openfeint that I realized it was a sprite sheet issue.

the line that’s failing is in the Text Candy library, lib_text_candy.lua. I’ll give the horse demo a try. But I suspect it’s related to a problem finding the sprite sheet or directory permissions.

I haven’t done a release build of this code for a long time and I didn’t use sprite sheets in the earlier version.

[import]uid: 1560 topic_id: 22561 reply_id: 89974[/import]

The Horse animation works just fine on my iPhone. I’m pretty sure the problem is related to Text Candy. I couldn’t get one of the Text Candy sample projects to work on device either. [import]uid: 1560 topic_id: 22561 reply_id: 89976[/import]

One thing to check is the sprite file names. On Mac, file names are case-insensitive but on iOS and Android devices files will fail to load if their file names are not exact. This may be why you are seeing the newSprite error message. [import]uid: 7559 topic_id: 22561 reply_id: 89997[/import]

Do you mean the name of the single sprite sheet being loaded? The file in the main folder and references to the file and the related data file, font_LED_Big_Orange.lua and font_LED_Big_Orange.png, are consistent.

[import]uid: 1560 topic_id: 22561 reply_id: 90050[/import]

I was talking about the name of the file you are trying to load vs. the file name in your bundle. If your file is called “font_LED_Big_Orange.png” and you refer to it as “Font_LED_Big_Orange.png” in your code (e.g. newSpite), it will work in the Mac Simulator but fail on the device because the file names don’t match.

If you can determine which Corona build broke your code, we can see what changed in Corona. From what you said before it sounds like it may have never worked in any Corona build which could mean a problem in your code. [import]uid: 7559 topic_id: 22561 reply_id: 90226[/import]

Right, I double checked the file name references. That’s not the problem. I tried builds by renaming the spite sheet and data files all in lower case and also with a different sprite sheet.

I’ll try installing an old version of Corona, but I don’t think that’s it. The reference to “sandbox” in the console output makes me think the problem has something to do with recent iOS sandboxing changes or Xcode 4.3…maybe Text Candy is trying to write files where they are no longer allowed?

In any event, the problem is linked to the Text Candy library, lib_text_candy.lua. I’ve written Xpressed to ask about this.

I tried a build with Corona 755 and the problem is the same. If I replace Text Candy with a plain old text display object, the build works fine.

Also, the Text Candy sample project I tried to build for device also fails in the same way.

Everything runs correctly in the simulator. [import]uid: 1560 topic_id: 22561 reply_id: 90247[/import]

Problem resolved: I had a copy of sprite.lua in the project folder, which was evidently treading on the name space of the build-in sprite resources. For some reason, it didn’t show up as a problem in the simulator. Thanks the suggestions. [import]uid: 1560 topic_id: 22561 reply_id: 91390[/import]

I have a similar problem. My app runs fine under windows and Mac but not in my device. I have renamed my files references as stated here, rebuilt with the barest code (just an image and text), but all without success. I added “UIRequiredDeviceCapabilities = magnetometer” to the build file and there is internal api error when I upload to my device, I kindly need help. [import]uid: 74375 topic_id: 22561 reply_id: 101705[/import]