Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash: "Gifski.run(_:completionHandler:)" #118

Closed
sindresorhus opened this issue Aug 8, 2019 · 6 comments · Fixed by #124
Closed

Crash: "Gifski.run(_:completionHandler:)" #118

sindresorhus opened this issue Aug 8, 2019 · 6 comments · Fixed by #124
Labels
bug Something isn't working 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted Extra attention is needed

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Aug 8, 2019

Issuehunt badges

From Crashlytics:

# Version: 2.0.0 (18)
# Session ID: e47bb13755ef4930b38c7c2ba1173432_DNE_1_v2
# OS Version: 10.13.6 (17G8030)
# Device: MacBook Pro 15", Late 2011

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000014531e000
--

#8. Crashed: Thread
0  libsystem_platform.dylib       0x7fff7c612527 _platform_memmove$VARIANT$Nehalem + 295
1  Foundation                     0x7fff564483c8 -[NSConcreteMutableData appendBytes:length:] + 506
2  Gifski                         0x10fd5faee @objc closure #3 in static Gifski.run(_:completionHandler:) + 101 (Gifski.swift:101)
3  Gifski                         0x10fd8e3c4 std::io::Write::write_all::h32728146e2e956fd + 4351456196
4  Gifski                         0x10fd8972b std::io::Write::write_all::hf390105847e50c9e + 4351436587
5  Gifski                         0x10fd928b8 lzw::lzw::Encoder$LT$W$GT$::encode_bytes::h901c74149ca13f6d + 4351473848
6  Gifski                         0x10fd885c9 gif::encoder::Encoder$LT$W$GT$::write_frame::h899ed2c94d023557 + 4351432137
7  Gifski                         0x10fd9874b gifski::Writer::write::h318cb0b37b9bb606 + 4351498059
8  Gifski                         0x10fd9075b gifski::c_api::gifski_write_sync_internal::he475337230ac78cf + 4351465307
9  Gifski                         0x10fd9fe57 std::sys_common::backtrace::__rust_begin_short_backtrace::h7d84625eb0eb1761 + 4351528535
10 Gifski                         0x10fd9405c std::panicking::try::do_call::h01f306db21e930dd (.llvm.6861174976860541177) + 4351479900
11 Gifski                         0x10fe1d02c __rust_maybe_catch_panic + 31 (lib.rs:31)
12 Gifski                         0x10fda1440 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hdc74ba1bfd3f08af + 4351534144
13 Gifski                         0x10fdef5ee _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h184cdfe19b856bb1 + 219 (alloc.rs:219)
14 Gifski                         0x10fe1c0be std::sys::unix::thread::Thread::new::thread_start::he418bbb505b1b1b9 + 103 (alloc.rs:103)
15 libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
16 libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
17 libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

--

