[Solved] Ticket #4136 - Hard crash using Addon Manager when multiple clicking on different addons

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

[Solved] Ticket #4136 - Hard crash using Addon Manager when multiple clicking on different addons

Postby Kunda1 » Sun Jul 14, 2019 3:13 pm

Steps to recreate:
1. Start FC
2. Go to Addon Manager
3. Choose any installed Addon and uninstall it.
Result: a separate bug happens here where all the Addon logos disappear and turn in to folder icons
4. click on another addon
Result: FreeCAD crashes (see below)
5. if step #4 didn't trigger the bug then just click around on different addons and eventually it will crash

Note: I tried to get a backtrace in gdb with no success.
Result:
(gdb) bt
No stack.

/tmp/.mount_FreeCAm5b73n/AppRun: line 13: 14868 Aborted (core dumped) ${HERE}/usr/bin/FreeCAD "$@"
OS: Manjaro Linux (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17349 (Git) AppImage
Build type: Release
Branch: master
Hash: 7eccda34d090ab641b29fa4be24c515cfa39c601
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
rockn
Posts: 1589
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: AppImage 0.19.17349 - Hard crash using Download Manager

Postby rockn » Sun Jul 14, 2019 3:18 pm

Title should not be "Hard crash using Addons Manager" instead of Download ?
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
looo
Posts: 2964
Joined: Mon Nov 11, 2013 5:29 pm

Re: AppImage 0.19.17349 - Hard crash using Addon Manager

Postby looo » Tue Jul 16, 2019 2:02 pm

can reproduce with:

ppa:
OS: Ubuntu 18.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)


and:

conda
OS: Ubuntu 18.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17360 (Git)
Build type: Release
Branch: master
Hash: 348160d4ea970f5f6d0850272c04800c0222c8ba
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: AppImage 0.19.17349 - Hard crash using Addon Manager

Postby Kunda1 » Mon Jul 22, 2019 12:06 pm

yorik wrote:soft bump
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: AppImage 0.19.17349 - Hard crash using Addon Manager

Postby Kunda1 » Mon Sep 16, 2019 1:20 pm

This is still an issue
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
hinckel
Posts: 77
Joined: Fri Nov 21, 2014 11:45 am
Location: SJCAMPOS, SP - BR

Re: AppImage 0.19.17349 - Hard crash using Addon Manager

Postby hinckel » Tue Sep 17, 2019 5:47 pm

Still an issue with current (self-compiled) git version

