webcore crash in UIWebView's init method - iphone

I have run into some kind of crash, here is the crash stack:
WebCore 0x353c81b4 WebCore::PageCache::markPagesForFullStyleRecalc(WebCore::Page*) + 20
WebKit 0x36a6a45f -[WebView(WebPrivate) _initWithFrame:frameName:groupName:usesDocumentViews:] + 139
WebKit 0x36a6a3cd -[WebView initWithFrame:frameName:groupName:] + 53
WebKit 0x36a6a393 -[WebView initWithFrame:] + 47
UIKit 0x37251bfb -[UIWebDocumentView initWithWebView:frame:] + 287
UIKit 0x372828d1 -[UIWebBrowserView initWithWebView:frame:] + 57
UIKit 0x37282891 -[UIWebDocumentView initWithFrame:] + 41
UIKit 0x37282809 -[UIWebBrowserView initWithFrame:] + 49
UIKit 0x37437d73 -[UIWebView _webViewCommonInitWithWebView:scalesPageToFit:shouldEnableReachability:] + 235
UIKit 0x374385a9 -[UIWebView initWithFrame:] + 81
SeMob 0x001c216d -[SeMobWebInternalView initWithFrame:] (SeMobWebInternalView.m:64)
SeMob 0x001e7761 -[SeMobWebReader prepareReaderInWebView:] (SeMobWebReader.m:102)
SeMob 0x000eeb0d -[SeMobWebView webViewDidFinishLoad:] (SeMobWebView.m:1475)
CoreFoundation 0x346979c4 __invoking___ + 68
CoreFoundation 0x345eefeb -[NSInvocation invoke] + 287
CoreFoundation 0x345eeb43 -[NSInvocation invokeWithTarget:] + 51
WebKit 0x36a6189b -[_WebSafeForwarder forwardInvocation:] + 375
CoreFoundation 0x3469661b ___forwarding___ + 627
CoreFoundation 0x345edf68 __forwarding_prep_0___ + 24
CoreFoundation 0x346979c4 __invoking___ + 68
CoreFoundation 0x345eefeb -[NSInvocation invoke] + 287
WebCore 0x354197eb _ZL11SendMessageP12NSInvocation + 27
WebCore 0x35456fa5 _ZL20HandleDelegateSourcePv + 81
CoreFoundation 0x34669683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
CoreFoundation 0x34668ee9 __CFRunLoopDoSources0 + 213
CoreFoundation 0x34667cb7 __CFRunLoopRun + 647
CoreFoundation 0x345daebd CFRunLoopRunSpecific + 357
CoreFoundation 0x345dad49 CFRunLoopRunInMode + 105
GraphicsServices 0x353432eb GSEventRunModal + 75
UIKit 0x37220301 UIApplicationMain + 1121
SeMob 0x000d48a7 main (main.m:12)
and two pieces of code:
- (void)prepareReaderInWebView:(UIWebView *)webView
{
// ...omit some code here
if ([readableContent length]) {
self.innerWebView = [[[SeMobWebInternalView alloc] initWithFrame:webView.bounds] autorelease];
innerWebView.scalesPageToFit = NO;
innerWebView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
innerWebView.scrollView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
innerWebView.scrollView.scrollsToTop = YES;
innerWebView.delegate = self;
...
}
#interface SeMobWebInternalView : UIWebView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
UIMenuItem *flag =
[[UIMenuItem alloc] initWithTitle:#"search" action:#selector(search:)];
...
}
the crash always occers in the super's init method. Why it always crash? Plz help me !

Apple documentation says that UIWebView should not be subclassed:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-DontLinkElementID_2
Check subclassing notes.

As #cosmin stated your not meant to subclass UIWebView, from your code it looks like your trying to customize the appearance. try this code instead:
webView.backgroundColor = [UIColor clearColor]; // changes to clear colour
webView.opaque = NO;
for(UIView *innerView in [[[webView subviews] objectAtIndex:0] subviews]) { // Hide images that make shadow
if ([innerView isKindOfClass:[UIImageView class]]) {
innerView.hidden = YES;
}
}

Related

Viewcontroller length unrecognized selector sent to instance in iphone

My application crashing ans showing following in console. How to remove this exception???
2011-11-25 17:47:56.519 ShowroomLocator[1482:707] -[ShowroomLocatorViewController length]: unrecognized selector sent to instance 0x164860
2011-11-25 17:47:56.541 ShowroomLocator[1482:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '- [ShowroomLocatorViewController length]: unrecognized selector sent to instance 0x164860'
*** Call stack at first throw:
(
0 CoreFoundation 0x308aa64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x3400bc5d objc_exception_throw + 24
2 CoreFoundation 0x308ae1bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x308ad649 ___forwarding___ + 508
4 CoreFoundation 0x30824180 _CF_forwarding_prep_0 + 48
5 UIKit 0x35dcfed1 - [UITableView(UITableViewInternal) _delegateWantsHeaderForSection:] + 228
6 UIKit 0x35dcf2db -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 78
7 UIKit 0x35dcf225 -[UITableViewRowData numberOfRows] + 72
8 UIKit 0x35dcec73 -[UITableView noteNumberOfRowsChanged] + 82
9 UIKit 0x35dce7f7 -[UITableView reloadData] + 582
10 HettichShowroomLocator 0x00003487 - [ShowroomLocatorViewController viewWillAppear:] + 50
11 UIKit 0x35dbf1d9 -[UIViewController viewWillMoveToWindow:] + 64
12 UIKit 0x35d9e179 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 132
13 UIKit 0x35d83a59 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 228
14 UIKit 0x35d8396b -[UIView(Hierarchy) addSubview:] + 22
15 UIKit 0x35db335f -[UIWindow addRootViewControllerViewIfPossible] + 202
16 UIKit 0x35daf333 -[UIWindow _setHidden:forced:] + 182
17 UIKit 0x35db328f -[UIWindow _orderFrontWithoutMakingKey] + 18
18 UIKit 0x35dc1c61 -[UIWindow makeKeyAndVisible] + 16
19 ShowroomLocator 0x0000285b - [ShowroomLocatorAppDelegate application:didFinishLaunchingWithOptions:] + 162
20 UIKit 0x35db3821 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 772
21 UIKit 0x35dadb65 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 272
22 UIKit 0x35d827d7 -[UIApplication handleEvent:withNewEvent:] + 1114
23 UIKit 0x35d82215 -[UIApplication sendEvent:] + 44
24 UIKit 0x35d81c53 _UIApplicationHandleEvent + 5090
25 GraphicsServices 0x35a56e77 PurpleEventCallback + 666
26 CoreFoundation 0x30881a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
27 CoreFoundation 0x3088383f __CFRunLoopDoSource1 + 166
28 CoreFoundation 0x3088460d __CFRunLoopRun + 520
29 CoreFoundation 0x30814ec3 CFRunLoopRunSpecific + 230
30 CoreFoundation 0x30814dcb CFRunLoopRunInMode + 58
31 UIKit 0x35dacd49 -[UIApplication _run] + 372
32 UIKit 0x35daa807 UIApplicationMain + 670
33 ShowroomLocator 0x0000278b main + 70
34 ShowroomLocator 0x00002740 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.2 (8H7)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
(gdb)
After adding SearchDisplayController with _tableview1 my application started crashing.
I have two tableview in same controller class. Pleas suggest something to handle this...
Edited with multiple tableview coding:
- (void)viewDidLoad {
appDelegate = (ShowroomLocatorAppDelegate *)[[UIApplication sharedApplication] delegate];
NSArray *items = [[NSArray alloc] initWithObjects:
#"Sydney Airport (SYD), Mascot NSW 2020, Australia",
#"Sydney NSW, Australia'",
#"Smithfield NSW 2164, Australia",
#"Smithfield SA 5114, Australia",
#"Smithfield QLD 4878, Australia",
nil];
self.allItems = items;
[items release];
self._tableView1.scrollEnabled = YES;
_tableView1.hidden = YES;
_tableView.hidden = YES;
[self._tableView reloadData];
self._tableView.rowHeight = 80.0;
[ self.view addSubview:_tableView] ;
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView1.delegate = self;
_tableView1.dataSource = self;
}
- (void)viewWillAppear:(BOOL)animated
{
[self._tableView reloadData];
[self._tableView1 reloadData]; }
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
if(tableView ==_tableView && tableView ==_tableView1 )
{
return 1;
}
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
if(tableView ==_tableView )
{
if(section == 0)
return [NSString stringWithFormat:NSLocalizedString(#"ShowRooms[%d]", #"Showroom format"), [appDelegate.markers count]];
}
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableview numberOfRowsInSection:(NSInteger)section {
if(tableview ==_tableView )
{
return [appDelegate.markers count];
}
if(tableview ==_tableView1 )
{ NSInteger rows = 0;
if ([_tableView1
isEqual:self.searchDisplayController.searchResultsTableView]){
rows = [self.searchResults count];
}
else{
rows = [self.allItems count];
}
return rows;
}
}
In my _tableview web-service data get fill and _tableview1 array data with address get fill.....
The above error is coming on adding _tableview1.....
I suspect, in viewWillAppear, you did a reloadData specifying self rather than self.tableView.

Exception thrown by code: Stack trace shows this is the last functioncall made: [UIControl(Deprecated)sendAction:toTarget:forEvent]

Here is the code:
- (IBAction)textFieldDidBeginEditing:(UITextField *)textField
{
NSLog(#"Inside textfieldDidBeginEditing");
textFieldBeingEdited = textField;
}
//==============================================================================
-(IBAction)textFieldDoneEditing:(id)sender
{
textFieldBeingEdited = NULL;
[sender resignFirstResponder];
if (moveViewUp)
{
[self scrollTheView:NO];
}
}
//==============================================================================
-(void)keyboardWillShow:(NSNotification *)notif
{
NSLog(#"Inside keyborad will show");
NSDictionary *info = [notif userInfo];
NSValue *aValue = [info objectForKey:UIKeyboardFrameBeginUserInfoKey];
CGSize keyboardSize = [aValue CGRectValue].size;
float bottomPoint = (textFieldBeingEdited.frame.origin.y + textFieldBeingEdited.frame.size.height /*+ 20*/);
scrollAmount = keyboardSize.height - (self.view.frame.size.height- bottomPoint);
if(scrollAmount > 0)
{
moveViewUp = YES;
[self scrollTheView:YES];
}
else
{
moveViewUp = NO;
}
}
Here is the screen shot of the view controller
when I tap on any one of these text fields. An exception is thrown
-[__NSCFType textFieldDidBeginEditing:]: unrecognized selector sent to instance 0x5a3c100
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType textFieldDidBeginEditing:]: unrecognized selector sent to instance 0x5a3c100'
*** Call stack at first throw:
(
0 CoreFoundation 0x010275a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0117b313 objc_exception_throw + 44
2 CoreFoundation 0x010290bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00f98966 ___forwarding___ + 966
4 CoreFoundation 0x00f98522 _CF_forwarding_prep_0 + 50
5 UIKit 0x003a1581 -[UIControl(Deprecated) sendAction:toTarget:forEvent:] + 67
6 UIKit 0x003a3e62 -[UIControl(Internal) _sendActionsForEventMask:withEvent:] + 525
7 UIKit 0x003a9e11 -[UITextField willAttachFieldEditor:] + 404
8 UIKit 0x003bbcdf -[UIFieldEditor becomeFieldEditorForView:] + 653
9 UIKit 0x003abf98 -[UITextField _becomeFirstResponder] + 99
10 UIKit 0x003e02c3 -[UIResponder becomeFirstResponder] + 328
11 UIKit 0x005a8961 -[UITextInteractionAssistant setFirstResponderIfNecessary] + 208
12 UIKit 0x005ab5e2 -[UITextInteractionAssistant oneFingerTap:] + 1676
13 UIKit 0x005a24f2 -[UIGestureRecognizer _updateGestureWithEvent:] + 730
14 UIKit 0x0059e4fe -[UIGestureRecognizer _delayedUpdateGesture] + 47
15 UIKit 0x005a4afc _UIGestureRecognizerUpdateObserver + 584
16 UIKit 0x005a4ce1 _UIGestureRecognizerUpdateGesturesFromSendEvent + 51
17 UIKit 0x0033832a -[UIWindow _sendGesturesForEvent:] + 1292
18 UIKit 0x00333ca3 -[UIWindow sendEvent:] + 105
19 UIKit 0x00316c37 -[UIApplication sendEvent:] + 447
20 UIKit 0x0031bf2e _UIApplicationHandleEvent + 7576
21 GraphicsServices 0x0197f992 PurpleEventCallback + 1550
22 CoreFoundation 0x01008944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
23 CoreFoundation 0x00f68cf7 __CFRunLoopDoSource1 + 215
24 CoreFoundation 0x00f65f83 __CFRunLoopRun + 979
25 CoreFoundation 0x00f65840 CFRunLoopRunSpecific + 208
26 CoreFoundation 0x00f65761 CFRunLoopRunInMode + 97
27 GraphicsServices 0x0197e1c4 GSEventRunModal + 217
28 GraphicsServices 0x0197e289 GSEventRun + 115
29 UIKit 0x0031fc93 UIApplicationMain + 1160
terminate called after throwing an instance of 'NSException'
please help
Shouldn't the method signature be:
-(void)textFieldDidBeginEditing:(UITextField *)textField
i.e. (void) instead of (IBAction)

Application Crashes on [scrollView removeFromSuperview];

Hell All,
I am new to iPhone and struggling with following problem.
When i remove scroll view with following statement my appli crashes.
[scrollView removeFromSuperview];
I am adding uiscrollview with following line.
[self.view addSubview:scrollView];
Hereis the log.
Thread 0 Crashed:
0 libobjc.A.dylib 0x34a80466 objc_msgSend + 18
1 UIKit 0x341aaaa8 -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 152
2 UIKit 0x341aaace -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 190
3 UIKit 0x341aaace -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] + 190
4 UIKit 0x341c05a0 -[UIView(Hierarchy) removeFromSuperview] + 208
5 UIKit 0x34249a76 -[UIScrollView removeFromSuperview] + 42
6 KabushikiShimbun 0x000387b6 -[PDFPageScrollViewController ReGenerateScrollViewAsperNewData] (PDFPageScrollViewController.m:1451)
7 KabushikiShimbun 0x00038aac -[PDFPageScrollViewController CheckPageUpdationWithDate:] (PDFPageScrollViewController.m:1441)
8 KabushikiShimbun 0x0003c472 -[PDFPageScrollViewController requestFinished:] (PDFPageScrollViewController.m:792)
9 CoreFoundation 0x35818bb8 -[NSObject(NSObject) performSelector:withObject:] + 16
10 KabushikiShimbun 0x0000e9ba -[ASIHTTPRequest reportFinished] (ASIHTTPRequest.m:1945)
11 CoreFoundation 0x35818bb8 -[NSObject(NSObject) performSelector:withObject:] + 16
12 Foundation 0x3118178e __NSThreadPerformPerform + 262
13 CoreFoundation 0x358307d6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
14 CoreFoundation 0x358025b0 __CFRunLoopDoSources0 + 376
15 CoreFoundation 0x35801e54 __CFRunLoopRun + 224
16 CoreFoundation 0x35801c80 CFRunLoopRunSpecific + 224
17 CoreFoundation 0x35801b88 CFRunLoopRunInMode + 52
18 GraphicsServices 0x320c84a4 GSEventRunModal + 108
19 GraphicsServices 0x320c8550 GSEventRun + 56
20 UIKit 0x341dc322 -[UIApplication _run] + 406
21 UIKit 0x341d9e8c UIApplicationMain + 664
22 KabushikiShimbun 0x00002da6 main (main.m:14)
23 KabushikiShimbun 0x00002d70 start + 32
Any Idea ?
Thank you.
Check whether it has a superview before removing from superview;
if([scrollView superview]!=nil){
[scrollView removeFromSuperview];
}
Try this code
for(UIView *view in self.view.subviews)
{
if([view isMemberOfClass:[UIScrollView class]])
{
[scrollview removeFromSuperView];
}
}
Try this code. It's tested.
NSArray *subviews = [[NSArray alloc] initWithArray:self.view.subviews];
for(UIScrollView *subview in subviews) {
[subview removeFromSuperView];
}
[subviews release];
but be carefull it removes all ScrollViews present in your self.view

UIButton created in UItableview cell crashes when tapped

I created a custom UItableviewcell
added a button into its initWithStyle area:
favoriteButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
favoriteButton.backgroundColor = [UIColor clearColor];
[favoriteButton setTitle:#"Play" forState:UIControlStateNormal];
[favoriteButton addTarget:self action:#selector(favoriteClick:) forControlEvents:UIControlEventTouchUpInside];
favoriteButton.center = self.center;
set its frame and layout in:
- (void)layoutSubviews {
[super layoutSubviews];
CGRect contentRect = self.contentView.bounds;
CGFloat boundsX = contentRect.origin.x;
CGRect frame;
frame = CGRectMake(boundsX+200, 44, 40, 40);
favoriteButton.frame = frame;
}
and then in my tableviewcontroller.m file I use that tableviewcell and have the user click tap to go to the action within that tableviewcontroller.m code
-(void)favoriteClick:(id)sender// forEvent:(UIEvent*)event
{
NSLog(#"click");
}
however when i tap the button I get an unhandled exception:
2010-07-24 16:06:02.197 Film Fest[10342:40b] -[ProgramGuideCell favoriteClick:]: unrecognized selector sent to instance 0x6e63ff0
2010-07-24 16:06:02.200 Film Fest[10342:40b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ProgramGuideCell favoriteClick:]: unrecognized selector sent to instance 0x6e63ff0'
*** Call stack at first throw:
(
0 CoreFoundation 0x02a56919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02ba45de objc_exception_throw + 47
2 CoreFoundation 0x02a5842b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x029c8116 ___forwarding___ + 966
4 CoreFoundation 0x029c7cd2 _CF_forwarding_prep_0 + 50
5 UIKit 0x00301e14 -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x0038b6c8 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x0038db4a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x0038c6f7 -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x00579070 _UIGestureRecognizerUpdateObserver + 3687
10 CoreFoundation 0x02a37d1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
11 CoreFoundation 0x029cc987 __CFRunLoopDoObservers + 295
12 CoreFoundation 0x02995c17 __CFRunLoopRun + 1575
13 CoreFoundation 0x02995280 CFRunLoopRunSpecific + 208
14 CoreFoundation 0x029951a1 CFRunLoopRunInMode + 97
15 GraphicsServices 0x030b42c8 GSEventRunModal + 217
16 GraphicsServices 0x030b438d GSEventRun + 115
17 UIKit 0x0030fb58 UIApplicationMain + 1160
18 Film Fest 0x00002170 main + 102
19 Film Fest 0x00002101 start + 53
)
terminate called after throwing an instance of 'NSException'
I dont see what Im doing wrong here...
Try returning IBAction instead of void on your selector, and put the selector in the ProgramGuideCell instead of tableviewcontroller.
-(IBAction)favoriteClick:(id)sender// forEvent:(UIEvent*)event
{
NSLog(#"click");
}

iPhone: what does this Crash Log mean?

My app crashes - unfortunately, it's not reproducable - this is a crash log I got, but I cannot read anything that would help me. Perhaps someone of you? Would be reeeeeeeeally great...
0 libSystem.B.dylib 0x00088c24 __kill + 8
1 libSystem.B.dylib 0x00088c12 kill + 4
2 libSystem.B.dylib 0x00088c06 raise + 10
3 libSystem.B.dylib 0x0009f902 abort + 54
4 libstdc++.6.dylib 0x00065a00 __gnu_cxx::__verbose_terminate_handler() + 588
5 libobjc.A.dylib 0x00007f1c _objc_terminate + 160
6 libstdc++.6.dylib 0x00063100 __cxxabiv1::__terminate(void (*)()) + 76
7 libstdc++.6.dylib 0x00063178 std::terminate() + 16
8 libstdc++.6.dylib 0x000632a0 __cxa_throw + 100
9 libobjc.A.dylib 0x00006504 objc_exception_throw + 104
10 CoreFoundation 0x000a01c0 +[NSException raise:format:arguments:] + 64
11 CoreFoundation 0x000a01f4 +[NSException raise:format:] + 24
12 Foundation 0x0002cbc6 -[NSPlaceholderMutableString initWithString:] + 78
13 here_my_app 0x0002c35e 0x1000 + 176990
14 here_my_app 0x00029a6c 0x1000 + 166508
15 UIKit 0x000a9248 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 644
16 UIKit 0x000a8eac -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 44
17 UIKit 0x0006f3b8 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1100
18 UIKit 0x0006ce40 -[UITableView layoutSubviews] + 200
19 UIKit 0x00014ab0 -[UIView(CALayerDelegate) _layoutSublayersOfLayer:] + 32
20 CoreFoundation 0x000285ba -[NSObject(NSObject) performSelector:withObject:] + 18
21 QuartzCore 0x0000a61c -[CALayer layoutSublayers] + 176
22 QuartzCore 0x0000a2a4 CALayerLayoutIfNeeded + 192
23 QuartzCore 0x00009bb0 CA::Context::commit_transaction(CA::Transaction*) + 256
24 QuartzCore 0x000097d8 CA::Transaction::commit() + 276
25 QuartzCore 0x000119d8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
26 CoreFoundation 0x00074244 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12
27 CoreFoundation 0x00075d9e __CFRunLoopDoObservers + 494
28 CoreFoundation 0x000772f6 __CFRunLoopRun + 934
29 CoreFoundation 0x0001e0bc CFRunLoopRunSpecific + 220
30 CoreFoundation 0x0001dfca CFRunLoopRunInMode + 54
31 GraphicsServices 0x00003f88 GSEventRunModal + 188
32 UIKit 0x00007b40 -[UIApplication _run] + 564
33 UIKit 0x00005fb8 UIApplicationMain + 964
34 here_my_app 0x00002f52 0x1000 + 8018
35 here_my_app 0x00002efc 0x1000 + 7932
here's the code for my "cellForRowAtIndexPath"
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = #"AbfahrtszeitResultTableCell";
AbfahrtszeitResultTableCell *cell = (AbfahrtszeitResultTableCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:#"AbfahrtszeitResultTableCell" owner:nil options:nil];
for (id currentObject in topLevelObjects) {
if ([currentObject isKindOfClass:[UITableViewCell class]]) {
cell = (AbfahrtszeitResultTableCell *) currentObject;
break;
}
}
// make cell not-selectable
cell.selectionStyle = UITableViewCellSelectionStyleNone;
// background color
BOOL day = [self isDayView];
if (day) {
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ABFAHRTSZEIT_RESULT_TABLE_CELL_BACKGROUND_IMAGE_RED]];
cell.backgroundView = imageView;
[imageView release];
} else {
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ABFAHRTSZEIT_RESULT_TABLE_CELL_BACKGROUND_IMAGE_BLUE]];
cell.backgroundView = imageView;
[imageView release];
}
// text color
cell.textLabel.textColor = [UIColor whiteColor];
}
// Set up the cell...
AbfahrtszeitResult *result = [abfahrten objectAtIndex:indexPath.row];
cell.linienLabel.text = [TextUtil cleanUpString:result.linie];
cell.zielLabel.text = [TextUtil cleanUpString:result.ziel];
cell.zeitLabel.text = [TextUtil cleanUpString:result.zeit];
return cell;
}
You read the stack from the bottom to the top. Here's the key area:
12 Foundation 0x0002cbc6 -[NSPlaceholderMutableString initWithString:] + 78
13 here_my_app 0x0002c35e 0x1000 + 176990
14 here_my_app 0x00029a6c 0x1000 + 166508
15 UIKit 0x000a9248 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 644
It looks like 15 is UIKit trying to create cells for a UITableView. 13 and 14 are in your code, likely your tableView:cellForRowAtIndexPath: method. 12 is a Foundation method dealing with strings.
I would take a look at your tableView:cellForRowAtIndexPath: method and see what you could be doing wrong with string initialization or post your method for us to examine.
Not enough information. You're stuck. Better not strip the symbols next time :)
Anyway, the key lines are
12 Foundation 0x0002cbc6 -[NSPlaceholderMutableString initWithString:] + 78
13 here_my_app 0x0002c35e 0x1000 + 176990
14 here_my_app 0x00029a6c 0x1000 + 166508
15 UIKit 0x000a9248 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 644
From #15 we know the error is in the -tableView:cellForRowAtIndexPath: method in one of your delegates, and from #12 we know the error is due to initializing a string. The only way -initWithString: will throw is when the input argument is nil. Check the custom function called from -tableView:cellForRowAtIndexPath: and ensure the string is not nil.