#0. com.apple.main-thread
0  libsystem_kernel.dylib         0x7fff7c44b20a mach_msg_trap + 10
1  libsystem_kernel.dylib         0x7fff7c44a724 mach_msg + 60
2  libdispatch.dylib              0x7fff7c2e5ac2 _dispatch_mach_send_and_wait_for_reply + 756
3  libdispatch.dylib              0x7fff7c2e5fad dispatch_mach_send_with_result_and_wait_for_reply + 53
4  libxpc.dylib                   0x7fff7c658d98 xpc_connection_send_message_with_reply_sync + 164
5  Foundation                     0x7fff5671cfd5 __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 9
6  Foundation                     0x7fff5671c743 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 4444
7  Foundation                     0x7fff5671b5d8 -[NSXPCConnection _sendInvocation:withProxy:] + 89
8  CoreFoundation                 0x7fff54336a6b ___forwarding___ + 651
9  CoreFoundation                 0x7fff54336758 _CF_forwarding_prep_0 + 120
10 libFontRegistry.dylib          0x7fff5298613c __51-[XTypeXPCClient XTCopyFontWithName:scope:options:]_block_invoke + 98
11 libFontRegistry.dylib          0x7fff52982835 -[XTypeXPCClient run:errorHandler:] + 99
12 libFontRegistry.dylib          0x7fff5298609e -[XTypeXPCClient XTCopyFontWithName:scope:options:] + 202
13 libFontRegistry.dylib          0x7fff5297a02f TGlobalFontRegistry::CopyFontForName(__CFString const*, TFontQueryOptions const&) const + 129
14 libFontRegistry.dylib          0x7fff5295ead6 XTCopyFontWithName + 160
15 CoreText                       0x7fff55e6e33e TDescriptorSource::CopyFontDescriptorPerPostScriptName(__CFString const*, unsigned long, unsigned long) const + 518
16 CoreText                       0x7fff55e6fc08 TDescriptorSource::CopySystemFontDescriptorByName(__CFString const*, unsigned long) const + 20
17 CoreText                       0x7fff55eb7555 CopyComponentFontDescriptor(__CFString const*, __CFURL const*, unsigned long) + 194
18 CoreText                       0x7fff55de60ea TTenuousComponentFont::Substantiate() const + 210
19 CoreText                       0x7fff55de5ff7 TTenuousComponentFont::CopyFontURL() const + 25
20 CoreText                       0x7fff55eb0086 TBaseFont::CopyXTProperties(__CFSet const*, bool) const + 54
21 CoreText                       0x7fff55eb0153 TBaseFont::CopyVariationProperties() const + 123
22 CoreText                       0x7fff55df8ab5 TBaseFont::CopyVariation() const + 115
23 CoreText                       0x7fff55eb9f7d TTenuousComponentFont::CopyVariation() const + 35
24 CoreText                       0x7fff55df6482 TSplicedFont::CopyVariation() const + 74
25 CoreText                       0x7fff55df5ef1 TBaseFont::CopyTraitsInternal() const + 137
26 CoreText                       0x7fff55eb25d5 TBaseFont::CopyTraits(bool) const + 35
27 CoreText                       0x7fff55de20d3 TBaseFont::CopyAttribute(unsigned long) const + 201
28 CoreText                       0x7fff55df5ceb TSplicedFont::CopyAttribute(unsigned long) const + 115
29 CoreText                       0x7fff55de10b5 TDescriptor::CopyAttribute(__CFString const*) const + 187
30 CoreText                       0x7fff55de0fba CTFontDescriptorCopyAttribute + 101
31 UIFoundation                   0x7fff77fd6752 -[NSCTFontDescriptor objectForKey:] + 21
32 UIFoundation                   0x7fff77fd671b -[NSFontDescriptor symbolicTraits] + 33
33 UIFoundation                   0x7fff77fd66af -[__NSFontTypefaceInfo _postscriptName] + 217
34 UIFoundation                   0x7fff77fd6187 +[__NSFontTypefaceInfo typefaceInfoForPostscriptName:options:] + 669
35 UIFoundation                   0x7fff77fd58ee __NSGetMetaFontInstance + 511
36 UIFoundation                   0x7fff77fde68a -[NSFont initWithCoder:] + 1559
37 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
38 Foundation                     0x7fff56440ef0 _decodeObject + 243
39 AppKit                         0x7fff5193acf4 -[NSCell initWithCoder:] + 927
40 AppKit                         0x7fff5193a7d9 -[NSActionCell initWithCoder:] + 51
41 AppKit                         0x7fff51943775 -[NSTextFieldCell initWithCoder:] + 53
42 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
43 Foundation                     0x7fff56440ef0 _decodeObject + 243
44 AppKit                         0x7fff51937645 -[NSControl initWithCoder:] + 366
45 AppKit                         0x7fff51943495 -[NSTextField initWithCoder:] + 53
46 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
47 Foundation                     0x7fff56442e35 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1687
48 Foundation                     0x7fff56446c71 -[NSArray(NSArray) initWithCoder:] + 198
49 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
50 Foundation                     0x7fff56440ef0 _decodeObject + 243
51 AppKit                         0x7fff519381f6 -[NSView initWithCoder:] + 1935
52 AppKit                         0x7fff5193742e -[NSClassSwapper initWithCoder:] + 602
53 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
54 Foundation                     0x7fff56440ef0 _decodeObject + 243
55 AppKit                         0x7fff51938dd8 -[NSResponder initWithCoder:] + 99
56 AppKit                         0x7fff51937ac7 -[NSView initWithCoder:] + 96
57 AppKit                         0x7fff5193750c -[NSControl initWithCoder:] + 53
58 AppKit                         0x7fff51937470 -[NSButton initWithCoder:] + 46
59 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
60 Foundation                     0x7fff56440ef0 _decodeObject + 243
61 AppKit                         0x7fff51893016 -[NSNibConnector initWithCoder:] + 96
62 AppKit                         0x7fff51892e9e -[NSNibOutletConnector initWithCoder:] + 76
63 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
64 Foundation                     0x7fff56442e35 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1687
65 Foundation                     0x7fff56446c71 -[NSArray(NSArray) initWithCoder:] + 198
66 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
67 Foundation                     0x7fff56440ef0 _decodeObject + 243
68 AppKit                         0x7fff51891b75 -[NSIBObjectData initWithCoder:] + 200
69 Foundation                     0x7fff56441823 _decodeObjectBinary + 2095
70 Foundation                     0x7fff56440ef0 _decodeObject + 243
71 AppKit                         0x7fff5189193a loadNib + 348
72 AppKit                         0x7fff51890eb5 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 696
73 AppKit                         0x7fff51ac6aba +[NSBundle(NSNibLoadingInternal) _loadNibFile:externalNameTable:options:withZone:] + 150
74 AppKit                         0x7fff51b6f18d _NXLoadNib + 196
75 AppKit                         0x7fff51b6eb5d -[NSAlert init] + 106
76 AppKit                         0x7fff51ccf9e7 +[NSAlert alertWithError:] + 203
77 AppKit                         0x7fff51ce7d92 -[NSApplication(NSErrorPresentation) presentError:modalForWindow:delegate:didPresentSelector:contextInfo:] + 260
78 AppKit                         0x7fff52408b5d -[NSWindowController presentError:modalForWindow:delegate:didPresentSelector:contextInfo:] + 173
79 Gifski                         0x10fd85400 closure #1 in closure #1 in ConversionViewController.start(conversion:) + 1930 (util.swift:1930)
80 Gifski                         0x10fd863f7 partial apply for closure #1 in closure #1 in ConversionViewController.start(conversion:) (<compiler-generated>)
81 Gifski                         0x10fd5fa26 closure #1 in closure #1 in static Gifski.run(_:completionHandler:) + 65 (Gifski.swift:65)
82 Gifski                         0x10fd62712 partial apply for closure #1 in closure #1 in static Gifski.run(_:completionHandler:) (<compiler-generated>)
83 Gifski                         0x10fd3fc20 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
84 libdispatch.dylib              0x7fff7c2d25fa _dispatch_call_block_and_release + 12
85 libdispatch.dylib              0x7fff7c2cadb8 _dispatch_client_callout + 8
86 libdispatch.dylib              0x7fff7c2d6395 _dispatch_main_queue_callback_4CF + 1148
87 CoreFoundation                 0x7fff54378ae9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
88 CoreFoundation                 0x7fff5433b2ba __CFRunLoopRun + 2586
89 CoreFoundation                 0x7fff5433a607 CFRunLoopRunSpecific + 487
90 HIToolbox                      0x7fff5361ad96 RunCurrentEventLoopInMode + 286
91 HIToolbox                      0x7fff5361ab06 ReceiveNextEventCommon + 613
92 HIToolbox                      0x7fff5361a884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
93 AppKit                         0x7fff518caa73 _DPSNextEvent + 2085
94 AppKit                         0x7fff52060e34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
95 AppKit                         0x7fff518bf885 -[NSApplication run] + 764
96 AppKit                         0x7fff5188ea72 NSApplicationMain + 804
97 Gifski                         0x10fd36889 main + 6 (AppDelegate.swift:6)
98 libdyld.dylib                  0x7fff7c304015 start + 1

