unlobito / skunk

Easy access to your store cards and other barcodes from your Pebble.
Other
29 stars 14 forks source link

Crash during launch after firmware 3.10 #22

Closed erikrose closed 7 years ago

erikrose commented 8 years ago

Since updating my Pebble Time Steel to firmware 3.10, skunk crashes on launch. (I get the flippy little launch animation, but it never leaves the application menu.) Uninstalling and reinstalling skunk gets me to the "Please open settings" state, but then it crashes again once I enter a barcode on the phone and hit Save. Is there any debug info I can send you to help?

erikrose commented 8 years ago

Hmm, it may also have been 3.10.1 at fault. I might have upgraded twice in the 2 days since I launched skunk.

jdpatton commented 8 years ago

I'm seeing the same problem on a Pebble Steel.

unlobito commented 8 years ago

I've gotten a few reports about crashes but haven't been able to reproduce this on any devices I have access to.

Could someone upload device logs dumped shortly after the crash?

erikrose commented 8 years ago

Certainly! (And thanks for the nifty app!)

[17:59:55] message_inbox.c:13> app_message_open() called with app_message_inbox_size_maximum().
[17:59:55] message_inbox.c:16> This consumes 8200 bytes of heap memory, potentially more in the future!
[17:59:55] rocess_loader.c:134> Error: Heap corrupt around <0x20021738>
[17:59:56] ault_handling.c:78> App fault! {1e420b43-63be-45f7-822c-2a7d57a55384} PC: 0x800ed0b LR: ???
Program Counter (PC)    : 0x800ed0b  ???
Link Register (LR)      : ???        ???
[17:59:56] javascript> Skunk:392 loadScript /data/data/com.getpebble.android.basalt/app_js_app_files/1e420b43-63be-45f7-822c-2a7d57a55384/pebble-js-app.js
Weirdosrock commented 8 years ago

I've been having the same issue since the update as well. Pebble time. Thanks! Looking forward to the fix! I really appreciate how this app and all the hard work you've put into it simplifies my life.

shrmnk commented 8 years ago

May I know how I would access these logs? I would be happy to contribute them when I experience them as well.

unlobito commented 8 years ago

@shrmnk You can do this by opening the Pebble app on your phone, selecting Support then Contact Support.

jdpatton commented 8 years ago

Here are my logs.

Attached below are log files that will help our engineers analyze the problem. Please do not modify them.

Pebble account: 5688576331333500271f0c00

Pebble iOS App -- version 3.10 (20160223031053) iPhone7,2 (N61AP) - iPhone OS 9.3

Carrier name: Sprint

Last connected watch: Pebble B89C (Connected) Serial Number: Q202524E010C Version Info:Running FW: Version: v3.10.1 Is Recovery FW?: NO Hardware Platform: v2_0

Recovery FW: Version: v3.8-prf9 Is Recovery FW?: YES Hardware Platform: v2_0

Bootloader: 1447134832

Hardware Rev: 102V1 Serial Number: Q202524E010C Device Address: <9cb8afe9 1700>

System Resources: CRC: 888196867 Timestamp:0

Known watches:

Pebble B89C (Connected) Serial Number: Q202524E010C Version Info:Running FW: Version: v3.10.1 Is Recovery FW?: NO Hardware Platform: v2_0

Recovery FW: Version: v3.8-prf9 Is Recovery FW?: YES Hardware Platform: v2_0

Bootloader: 1447134832

Hardware Rev: 102V1 Serial Number: Q202524E010C Device Address: <9cb8afe9 1700>

System Resources: CRC: 888196867 Timestamp:0

Background refresh status: 2

On Mon, Mar 28, 2016 at 9:27 AM, Henri Watson notifications@github.com wrote:

@shrmnk https://github.com/shrmnk You can do this by opening the Pebble app on your phone, selecting Support then Contact Support.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/henriwatson/skunk/issues/22#issuecomment-202416375

TransRapid commented 8 years ago

@henriwataon

Exactly the same issue as mentioned at the start of the thread, thanks for conslidating this to here.

