Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
greid
Visitor

Help! Packaged apps are crashing

I have a new problem where apps that are packaged and pushed out to the private channel are crashing on launch, while the development version works fine. This reproduces on 3 different Roku's, even on the development box (if the private channel is "Add"ed via the web interface).

I tried adding code at the very beginning of the app that touches the server to give me some info, but it never gets that far.

It seems that there's something going wrong in the packaging itself, such that the resulting package is DOA when it gets to the target box. I don't know how to debug this!

Thanks.
0 Kudos
5 REPLIES 5
greid
Visitor

Re: Help! Packaged apps are crashing

Also I'm reading on the blog about 5.2 firmware update but it's not available through the normal Roku Settings/Update mechanism, which shows 5.1 and that I'm "up to date". Is that what's going on, perhaps, that a package made with 5.1 is no longer workable (even though my other Roku's are also 5.1)? How does one update to 5.2?
0 Kudos
RokuJoel
Binge Watcher

Re: Help! Packaged apps are crashing

Channels built on 5.0 that didn't have a facade screen may exit on 5.1 without a log, as the normal behavior where channels exit when the last screen is closed is working again on 5.1

Make sure you are zipping properly (in most cases, you want to zip from within the project folder if zipping from mac or pc gui unless you are on an older Mac OS version).

Be sure you aren't zipping up hidden or system files or subversion repositories within your channel.

Make sure that the mm_icon_side_hd, mm_icon_side_sd, mm_icon_focus_sd and mm_icon_focus_hd paths in the manifest are all valid paths to valid images.

- Joel
0 Kudos
greid
Visitor

Re: Help! Packaged apps are crashing

Thanks, Joel. It's not the .zip (that goes to the dev box) I'm having trouble with -- that works. It's the .pkg that I download from the Packager and upload to the private channel interface on the Dev site that doesn't work when installed through the private channel mechanism to another user box.

I have been installing the app on the Roku with 'make install' and then running the Packager on the web interface on the Roku itself. I'm not aware of any other way to build a package. It worked before, all the way through to the private channel install, though I havent done it in a month or two. Here's what 'make install' says:

Silver-Tower.local: make install
*** Creating MyTestApp.zip ***
>> removing old application zip ../../zips/MyTestApp.zip
>> creating destination directory ../../zips
>> setting directory permissions for ../../zips
>> creating application zip ../../zips/MyTestApp.zip
adding: .DS_Store (deflated 94%)
adding: app.mk (deflated 68%)
adding: images/ (stored 0%)
adding: images/mm_icon_focus_hd.png (deflated 1%)
adding: images/mm_icon_focus_sd.png (deflated 0%)
adding: images/mm_icon_side_hd.png (deflated 0%)
adding: images/mm_icon_side_sd.png (stored 0%)
adding: images/successful_reg.png (deflated 13%)
adding: images/theater3.jpg (deflated 7%)
adding: Makefile (deflated 64%)
adding: manifest (deflated 51%)
adding: source/ (stored 0%)
adding: source/.DS_Store (deflated 97%)
adding: source/MovieChooser.brs (deflated 70%)
adding: source/MyTheater.brs (deflated 76%)
adding: source/MyTestApp.brs (deflated 59%)
adding: source/Registration.brs (deflated 74%)
adding: source/Utilities.brs (deflated 62%)
adding: source/videoPlayer.brs (deflated 74%)
deleting: Makefile
*** developer zip MyTestApp complete ***
Installing MyTestApp to host 10.0.1.72
Application Received: 155324 bytes stored.
Install Success.</font>

I'm pretty sure the facade screen is working. Here's the beginning of the main app, though the version and TouchBaseWithServer() stuff is new after I got this behavior, trying to get the app to tell me something (it never gets that far on the packaged version, though it all works fine through the dev mechanism):

Sub Main()
appVersion = "1.0.3"
print appVersion
bottomScreen = CreateObject("roParagraphScreen")
bottomScreen.Show()
code = GetStoredRegCode()
codeResult = TouchBaseWithServer(code, appVersion)
if code = invalid OR code <> codeResult
DoWelcomeScreen()
code = DoRegScreen()
endif
0 Kudos
TheEndless
Channel Surfer

Re: Help! Packaged apps are crashing

"greid" wrote:

code = GetStoredRegCode()

I'd bet this is where the issue is. The published channel uses a different registry location than your side-loaded dev channel, so it could be crashing when trying to read from a registry location that your code assumes exists. Check the GetStoredRegCode() function (or any others that read from the registry) and make sure your code doesn't crash if the key you're looking for doesn't exist.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
greid
Visitor

Re: Help! Packaged apps are crashing

"TheEndless", thank you! I'm not positive that was it, because I tried a lot of things at the same time, adding some defensive code, but I changed the registry to use a different registry token so it forced all existing codes to be invalid, checked for 'invalid' a couple of places and rebuilt it again and it seems as though the problem has gone away.

Tricky one to debug, so I really appreciate the help from you and RokuJoel!
0 Kudos