#1. Thread
0  libsystem_kernel.dylib         0x7fff7c45528a __workq_kernreturn + 10
1  libsystem_pthread.dylib        0x7fff7c61c009 _pthread_wqthread + 1035
2  libsystem_pthread.dylib        0x7fff7c61bbe9 start_wqthread + 13
3  (Missing)                      0x59454b5f454d40 (Missing)

#2. com.twitter.crashlytics.mac.MachExceptionServer
0  Gifski                         0x10fe6f2be CLSProcessRecordAllThreads + 4352377534
1  Gifski                         0x10fe6f6b9 CLSProcessRecordAllThreads + 4352378553
2  Gifski                         0x10fe5ec35 CLSHandler + 4352310325
3  Gifski                         0x10fe5a180 CLSMachExceptionServer + 4352291200
4  libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
5  libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
6  libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

#3. com.apple.NSEventThread
0  libsystem_kernel.dylib         0x7fff7c44b20a mach_msg_trap + 10
1  libsystem_kernel.dylib         0x7fff7c44a724 mach_msg + 60
2  CoreFoundation                 0x7fff5433bc45 __CFRunLoopServiceMachPort + 341
3  CoreFoundation                 0x7fff5433af97 __CFRunLoopRun + 1783
4  CoreFoundation                 0x7fff5433a607 CFRunLoopRunSpecific + 487
5  AppKit                         0x7fff51a07fc4 _NSEventThread + 184
6  libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
7  libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
8  libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