As of now do you have any idea as to what it might be?

AlecEdworthy commented 8 years ago

I too get this error. Which bit of the logs do you want? I appear to get four files generated as part of the log generation process - three are plain text log files (two called com.getpebble.pebbletime yyyy-mm-dd hh-mm.log and one called watch_logs_gen0_nnnnnnnnnn.txt) and one is a binary file called "crash.data". None of the plain text files appear to contain anything massively useful regarding Skunk sadly. The section which might be relevant is,

2016/03/28 22:03:49:296Z [I] [PBCloudAppHost start] JS: starting app: 1E420B43-63BE-45F7-822C-2A7D57A55384 Skunk
2016/03/28 22:03:51:200Z [V] [PBPebbleProtocolLogging PBPebbleProtocolLogMessage] Watch => Phone PBAppRunStateRunningApplicationResponseMessage endpoint=0x34 (52) payload=17 bytes 
2016/03/28 22:03:51:201Z [V] [PBPebbleProtocolLogging PBPebbleProtocolLogMessage] Watch => Phone PBAppRunStateRunningApplicationResponseMessage endpoint=0x34 (52) payload=17 bytes 
2016/03/28 22:03:51:201Z [V] [PBPebbleProtocolLogging PBPebbleProtocolLogMessage] Watch => Phone PBAppRunStateRunningApplicationResponseMessage endpoint=0x34 (52) payload=17 bytes 
2016/03/28 22:03:51:201Z [V] [PBPebbleProtocolLogging PBPebbleProtocolLogMessage] Watch => Phone PBAppRunStateRunningApplicationResponseMessage endpoint=0x34 (52) payload=17 bytes 
2016/03/28 22:03:52:620Z [I] [EJBindingPebble onPebbleReady:] app is ready: 1
2016/03/28 22:03:52:779Z [V] [PBPebbleProtocolLogging PBPebbleProtocolLogMessage] Watch => Phone PBAppRunStateRunningApplicationResponseMessage endpoint=0x34 (52) payload=17 bytes 
2016/03/28 22:03:52:802Z [V] [PBPebbleProtocolLogging PBPebbleProtocolLogMessage] Watch => Phone PBAppRunStateRunningApplicationResponseMessage endpoint=0x34 (52) payload=17 bytes 
2016/03/28 22:03:53:210Z [D] [PBWatchAppManager registerLaunchEventHandler] Watch face tracker not interested in lifecycle event (uuid=1E420B43-63BE-45F7-822C-2A7D57A55384 state=0)
2016/03/28 22:03:53:222Z [V] [PBWatchCloudAppManager registerLaunchEventHandler] App launch event for app 1E420B43-63BE-45F7-822C-2A7D57A55384: not running
2016/03/28 22:03:53:222Z [I] [PBCloudAppHost stop] JS: stopping app: 1E420B43-63BE-45F7-822C-2A7D57A55384 Skunk
2016/03/28 22:03:53:670Z <NSLog> -[EJJavaScriptView dealloc] [Line 165] going down!
2016/03/28 22:03:54:721Z [V] [PBWatchCloudAppManager registerLaunchEventHandler] App launch event for app DEC0424C-0625-4878-B1F2-147E57E83688: running
2016/03/28 22:03:54:721Z [I] [PBWatchCloudAppManager stopAllAppsExceptConfiguration] 
2016/03/28 22:03:55:198Z [E] [PBWatchCloudAppManager retryInstallationOfAppWithUUID:userAccountToken:] App does not exist: DEC0424C-0625-4878-B1F2-147E57E83688
2016/03/28 22:03:56:438Z [D] [PBWatchAppManager registerLaunchEventHandler] Watch face tracker not interested in lifecycle event (uuid=DEC0424C-0625-4878-B1F2-147E57E83688 state=0)
2016/03/28 22:03:56:476Z [V] [PBWatchCloudAppManager registerLaunchEventHandler] App launch event for app DEC0424C-0625-4878-B1F2-147E57E83688: not running
2016/03/28 22:03:56:476Z [E] [PBWatchCloudAppManager stopAppWithUUIDUnlessItsConfiguration:] App does not exist: DEC0424C-0625-4878-B1F2-147E57E83688
2016/03/28 22:03:57:049Z [V] [PBWatchCloudAppManager registerLaunchEventHandler] App launch event for app 1E420B43-63BE-45F7-822C-2A7D57A55384: running
2016/03/28 22:03:57:049Z [I] [PBWatchCloudAppManager stopAllAppsExceptConfiguration] 
2016/03/28 22:03:57:050Z [I] [PBCloudAppHost start] JS: starting app: 1E420B43-63BE-45F7-822C-2A7D57A55384 Skunk
2016/03/28 22:03:58:742Z [I] [EJBindingPebble onPebbleReady:] app is ready: 1
2016/03/28 22:04:00:623Z [D] [PBWatchAppManager registerLaunchEventHandler] Watch face tracker not interested in lifecycle event (uuid=1E420B43-63BE-45F7-822C-2A7D57A55384 state=0)
2016/03/28 22:04:00:642Z [V] [PBWatchCloudAppManager registerLaunchEventHandler] App launch event for app 1E420B43-63BE-45F7-822C-2A7D57A55384: not running
2016/03/28 22:04:00:642Z [I] [PBCloudAppHost stop] JS: stopping app: 1E420B43-63BE-45F7-822C-2A7D57A55384 Skunk

