Post not yet marked as solved
I trained an object detector with CreateML and when I test the model in CreateML, I get a high number of identified objects:
See screenshot:
https://stackoverflow.com/questions/62818892/why-does-obect-detection-result-in-multiple-found-objects
Notes: The model was trained on a small data set of ~30 images with that particular label face-gendermale occuring ~20 times.
Each training image has 1-3 labelled objects.
There are 5 label total.
Questions: Is that expected or is there something wrong with the model?
If this is expected, how should I evaluate these multiple results or even count the number of objects found in the model?
(Sorry for the cross-post, but it should really be possible to upload images here.)
Post not yet marked as solved
A hair model contains semi-transparent textures to simulate dense hair. To render these textures correctly, the material property `writesToDepthBuffer` is set to `false`.However this causes hair polygons that are further away from the camera to cover hair polygons that are nearer to the camera. This results in an artefact line that you can see in the Xcode Scene Editor on the top edge of the blue sphere that is a placeholder for a head inside the hair model.For the hair that is covering the sphere, the hair is rendered as expected. For the hair that is not covering the sphere, the hair from polygons further back are rendered, causing a "texture break" to appear at the top edge of the sphere.How does the renderer settings or the model have to be changed to avoid this "texture break" on top of the sphere?Screenshots if the issue here:https://stackoverflow.com/questions/52021860/how-to-render-a-3d-model-with-semi-transparent-textures-in-xcode
Can anyone please help me to interpret this crashed thread?It's from an app that records and plays audio. From line 2 I understand that the crash happened during audio recording, but what happened during the recording that made it crash?0 libobjc.A.dylib 0x000000018442c910 objc_msgSend + 16
1 AVFAudio 0x000000018ab9f87c AudioRecorderSessionPropertyListener(void*, unsigned int, unsigned int, void const*) + 148
2 AudioToolbox 0x0000000188ecfcc0 AudioSessionPropertyListeners::CallPropertyListenersImp(AudioSessionPropertyListeners const&, unsigned int, unsigned int, void const*) + 740
3 AudioToolbox 0x0000000188fc2a3c AudioSessionPropertyListeners::CallPropertyListeners(unsigned int, unsigned int, void const*) + 220
4 AudioToolbox 0x00000001890060d0 ProcessInterruptionListenerMessage(unsigned int, unsigned int, unsigned int) + 344
5 AudioToolbox 0x0000000189005dc0 HandleAudioSessionCFTypePropertyChangedMessage(unsigned int, unsigned int, void*, unsigned int) + 556
6 AudioToolbox 0x0000000189005328 ProcessDeferredMessage(unsigned int, __CFData const*, unsigned int, unsigned int) + 2028
7 AudioToolbox 0x000000018900484c ASCallbackReceiver_AudioSessionPingMessage + 580
8 AudioToolbox 0x0000000188ec02a8 _XAudioSessionPingMessage + 48
9 AudioToolbox 0x00000001891a7210 mshMIGPerform + 228
10 CoreFoundation 0x0000000185207ae8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
11 CoreFoundation 0x0000000185207230 __CFRunLoopDoSource1 + 436
12 CoreFoundation 0x0000000185204c80 __CFRunLoopRun + 2452
13 CoreFoundation 0x0000000185124da8 CFRunLoopRunSpecific + 548
14 AVFAudio 0x000000018ac0a424 GenericRunLoopThread::Entry(void*) + 160
15 AVFAudio 0x000000018ac34834 CAPThread::Entry(CAPThread*) + 84
16 libsystem_pthread.dylib 0x0000000184e85220 _pthread_body + 268
17 libsystem_pthread.dylib 0x0000000184e85110 _pthread_start + 288
18 libsystem_pthread.dylib 0x0000000184e83b10 thread_start + 0
Post not yet marked as solved
Can anyone please help me to interpret the crash below.It is from a live app, these crashes come in rarely but regularly. I was not able to reproduce the crash locally.I understand it like this:Within a `Dispatch.Queue` block that is deallocated (thread 9, line 2) there is an object that cannot be deallocated (thread 9, line 1) because it has been already deallocated.Is my interpretation correct and if so, how can I know which background thread is causing this?Incident Identifier: <Removed>
CrashReporter Key: <Removed>
Hardware Model: iPhone7,2
Process: MyApp [1842]
Path: <Removed>
Identifier: com.MyApp.MyApp
Version: 1.26.1 (180)
Code Type: ARM-64
Parent Process: ??? [1]
Date/Time: 2018-06-10T23:49:35Z
Launch Time: 2018-06-10T23:40:38Z
OS Version: iPhone OS 10.3.3 (14G60)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x20
Crashed Thread: 9
Thread 0:
0 libsystem_kernel.dylib 0x00000001876bb224 mach_msg_trap + 8
1 CoreFoundation 0x000000018868ce90 __CFRunLoopServiceMachPort + 188
2 CoreFoundation 0x000000018868aae4 __CFRunLoopRun + 1056
3 CoreFoundation 0x00000001885bada4 CFRunLoopRunSpecific + 420
4 GraphicsServices 0x000000018a025074 GSEventRunModal + 96
5 UIKit 0x000000018e875c9c UIApplicationMain + 204
6 MyApp 0x000000010007c0a4 main (AppDelegate.swift:18)
7 libdyld.dylib 0x00000001875c959c start + 0
Thread 1:
0 libsystem_kernel.dylib 0x00000001876bb224 mach_msg_trap + 8
1 CoreFoundation 0x000000018868ce90 __CFRunLoopServiceMachPort + 188
2 CoreFoundation 0x000000018868aae4 __CFRunLoopRun + 1056
3 CoreFoundation 0x00000001885bada4 CFRunLoopRunSpecific + 420
4 Foundation 0x00000001890d5db4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
5 Foundation 0x00000001890f6b84 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92
6 UIKit 0x000000018f1ff830 -[UIEventFetcher threadMain] + 132
7 Foundation 0x00000001891d3318 __NSThread__start__ + 992
8 libsystem_pthread.dylib 0x00000001877a168c _pthread_body + 236
9 libsystem_pthread.dylib 0x00000001877a159c _pthread_start + 280
10 libsystem_pthread.dylib 0x000000018779ecb4 thread_start + 0
Thread 2:
0 libsystem_kernel.dylib 0x00000001876bb224 mach_msg_trap + 8
1 CoreFoundation 0x000000018868ce90 __CFRunLoopServiceMachPort + 188
2 CoreFoundation 0x000000018868aae4 __CFRunLoopRun + 1056
3 CoreFoundation 0x00000001885bada4 CFRunLoopRunSpecific + 420
4 Foundation 0x00000001890d5db4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
5 Foundation 0x000000018912a704 -[NSRunLoop(NSRunLoop) run] + 84
6 MyApp 0x0000000100392520 +[GAI threadMain:] + 60
7 Foundation 0x00000001891d3318 __NSThread__start__ + 992
8 libsystem_pthread.dylib 0x00000001877a168c _pthread_body + 236
9 libsystem_pthread.dylib 0x00000001877a159c _pthread_start + 280
10 libsystem_pthread.dylib 0x000000018779ecb4 thread_start + 0
Thread 3:
0 libsystem_kernel.dylib 0x00000001876bb224 mach_msg_trap + 8
1 CoreFoundation 0x000000018868ce90 __CFRunLoopServiceMachPort + 188
2 CoreFoundation 0x000000018868aae4 __CFRunLoopRun + 1056
3 CoreFoundation 0x00000001885bada4 CFRunLoopRunSpecific + 420
4 CFNetwork 0x0000000188dc7df4 +[NSURLConnection(Loader) _resourceLoadLoop:] + 400
5 Foundation 0x00000001891d3318 __NSThread__start__ + 992
6 libsystem_pthread.dylib 0x00000001877a168c _pthread_body + 236
7 libsystem_pthread.dylib 0x00000001877a159c _pthread_start + 280
8 libsystem_pthread.dylib 0x000000018779ecb4 thread_start + 0
Thread 4:
0 libsystem_kernel.dylib 0x00000001876bb224 mach_msg_trap + 8
1 CoreFoundation 0x000000018868ce90 __CFRunLoopServiceMachPort + 188
2 CoreFoundation 0x000000018868aae4 __CFRunLoopRun + 1056
3 CoreFoundation 0x00000001885bada4 CFRunLoopRunSpecific + 420
4 AVFAudio 0x00000001a29014f4 GenericRunLoopThread::Entry(void*) + 160
5 AVFAudio 0x00000001a2927814 CAPThread::Entry(CAPThread*) + 80
6 libsystem_pthread.dylib 0x00000001877a168c _pthread_body + 236
7 libsystem_pthread.dylib 0x00000001877a159c _pthread_start + 280
8 libsystem_pthread.dylib 0x000000018779ecb4 thread_start + 0
Thread 5:
0 libsystem_kernel.dylib 0x00000001876bb224 mach_msg_trap + 8
1 CoreFoundation 0x000000018868ce90 __CFRunLoopServiceMachPort + 188
2 CoreFoundation 0x000000018868aae4 __CFRunLoopRun + 1056
3 CoreFoundation 0x00000001885bada4 CFRunLoopRunSpecific + 420
4 GeoServices 0x00000001906d4854 _runNetworkThread + 440
5 libsystem_pthread.dylib 0x00000001877a168c _pthread_body + 236
6 libsystem_pthread.dylib 0x00000001877a159c _pthread_start + 280
7 libsystem_pthread.dylib 0x000000018779ecb4 thread_start + 0
Thread 6:
0 libsystem_kernel.dylib 0x00000001876d9a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018779ecac start_wqthread + 0
Thread 7:
0 libsystem_kernel.dylib 0x00000001876d9a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018779ecac start_wqthread + 0
Thread 8:
0 libsystem_kernel.dylib 0x00000001876d9a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018779ecac start_wqthread + 0
Thread 9 Crashed:
0 libobjc.A.dylib 0x000000018715d7f4 objc_object::release() + 8
1 libsystem_blocks.dylib 0x00000001875eba68 _Block_release + 156
2 libdispatch.dylib 0x00000001875969a0 _dispatch_client_callout + 12
3 libdispatch.dylib 0x00000001875a4ad4 _dispatch_queue_serial_drain + 924
4 libdispatch.dylib 0x000000018759a2cc _dispatch_queue_invoke + 880
5 libdispatch.dylib 0x00000001875a4fa8 _dispatch_queue_override_invoke + 340
6 libdispatch.dylib 0x00000001875a6a50 _dispatch_root_queue_drain + 536
7 libdispatch.dylib 0x00000001875a67d0 _dispatch_worker_thread3 + 120
8 libsystem_pthread.dylib 0x000000018779f100 _pthread_wqthread + 1092
9 libsystem_pthread.dylib 0x000000018779ecac start_wqthread + 0
Thread 10:
0 libsystem_kernel.dylib 0x00000001876d9a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018779ecac start_wqthread + 0
Thread 9 crashed with ARM-64 Thread State:
pc: 0x000000018715d7f4 fp: 0x000000016e1aeca0 sp: 0x000000016e1aec90 x0: 0x0000000118dd9a00
x1: 0x000000018715c250 x2: 0x0000000000000018 x3: 0x0000000000000000 x4: 0x0000000000000000
x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x0000000000000000
x9: 0x000000000000fffe x10: 0x00000000fffffffe x11: 0x00000000c3000002 x12: 0x0000000000000002
x13: 0x00000000c3000001 x14: 0x0000000000000000 x15: 0xfffffff100000000 x16: 0xffffffffffffffe1
x17: 0x000000018f3409a0 x18: 0x0000000000000000 x19: 0x000000017304ad70 x20: 0x000000017187a000
x21: 0x0000000000000000 x22: 0x0000000170aec380 x23: 0x0000000000000014 x24: 0x00000001ae9b4480
x25: 0x000000017187a000 x26: 0x00000001ae9b4480 x27: 0x000000016e1af0e0 x28: 0x0000000000000000
lr: 0x00000001875eba68 cpsr: 0x0000000020000000
Post not yet marked as solved
I get some crash reports in the following code when fetching images from a server:DispatchQueue.global(qos: DispatchQoS.QoSClass.userInitiated).async {
if
let imageData = try? imageFile.getData(),
let image = UIImage(data: imageData) {
//...
}
}The crash report: Thread 3 Crashed:
0 ImageIO 0x0000000184c3bef0 ERROR_ImageIO_DataIsNotReadable(unsigned char*) + 16
1 ImageIO 0x0000000184c3bd90 IIOImageSource::doBindToReader() + 280
2 ImageIO 0x0000000184c3c180 IIOImageSource::updatedCount() + 48
3 ImageIO 0x0000000184c40040 CGImageSourceGetCount + 152
4 UIKit 0x000000018c32c29c _UIImageRefFromData + 396
5 UIKit 0x000000018c49d608 -[UIImage(UIImagePrivate) _initWithData:preserveScale:cache:] + 120
6 MyApp 0x0000000100fd60d0 function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of closure #1 () -> () in closure #1 (Any?, Swift.Error?) -> () in MyApp.MyClass.myFunction(forUser: MyApp.User) -> () (MyClass.swift:0)
7 MyApp 0x0000000100fdba10 partial apply forwarder for closure #1 () -> () in closure #1 (Any?, Swift.Error?) -> () in MyApp.MyClass.myFunction(forUser: MyApp.User) -> () (MyClass.swift:0)
8 MyApp 0x00000001010a90a4 reabstraction thunk helper from @callee_owned () -> () to @callee_unowned @convention(block) () -> () (MyController.swift:0)
9 libdispatch.dylib 0x0000000182692a54 _dispatch_call_block_and_release + 20
10 libdispatch.dylib 0x0000000182692a14 _dispatch_client_callout + 12
11 libdispatch.dylib 0x000000018269fea4 _dispatch_root_queue_drain + 1028
12 libdispatch.dylib 0x000000018269fa38 _dispatch_worker_thread3 + 116
13 libsystem_pthread.dylib 0x000000018293b06c _pthread_wqthread + 1264
14 libsystem_pthread.dylib 0x000000018293ab6c start_wqthread + 0I am not able to reproduce the crash but I have two guesses:UIImage(data:) is executed on a background thread. There are ongoing discussions about whether UIImage being of UIKit is thread safe. However the Apple docs now more clearly suggest that UIImage is thread safe:
"The immutable nature of image objects also means that they are safe to create and use from any thread."
The image data is corrupted in a way that causes an exception that is not caught within the creation of UIImage. And because among many images only a few have corrupted data I could not reproduce the crash. Maybe there is a data test that I should do manually before trying to create an UIImage from it.Can anyone interpret the crash report?