OS: openSUSE Leap 15.1 (KDE//usr/share/xsessions/plasma5)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18240 (Git)
Build type: Unknown
Branch: master
Hash: f4bc889b4d69ec35dfcc52e4eec1a5a5f97d8140
Python version: 3.6.5
Qt version: 5.9.7
Coin version: 3.1.3
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Does not happen every time, but most of the times.

Steps to replicate


1. Start FreeCAD
2. Open Addon Manager.
3. Click on of the addons (happens most often with GDT addon) (even if it is not installed in my system).
4. Kaboomm! system crash. Asks for bug report (not available) or system restart..
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4136 - Hard crash using Addon Manager when multiple clicking on different addons

Postby Kunda1 » Thu Sep 19, 2019 1:17 am

issue #4136 was open independently of this thread.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
vocx
Posts: 1906
Joined: Thu Oct 18, 2018 9:18 pm

Re: Ticket #4136 - Hard crash using Addon Manager when multiple clicking on different addons

Postby vocx » Thu Sep 19, 2019 8:41 am

In order to get a trace with gdb, you need to compile a "Debug" build.

Code: Select all

cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Debug ../freecad-source
You also need to have debug symbols for the dependencies, that is, Qt5, Python3, etc. According to the bug report, it seems the errors occur in the Qt5 libraries, so maybe these debug symbols are enough.

Many threads created

Code: Select all

QThread: Destroyed while thread is still running

Thread 18 "ShowWorker" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff6cbfe700 (LWP 7708)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) info threads
  Id   Target Id         Frame 
  1    Thread 0x7ffff7f71780 (LWP 7668) "FreeCAD" QtPrivate::RefCount::deref (this=0x555555e8da00)
    at ../../include/QtCore/../../src/corelib/tools/qrefcount.h:68
  2    Thread 0x7fffdf36b700 (LWP 7679) "QXcbEventReader" 0x00007ffff213cbf9 in __GI___poll (fds=0x7fffdf36ad28, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  3    Thread 0x7fffd52cc700 (LWP 7680) "gmain" 0x00007ffff213cbf9 in __GI___poll (fds=0x555555ab2220, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  4    Thread 0x7fffd4acb700 (LWP 7681) "gdbus" 0x00007ffff213cbf9 in __GI___poll (fds=0x555555ac3c30, nfds=2, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  5    Thread 0x7fffcef70700 (LWP 7682) "QDBusConnection" 0x00007ffff213cbf9 in __GI___poll (fds=0x7fffc4010c50, nfds=4, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  6    Thread 0x7fffc3cb5700 (LWP 7684) "FreeCAD:disk$0" 0x00007ffff0efc9f3 in futex_wait_cancelable (private=<optimized out>, 
    expected=0, futex_word=0x555555ae4f88) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  7    Thread 0x7fffb1d07700 (LWP 7689) "FreeCAD" 0x00007ffff0efc9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, 
    futex_word=0x7fffb81de114 <bmalloc::PerProcess<bmalloc::Heap>::s_memory+3124>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  8    Thread 0x7fff6f7ff700 (LWP 7690) "Qt bearer threa" 0x00007ffff213cbf9 in __GI___poll (fds=0x7fff68002ce0, nfds=1, timeout=9991)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  9    Thread 0x7fff6d3ff700 (LWP 7691) "QNetworkAccessM" 0x00007ffff213cbf9 in __GI___poll (fds=0x7fff60002e90, nfds=1, timeout=75501)
    at ../sysdeps/unix/sysv/linux/poll.c:29
  12   Thread 0x7fff5d5f4700 (LWP 7694) "FreeCAD" 0x00007ffff0efc9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, 
    futex_word=0x7fff6d48205c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  13   Thread 0x7fff5cdf3700 (LWP 7695) "FreeCAD" 0x00007ffff0efc9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, 
    futex_word=0x7fff6d5241ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
---Type <return> to continue, or q <return> to quit---
  14   Thread 0x7fff57fff700 (LWP 7696) "FreeCAD" 0x00007ffff0efc9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, 
    futex_word=0x7fff6de48058) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
* 18   Thread 0x7fff6cbfe700 (LWP 7708) "ShowWorker" __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
  19   Thread 0x7fff577fe700 (LWP 7709) "ShowWorker" 0x00007ffff213cbf9 in __GI___poll (fds=0x7fff577facc8, nfds=1, timeout=5000)
    at ../sysdeps/unix/sysv/linux/poll.c:29
Thread 18 "ShowWorker" seems to be the problematic one

Code: Select all

(gdb) bt full
#0  0x00007ffff2066e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
        set = 
            {__val = {0, 283686952306183, 7493989779944505344, 9271505357383925760, 12032118241111421022, 1714141844386072672, 140737011779376, 353066784953759488, 17854435554918475922, 140737289835734, 0, 140735017900464, 140736167783504, 140737294167104, 140735088366480, 140736330822414}}
        pid = <optimized out>
        tid = <optimized out>
#1  0x00007ffff2068801 in __GI_abort () at abort.c:79
        save_stage = 1
        act = 
          {__sigaction_handler = {sa_handler = 0x7fff6cbfdac0, sa_sigaction = 0x7fff6cbfdac0}, sa_mask = {__val = {140734871148960, 140735017900736, 93824992275602, 0, 353066784953759488, 140735017900768, 93824994593792, 140735017900816, 140737296215286, 93825020048592, 93825002247664, 140734871165344, 93824992274548, 93824994593792, 140734871148960, 140735017900848}}, sa_flags = -156389979, sa_restorer = 0x555555794c00}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff6ad4a62 in messageHandler(QtMsgType, QMessageLogContext const&, QString const&) (type=QtFatalMsg, context=..., msg=...)
    at /opt/freecad-source-vocx/src/Gui/Application.cpp:1540
#3  0x00007ffff2a4f477 in qt_message_print (message=..., context=..., msgType=QtFatalMsg) at global/qlogging.cpp:1656
        buf = {static null = {<No data fields>}, d = 0x7fff64001130}
#4  0x00007ffff2a4f477 in qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, context=..., msg=msg@entry=0x7ffff2d31c18 "QThread: Destroyed while thread is still running", ap=ap@entry=0x7fff6cbfdbf0) at global/qlogging.cpp:281
        buf = {static null = {<No data fields>}, d = 0x7fff64001130}
---Type <return> to continue, or q <return> to quit---
#5  0x00007ffff2a50f9e in QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7fff6cbfdcd0, msg=msg@entry=0x7ffff2d31c18 "QThread: Destroyed while thread is still running") at global/qlogging.cpp:793
        message = <optimized out>
        ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fff6cbfdcd0, reg_save_area = 0x7fff6cbfdc10}}
#6  0x00007ffff2a6018d in QThread::~QThread() (this=0x555555ee15f0, __in_chrg=<optimized out>) at thread/qthread.cpp:429
        locker = <optimized out>
        d = 0x555556fdb460
#7  0x00007fffbb0d6e99 in  () at /usr/lib/python3/dist-packages/PySide2/QtCore.cpython-36m-x86_64-linux-gnu.so
#8  0x00007fffefff5b68 in  () at /usr/lib/x86_64-linux-gnu/libshiboken2.cpython-36m-x86_64-linux-gnu.so.5.11
#9  0x00007ffff42ad3c5 in subtype_dealloc (self=<ShowWorker(info_label=<unknown at remote 0x7fff70f1b710>, addon_repos=<PySide2.QtCore.SignalInstance at remote 0x7fffb8a6ad50>, progressbar_show=<PySide2.QtCore.SignalInstance at remote 0x7fffb8a6ad68>, repos=[['3D_Printing_Tools', 'https://github.com/mark1791/3D_Printing_Tools', 0], ['A2plus', 'https://github.com/kbwbe/A2plus', 0], ['AirPlaneDesign', 'https://github.com/FredsFactory/FreeCAD_AirPlaneDesign', 0], ['animation', 'https://github.com/microelly2/Animation', 0], ['ArchTextures', 'https://github.com/furti/FreeCAD-ArchTextures', 0], ['assembly2', 'https://github.com/hamish2014/FreeCAD_assembly2', 0], ['Autoload', 'https://github.com/triplus/Autoload', 0], ['BCFPlugin', 'https://github.com/podestplatz/BCF-Plugin-FreeCAD', 0], ['BIM', 'https://github.com/yorikvanhavre/BIM_Workbench', 1], ['BIMBots', 'https://github.com/opensourceBIM/BIMbots-FreeCAD', 0], ['BOLTSFC', 'https://github.com/boltsparts/BOLTSFC', 1], ['CADExchanger', 'https://github.com/yorikvanhavre/CADExchanger', 0], ['cadquery_module', 'ht...(truncated))
    at ../Objects/typeobject.c:1222
        _tstate = <optimized out>
        type = 0x5555558492e8
        base = <optimized out>
        basedealloc = 0x7fffefff5bd0 <SbkDeallocWrapper>
        tstate = 0x7fff6400d9a0
---Type <return> to continue, or q <return> to quit---
        has_finalizer = <optimized out>
#10 0x00007ffff4306357 in method_dealloc (im=0x7fffc026aa48) at ../Objects/classobject.c:195
        _py_decref_tmp = <optimized out>
        _py_xdecref_tmp = <optimized out>
#11 0x00007fffbb0d9fc7 in  () at /usr/lib/python3/dist-packages/PySide2/QtCore.cpython-36m-x86_64-linux-gnu.so
#12 0x00007ffff2a6617d in QThreadPrivate::start(void*) (arg=0x555555ee15f0) at thread/qthread_unix.cpp:368
        __clframe = 
          {__cancel_routine = 0x7ffff2a65210 <QThreadPrivate::finish(void*)>, __cancel_arg = 0x555555ee15f0, __do_it = 1, __cancel_type = <optimized out>}
        thr = 0x555555ee15f0
        data = 0x555555f3b950
#13 0x00007ffff0ef66db in start_thread (arg=0x7fff6cbfe700) at pthread_create.c:463
        pd = 0x7fff6cbfe700
        now = <optimized out>
        unwind_buf = 
              {cancel_jmp_buf = {{jmp_buf = {140735017903872, 2662616058880021187, 140735017901952, 0, 93825002247664, 140737488328336, -2662372515945688381, -2662644513804168509}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#14 0x00007ffff214988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
My system information

Code: Select all

OS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18255 (Git)
Build type: Debug
Branch: master
Hash: 5a83dc2c8f0fd10640fc8f2268d16f67fd31fa85
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Last edited by vocx on Thu Sep 19, 2019 2:38 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4136 - Hard crash using Addon Manager when multiple clicking on different addons

Postby Kunda1 » Thu Sep 19, 2019 11:07 am

vocx wrote:
Thu Sep 19, 2019 8:41 am
In order to get a trace with gdb, you need to compile a "Debug" build.
Nice sluething! I wasn't aware of bt full I should add that to the debugging wiki page.

I wish we had a way to continuously build nightly debug builds (maybe some educational institution would support it?) instead of asking users to build FC with all its dependencies.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4136 - Hard crash using Addon Manager when multiple clicking on different addons

Postby Kunda1 » Wed Oct 09, 2019 4:38 pm

yorik wrote:soft bump
Just a reminder, in case this got lost in all the noise
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features