Am 14.06.23 um 14:15 schrieb Will Godfrey:
There is also an issue created on github from a BSD user who cant get Yoshimi
running.
https://github.com/Yoshimi/yoshimi/issues/183
At the moment I can't get my head round this,
....me neither, the report looks puzzling.
The Stacktrace indicates that Yoshimi started up regularly
and went ahead to launch the UI
in main.cpp, line 266
if (bShowGui)
{
MasterUI *guiMaster = _synth->getGuiMaster(false);
if (guiMaster)
{
...
...
}
else
GuiThreadMsg::processGuiMessages();
GuiThreadMsg::processGuiMessages()
...
guiMaster->Init( ... );
MasterUI::Init(const char *_label)
...
configui = new ConfigUI(synth);
ConfigUI::ConfigUI(SynthEngine *_synth)
synth = _synth;
manageThemes();
ConfigUI::manageThemes()
...
... down to the last line
setClassicTable()
ConfigUI::setClassicTable()
setColourLine(colourData[lineCount + 1], lineCount, 1);
setGreyScale(colourData[0]);
int lineCount = 0;
while (colourData[lineCount + 1].substr(0, 7) != "-------")
{
setColourLine(colourData[lineCount + 1], lineCount, 1);
++ lineCount;
}
The SEGFAULT then happens while copying the by-value argument string,
i.e. while processing the expression
> colourData[lineCount + 1]
Now I am not familiar with the theme handling code, so I don't really
understand what is supposed to happen in that loop. Am I correct
that this string Array "colourData" is in static memory, and defined
in Themes.h ?
Because, what puzzles me, this array does not have any line starting
with "-------", only a line starting with "=================== data end marker"
This is other than the file "classic.clr" (installed with Yoshimi),
which does hold a line "------------------ data start marker"
Probably I am mixing something up here, but if that observation is correct,
than this loop will go on forever, read beyond the end of the array and at
some point just leave the static memory block loaded from the binary,
at which point it will trigger a SEGFAULT.
So, to be safe, that loop might better include a upper limit on the
lineCount variable, based on the length of that array. But, as said,
I did not yet look in detail into this theme handling code, thus I
do not understand what is supposed to happen there when Yoshimi
starts up regularly from a proper installation.
-- Hermann
_______________________________________________
Yoshimi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel