Bug 415302 - Cantor crashing (qalculate backend)
Summary: Cantor crashing (qalculate backend)
Status: RESOLVED UPSTREAM
Alias: None
Product: cantor
Classification: Applications
Component: qualculate-backend (show other bugs)
Version: 19.12.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Nikita Sirgienko
URL:
Keywords: drkonqi
: 431657 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-17 22:34 UTC by Alessio Adamo
Modified: 2021-03-26 07:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (7.03 KB, text/plain)
2019-12-20 20:30 UTC, Tim Richardson
Details
New crash information added by DrKonqi (8.79 KB, patch)
2020-04-25 17:25 UTC, dennis.bellinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessio Adamo 2019-12-17 22:34:52 UTC
Application: cantor (19.12.0)

Qt Version: 5.13.2
Frameworks Version: 5.65.0
Operating System: Linux 5.0.0-37-generic x86_64
Distribution: KDE neon User Edition 5.17

-- Information about the crash:
I'm using KDE Neon up-to-date on a Slimbook. At the beginning I was able to select the backend, but after confirmation the application was crashing. Then I installed other backends (Maxima, Octave) but the application started to crash immediately after launch,

The crash can be reproduced every time.

-- Backtrace:
Application: Cantor (cantor), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9eeae10840 (LWP 1781))]

