Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-07-2009, 08:01 AM   #1 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default REJECTED! Can't reproduce the crash - UITabBar related

I had the Lite and paid versions of my new app were rejected for the App Store because of a crash that I never have experienced. My app is a type of calculator with four tabs.

At this time, STAT E&M LITE cannot be posted to the App Store because it is crashing on iPhone OS 2.2 and Mac OS X 10.5.5. To reproduce, launch the application then tap the Exam button at the bottom of the screen. Please refer to the attached crash logs.

All of the .crash logs from Apple are labeled "_iPod-touch.crash" I have only tested this app on my iPhone but am not aware of any difference among iPhone and iPod Touch about how tabs are handled.

Code:
EXC_BAD_ACCESS/KERN_PROTECTION_FAILURE — (This is caused by the thread trying to write to read-only memory. This is always caused by a data access.)

§  0   STATEMLITE                      0x00009ec6 0x1000 + 36550
1   STATEMLITE                      0x00006aac 0x1000 + 23212
2   STATEMLITE                      0x000056be 0x1000 + 18110
3   UIKit                           0x30ad65ec -[UITabBarController transitionFromViewController:toViewController:] + 312
4   UIKit                           0x30ad542c -[UITabBarController setSelectedIndex:] + 240
5   UIKit                           0x30ad6498 -[UITabBarController setSelectedTabBarItem:] + 84
6   UIKit                           0x30ad6418 -[UITabBarController tabBarItemClicked:] + 152
7   CoreFoundation                  0x3027ee9c -[NSObject performSelector:withObject:withObject:] + 20
8   UIKit                           0x30a501b0 -[UIApplication sendAction:to:from:forEvent:] + 128
9   UIKit                           0x30a50118 -[UIApplication sendAction:toTarget:fromSender:forEvent:]



The Exception Type is EXC_BAD_ACCESS (SIGBUS)
The Exeption Code is KERN_PROTECTION_FAILURE at 0x00000000


The function that crashed is [UITabBarController transitionFromViewController:toViewController:]

This seems kind of strange to me because it seems to crash in the middle of a function that is handled by the stock UITabBarController that manages its view controllers and that I didn't fiddle with. I guess it's possible that I might have corrupted tab bar controller in some way. I was just hoping that someone might have some ideas. Since I can't reproduce it, I can't imagine having to tweak and resubmit only to hear a week later that it's still crashing.

I have already resubmitted, changing the way that I used NSUserDefaults in the AppDelegate just in case that's the issue. Also found a couple of AudioToolbox.h related interface elements in that one view controller that were left over and not being used - perhaps this could cause a problem when loading . If there's a Good Samaritan out there with an iPod Touch who is willing to a quick ad hoc installation, I would appreciate it if you would PM me with your device ID.

Last edited by StatCoder; 01-07-2009 at 03:45 PM.
StatCoder is offline   Reply With Quote
Old 01-10-2009, 04:17 PM   #2 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default

UPDATE - So my resubmission was reject for the same reason:

At this time, STAT E&M Coder cannot be posted to the App Store because it is crashing on iPhone OS 2.2 and Mac OS X 10.5.6.

Steps to reproduce:
(a) open app
(b) tap "Exam" tab bar button at bottom
(c) *crash*


Since the crash logs come, again from an iPod Touch, I went out and purchased one and ... no crash. So, my app is being rejected for a crash that I have never seen and can not reproduce on an iPhone or iPod Touch OS 2.2. Anyone want to buy an iPod Touch that has been used for 2 minutes?

Has anyone else run into this kind of problem? I'm going to look at the crash logs again - they sent more. However, all I can do is resubmit.
StatCoder is offline   Reply With Quote
Old 01-10-2009, 04:46 PM   #3 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
RickMaddy will become famous soon enough
Default

Have you decoded the error. There are tools available to convert:

0 STATEMLITE 0x00009ec6 0x1000 + 36550
1 STATEMLITE 0x00006aac 0x1000 + 23212
2 STATEMLITE 0x000056be 0x1000 + 18110

Into useful line numbers from your code. Google for 'atos' and iphone. You need a debug version of your app that was built with the EXACT same code as the distribution version sent to Apple.
RickMaddy is offline   Reply With Quote
Old 01-10-2009, 04:53 PM   #4 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: London/Peterborough
Posts: 562
QuantumDoja is on a distinguished road
Default Threads

Hi, are you using any threads in your app?
QuantumDoja is offline   Reply With Quote
Old 01-10-2009, 04:56 PM   #5 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 253
zhyla is on a distinguished road
Default

I'm sure you have, but have you tried the Touch version of the simulator? Maybe it doesn't happen on any devices but does happen on the simulator.
zhyla is offline   Reply With Quote
Old 01-10-2009, 06:06 PM   #6 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default

Thanks for all of your suggestions. I used the symbolicatecrash command on the lastest crash dump and corresponding .dSYM file and I get a translation only up to the 4th step before the crash. I'm not sure if I'm supposed to get a further translation or not. There are like 9 .crash files that were emailed from Apple so I'll try them all.

iPhone Touch version of the simulator? I don't think I've ever seen that.

I'm pretty sure I only have one thread.

It looks to me like it's crashing right when a particular view controller is being launched via my Exam tab. I would LOVE to find out if the other three tab buttons exhibit the same behavior. Then, at least I could narrow it town to a bug in one view or view controller. I'm using IB extensively and I'm afraid that something must be corrupt about the tab bar controller. My next step is going to have to be to open another project from scratch and move things over.

Code:
Incident Identifier: 9FE286DF-BC0B-489B-A01B-F48BA4B01775
CrashReporter Key:   559399dd82c53cab208f31221ffc6c9b2023edc7
Process:         STATEM [46]
Path:            /var/mobile/Applications/52C8BAB0-FDB3-4EAB-AF2D-186398AC91D2/STATEM.app/STATEM
Identifier:      STATEM
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2009-01-09 16:51:44.968 -0800
OS Version:      iPhone OS 2.2 (5G77a)
Report Version:  103

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread:  0

Thread 0 Crashed:
0   STATEM                        	0x00009fa6 0x1000 + 36774
1   STATEM                        	0x00006b8c 0x1000 + 23436
2   STATEM                        	0x0000579e 0x1000 + 18334
3   UIKit                         	0x30ad65ec -[UITabBarController transitionFromViewController:toViewController:] + 312
4   UIKit                         	0x30ad542c -[UITabBarController setSelectedIndex:] + 240
5   UIKit                         	0x30ad6498 -[UITabBarController setSelectedTabBarItem:] + 84
6   UIKit                         	0x30ad6418 -[UITabBarController tabBarItemClicked:] + 152
7   CoreFoundation                	0x3027ee9c -[NSObject performSelector:withObject:withObject:] + 20
8   UIKit                         	0x30a501b0 -[UIApplication sendAction:to:from:forEvent:] + 128
9   UIKit                         	0x30a50118 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
10  UIKit                         	0x30c3eec4 -[UITabBar _sendAction:withEvent:] + 404
11  CoreFoundation                	0x3027ee9c -[NSObject performSelector:withObject:withObject:] + 20
12  UIKit                         	0x30a501b0 -[UIApplication sendAction:to:from:forEvent:] + 128
13  UIKit                         	0x30a50118 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
14  UIKit                         	0x30ab3000 -[UIControl sendAction:to:forEvent:] + 44
15  UIKit                         	0x30ab3658 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 576
16  UIKit                         	0x30ab3070 -[UIControl sendActionsForControlEvents:] + 88
17  UIKit                         	0x30c3ffe0 -[UITabBar(Static) _buttonUp:] + 108

Last edited by StatCoder; 01-10-2009 at 06:12 PM.
StatCoder is offline   Reply With Quote
Old 01-10-2009, 06:18 PM   #7 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
RickMaddy will become famous soon enough
Default

You only need to translate the line '0' in the stack you posted. That's where it crashed in your code. Just figure out what class and line of code 0x00009fa6 is.
RickMaddy is offline   Reply With Quote
Old 01-10-2009, 07:02 PM   #8 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default

I'm having a problem getting the atos command to work in this instance:

atos -arch armv6 -o [.dSYM file location] [address] gives me "atos cannot load symbols for the file ...STATEM.app.dSYM"

Nevermind... the file needs to be the executable inside the .dSYM folder in the DWARF folder

OK...but all it does is parrot whatever address I give it. No translation. I must be missing something.

Last edited by StatCoder; 01-10-2009 at 07:16 PM.
StatCoder is offline   Reply With Quote
Old 01-10-2009, 09:50 PM   #9 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 253
zhyla is on a distinguished road
Default

I haven't done this on this toolchain but usually when you are trying to look up symbols for an address you don't find any if that particular piece of code doesn't have any symbols (e.g., a library you don't have source for).
zhyla is offline   Reply With Quote
Old 01-11-2009, 11:27 PM   #10 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default UPDATE

Well, I finally have been able to reproduce the crash. It only shows up when I install the app via the ad hoc distribution method. Obviously, there is something different about the distribution build. What I wasn't doing was actually testing the distribution build on my iPhone using the ad hoc provisioning profile.

The crash only occurs in one of the four tabs so I'm confident that I will be able to isolate the bug shortly. It's so much better than having to wait for an App Store rejection.

Last edited by StatCoder; 01-11-2009 at 11:48 PM.
StatCoder is offline   Reply With Quote
Old 01-12-2009, 02:17 AM   #11 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 5
hoschy07 is on a distinguished road
Default

StatCoder, thanks for this post. I also got a submission for my app with an unknown bug. Yesterday I fixed something in the code but I´m not sure if this will solve the strange bug.

Please can you explain, how do you installed the distribution build with an ad hoc provisioning profile?
This will be easier as waiting for the next submission in some days.
hoschy07 is offline   Reply With Quote
Old 01-12-2009, 02:41 AM   #12 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 5
hoschy07 is on a distinguished road
Default

Just playing with atos.
The correct syntax for you should be:
atos -arch armv6 -o STATEM.app/STATEM 0x00009fa6

Thanks for the tip for atos!
hoschy07 is offline   Reply With Quote
Old 01-12-2009, 02:51 AM   #13 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default

If you add your own iPhone to your ad hoc list then you can run the distrubution build on that phone either directly with your iPhone hooked up or by dragging the app into iTunes like any ad hoc user. Make sure to follow the instructions about how to do the Entitlements.plist for the ad hoc configuration. I skipped over that, initially, when I was doing my submission and never went back to reading that part when I tried unsuccessfully, to do ad hoc later on.

The ultimate bug took a while to track down because it involved some sloppy use of global variables on my part. It actually ran just fine in debug but crashed on the distribution build.

Last edited by StatCoder; 01-12-2009 at 04:26 AM.
StatCoder is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 394
14 members and 380 guests
7twenty7, chiataytuday, cristofercolmbos, dedeys78, fiftysixty, gmarro, iOS.Lover, jimmyon122, jonathandeknudt, raymng, stanny, tymex, UMAD, xerohuang
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,669
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dedeys78
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0