#4. com.apple.coreaudio.AQClient
0  libsystem_kernel.dylib         0x7fff7c44b20a mach_msg_trap + 10
1  libsystem_kernel.dylib         0x7fff7c44a724 mach_msg + 60
2  CoreFoundation                 0x7fff5433bc45 __CFRunLoopServiceMachPort + 341
3  CoreFoundation                 0x7fff5433af97 __CFRunLoopRun + 1783
4  CoreFoundation                 0x7fff5433a607 CFRunLoopRunSpecific + 487
5  AudioToolbox                   0x7fff52c9440a GenericRunLoopThread::Entry(void*) + 158
6  AudioToolbox                   0x7fff52c94119 CAPThread::Entry(CAPThread*) + 77
7  libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
8  libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
9  libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

#5. Thread
0  libsystem_kernel.dylib         0x7fff7c45528a __workq_kernreturn + 10
1  libsystem_pthread.dylib        0x7fff7c61c009 _pthread_wqthread + 1035
2  libsystem_pthread.dylib        0x7fff7c61bbe9 start_wqthread + 13
3  (Missing)                      0x10c7 (Missing)

#6. com.apple.avfoundation.requestsqueue
0  libsystem_kernel.dylib         0x7fff7c44b13e _kernelrpc_mach_vm_deallocate_trap + 10
1  libsystem_kernel.dylib         0x7fff7c453753 mach_vm_deallocate + 64
2  libsystem_malloc.dylib         0x7fff7c4bc32f mvm_deallocate_pages + 62
3  libsystem_malloc.dylib         0x7fff7c4b1e1a free_large + 834
4  Foundation                     0x7fff56448aa5 -[NSConcreteMutableData dealloc] + 25
5  Gifski                         0x10fd6214d (Missing)
6  Gifski                         0x10fd629b9 block_copy_helper.32 + 4351277497
7  libswiftCore.dylib             0x1102a66a0 _swift_release_dealloc + 16
8  Gifski                         0x10fd624a8 (Missing)
9  libswiftCore.dylib             0x1102a66a0 _swift_release_dealloc + 16
10 Gifski                         0x10fd5e476 (Missing)
11 libswiftCore.dylib             0x1102a66a0 _swift_release_dealloc + 16
12 libsystem_blocks.dylib         0x7fff7c35299d _Block_release + 111
13 CoreFoundation                 0x7fff54315437 -[__NSDictionaryI dealloc] + 135
14 libsystem_blocks.dylib         0x7fff7c35299d _Block_release + 111
15 libdispatch.dylib              0x7fff7c2cadb8 _dispatch_client_callout + 8
16 libdispatch.dylib              0x7fff7c2df217 _dispatch_queue_serial_drain + 635
17 libdispatch.dylib              0x7fff7c2d2166 _dispatch_queue_invoke + 373
18 libdispatch.dylib              0x7fff7c2dff0d _dispatch_root_queue_drain_deferred_wlh + 332
19 libdispatch.dylib              0x7fff7c2e3d21 _dispatch_workloop_worker_thread + 880
20 libsystem_pthread.dylib        0x7fff7c61bfd2 _pthread_wqthread + 980
21 libsystem_pthread.dylib        0x7fff7c61bbe9 start_wqthread + 13
22 (Missing)                      0x120000220000 (Missing)

