When I reopen a webcam in OpenCV on Mac OSX Sierra, and I display images from it, I get NSExceptions.
This is the test code I'm working with to try to figure out the error mode.
import cv2
cam = cv2.VideoCapture(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.open(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.open(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.open(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
The error I'm getting is
2016-11-05 18:15:07.075 Python[1082:24157] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fca4ac3a6f0 of class AVCaptureDALDevice was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x7fca4ac42f80> (
<NSKeyValueObservance 0x7fca4ae6df50: Observer: 0x7fca4ae6b410, Key path: open, Options: <New: NO, Old: NO, Prior: NO> Context: 0x7fffc9c99570, Property: 0x7fca4ac3fe30>
)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffafde96fb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffc45f0a2a objc_exception_throw + 48
2 CoreFoundation 0x00007fffafe669a5 +[NSException raise:format:] + 197
3 Foundation 0x00007fffb17d1d84 NSKVODeallocate + 293
4 AVFoundation 0x00007fffac67dabe -[AVCaptureDeviceInput _setDevice:exceptionReason:] + 304
5 AVFoundation 0x00007fffac5ae914 -[AVCaptureDeviceInput dealloc] + 39
6 CoreFoundation 0x00007fffafe53a7b -[__NSSingleObjectArrayI dealloc] + 43
7 libobjc.A.dylib 0x00007fffc45e5e60 _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 808
8 CoreFoundation 0x00007fffafd20d66 _CFAutoreleasePoolPop + 22
9 CoreFoundation 0x00007fffafd612c5 __CFRunLoopRun + 2229
10 CoreFoundation 0x00007fffafd607b4 CFRunLoopRunSpecific + 420
11 HIToolbox 0x00007fffaf2fcfbc RunCurrentEventLoopInMode + 240
12 HIToolbox 0x00007fffaf2fcdf1 ReceiveNextEventCommon + 432
13 HIToolbox 0x00007fffaf2fcc26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
14 AppKit 0x00007fffad9e6b79 _DPSNextEvent + 1093
15 AppKit 0x00007fffae0fc1c3 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
16 libopencv_highgui.2.4.dylib 0x000000010d79c0a6 cvWaitKey + 402
17 cv2.so 0x000000010cfa3ce1 _ZL16pyopencv_waitKeyP7_objectS0_S0_ + 103
18 Python 0x000000010cc001ab PyEval_EvalFrameEx + 27003
19 Python 0x000000010cbf963a PyEval_EvalCodeEx + 1617
20 Python 0x000000010cbf8fe3 PyEval_EvalCode + 48
21 Python 0x000000010cc1cc04 run_mod + 53
22 Python 0x000000010cc1cca7 PyRun_FileExFlags + 133
23 Python 0x000000010cc1c7f8 PyRun_SimpleFileExFlags + 702
24 Python 0x000000010cc2deba Py_Main + 3094
25 libdyld.dylib 0x00007fffc4ecd255 start + 1
26 ??? 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
I get this error consistently when I run it from iTerm or terminal. But I get it inconsistently from xterm.
I also get the same error when using cam.release() prior to all calls to cam.open(0).
import cv2
cam = cv2.VideoCapture(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.release()
cam.open(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.release()
cam.open(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.release()
cam.open(0)
ret, im = cam.read()
cv2.imshow('im', im)
cv2.waitKey(1)
cam.release()
In cap_avfoundation_mac.mm, function CvCaptureCAM::stopCaptureDevice,
comment this line:
[mCaptureDevice release];
Related
The problem started with the XCode 10.2.x as I guess
While it was working fine with the XCode 10.1
The crash point is "pdfView.frame = self.view.frame" from below code:
import UIKit
import PDFKit
class ViewController: UIViewController {
var pdfView = PDFView()
override func viewDidLoad() {
super.viewDidLoad()
// Prepare document to show
let url = Bundle.main.url(forResource: "sample", withExtension: "pdf")
let pdfDocument = PDFDocument(url: url!)
// PDFView
pdfView = PDFView()
pdfView.frame = self.view.frame
pdfView.autoScales = true
pdfView.document = pdfDocument
// Add PDFView to viewController
self.view.addSubview(pdfView)
}
}
Crash Log:
2019-05-20 16:24:39.269219+0530 PDFKitDemo[6795:305736] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001118c06fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010fd63ac5 objc_exception_throw + 48
2 CoreFoundation 0x00000001118c0555 +[NSException raise:format:] + 197
3 QuartzCore 0x00000001149632ae _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 140
4 QuartzCore 0x000000011495268b -[CALayer setPosition:] + 57
5 QuartzCore 0x0000000114952de3 -[CALayer setFrame:] + 560
6 PDFKit 0x00000001106c7097 -[PDFPageLayerTile initWithFrame:forPageLayer:withRenderingTransform:tileContentsScale:generationID:] + 168
7 PDFKit 0x00000001106cc805 -[PDFPageLayer _updateTiles] + 3439
8 PDFKit 0x00000001106c7d8e -[PDFPageLayer setNeedsTilesUpdate] + 87
9 PDFKit 0x00000001106dc97d -[PDFPageView setNeedsTilesUpdate] + 48
10 PDFKit 0x00000001106de816 -[PDFPageView setFrame:] + 334
11 PDFKit 0x00000001106d511c -[PDFDocumentView createPageViewForPageAtIndex:] + 764
12 PDFKit 0x00000001106d6326 -[PDFDocumentView updateVisibility] + 1726
13 PDFKit 0x000000011074576f -[PDFView resizeDisplayView:] + 517
14 PDFKit 0x000000011073ecdf -[PDFView layoutDocumentView] + 464
15 PDFKit 0x000000011073a36a -[PDFView setDocument:waitDuration:] + 1246
16 PDFKitDemo 0x000000010f4833b3 $s10PDFKitDemo14ViewControllerC11viewDidLoadyyF + 2147
17 PDFKitDemo 0x000000010f483874 $s10PDFKitDemo14ViewControllerC11viewDidLoadyyFTo + 36
18 UIKitCore 0x000000011666843b -[UIViewController loadViewIfRequired] + 1183
19 UIKitCore 0x0000000116668868 -[UIViewController view] + 27
20 UIKitCore 0x0000000116ca0c33 -[UIWindow addRootViewControllerViewIfPossible] + 122
21 UIKitCore 0x0000000116ca1327 -[UIWindow _setHidden:forced:] + 289
22 UIKitCore 0x0000000116cb3f86 -[UIWindow makeKeyAndVisible] + 42
23 UIKitCore 0x0000000116c63f1c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4555
24 UIKitCore 0x0000000116c690c6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
25 UIKitCore 0x00000001164ae6d6 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
26 UIKitCore 0x00000001164b6fce +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
27 UIKitCore 0x00000001164ae2ec -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
28 UIKitCore 0x00000001164aec48 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
29 UIKitCore 0x00000001164acfba __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
30 UIKitCore 0x00000001164acc71 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
31 UIKitCore 0x00000001164b19b6 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
32 UIKitCore 0x00000001164b2610 _performActionsWithDelayForTransitionContext + 100
33 UIKitCore 0x00000001164b171d -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
34 UIKitCore 0x00000001164b66d0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
35 UIKitCore 0x0000000116c679a8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
36 UIKitCore 0x000000011681edfa -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
37 FrontBoardServices 0x000000011cb5b125 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
38 FrontBoardServices 0x000000011cb64ed6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
39 FrontBoardServices 0x000000011cb64700 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
40 libdispatch.dylib 0x0000000112c53db5 _dispatch_client_callout + 8
41 libdispatch.dylib 0x0000000112c572ba _dispatch_block_invoke_direct + 300
42 FrontBoardServices 0x000000011cb96146 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
43 FrontBoardServices 0x000000011cb95dfe -[FBSSerialQueue _performNext] + 451
44 FrontBoardServices 0x000000011cb96393 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
45 CoreFoundation 0x0000000111827be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
46 CoreFoundation 0x0000000111827463 __CFRunLoopDoSources0 + 243
47 CoreFoundation 0x0000000111821b1f __CFRunLoopRun + 1231
48 CoreFoundation 0x0000000111821302 CFRunLoopRunSpecific + 626
49 GraphicsServices 0x0000000119d422fe GSEventRunModal + 65
50 UIKitCore 0x0000000116c6aba2 UIApplicationMain + 140
51 PDFKitDemo 0x000000010f484a6b main + 75
52 libdyld.dylib 0x0000000112cc8541 start + 1
53 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Don't the exact reason but by adding the method viewDidLayoutSubviews, it's fixed the crash problem.
Now, working code is
override func viewDidLoad() {
super.viewDidLoad()
// Prepare document to show
let url = Bundle.main.url(forResource: "sample", withExtension: "pdf")
let pdfDocument = PDFDocument(url: url!)
// PDFView
pdfView = PDFView()
pdfView.autoScales = true
pdfView.document = pdfDocument
// Add PDFView to viewController
self.view.addSubview(pdfView)
}
override func viewDidLayoutSubviews() {
pdfView.frame = self.view.frame
}
We have an app which works without any issues in iOS 7, but when running on iOS 8 it crashes with the following error:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** - [__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x03361df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x026fca97 objc_exception_throw + 44
2 CoreFoundation 0x03238073 -[__NSArrayM objectAtIndex:] + 243
3 eAlth Devel 0x0022f13e -[NSArray(TKCategory) firstObject] + 62
4 UIKit 0x00f411ee -[UITableView reloadData] + 443
5 UIKit 0x00f45ede -[UITableView _reloadDataIfNeeded] + 78
6 UIKit 0x00f4bec7 -[UITableView layoutSubviews] + 36
7 UIKit 0x00ec19c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
8 libobjc.A.dylib 0x02712771 -[NSObject performSelector:withObject:] + 70
9 QuartzCore 0x0055a27f -[CALayer layoutSublayers] + 152
10 QuartzCore 0x0054e105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
11 QuartzCore 0x0054df60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
12 QuartzCore 0x004ac676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
13 QuartzCore 0x004ada3c _ZN2CA11Transaction6commitEv + 392
14 QuartzCore 0x004ae108 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
15 CoreFoundation 0x03284fbe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
16 CoreFoundation 0x03284f00 __CFRunLoopDoObservers + 400
17 CoreFoundation 0x0327a93a __CFRunLoopRun + 1226
18 CoreFoundation 0x0327a1ab CFRunLoopRunSpecific + 443
19 CoreFoundation 0x03279fdb CFRunLoopRunInMode + 123
20 GraphicsServices 0x04aa924f GSEventRunModal + 192
21 GraphicsServices 0x04aa908c GSEventRun + 104
22 UIKit 0x00e36e16 UIApplicationMain + 1526
23 eAlth Devel 0x000f1c5c main + 76
24 libdyld.dylib 0x02a53ac9 start + 1
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The method which was called before the error is:
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
NSObject * sel = [pickerData objectAtIndex:row];
return sel.description;
}
pickerData array object is not nil and it has following objects in it:
self->pickerData:
<__NSArrayM 0x7c130080>(
All,
Br Clinic,
Clinic 2,
EssHth,
GC Clinic,
HHolistics,
K5003 - HHD3112,
K5003 - HHD3112 - Gp2,
NEW DEMO CLINIC,
Nursing Home Visits,
PR Accupuncture,
PP,
RB Therapy,
SC Clinic,
S Clinic,
TW Practice
)
Any suggessions on how to fix the issue ?
Thanks in advance !
Please refer to the following line of my question.
3 eAlth Devel 0x0022f13e -[NSArray(TKCategory) firstObject] + 62
In iOS 8 apple has implemented the method for
- (id)firstObject
But one of the libraries which I used in my project is implementing a Category for NSArray with the above method. The library which I was using was TapkuLibrary.
When initiating the UIPickerView, iOS gets confused about which "firstObject" method to be used. Is it from the core libraries or the one from the TapkuLibrary.
Due to that app crashes.
Exceptions was not clear for me to figure it out. An expert pointed me in the right direction after he so the exception. (Thank you expert ! you save me three more days of head scratching !)
Any how if you are getting a similar exception in iOS 8, check whether you have a "Category" for NSArray.
Remedy is remove the category from your project if it only implements "firstObject" method.
Hope this helps.
The app is supposed to save data in Text Fields when I click return on the keyboard. The app crashes when I click the return key. I have connected the IBActions to the textfields with "Did End on Exit" in .xib". Here is the error log:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithFormat:locale:arguments:]: nil argument'
*** First throw call stack:
(
0 CoreFoundation 0x0173b5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014be8b6 objc_exception_throw + 44
2 CoreFoundation 0x0173b3bb +[NSException raise:format:] + 139
3 Foundation 0x010da664 -[NSPlaceholderString initWithFormat:locale:arguments:] + 99
4 Foundation 0x010da5f4 -[NSString initWithFormat:] + 58
5 Attendance 0x00002ded -[ShiftAController1 saveRoster1:] + 157
6 libobjc.A.dylib 0x014d081f -[NSObject performSelector:withObject:] + 70
7 UIKit 0x0022e0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
8 UIKit 0x0022e04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
9 UIKit 0x003260c1 -[UIControl sendAction:to:forEvent:] + 66
10 UIKit 0x00326484 -[UIControl _sendActionsForEvents:withEvent:] + 577
11 UIKit 0x0032da28 -[UIFieldEditor insertText:] + 263
12 UIKit 0x0091771f -[UITextField insertText:] + 59
13 UIKit 0x00409b40 -[UIKeyboardImpl insertText:] + 87
14 UIKit 0x0041af14 -[TIKeyboardOperationInsertText(UIKeyboardImpl) main] + 83
15 Foundation 0x01193829 -[__NSOperationInternal _start:] + 671
16 Foundation 0x01110558 -[NSOperation start] + 83
17 UIKit 0x004081cd -[UIKeyboardImpl performOperations:] + 153
18 UIKit 0x0040640b -[UIKeyboardImpl continueHandleKeyboardInputWithOperations:] + 40
19 UIKit 0x0040627c __73-[UIKeyboardImpl replyHandlerForHandleKeyboardInputWithExecutionContext:]_block_invoke_2 + 44
20 UIKit 0x0093b3c8 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 402
21 libobjc.A.dylib 0x014d081f -[NSObject performSelector:withObject:] + 70
22 Foundation 0x011139d8 __NSThreadPerformPerform + 285
23 CoreFoundation 0x016c483f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
24 CoreFoundation 0x016c41cb __CFRunLoopDoSources0 + 235
25 CoreFoundation 0x016e129e __CFRunLoopRun + 910
26 CoreFoundation 0x016e0ac3 CFRunLoopRunSpecific + 467
27 CoreFoundation 0x016e08db CFRunLoopRunInMode + 123
28 GraphicsServices 0x036e09e2 GSEventRunModal + 192
29 GraphicsServices 0x036e0809 GSEventRun + 104
30 UIKit 0x0022cd3b UIApplicationMain + 1225
31 Attendance 0x00003a1d main + 141
32 libdyld.dylib 0x01d7970d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This is my code in .m:
-(IBAction)saveRoster1:(id)sender{
myString1 = [[NSString alloc] initWithFormat:roster1.text];
[roster1 setText:myString1];
NSUserDefaults *stringDefault1 = [NSUserDefaults standardUserDefaults];
[stringDefault1 setObject:myString1 forKey:#"stringKey1"];}
-(IBAction)savetimeIn:(id)sender{
myString2 = [[NSString alloc] initWithFormat:timeIn.text];
[timeIn setText:myString2];
NSUserDefaults *stringDefault2 = [NSUserDefaults standardUserDefaults];
[stringDefault2 setObject:myString2 forKey:#"stringKey2"];}
-(IBAction)savetimeOut:(id)sender{
myString3 = [[NSString alloc] initWithFormat:timeOut.text];
[timeOut setText:myString3];
NSUserDefaults *stringDefault3 = [NSUserDefaults standardUserDefaults];
[stringDefault3 setObject:myString3 forKey:#"stringKey3"];}
my app crashes on iPad when I open a new view even though in the simulator it works like a charm.
Any help is strongly appreciated!
Thanks in advance
Console Output:
2012-07-18 10:32:19.783 Coverdale[3484:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 3]'
First throw call stack:
(0x3757688f 0x315eb259 0x374bf9db 0x37745 0x35c3f 0x306e3c8b 0x30708481 0x306ccbd5 0x3078f359 0x306d53b5 0x306d53d1 0x306d5263 0x3078f31f 0x307446cb 0x3074400f 0x3078dc05 0x3078c367 0x307e76a7 0x2c4fb 0x3075c93d 0x307d6627 0x33093933 0x3754aa33 0x3754a699 0x3754926f 0x374cc4a5 0x374cc36d 0x376c5439 0x306d8cd5 0x22103 0x220a8)
terminate called throwing an exception(lldb)
Crash Report
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3757688f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x315eb259 objc_exception_throw + 33
2 CoreFoundation 0x374bf9db -[__NSArrayM objectAtIndex:] + 271
3 Coverdale 0x00092745 -[PreparationViewController setDetails:newFile:] (PreparationViewController.m:376)
4 Coverdale 0x00090c3f -[PreparationViewController viewDidLoad] (PreparationViewController.m:70)
5 UIKit 0x306e3c8b -[UIViewController view] + 167
6 UIKit 0x30708481 -[UIViewController nextResponder] + 21
7 UIKit 0x306ccbd5 -[UIResponder _containsResponder:] + 37
8 UIKit 0x3078f359 -[UINavigationController defaultFirstResponder] + 57
9 UIKit 0x306d53b5 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 25
10 UIKit 0x306d53d1 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 53
11 UIKit 0x306d5263 -[UIResponder(Internal) _promoteDeepestDefaultFirstResponder] + 31
12 UIKit 0x3078f31f -[UIWindowController transitionViewDidStart:] + 83
13 UIKit 0x307446cb -[UITransitionView _didStartTransition] + 71
14 UIKit 0x3074400f -[UITransitionView transition:fromView:toView:] + 999
15 UIKit 0x3078dc05 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4937
16 UIKit 0x3078c367 -[UIViewController presentViewController:withTransition:completion:] + 3123
17 UIKit 0x307e76a7 -[UIViewController presentModalViewController:animated:] + 31
18 Coverdale 0x000874fb -[IntroTableViewController tableView:didSelectRowAtIndexPath:] (IntroTableViewController.m:498)
19 UIKit 0x3075c93d -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 945
20 UIKit 0x307d6627 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 159
21 Foundation 0x33093933 __NSFireDelayedPerform + 415
22 CoreFoundation 0x3754aa33 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 15
23 CoreFoundation 0x3754a699 __CFRunLoopDoTimer + 365
24 CoreFoundation 0x3754926f __CFRunLoopRun + 1207
25 CoreFoundation 0x374cc4a5 CFRunLoopRunSpecific + 301
26 CoreFoundation 0x374cc36d CFRunLoopRunInMode + 105
27 GraphicsServices 0x376c5439 GSEventRunModal + 137
28 UIKit 0x306d8cd5 UIApplicationMain + 1081
29 Coverdale 0x0007d103 main (main.m:17)
30 Coverdale 0x0007d0a8 start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3291b32c __pthread_kill + 8
1 libsystem_c.dylib 0x34c90208 pthread_kill + 48
2 libsystem_c.dylib 0x34c89298 abort + 88
3 libc++abi.dylib 0x3229ef64 abort_message + 40
4 libc++abi.dylib 0x3229c346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x315eb350 _objc_terminate + 140
6 libc++abi.dylib 0x3229c3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x3229c44a std::terminate() + 14
8 libc++abi.dylib 0x3229d81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x315eb2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x374cc506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x374cc366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x376c5432 GSEventRunModal + 130
13 UIKit 0x306d8cce UIApplicationMain + 1074
14 Coverdale 0x0007d0fc main (main.m:17)
15 Coverdale 0x0007d0a0 start + 32
I deleted the App on the iPad and run it again.
It looks like that an array generated from a text file which i am reading out with componentsSeparatedByString: had less entries than i was accessing.
Hello I'm trying to use Three20 with my Monotouch Application with no luck.
I have added the Three20 dll file that I made and all the *.a files that created, to my project.
I have added the argument in my project option and everything was compiled witch means I did that part in the right way.
-gcc_flags "-framework QuartzCore -L${ProjectDir}} -|libThree20CoreSDK -|libThree20NetworkSDK -|libThree20SDK -|libThree20StyleSDK -|libThree20UICommonSDK -|libThree20UINavigatorSDK -|libThree20UISDK -ObjC"
I created a view for testing :
public partial class ViewForTesting : DialogViewController
{
public ViewForTesting () : base (UITableViewStyle.Grouped, null)
{
Section section = new Section();
TTTabBar strip = new TTTabBar(new RectangleF(0,0,200,40));
NSMutableArray arr = new NSMutableArray();
NSString a = new NSString("abc");
arr.Add(a);
arr.Add(a);
strip.TabItems = arr;
section.HeaderView = srtip;
root.Add(section);
this.Root = root;
}
}
and this is the error that i get
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
0 Test 0x00090b7c mono_handle_native_sigsegv + 284
1 Test 0x00005f28 mono_sigsegv_signal_handler + 248
2 libsystem_c.dylib 0x9bbcb59b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 ??? 0x1162086c 0x0 + 291637356
5 ??? 0x11620158 0x0 + 291635544
6 ??? 0x0b5beb5b 0x0 + 190573403
7 ??? 0x0b5ba3a0 0x0 + 190555040
8 ??? 0x0b5ba4bf 0x0 + 190555327
9 Test 0x0000a292 mono_jit_runtime_invoke + 722
10 Test 0x0016a17e mono_runtime_invoke + 126
11 Test 0x0020683c monotouch_trampoline + 3372
12 UIKit 0x0218e9d6 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1292
13 UIKit 0x0218f8a6 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 508
14 UIKit 0x0219e743 -[UIApplication handleEvent:withNewEvent:] + 1027
15 UIKit 0x0219f1f8 -[UIApplication sendEvent:] + 68
16 UIKit 0x02192aa9 _UIApplicationHandleEvent + 8196
17 GraphicsServices 0x0478afa9 PurpleEventCallback + 1274
18 CoreFoundation 0x011951c5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
19 CoreFoundation 0x010fa022 __CFRunLoopDoSource1 + 146
20 CoreFoundation 0x010f890a __CFRunLoopRun + 2218
21 CoreFoundation 0x010f7db4 CFRunLoopRunSpecific + 212
22 CoreFoundation 0x010f7ccb CFRunLoopRunInMode + 123
23 UIKit 0x0218f2a7 -[UIApplication _run] + 576
24 UIKit 0x02190a9b UIApplicationMain + 1175
25 ??? 0x0b5b779c 0x0 + 190543772
26 ??? 0x0b5b6980 0x0 + 190540160
27 ??? 0x0b5b6818 0x0 + 190539800
28 ??? 0x0b5b68a7 0x0 + 190539943
29 Test 0x0000a292 mono_jit_runtime_invoke + 722
30 Test 0x0016a17e mono_runtime_invoke + 126
31 Test 0x0016e264 mono_runtime_exec_main + 420
32 Test 0x00173685 mono_runtime_run_main + 725
33 Test 0x00067495 mono_jit_exec + 149
34 Test 0x002116c9 main + 2825
35 Test 0x000032e5 start + 53
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Also I have updated the monoTouch to 5.2.4
any idea?
You are setting the tabItems property of a TTTabBar to an array of NSStrings, were it should be an array of TTTabItem objects.