I tried to launch Skunk, it downloaded (not been run for a while), failed to load so I tried again and it instantly failed to load. I'm happy to send other log data directly rather than publishing here.

Alec

unlobito commented 8 years ago

Does this error still occur on Pebble Firmware v3.11.1?

AlecEdworthy commented 8 years ago

Yes, unfortunately it does. If you want any logs then let me know what you want collecting and I'll send them over.

A

TransRapid commented 8 years ago

Yes, it does. It was the first thing I tried yesterday after updating. The app was uninstalled actually and the data cleared; I would consider it a clean installation on my end.

I can send logs as well. Just let me know what you want.

clach04 commented 8 years ago

I think I'm seeing the same problem (on 3.11.1 on Pebble Time, with Android phone) with EAN-13 bar codes. Looks like any value causes the problem. I'm using 1234567891231 as my test. I have to uninstall skunk to get settings to load again.

clach04 commented 8 years ago

I just tried in the CloudPebble emulator using https://cloudpebble.net/ide/import/github/henriwatson/skunk/ BUT that doesn't work well as the hosted server that serves the html settings doesn't look like it has emulator support.

https://skunkapp.herokuapp.com/script.js has a function, generatePebbleURL() which would be the place to add emulator support. It has a hard coded 'pebblejs://close#'.

See https://github.com/clach04/watchface_framework/blob/master/config/slate/index.html#L156 and the return_to code for a code snippet you can use. See https://developer.pebble.com/blog/2015/01/22/cloudpebble-pebble-emulator/ for more detail.

AlecEdworthy commented 8 years ago

Since upgrading to 3.11.1 I hadn't tried deleting and reinstalling Skunk. Just tried it now and it works again. Just have to re-enter all my codes now :(

A ​

erikrose commented 8 years ago

Since upgrading to 3.11.1 I hadn't tried deleting and reinstalling Skunk. Just tried it now and it works again. Just have to re-enter all my codes now :(

I think you lucked out. Don't touch anything! :-) It still crashes for me.

Weirdosrock commented 8 years ago

I just fresh installed after the update and it's back to working again! Definitely not gonna touch it!

On Saturday, April 9, 2016, Erik Rose notifications@github.com wrote:

Since upgrading to 3.11.1 I hadn't tried deleting and reinstalling Skunk. Just tried it now and it works again. Just have to re-enter all my codes now :(

I think you lucked out. Don't touch anything! :-) It still crashes for me.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/henriwatson/skunk/issues/22#issuecomment-207829800

Leon J. Wood

(562) 292-8594

