Debug build crashed with
/usr/include/c++/9/bits/stl_iterator.h:820:17: runtime error: reference binding to null pointer of type 'struct PathPart'
/usr/include/c++/9/bits/stl_vector.h:1121:16: runtime error: reference binding to null pointer of type 'struct value_type'
/data/src/oomapper/src/gui/map/map_editor.cpp:2544:177: runtime error: member access within null pointer of type 'struct value_type'
/data/src/oomapper/src/gui/map/map_editor.cpp:2544:177: runtime error: member call on null pointer of type 'struct VirtualPath'
/data/src/oomapper/src/core/virtual_path.cpp:339:2: runtime error: member access within null pointer of type 'const struct VirtualPath'
n/a
Mapper Version: master-v20191221.17-62-gb4466b076612
Operating System: openSUSE Tumbleweed
Possibly related, this is a backtrace of a similar crash I observed on Android with another custom build. I was unable to replicate that one either. I'm attaching this data bit just in case it helps to determine the root cause of this irregular crash.
--------- beginning of crash
08-15 10:56:52.818 3953 3967 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 3967 (qtMainLoopThrea)
08-15 10:56:52.913 7609 7609 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-15 10:56:52.914 7609 7609 F DEBUG : Build fingerprint: 'nvidia/wx_na_wf/shieldtablet:7.0/NRD90M/1928188_1006.1489:user/release-keys'
08-15 10:56:52.914 7609 7609 F DEBUG : Revision: '0'
08-15 10:56:52.914 7609 7609 F DEBUG : ABI: 'arm'
08-15 10:56:52.914 7609 7609 F DEBUG : pid: 3953, tid: 3967, name: qtMainLoopThrea >>> org.openorienteering.mapper.dev <<<
08-15 10:56:52.915 7609 7609 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
08-15 10:56:52.915 7609 7609 F DEBUG : r0 00000000 r1 00000000 r2 00000001 r3 00000100
08-15 10:56:52.915 7609 7609 F DEBUG : r4 00000001 r5 922aa7b0 r6 00000000 r7 b21304a8
08-15 10:56:52.915 7609 7609 F DEBUG : r8 8f0b4580 r9 00000001 sl 00000001 fp 995f7c20
08-15 10:56:52.915 7609 7609 F DEBUG : ip 99601088 sp b21303e8 lr 9942752b pc 994eefa6 cpsr 200f0030
08-15 10:56:52.936 7609 7609 F DEBUG :
08-15 10:56:52.936 7609 7609 F DEBUG : backtrace:
08-15 10:56:52.936 7609 7609 F DEBUG : #00 pc 00230fa6 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libMapper.so (_ZNK16OpenOrienteering11VirtualPath17countRegularNodesEv+77)
08-15 10:56:52.936 7609 7609 F DEBUG : #01 pc 00169527 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libMapper.so (_ZN16OpenOrienteering19MapEditorController28updateObjectDependentActionsEv+5686)
08-15 10:56:52.936 7609 7609 F DEBUG : #02 pc 00167de7 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libMapper.so (_ZN16OpenOrienteering19MapEditorController20setEditingInProgressEb+586)
08-15 10:56:52.936 7609 7609 F DEBUG : #03 pc 0028cf91 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libMapper.so (_ZN16OpenOrienteering19DrawLineAndAreaTool13finishDrawingEPNS_10PathObjectE+336)
08-15 10:56:52.936 7609 7609 F DEBUG : #04 pc 0028c79f /data/app/org.openorienteering.mapper.dev-2/lib/arm/libMapper.so (_ZN16OpenOrienteering19DrawLineAndAreaTool13finishEditingEv+14)
08-15 10:56:52.936 7609 7609 F DEBUG : #05 pc 00167907 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libMapper.so (_ZN16OpenOrienteering19MapEditorController7setToolEPNS_13MapEditorToolE+38)
08-15 10:56:52.937 7609 7609 F DEBUG : #06 pc 0015edf9 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libQt5Core.so (_ZN11QMetaObject8activateEP7QObjectiiPPv+1304)
08-15 10:56:52.937 7609 7609 F DEBUG : #07 pc 0015ed2b /data/app/org.openorienteering.mapper.dev-2/lib/arm/libQt5Core.so (_ZN11QMetaObject8activateEP7QObjectiiPPv+1098)
08-15 10:56:52.937 7609 7609 F DEBUG : #08 pc 00102aa1 /data/app/org.openorienteering.mapper.dev-2/lib/arm/libQt5Widgets.so (_ZN7QAction9triggeredEb+40)
That happened to me too. But was not able to replicate it.
Just managed to replicate one such crash:
1) Select circle tool
2) Make a _single_ click on the map
3) Press E key to select Edit tool
@ollesmaps, thanks for sharing your experience. Knowing that I'm not doing the work only for myself is always motivates me more.
@lpechacek That's it! I suspected it was something short - wanted to draw a circle and than realised I want something else. Thank you investigating this issue!
This seems to be the fix:
--- a/src/tools/draw_circle_tool.cpp
+++ b/src/tools/draw_circle_tool.cpp
@@ -97,6 +97,8 @@ bool DrawCircleTool::mousePressEvent(QMouseEvent* event, const MapCoordF& map_co
if (!editingInProgress())
startDrawing();
+
+ updateCircle();
}
else if (first_point_set && !second_point_set)
{
Thanks, Libor! I was able to reproduce the issue. However, I found that the proposed solution created a zero-length straight path. Thus I implemented a change in finishDrawing instead.
- Select circle tool
- Make a single click on the map
All right, this starts editing, with most buttons disabled, for good reasons.
- Press E key to select Edit tool
Oops, is this action really meant/needed to be possible at all while editing is in progress? And implicitly finish drawing, instead of aborting?
- Press E key to select Edit tool
Oops, is this action really meant/needed to be possible at all while editing is in progress? And _implicitly_ finish drawing, instead of aborting?
Yes. There was a discussion on that topic in issue #1175. I myself am happy with the possibility of a rapid tool switch without too much clicking. However, if there are alternate opinions, I'm listening. :)