Umbrello crashes (segmentation fault) when adding a message to a sequence diagram. Using Archlinux. Steps to reproduce: * Open Umbrello * Add new logical view of type "Sequence diagram" * Add two objects * Add a message between both objects (doesnt matter if sync. or async.) * Crash occurs when clicking on the second lifeline
Can you provide a backtrace ?
I recompiled umbrello including debug symbols and gdb shows the following: +++ umbrello: "Create widget : new_class" [ 2 ] umbrello: Modified file= "Untitled" umbrello: Object_Factory::createUMLObject( "" ): parentPkg is not set, assuming Model_Type "Logical" umbrello: "Create UML object : new_class_1" [ 3 ] umbrello: Modified file= "Untitled" umbrello: scene= "sequence diagram" / object= "new_class_1" umbrello: Modified file= "Untitled" umbrello: "Create widget : new_class_1" [ 3 ] umbrello: Modified file= "Untitled" umbrello: virtual void ToolBarStateMessages::setCurrentElement() Object detected umbrello: virtual void ToolBarStateMessages::setCurrentElement() Object detected Thread 1 "umbrello" received signal SIGSEGV, Segmentation fault. __cxxabiv1::__dynamic_cast (src_ptr=0x0, src_type=0xb304a0 <typeinfo for UMLObject>, dst_type=0xb30630 <typeinfo for UMLOperation>, src2dst=0) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/dyncast.cc:50 50 /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/dyncast.cc: Datei oder Verzeichnis nicht gefunden. (gdb) +++ I hope this helps. If you need any further information please let me know!
(In reply to Clemens John from comment #2) > I recompiled umbrello including debug symbols and gdb shows the following: > > +++ > umbrello: "Create widget : new_class" [ 2 ] > umbrello: Modified file= "Untitled" > umbrello: Object_Factory::createUMLObject( "" ): parentPkg is not set, > assuming Model_Type "Logical" > umbrello: "Create UML object : new_class_1" [ 3 ] > umbrello: Modified file= "Untitled" > umbrello: scene= "sequence diagram" / object= "new_class_1" > umbrello: Modified file= "Untitled" > umbrello: "Create widget : new_class_1" [ 3 ] > umbrello: Modified file= "Untitled" > umbrello: virtual void ToolBarStateMessages::setCurrentElement() Object > detected > umbrello: virtual void ToolBarStateMessages::setCurrentElement() Object > detected > > Thread 1 "umbrello" received signal SIGSEGV, Segmentation fault. > __cxxabiv1::__dynamic_cast (src_ptr=0x0, src_type=0xb304a0 <typeinfo for > UMLObject>, dst_type=0xb30630 <typeinfo for UMLOperation>, src2dst=0) > at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/dyncast.cc:50 > 50 /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/dyncast.cc: Datei > oder Verzeichnis nicht gefunden. > (gdb) > +++ > > I hope this helps. yes, I have an idea what's going wrong. The above mentioned crash is known with gcc 6.2 on windows (see bug 373911) > If you need any further information please let me know! Yes: 1. It would be nice to get more backtrace stackframes to be able to get an idea which code path has been used. 2. Which compiler version did you use ? 3. It would be nice if you would perform the following steps: 3.1 checkout umbrello from branch Applications/16.12 from git repo git://anongit.kde.org/umbrello if not already done 3.2 enable macro checkPointer() unconditional (see the following commit https://cgit.kde.org/umbrello.git/commit/?h=Applications/16.12&id=5b81af759c24895892d8c628fd610ff43f16fd2c for details) 3.2 recompile, retest and report if that helps Thanks
Git commit 21bcc9a769bb0813f313955586f5fe8572e0c228 by Ralf Habacker. Committed on 04/01/2017 at 13:31. Pushed by habacker into branch 'Applications/16.12'. Fix 'Crash when adding message to sequence diagram'. To support gcc 6.2 on linux it is required to guard the dynamic_cast's there too. Related: bug 373911 FIXED-IN:2.21.1 (KDE Applications 16.12.1) M +0 -4 umbrello/umlmodel/umlobject.cpp https://commits.kde.org/umbrello/21bcc9a769bb0813f313955586f5fe8572e0c228
(In reply to Ralf Habacker from comment #3) > 3.2 recompile, retest and report if that helps Updated gcc to 6.2 on opensuse and got the same crash. Thanks for reporting.
Git commit d1df6ae9759f75e3c3b244678c19c7eb009a3c63 by Ralf Habacker. Committed on 04/01/2017 at 13:57. Pushed by habacker into branch 'Applications/16.12'. Fix additional gcc 6.2 "nonnull" warnings caused by checking this pointer. Renamed macro checkPointer() to uCheckPointerAndReturnIfZero() and made it public accessable. M +2 -1 lib/cppparser/driver.h M +19 -0 umbrello/debug/debug_utils.h M +29 -38 umbrello/umlmodel/umlobject.cpp https://commits.kde.org/umbrello/d1df6ae9759f75e3c3b244678c19c7eb009a3c63
FYI, you introduced non-portable ASM code here, that (apparently?) only works on intel architectures, so umbrello now fails to build elsewhere (like arm, ppc, etc...)
The error I'm seeing: {standard input}: Assembler messages: {standard input}:8263: Error: unrecognized opcode: `test' {standard input}:8263: Error: unrecognized opcode: `jne'
Please revert this non-portable patch and use -fno-delete-null-pointer-checks instead. (That is a GCC switch, but your inline assembly is also GCC-only!) Rex, you will want to just revert the patch in Fedora. I think we are already/still using -fno-delete-null-pointer-checks across all Qt/KDE stuff (may be worth looking into dropping that at some point, I think Qt itself was fixed, and most other stuff is getting fixed, too, or at least adds the switch itself), so at this time, reverting the patch will NOT reintroduce this bug on Fedora.
Reopening because the fix is not acceptable. (It breaks the build on everything except GCC on x86.)
Git commit ce147ad93100a0d296f1c5958fcb7bf70c9d70af by Ralf Habacker. Committed on 14/01/2017 at 10:45. Pushed by habacker into branch 'Applications/16.12'. Use gcc buildin null pointer check to remove x86 limitation of previous implementation. Thanks to Kevin Kofler for pointing out. MSVC dynamic_cast null pointer support has been checked and proved by Daniel Wendt. FIXED-IN:2.12.2 (KDE Applications 16.12.2) M +4 -0 CMakeLists.txt M +0 -2 lib/cppparser/driver.h M +0 -19 umbrello/debug/debug_utils.h M +28 -29 umbrello/umlmodel/umlobject.cpp https://commits.kde.org/umbrello/ce147ad93100a0d296f1c5958fcb7bf70c9d70af
I just want to leave some feedback, that the bug is fixed for me in Version 2.21.1. Thank you!