Crash: Add dive on empty log
Dirk Hohndel
dirk at hohndel.org
Tue Sep 18 16:37:51 PDT 2012
Henrik Brautaset Aronsen <subsurface at henrik.synth.no> writes:
> 1) Open Subsurface (commit 0cf3a11) with 1 dive
> 2) Delete it
> 3) Log » Add Dive
> 4) Crash!
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0 org.hohndel.subsurface 0x000000010d7b33e8
> dive_time_widget + 504
> 1 org.hohndel.subsurface 0x000000010d7b3b2b add_new_dive + 43
> 2 org.hohndel.subsurface 0x000000010d7bd465 add_dive_cb + 37
> 3 libgobject-2.0.0.dylib 0x000000010e417104
> g_closure_invoke + 308
> 4 libgobject-2.0.0.dylib 0x000000010e426859
> signal_emit_unlocked_R + 1641
> 5 libgobject-2.0.0.dylib 0x000000010e42795c
> g_signal_emit_valist + 2924
> 6 libgobject-2.0.0.dylib 0x000000010e427f84 g_signal_emit + 116
This one makes sense. When deleting the only dive (which is selected)
and right away adding a dive we don't set amount_selected back to 0 and
end up dereferencing the invalid current_dive.
Nice catch. Will be fixed in my next push.
/D
More information about the subsurface
mailing list