Thread 5 (Thread 0x7f9eb3096700 (LWP 1785)):
#0  0x00007f9ee6c920b4 in __GI___libc_read (fd=19, buf=0x7f9eb3095b50, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x00007f9ee0f9f2d0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f9ee0f5a0b7 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9ee0f5a570 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f9ee0f5a6dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f9ee7801b9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f9ee77a206a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f9ee75bd3aa in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f9ee75beb52 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f9ee2e276db in start_thread (arg=0x7f9eb3096700) at pthread_create.c:463
#10 0x00007f9ee6ca388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f9ebe2c6700 (LWP 1784)):
#0  0x00007f9ee2e2d9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x560ba8edfc08) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x560ba8edfbb8, cond=0x560ba8edfbe0) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x560ba8edfbe0, mutex=0x560ba8edfbb8) at pthread_cond_wait.c:655
#3  0x00007f9ebf5992cb in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007f9ebf598ff7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007f9ee2e276db in start_thread (arg=0x7f9ebe2c6700) at pthread_create.c:463
#6  0x00007f9ee6ca388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f9ec75a3700 (LWP 1783)):
#0  0x00007f9ee6c96bf9 in __GI___poll (fds=0x7f9ec001b5a0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f9ee0f5a5c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f9ee0f5a6dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9ee7801b9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f9ee77a206a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f9ee75bd3aa in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f9ee3e010e5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f9ee75beb52 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f9ee2e276db in start_thread (arg=0x7f9ec75a3700) at pthread_create.c:463
#9  0x00007f9ee6ca388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f9ecf74d700 (LWP 1782)):
#0  0x00007f9ee6c96bf9 in __GI___poll (fds=0x7f9ecf74cc68, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f9ede05a747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f9ede05c36a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f9ed20bbe10 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f9ee75beb52 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f9ee2e276db in start_thread (arg=0x7f9ecf74d700) at pthread_create.c:463
#6  0x00007f9ee6ca388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f9eeae10840 (LWP 1781)):
[KCrash Handler]
#6  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299
#7  0x00007f9ee0b3b501 in memcpy (__len=8, __src=<optimized out>, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#8  StitchingFunction::StitchingFunction (this=0x560ba919b850, func=0x560ba919b470) at ./poppler/Function.cc:770
#9  0x00007f9ee0b414b1 in StitchingFunction::copy (this=0x560ba919b470) at ./poppler/Function.h:200
#10 0x00007f9eb4ebf5e7 in MathFunction::setArgumentDefinition (this=this@entry=0x560ba919b470, index=<optimized out>, index@entry=1, argdef=argdef@entry=0x560ba919b600) at Function.cc:434
#11 0x00007f9eb4ff7f62 in IdentityFunction::IdentityFunction (this=0x560ba919b470) at BuiltinFunctions.cc:257
#12 0x00007f9eb4edd2ee in Calculator::addBuiltinFunctions (this=this@entry=0x560ba9191e80) at Calculator.cc:1345
#13 0x00007f9eb4ee2a68 in Calculator::Calculator (this=0x560ba9191e80) at Calculator.cc:491
#14 0x00007f9eb52b1035 in QalculateSession::QalculateSession (this=0x560ba91912a0, backend=<optimized out>) at ./src/backends/qalculate/qalculatesession.cpp:54
#15 0x00007f9eb52a76c1 in QalculateBackend::createSession (this=0x560ba8faec00) at ./src/backends/qalculate/qalculatebackend.cpp:54
#16 0x00007f9eb45410fd in Worksheet::initSession (this=0x560ba8f53cf0, backend=<optimized out>) at ./src/worksheet.cpp:1284
#17 0x00007f9eb45429c2 in Worksheet::Worksheet (this=0x560ba8f53cf0, backend=0x560ba8faec00, parent=<optimized out>, useDeafultWorksheetParameters=<optimized out>) at ./src/worksheet.cpp:102
#18 0x00007f9eb4535524 in CantorPart::CantorPart (this=this@entry=0x560ba918e040, parentWidget=parentWidget@entry=0x560ba8f6dec0, parent=parent@entry=0x560ba8f6dec0, args=..., __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at ./src/cantor_part.cpp:140
#19 0x00007f9eb453a0c1 in KPluginFactory::createPartInstance<CantorPart> (parentWidget=0x560ba8f6dec0, parent=0x560ba8f6dec0, args=...) at /usr/include/KF5/KCoreAddons/kpluginfactory.h:538
#20 0x00007f9ee8f45ae6 in KPluginFactory::create (this=this@entry=0x560ba918b9c0, iface=0x7f9eea5d88e0 "KParts::ReadWritePart", parentWidget=parentWidget@entry=0x560ba8f6dec0, parent=parent@entry=0x560ba8f6dec0, args=..., keyword=...) at ./src/lib/plugin/kpluginfactory.cpp:145
#21 0x0000560ba70781ca in KPluginFactory::create<KParts::ReadWritePart> (args=..., parent=0x560ba8f6dec0, this=0x560ba918b9c0) at /usr/include/KF5/KCoreAddons/kpluginfactory.h:550
#22 CantorShell::addWorksheet (this=this@entry=0x560ba8e928f0, backendName=...) at ./src/cantor.cpp:342
#23 0x0000560ba7079b7d in CantorShell::addWorksheet (this=0x560ba8e928f0) at ./src/cantor.cpp:272
#24 0x0000560ba707334c in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:131

Possible duplicates by query: bug 414541, bug 410586, bug 389244, bug 387802, bug 374466.

Reported using DrKonqi
Comment 1 Nikita Sirgienko 2019-12-20 19:56:35 UTC
I have reproduced crash only with Qalculate. Octave, Maxima and others works as expected.
Could you please add crashlog with Octave backend for example?
Comment 2 Tim Richardson 2019-12-20 20:30:40 UTC
Created attachment 124630 [details]
New crash information added by DrKonqi

cantor (19.12.0) using Qt 5.13.2

- What I was doing when the application crashed:

Trying to launch Cantor after installed from Discover

