boxcrash
boxcrash copied to clipboard
Crashes on Mac OS X 10.12.2
Hello!
I've been very interested in seeing how rust is used for game development as an opportunity to learn more about the language. When attempting to compile and run this program I get a pretty nasty crash. Before I spend some time trying to dig this apart - I'm wondering if any of the following might look familiar to you:
$ CA_DEBUG_TRANSACTIONS=1 RUST_BACKTRACE=1 cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/boxcrash`
CoreAnimation: warning, deleted thread with uncommitted CATransaction; created by:
0 QuartzCore 0x00007fff7c00fe5b _ZN2CA11Transaction4pushEv + 331
1 QuartzCore 0x00007fff7c01021f _ZN2CA11Transaction15ensure_implicitEv + 281
2 QuartzCore 0x00007fff7c0106cc _ZN2CA11Transaction8set_seedEj + 30
3 QuartzCore 0x00007fff7c182708 +[CATransaction(CATransactionPrivate) generateSeed] + 56
4 AppKit 0x00007fff73e2f88e +[NSDisplayCycle currentDisplayCycle] + 44
5 AppKit 0x00007fff73e99803 -[NSDisplayCycleObserver setNeedsDisplay:] + 34
6 AppKit 0x00007fff73e993dc -[NSWindow _setNeedsDisplayInRect:] + 382
7 AppKit 0x00007fff73df1163 NSViewSetNeedsDisplayInRect + 695
8 AppKit 0x00007fff73df0ea3 -[NSView setNeedsDisplayInRect:] + 48
9 AppKit 0x00007fff73df0d42 -[NSView setNeedsDisplay:] + 81
10 AppKit 0x00007fff73e3e5c5 -[NSThemeFrame setNeedsDisplay:] + 112
11 AppKit 0x00007fff73e50bca -[NSTitledFrame tileAndSetWindowShape:] + 45
12 AppKit 0x00007fff73e277a8 -[NSThemeFrame initWithFrame:styleMask:owner:] + 282
13 AppKit 0x00007fff73e26206 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 590
14 AppKit 0x00007fff73e248e3 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1435
15 AppKit 0x00007fff73e2433f -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
16 boxcrash 0x00000001065d02be _ZN88_$LT$$LP$A$C$$u20$B$C$$u20$C$C$$u20$D$RP$$u20$as$u20$objc..message..MessageArguments$GT$6invoke17h380a8fa2679488c4E + 414
17 boxcrash 0x00000001065cd5b2 _ZN4objc7message15send_unverified17h8b300870aed28301E + 402
18 boxcrash 0x00000001065d1f14 _ZN77_$LT$$BP$mut$u20$objc..runtime..Object$u20$as$u20$cocoa..appkit..NSWindow$GT$44initWithContentRect_styleMask_backing_defer_17h118c068211831d33E + 852
19 boxcrash 0x00000001065c7a16 _ZN5winit8platform8platform6Window13create_window17hd384d6893a98006bE + 4438
20 boxcrash 0x00000001065c5ea5 _ZN5winit8platform8platform6Window3new17hcc5076d31f98d38dE + 245
21 boxcrash 0x00000001065cb350 _ZN5winit6window38_$LT$impl$u20$winit..WindowBuilder$GT$5build17h600c3aedf1c43a8cE + 448
22 boxcrash 0x00000001065b16d7 _ZN6glutin8platform8platform6Window3new17h38d28d7faa6540d2E + 455
23 boxcrash 0x00000001065b3254 _ZN6glutin6window53_$LT$impl$u20$glutin..WindowBuilder$LT$$u27$a$GT$$GT$5build17h6e63b6d9883305d8E + 276
24 boxcrash 0x000000010659f830 _ZN13glutin_window12GlutinWindow3new17hd093400494a85679E + 192
25 boxcrash 0x00000001065a1fdc _ZN79_$LT$glutin_window..GlutinWindow$u20$as$u20$window..BuildFromWindowSettings$GT$26build_from_window_settings17hfb27658f5714eeabE + 44
26 boxcrash 0x00000001061accbc _ZN6window14WindowSettings5build17h83c5773930b03ac1E + 44
27 boxcrash 0x00000001061e734a _ZN88_$LT$piston_window..PistonWindow$LT$W$GT$$u20$as$u20$window..BuildFromWindowSettings$GT$26build_from_window_settings17hefef8729c7900a02E + 298
28 boxcrash 0x00000001061acc7c _ZN6window14WindowSettings5build17h2494b293918a6fa8E + 44
29 boxcrash 0x0000000106241b05 _ZN8boxcrash4game4Game3new17h269cb37a0eec8643E + 309
30 boxcrash 0x0000000106248685 _ZN8boxcrash2ui10start_game28_$u7b$$u7b$closure$u7d$$u7d$17he01f4e98ccf93a51E + 133
31 boxcrash 0x000000010622b5db _ZN91_$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..FnOnce$LT$$LP$$RP$$GT$$GT$9call_once17hea1a7778bc9846fdE + 155
32 boxcrash 0x0000000106089dce _ZN3std9panicking3try7do_call17ha001d6090a047a66E + 318
33 boxcrash 0x000000010664ccfb __rust_maybe_catch_panic + 27
34 boxcrash 0x0000000106089bc4 _ZN3std9panicking3try17hce774dddc74615b5E + 244
35 boxcrash 0x0000000106088a75 _ZN3std5panic12catch_unwind17hc7b7b9ee6ab805b9E + 165
36 boxcrash 0x0000000106089809 _ZN3std6thread7Builder5spawn28_$u7b$$u7b$closure$u7d$$u7d$17hfdc524a9cceb2329E + 377
37 boxcrash 0x0000000106116843 _ZN50_$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$8call_box17h89d3994dc4972354E + 83
38 boxcrash 0x0000000106648de5 _ZN3std3sys3imp6thread6Thread3new12thread_start17h4008e1859fbd98b8E + 37
39 libsystem_pthread.dylib 0x00007fff8ba51aab _pthread_body + 180
40 libsystem_pthread.dylib 0x00007fff8ba519f7 _pthread_body + 0
41 libsystem_pthread.dylib 0x00007fff8ba511fd thread_start + 13
thread 'main' panicked at 'Unexpected thread error: Any', src/libcore/result.rs:859
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
1: std::panicking::default_hook::{{closure}}
2: std::panicking::default_hook
3: std::panicking::rust_panic_with_hook
4: std::panicking::begin_panic
5: std::panicking::begin_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: <core::result::Result<T, E>>::expect
10: boxcrash::ui::main
11: boxcrash::main
12: std::panicking::try::do_call
13: __rust_maybe_catch_panic
14: std::rt::lang_start
15: main
- Running
rustc
1.17.0 - Mac OS 10.12.2
Thanks for your feedback!!
I have no Mac OS to check but this seem to be a problem with Rust or Piston itself (I prefer Rust). Btw, I've replaced all unwrap()
with expect()
in my code. You should check it again to see if there is any difference or not.
Thanks for the quick reply.
I just saw these changes on master. I pull those in, still getting a crash.
cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/boxcrash`
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:323
note: Run with `RUST_BACKTRACE=1` for a backtrace.
fatal runtime error: failed to initiate panic, error 5