Loading a PDF causes crash

• Mar 11, 2011 - 11:01
Priority
P3 - Low
Type
Functional
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
Tags

platform: opensuse 11.4 (kde 4.6)
musescore trunk revision: 4084

steps to reproduce:
- load any pdf (non-music related)
= segfault

gdb output:
Program received signal SIGSEGV, Segmentation fault.
Measure::findSegment (this=0x0, st=SegClef, t=0) at /home/ilm/projecten/mscore/trunk/mscore/mscore/measure.cpp:802
for (s = first(); s && s->tick() < t; s = s->next())


Comments

gdb backtrace:
(gdb) bt
#0 Measure::findSegment (this=0x0, st=SegClef, t=0) at /home/ilm/projecten/mscore/trunk/mscore/mscore/measure.cpp:802
#1 0x0850d378 in Measure::getSegment (this=0x0, st=SegClef, t=0)
at /home/ilm/projecten/mscore/trunk/mscore/mscore/measure.cpp:854
#2 0x08757ef5 in Score::importPdf (this=0xb979fa8, path=...)
at /home/ilm/projecten/mscore/trunk/mscore/mscore/importpdf.cpp:129
#3 0x085ad606 in Score::readScore (this=0xb979fa8, name=...) at /home/ilm/projecten/mscore/trunk/mscore/mscore/score.cpp:535
#4 0x0848af04 in MuseScore::loadFile (this=0x9dc72e8) at /home/ilm/projecten/mscore/trunk/mscore/mscore/file.cpp:207
#5 0x08543bd2 in MuseScore::cmd (this=0x9dc72e8, a=0x9dfd030) at /home/ilm/projecten/mscore/trunk/mscore/mscore/mscore.cpp:2363
#6 0x083dc37f in MuseScore::qt_metacall (this=0x9dc72e8, _c=QMetaObject::InvokeMetaMethod, _id=, _a=
0xbfffde18) at /home/ilm/projecten/mscore/trunk/build/mscore/moc_mscore.cxx:349
#7 0xb68118cd in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#8 0xb6821a2c in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#9 0xb6be4425 in QActionGroup::triggered(QAction*) () from /usr/lib/libQtGui.so.4
#10 0xb6be44c9 in ?? () from /usr/lib/libQtGui.so.4
#11 0xb6be4ac3 in QActionGroup::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#12 0xb68118cd in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#13 0xb6821a2c in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#14 0xb6be12bd in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#15 0xb6be155b in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#16 0xb70de460 in QToolButton::nextCheckState() () from /usr/lib/libQtGui.so.4
#17 0xb7006e47 in ?? () from /usr/lib/libQtGui.so.4
#18 0xb7007146 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#19 0xb70de54d in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#20 0xb6c435b0 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#21 0xb7006160 in QAbstractButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#22 0xb70dfcbc in QToolButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb6be8414 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#24 0xb6bf1c20 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0xb680afde in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#26 0xb6be945c in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/lib/libQtGui.so.4
#27 0xb6c75030 in ?? () from /usr/lib/libQtGui.so.4
#28 0xb6c7413e in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4

Segfault with the latest trunk on mageia 1 32 bits.
Here is the gdb trace:

(gdb) where
#0 0x08290a58 in SegmentList::first (this=0xcc)
at /home/collette/repositories/mscore/mscore/libmscore/segmentlist.h:37
#1 0x08290aea in Measure::first (this=0x0)
at /home/collette/repositories/mscore/mscore/libmscore/measure.h:176
#2 0x085c5523 in Measure::findSegment (this=0x0, st=SegClef, t=0)
at /home/collette/repositories/mscore/mscore/libmscore/measure.cpp:657
#3 0x085c576d in Measure::getSegment (this=0x0, st=SegClef, t=0)
at /home/collette/repositories/mscore/mscore/libmscore/measure.cpp:704
#4 0x0853c4aa in MuseScore::importPdf (this=0x9227898, score=0x9784b98, path=...)
at /home/collette/repositories/mscore/mscore/mscore/importpdf.cpp:131
#5 0x085126a6 in MuseScore::readScore (this=0x9227898, score=0x9784b98, name=...)
at /home/collette/repositories/mscore/mscore/mscore/file.cpp:1490
#6 0x08508b06 in MuseScore::loadFile (this=0x9227898)
at /home/collette/repositories/mscore/mscore/mscore/file.cpp:225
#7 0x0836b6a9 in MuseScore::cmd (this=0x9227898, a=0x929bcb0, cmd=...)
at /home/collette/repositories/mscore/mscore/mscore/musescore.cpp:4228
#8 0x0836aec7 in MuseScore::cmd (this=0x9227898, a=0x929bcb0)
at /home/collette/repositories/mscore/mscore/mscore/musescore.cpp:4099
#9 0x0825cee4 in MuseScore::qt_metacall (this=0x9227898, _c=QMetaObject::InvokeMetaMethod, _id=24, _a=
0xbfffda68) at /home/collette/repositories/mscore/mscore/build/mscore/moc_musescore.cxx:367
#10 0xb4ffc77d in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) ()
from /usr/lib/libQtCore.so.4
#11 0xb500bfac in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
from /usr/lib/libQtCore.so.4
#12 0xb57f1c45 in QActionGroup::triggered(QAction*) () from /usr/lib/libQtGui.so.4
#13 0xb57f1ce9 in ?? () from /usr/lib/libQtGui.so.4

YC

Title segfault on load (random) pdf Loading a PDF causes crash
Status (old) active needs info

Hi

I can't reproduce - do you still have problems?

Using MuseScore 2.0 Nightly Build (bd8b902) - Mac 10.7.5.

Severity S1 - Blocker S3 - Major
Status active needs info

There almost no way this could still be relevant. But, just in case, anyone want to give steps relevant to 3.0?

Priority P1 - High P3 - Low
Status needs info active
Tags View Changes

As PDF import was disabled by default this issue is probably not so urgent anymore, at least until we decide to return PDF import back.
Still if build MuseScore with PDF import support this issue still remains relevant, opening some PDFs crashes MuseScore, opening others does not. For example, the attached PDF file produces a crash for me.

Attachment Size
test.pdf 6.56 KB
Fix version
3.6.0