[trunk] converter mode crash (regression)

• Nov 6, 2010 - 10:56
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Running MuseScore (trunk revision 3679) in converter mode crashes.
E.g. "./build/mscore/mscore mscore/test/noteheads.mscz -o ~/out.mscz" results in "Segmentation fault"
Running the GUI, opening mscore/test/noteheads.mscz and saving as out.mscz does not result in a crash.


Comments

Werner,

could you have a look at this, please ? I couldn't find the cause and this issue prevents me from easily fixing the existing MusicXML import/export issues.

Leon.

These are some debug data which may help in diagnosing the bug. I tried to investigate, but the issue is too deep in mscore internals for my knowledge.

My setup: Rev. 3708 under Windows XP w/ SP3, Qt SDK 2010.04 (Qt Creator 2.0.0, Qt lib 4.7.0)

The CALL STACK at the moment of the SEGFAULT (mem addrs are probably meaningless out of their context, but I kept them anyway):

0 ZNK13QStateMachine13configurationEv D:\Dev\qt2010-04\qt\bin\QtCore4.dll 0 0x6a2dde44
1 ScoreView::mscoreState scoreview.cpp 3726 0x0043b464
2 MuseScore::setCurrentScoreView mscore.cpp 1189 0x00512fb0
3 MuseScore::qt_metacall moc_mscore.cxx 344 0x0040415e
4 ZN11QMetaObject8activateEP7QObjectPKS_iPPv D:\Dev\qt2010-04\qt\bin\QtCore4.dll 0 0x6a2bf891
5 ScoreTab::currentScoreViewChanged moc_scoretab.cxx 96 0x0040b42a
6 ScoreTab::setCurrent scoretab.cpp 184 0x0065bdcd
7 ScoreTab::setCurrentIndex scoretab.cpp 288 0x0065c42a
8 MuseScore::setCurrentView mscore.cpp 1149 0x00512d54
9 loadScores mscore.cpp 1708 0x00515bf7
10 main mscore.cpp 2087 0x005183a5

The issue pops up while attempting to set up the score 'view'. This seems to be necessary in order to properly layout the score for output but, as there is no GUI, some caution is probably required.

For the sake of completeness, this is the full backtrace generated by Qt Creator:

Thread 13 (Thread 4008.0xff8):
#0 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90df4a in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c809590 in KERNEL32!CreateFileMappingA () from C:\WINDOWS\system32\kernel32.dll
#3 0x7c80a115 in WaitForMultipleObjects () from C:\WINDOWS\system32\kernel32.dll
#4 0x17c61bac in ProcessingThreadProc@4 () from D:\Dev\qt2010-04\mingw\bin\portaudio.dll
#5 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#6 0x00000000 in ?? ()

Thread 12 (Thread 4008.0xfdc):
#0 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90df5a in ntdll!ZwWaitForSingleObject () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c8025db in WaitForSingleObjectEx () from C:\WINDOWS\system32\kernel32.dll
#3 0x00000d14 in ?? ()
#4 0x00000000 in ?? ()

Thread 7 (Thread 4008.0xfb0):
#0 0x7e429823 in USER32!GetForegroundWindow () from C:\WINDOWS\system32\user32.dll
#1 0x73f12ab3 in ?? () from C:\WINDOWS\system32\dsound.dll
#2 0x73f1297e in ?? () from C:\WINDOWS\system32\dsound.dll
#3 0x73f12939 in ?? () from C:\WINDOWS\system32\dsound.dll
#4 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#5 0x00000000 in ?? ()

Thread 5 (Thread 4008.0xfc0):
#0 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90df4a in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c809590 in KERNEL32!CreateFileMappingA () from C:\WINDOWS\system32\kernel32.dll
#3 0x7c80a115 in WaitForMultipleObjects () from C:\WINDOWS\system32\kernel32.dll
#4 0x72d2312a in midMessage () from C:\WINDOWS\system32\wdmaud.drv
#5 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#6 0x00000000 in ?? ()

Thread 4 (Thread 4008.0xfa4):
#0 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90daaa in ntdll!ZwReplyWaitReceivePortEx () from C:\WINDOWS\system32\ntdll.dll
#2 0x77e765e3 in UuidCreate () from C:\WINDOWS\system32\rpcrt4.dll
#3 0x77e76caf in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#4 0x77e76ad1 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#5 0x77e76c97 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#6 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#7 0x00000000 in ?? ()

Thread 3 (Thread 4008.0xf94):
#0 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90df5a in ntdll!ZwWaitForSingleObject () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c8025db in WaitForSingleObjectEx () from C:\WINDOWS\system32\kernel32.dll
#3 0x00000e20 in ?? ()
#4 0x00000000 in ?? ()

Thread 2 (Thread 4008.0xf9c):
#0 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90daaa in ntdll!ZwReplyWaitReceivePortEx () from C:\WINDOWS\system32\ntdll.dll
#2 0x77e765e3 in UuidCreate () from C:\WINDOWS\system32\rpcrt4.dll
#3 0x77e76caf in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#4 0x77e76ad1 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#5 0x77e76c97 in RPCRT4!I_RpcBindingCopy () from C:\WINDOWS\system32\rpcrt4.dll
#6 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll
#7 0x00000000 in ?? ()

Thread 1 (Thread 4008.0xfa0):
#0 0x6a2dde44 in ZNK13QStateMachine13configurationEv () from D:\Dev\qt2010-04\qt\bin\QtCore4.dll
#1 0x0043b464 in ScoreView::mscoreState (this=0x19da43e0) at E:\Dev\musescore\mscore\mscore\mscore\scoreview.cpp:3726
#2 0x00512fb0 in MuseScore::setCurrentScoreView (this=0x19bdd3c0, view=0x19da43e0) at E:\Dev\musescore\mscore\mscore\mscore\mscore.cpp:1189
#3 0x0040415e in MuseScore::qt_metacall (this=0x19bdd3c0, _c=QMetaObject::InvokeMetaMethod, _id=34, _a=0x22fad8) at E:\Dev\musescore\debug\mscore\moc_mscore.cxx:344
#4 0x6a2bf891 in ZN11QMetaObject8activateEP7QObjectPKS_iPPv () from D:\Dev\qt2010-04\qt\bin\QtCore4.dll
#5 0x0040b42a in ScoreTab::currentScoreViewChanged (this=0x19bdf690, _t1=0x19da43e0) at E:\Dev\musescore\debug\mscore\moc_scoretab.cxx:96
#6 0x0065bdcd in ScoreTab::setCurrent (this=0x19bdf690, n=0) at E:\Dev\musescore\mscore\mscore\mscore\scoretab.cpp:184
#7 0x0065c42a in ScoreTab::setCurrentIndex (this=0x19bdf690, idx=0) at E:\Dev\musescore\mscore\mscore\mscore\scoretab.cpp:288
#8 0x00512d54 in MuseScore::setCurrentView (this=0x19bdd3c0, tabIdx=0, idx=0) at E:\Dev\musescore\mscore\mscore\mscore\mscore.cpp:1149
#9 0x00515bf7 in loadScores (argv=...) at E:\Dev\musescore\mscore\mscore\mscore\mscore.cpp:1708
#10 0x005183a5 in main (argc=4, av=0x3e4f38) at E:\Dev\musescore\mscore\mscore\mscore\mscore.cpp:2087

Hoping it may help,

M.

Status (old) active fixed

fixed in r3712 (the state machine in ScoreView() was not initialized in converter mode)