OpenClonk Bugtracker - OpenClonk
View Issue Details
0001658OpenClonkEnginepublic2016-01-27 15:542017-10-26 13:23
ReporterLuchs 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusconfirmedResolutionopen 
PlatformGNU G++OSLinuxOS Version 
Product Version 
Target Versiongit masterFixed in Version 
Summary0001658: Crash when reloading an object
DescriptionOpenClonk crashes when selecting an object after it was reloaded. If the object is already selected when reloading, OC crashes immediately.
Steps To Reproduce0. Start openclonk --editor Tests.ocf/Minimal.ocf
1. Create Windmill
2. Update Objects.ocd/Structures.ocd/Windmill.ocd/Script.c so that OC reloads the definition.
3. Using the white mouse cursor, click the Windmill.
4. Observe crash
Additional Information[16:47:25] Version: 8.0-alpha unix linux-x86_64 (d0d27d25f11b+)
[...]
[16:48:19] Reloading Windmill from Windmill.ocd
[16:48:19] C4AulScriptEngine linked - 66674 lines, 0 warnings, 0 errors
[16:48:19] Reloading Windmill from Windmill.ocd
[16:48:20] C4AulScriptEngine linked - 66674 lines, 0 warnings, 0 errors
[16:48:20] Reloading Windmill from Windmill.ocd
[16:48:20] C4AulScriptEngine linked - 66674 lines, 0 warnings, 0 errors

Program received signal SIGSEGV, Segmentation fault.
0x0000000000c20bdf in C4PropListStatic::GetDataString() const ()
(gdb) bt
#0 0x0000000000c20bdf in C4PropListStatic::GetDataString() const ()
#1 0x0000000000c20bfb in C4PropListStatic::GetDataString() const ()
#2 0x0000000000c20bfb in C4PropListStatic::GetDataString() const ()
0000003 0x0000000000c20bfb in C4PropListStatic::GetDataString() const ()
#4 0x0000000000c44cc2 in C4Value::GetDataString(int) const ()
0000005 0x0000000000c215a4 in C4PropList::AppendDataString(StdStrBuf*, char const*, int) const ()
0000006 0x0000000000b7ab81 in C4Object::GetDataString() ()
0000007 0x0000000000b953f4 in C4ObjectList::GetDataString() ()
0000008 0x0000000000770bb2 in C4ConsoleGUI::PropertyDlgUpdate(C4ObjectList&, bool) ()
0000009 0x00000000008351a2 in C4EditCursor::OnSelectionChanged() ()
#10 0x00000000007d097c in C4ControlEMMoveObject::Execute() const ()
0000011 0x00000000007e059c in C4GameControl::ExecControlPacket(C4PacketType, C4ControlPacket*) ()
#12 0x00000000007dfcb1 in C4GameControl::DoInput(C4PacketType, C4ControlPacket*, C4ControlDeliveryType) ()
0000013 0x0000000000835edd in C4EditCursor::AddToSelection(C4Object*) ()
0000014 0x0000000000836457 in C4EditCursor::LeftButtonDown(unsigned int) ()
0000015 0x000000000077afdc in OnButtonPressStatic(_GtkWidget*, _GdkEventButton*, void*) ()
0000016 0x00007ffff4c93cac in ?? () from /usr/lib/libgtk-3.so.0
0000017 0x00007ffff3417015 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
0000018 0x00007ffff3429061 in ?? () from /usr/lib/libgobject-2.0.so.0
0000019 0x00007ffff3431899 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
0000020 0x00007ffff343212f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
0000021 0x00007ffff4dd120c in ?? () from /usr/lib/libgtk-3.so.0
0000022 0x00007ffff4df0ce3 in ?? () from /usr/lib/libgtk-3.so.0
0000023 0x00007ffff4c92ed0 in gtk_main_do_event () from /usr/lib/libgtk-3.so.0
0000024 0x00007ffff480cd32 in ?? () from /usr/lib/libgdk-3.so.0
#25 0x00007ffff3142dc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
0000026 0x00000000007768b9 in C4GLibProc::Execute(int, pollfd*) ()
0000027 0x0000000000c768ce in StdScheduler::DoScheduleProcs(int) ()
0000028 0x0000000000bc1949 in C4AbstractApp::DoScheduleProcs(int) ()
0000029 0x0000000000c7491e in StdScheduler::ScheduleProcs(int) ()
---Type <return> to continue, or q <return> to quit---
0000030 0x0000000000bc18fd in C4AbstractApp::Run() ()
0000031 0x0000000000766249 in main ()
TagsNo tags attached.
related to 0001428assigned Clonk-Karl Definition reloading crashes often 
Attached Files

Notes
(0004911)
Zapper   
2016-01-29 15:55   
Maybe related: openging an UI window that is based on objects (e.g. the E menu) also crashes after reloading.

I believe it has something to do with GetProperties and proplist/Prototype corruption.
(0004925)
Clonk-Karl   
2016-01-31 05:45   
(Last edited: 2016-01-31 05:48)
Probably a duplicate of 0001428. The problem is that the definition is reloaded, but the object's Action still points into the old definition. When selected in the editor, all properties are converted into strings to be shown in the "Object Properties" window, and it crashes when trying to turn the Action into a string.

(0005843)
Clonkonaut   
2017-10-26 13:22   
Confirmed, but there is no fix on the horizon. Detaching target version.

In the meantime, object reloading is not supported.

Issue History
2016-01-27 15:54LuchsNew Issue
2016-01-29 15:55ZapperNote Added: 0004911
2016-01-31 05:45Clonk-KarlNote Added: 0004925
2016-01-31 05:46Clonk-KarlRelationship addedrelated to 0001428
2016-01-31 05:48Clonk-KarlNote Edited: 0004925bug_revision_view_page.php?bugnote_id=4925#r1206
2017-08-05 13:58MaikelTarget Version => 8.0
2017-10-26 13:22ClonkonautStatusnew => confirmed
2017-10-26 13:22ClonkonautNote Added: 0005843
2017-10-26 13:23ClonkonautTarget Version8.0 => git master