#7. com.apple.coremedia.scheduledfileio
0  libsystem_kernel.dylib         0x7fff7c454a16 __psynch_cvwait + 10
1  libsystem_pthread.dylib        0x7fff7c61d589 _pthread_cond_wait + 732
2  CoreMedia                      0x7fff55307be6 WaitOnCondition + 11
3  CoreMedia                      0x7fff55307aa3 FigSemaphoreWaitRelative + 149
4  CoreMedia                      0x7fff5531cd12 FigScheduledFileIOThread + 4395
5  CoreMedia                      0x7fff55307937 figThreadMain + 277
6  libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
7  libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
8  libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

#8. Crashed: Thread
0  libsystem_platform.dylib       0x7fff7c612527 _platform_memmove$VARIANT$Nehalem + 295
1  Foundation                     0x7fff564483c8 -[NSConcreteMutableData appendBytes:length:] + 506
2  Gifski                         0x10fd5faee @objc closure #3 in static Gifski.run(_:completionHandler:) + 101 (Gifski.swift:101)
3  Gifski                         0x10fd8e3c4 std::io::Write::write_all::h32728146e2e956fd + 4351456196
4  Gifski                         0x10fd8972b std::io::Write::write_all::hf390105847e50c9e + 4351436587
5  Gifski                         0x10fd928b8 lzw::lzw::Encoder$LT$W$GT$::encode_bytes::h901c74149ca13f6d + 4351473848
6  Gifski                         0x10fd885c9 gif::encoder::Encoder$LT$W$GT$::write_frame::h899ed2c94d023557 + 4351432137
7  Gifski                         0x10fd9874b gifski::Writer::write::h318cb0b37b9bb606 + 4351498059
8  Gifski                         0x10fd9075b gifski::c_api::gifski_write_sync_internal::he475337230ac78cf + 4351465307
9  Gifski                         0x10fd9fe57 std::sys_common::backtrace::__rust_begin_short_backtrace::h7d84625eb0eb1761 + 4351528535
10 Gifski                         0x10fd9405c std::panicking::try::do_call::h01f306db21e930dd (.llvm.6861174976860541177) + 4351479900
11 Gifski                         0x10fe1d02c __rust_maybe_catch_panic + 31 (lib.rs:31)
12 Gifski                         0x10fda1440 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hdc74ba1bfd3f08af + 4351534144
13 Gifski                         0x10fdef5ee _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h184cdfe19b856bb1 + 219 (alloc.rs:219)
14 Gifski                         0x10fe1c0be std::sys::unix::thread::Thread::new::thread_start::he418bbb505b1b1b9 + 103 (alloc.rs:103)
15 libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
16 libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
17 libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

#9. Thread
0  Gifski                         0x10fddc754 liq_max3 + 4351776596
1  Gifski                         0x10fdd6acd contrast_maps + 4351752909
2  Gifski                         0x10fdd4704 liq_histogram_add_image + 4351743748
3  Gifski                         0x10fdd45fe liq_image_quantize + 4351743486
4  Gifski                         0x10fdd1950 imagequant::Attributes::quantize::h0abe3946fa9ed236 + 4351732048
5  Gifski                         0x10fd9ac88 gifski::Writer::make_frames::hc07d73cbadb9fd42 + 4351507592
6  Gifski                         0x10fd9fe04 std::sys_common::backtrace::__rust_begin_short_backtrace::hc8e9266362a60183 + 4351528452
7  Gifski                         0x10fd940a0 std::panicking::try::do_call::h42c4c96ae8ef785a (.llvm.6861174976860541177) + 4351479968
8  Gifski                         0x10fe1d02c __rust_maybe_catch_panic + 31 (lib.rs:31)
9  Gifski                         0x10fda0ea3 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h1bd6881929edf5b0 + 4351532707
10 Gifski                         0x10fdef5ee _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h184cdfe19b856bb1 + 219 (alloc.rs:219)
11 Gifski                         0x10fe1c0be std::sys::unix::thread::Thread::new::thread_start::he418bbb505b1b1b9 + 103 (alloc.rs:103)
12 libsystem_pthread.dylib        0x7fff7c61c661 _pthread_body + 340
13 libsystem_pthread.dylib        0x7fff7c61c50d _pthread_start + 375
14 libsystem_pthread.dylib        0x7fff7c61bbf9 thread_start + 13