nickfang commented 8 years ago

I still see this issue on a pebble round.

christopher-demarco commented 8 years ago

Crash at launch on Pebble Time. Watch, phone app (Android 4.4), and Skunk all up-to-date.

Interestingly, when I try to open the Skunk settings, the app times out with the message "App install unsuccessful."

Deleting and reinstalling the watch app clears the settings, but after adding barcodes the crash returns.

QR codes seem to be fine; I'm only experiencing crashes with UPC-A. After extensive testing, the following seems to be true: (a) sometimes a UPC code in the zeroth slot crashes on startup, but if one or more QR codes are created first, and then the UPC code is moved into the zeroth slot that seems to work; (b) the more config changes I make, the likelier crashes become; (c) sometimes the direction from which I switch to a UPC code matters—UPC.foo only crashes when displaying via the "UP" button, UPC.bar only crashes via "DOWN".

Bizarre.

tw2501 commented 8 years ago

Since update to Firmware 3.13 on my Time Steel the App is not starting. reinstalling did not help. Settings can not send to App.

bearsh commented 8 years ago

for me it always crashes in card_layer_set_index() although I have no idea atm why, everything seems to be sane there... it's the same heap corruption as mentioned bevor:

[13:08:09] rocess_loader.c:136> Error: Heap corrupt around <0x20021bd4>
[13:08:09] ault_handling.c:93> App fault! {1e420b43-63be-45f7-822c-2a7d57a55384} PC: 0x8017e23 LR: ???
Program Counter (PC)    : 0x8017e23  ???
Link Register (LR)      : ???        ???
travm commented 8 years ago

@henriwatson I noticed that this crash may be tied directly to memory limits. To test, start with a clean install and then add multiple QR codes with some plain text strings or numbers. Mine will crash after two. But I can successfully get it to work with one. May help trace down the issue.

clach04 commented 8 years ago

@travm and @henriwatson I'm seeing crash consistently with a single bar code. EAN-13 bar codes type, looks like any value causes the problem. I'm using 1234567891231 as my test. I have to uninstall skunk to get settings to load again.

What types/values are you seeing success with one and crash with two?

travm commented 8 years ago

I can get it to crash by adding a single UPC_A 12 digit code.

I can also get it to crash with two QR codes: one being the string "Hello World" and the second being the 12 digit number. It doesn't matter which one you add first, which leads me to believe this is a memory issue.

I can confirm that it will permanently crash after the initial crash because I'm assuming that it is trying to load in the same data that caused it to crash when reopening the settings. I wish I was more familiar with C to be of more help.

travm commented 8 years ago

@clach04 and @henriwatson I pulled everything down locally and began trying a few things. Interestingly enough, I believe this is an issue with the label and not the data.

I added a UPC-A code to my settings with the label/name of "A"... and it actually worked. So, I opened the settings again and changed it to "AA" and again it saved successfully. Opened it a third time and changed it to "AAA" and it immediately crashed.

So, the label/name may actually be the culprit here instead of the data.

kontakt commented 8 years ago

I've found a solution for the problem after going through the source. I'll submit a pull request, please look over it.

clach04 commented 8 years ago

@kontakt Nice catch on the string dupe! PR #26 lgtm :+1:

unlobito commented 8 years ago

@kontakt Awesome! I didn't even think about that being an issue! Thank you so much for your time hunting this down. Now to email everybody about the fix. ^^;

I'll keep this issue open until I get confirmation that all is fixed.

clach04 commented 8 years ago

Confirmed, test case: EAN-13 bar code value 1234567891231 with name "123" works fine on PT hardware. :tada:

kontakt commented 8 years ago

Glad it's working for everyone, this app is really handy. Happy to help.

tw2501 commented 8 years ago

works (again) fir me too.

Thomas

Am 23.08.2016 um 23:40 schrieb Connor Huffine notifications@github.com:

Glad it's working for everyone, this app is really handy. Happy to help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

kontakt commented 8 years ago

This fix might resolve 5, 6 & 7 as well