-- Backtrace (Reduced):
#6  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299
#7  0x00007f47ce505501 in memcpy (__len=8, __src=<optimized out>, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#8  StitchingFunction::StitchingFunction (this=0x55a43ce4dc20, func=0x55a43ce4d840) at ./poppler/Function.cc:770
#9  0x00007f47ce50b4b1 in StitchingFunction::copy (this=0x55a43ce4d840) at ./poppler/Function.h:200
#10 0x00007f47a26da5e7 in MathFunction::setArgumentDefinition (this=this@entry=0x55a43ce4d840, index=<optimized out>, index@entry=1, argdef=argdef@entry=0x55a43ce4d9d0) at Function.cc:434
Comment 3 Alessio Adamo 2019-12-22 09:56:18 UTC
(In reply to Nikita Sirgienko from comment #1)
> I have reproduced crash only with Qalculate. Octave, Maxima and others works
> as expected.
> Could you please add crashlog with Octave backend for example?

I guess Cantor uses the latest selected backend by default at launch, that's why it crashes immediately. How can I wipe its configuration? I mean where is its dot folder located?
Comment 4 Nikita Sirgienko 2019-12-22 12:49:41 UTC
(In reply to Alessio Adamo from comment #3)
> (In reply to Nikita Sirgienko from comment #1)
> > I have reproduced crash only with Qalculate. Octave, Maxima and others works
> > as expected.
> > Could you please add crashlog with Octave backend for example?
> 
> I guess Cantor uses the latest selected backend by default at launch, that's
> why it crashes immediately. How can I wipe its configuration? I mean where
> is its dot folder located?

If you don't see "Choose backend" window after startup, then it means, that one of backend used by default (maybe Qalculate).
Cantor also allow run particular backend via console arguments, so run, for example, `cantor -b octave` in a terminal, then go "Settings"->"Configure Cantor" and remove content of editbox to the right of the "Default Backend:".
Comment 5 Alessio Adamo 2019-12-23 10:52:24 UTC
(In reply to Nikita Sirgienko from comment #4)
> (In reply to Alessio Adamo from comment #3)
> > (In reply to Nikita Sirgienko from comment #1)
> > > I have reproduced crash only with Qalculate. Octave, Maxima and others works
> > > as expected.
> > > Could you please add crashlog with Octave backend for example?
> > 
> > I guess Cantor uses the latest selected backend by default at launch, that's
> > why it crashes immediately. How can I wipe its configuration? I mean where
> > is its dot folder located?
> 
> If you don't see "Choose backend" window after startup, then it means, that
> one of backend used by default (maybe Qalculate).
> Cantor also allow run particular backend via console arguments, so run, for
> example, `cantor -b octave` in a terminal, then go "Settings"->"Configure
> Cantor" and remove content of editbox to the right of the "Default Backend:".

Thanks for the tip. I confirm it only crashes with Qalculate backend.
Comment 6 Nikita Sirgienko 2020-01-12 09:38:06 UTC
https://github.com/Qalculate/libqalculate/issues/171
Comment 7 Nikita Sirgienko 2020-01-12 09:41:18 UTC
Well, the problem is solved, but only for future release of Qalculate library (used in cantor and qalc): versions 3.6.1 and greater. Maybe we can fix the previous versions of qalculate, but I don't know how.
Comment 8 dennis.bellinger 2020-04-25 17:25:25 UTC
Created attachment 127869 [details]
New crash information added by DrKonqi

cantor (19.12.3) using Qt 5.12.4

- What I was doing when the application crashed:

Luanching the application and choosing the qalculate backend.

-- Backtrace (Reduced):
#6  0x00007f1c6bc9fc27 in __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:312
#7  0x00007f1c6a115579 in StitchingFunction::StitchingFunction(StitchingFunction const*) () at /usr/lib/x86_64-linux-gnu/libpoppler.so.90
#8  0x00007f1c6a11b6f6 in StitchingFunction::copy() const () at /usr/lib/x86_64-linux-gnu/libpoppler.so.90
#9  0x00007f1c4534abb6 in MathFunction::setArgumentDefinition(unsigned long, Argument*) () at /usr/lib/x86_64-linux-gnu/libqalculate.so.20
#10 0x00007f1c455015f2 in IdentityFunction::IdentityFunction() () at /usr/lib/x86_64-linux-gnu/libqalculate.so.20
Comment 9 Alexander Semke 2021-03-26 07:31:00 UTC
*** Bug 431657 has been marked as a duplicate of this bug. ***