Which is this line:

data.append(bufferPointer, length: bufferLength)

(The line number in the stack trace here is incorrect for some reason. I got the correct one from the App Store Connect report)

Help wanted with debugging this crash.

@sindresorhus sindresorhus added bug Something isn't working help wanted Extra attention is needed labels Aug 8, 2019
@ghost
Copy link

ghost commented Aug 15, 2019

I think I got the same thing here (when pressing cancel).
#95 (comment)

@sindresorhus
Copy link
Owner Author

@BowdusBrown I only managed to get that in Debug build, not in Release build. So make sure you test in Release mode.

@kornelski
Copy link
Collaborator

I've seen this crash too. All the pointers in the callback are the same as in previous calls that did succeed, so it looks like use-after-free of gifData.

@sindresorhus
Copy link
Owner Author

Reopening this as I'm still seeing this crash in Crashlytics: #124 (comment)

@sindresorhus sindresorhus reopened this Sep 13, 2019
@sindresorhus sindresorhus added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Mar 11, 2020
@sindresorhus
Copy link
Owner Author

This is unfortunately still crashing...

Recent crash log:

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00005128a405ace8
@objc closure #3 in Gifski.run(_:completionHandler:)

Crashed: Thread
0  libobjc.A.dylib                0x7fff61dd369d objc_msgSend + 29
1  Gifski                         0x10e737a0b @objc closure #3 in Gifski.run(_:completionHandler:) + 133 (Gifski.swift:133)
2  Gifski                         0x10e789684 std::io::Write::write_all::hd57c5af5d92ee071 + 4453373572
3  Gifski                         0x10e79188e gif::encoder::Encoder$LT$W$GT$::write_extension::h73c2b6f91d0bebe2 + 4453406862
4  Gifski                         0x10e790f08 gif::encoder::Encoder$LT$W$GT$::write_frame::h96065e27b864094e + 4453404424
5  Gifski                         0x10e7906da _$LT$gifski..encoderust..RustEncoder$LT$W$GT$$u20$as$u20$gifski..Encoder$GT$::write_frame::haa0119cba5178c40 + 4453402330
6  Gifski                         0x10e79e3e0 gifski::Writer::write_with_encoder::hacc6bc8ed766a0f1 + 4453458912
7  Gifski                         0x10e79e07a gifski::Writer::write::h56317085dab68fda + 4453458042
8  Gifski                         0x10e78b71e gifski::c_api::gifski_write_sync_internal::h24c94efed5f25b6d + 4453381918
9  Gifski                         0x10e783c17 std::sys_common::backtrace::__rust_begin_short_backtrace::h0a624410e0f77b45 + 4453350423
10 Gifski                         0x10e7890ec std::panicking::try::do_call::h90d0100bf748d586 (.llvm.11498677703954627722) + 4453372140
11 Gifski                         0x10e82b3cc __rust_maybe_catch_panic + 30 (lib.rs:30)
12 Gifski                         0x10e787330 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hc89410e0449b1b02 + 4453364528
13 Gifski                         0x10e7fdb2e _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::hf89a561d6d706029 + 222 (alloc.rs:222)
14 Gifski                         0x10e82a3ee std::sys::unix::thread::Thread::new::thread_start::hd09405f1ea9f0a0f + 106 (alloc.rs:106)
15 libsystem_pthread.dylib        0x7fff637a32eb _pthread_body + 126
16 libsystem_pthread.dylib        0x7fff637a6249 _pthread_start + 66
17 libsystem_pthread.dylib        0x7fff637a240d thread_start + 13

@sindresorhus
Copy link
Owner Author

This was fixed by bdee22c.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working 💵 Funded on Issuehunt This issue has been funded on Issuehunt help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants