From: Matthias N. <nee...@ma...> - 2004-08-31 07:07:14
|
The once crasher I had to fix bringing up rosegarden on MacOS X was related to the use of Rosegarden::Accidentals in notationtool.cpp. Since those constants are defined in a different compilation unit, it's not guaranteed that their initialization happens before the initialization of m_actionsAccidental, and in fact, on MacOS X, their initialization did NOT happen in time, which caused the c_str() member function to crash. My solution was to expand the values inline, which works, but may not be terribly elegant. FWIW, here's a patch Matthias diff -ru rosegarden-4-0.9.9-orig/gui/notationtool.cpp rosegarden-4-0.9.9/gui/notationtool.cpp --- rosegarden-4-0.9.9-orig/gui/notationtool.cpp 2004-08-30 00:50:01.000000000 -0700 +++ rosegarden-4-0.9.9/gui/notationtool.cpp 2004-08-30 00:52:08.000000000 -0700 @@ -718,17 +718,17 @@ const char* NoteInserter::m_actionsAccidental[][5] = { { "No accidental", "1slotNoAccidental()", "no_accidental", - "accidental-none", Rosegarden::Accidentals::NoAccidental.c_str() }, + "accidental-none", "no-accidental" }, { "Sharp", "1slotSharp()", "sharp_accidental", - "accidental-sharp", Rosegarden::Accidentals::Sharp.c_str() }, + "accidental-sharp", "sharp" }, { "Flat", "1slotFlat()", "flat_accidental", - "accidental-flat", Rosegarden::Accidentals::Flat.c_str() }, + "accidental-flat", "flat" }, { "Natural", "1slotNatural()", "natural_accidental", - "accidental-natural", Rosegarden::Accidentals::Natural.c_str() }, + "accidental-natural", "natural" }, { "Double sharp", "1slotDoubleSharp()", "double_sharp_accidental", - "accidental-doublesharp", Rosegarden::Accidentals::DoubleSharp.c_str() }, + "accidental-doublesharp", "double-sharp" }, { "Double flat", "1slotDoubleFlat()", "double_flat_accidental", - "accidental-doubleflat", Rosegarden::Accidentals::DoubleFlat.c_str() } + "accidental-doubleflat", "double-flat" } }; //------------------------------ |