Yoshimi / yoshimi

A sophisticated soft-synth originally forked from ZynAddSubFX V2.4.0 in 2009 by Alan Calvert, and still in continuous development - This is also mirrored at http://sourceforge.net/projects/yoshimi/ : Current news is at http://sourceforge.net/p/yoshimi/news/ : Our email discussion list is: http://www.freelists.org/list/yoshimi and here is our website
http://yoshimi.github.io/
Other
235 stars 39 forks source link

yoshimi crashes at startup #183

Closed yurivict closed 1 year ago

yurivict commented 1 year ago
$ yoshimi 
Not there
Yoshimi 2.3.0 is starting
Basic configuration /home/yuri/.config/yoshimi/yoshimi.config not found, will use default settings
/home/yuri/.local/share/yoshimi/presets
/usr/local/share/yoshimi/presets
Configuration /home/yuri/.config/yoshimi/yoshimi-0.instance not found, will use default settings
Missing preset directories file
Cannot lock down 107341340 byte memory area (Cannot allocate memory)
client 0x841e8c000  device default  port yoshimi:midi in
Didn't find jack MIDI source 'default'
Using jack_audio for audio and jack_midi for midi
Cannot use real-time scheduling (RR/5) (1: Operation not permitted)
JackClient::AcquireSelfRealTime error
Build Number 2239
Clientname: yoshimi
Audio: jack -> 'default'
Midi: jack -> 'default'
Oscilsize: 512
Samplerate: 48000
Period size: 256

Yay! We're up and running :-)
Missing recent history file
Found 24 new banks in root /home/yuri/.local/share/yoshimi/found/yoshimi/banks
XOpenIM() failed
Found 24 new banks in root /usr/local/share/yoshimi/banks

Found 1760 instruments in 48 banks
Root 5. Bank set to 5 "Arpeggios"
yoshimi> Segmentation fault
Yay! We're up and running :-)
[New LWP 442790 of process 93772]
Missing recent history file
Found 24 new banks in root /home/yuri/.local/share/yoshimi/found/yoshimi/banks
XOpenIM() failed
Found 24 new banks in root /usr/local/share/yoshimi/banks

Found 1760 instruments in 48 banks
Root 5. Bank set to 5 "Arpeggios"
[New LWP 442791 of process 93772]
yoshimi> 
Thread 6 received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
[Switching to LWP 442790 of process 93772]
memmove () at /disk-samsung/freebsd-src/lib/libc/amd64/string/memmove.S:302
302             MEMMOVE erms=0 overlap=1 begin=MEMMOVE_BEGIN end=MEMMOVE_END
(gdb) bt
#0  memmove () at /disk-samsung/freebsd-src/lib/libc/amd64/string/memmove.S:302
#1  0x00000000008f04c1 in ConfigUI::setClassicTable (this=0x822cc7000) at /usr/ports/audio/yoshimi/work/.build/ConfigUI.cpp:2327
#2  0x00000000008ef2b0 in ConfigUI::manageThemes (this=0x822cc7000) at /usr/ports/audio/yoshimi/work/.build/ConfigUI.cpp:2215
#3  0x00000000008eead7 in ConfigUI::ConfigUI (this=0x822cc7000, _synth=0x802a1fbc0) at /usr/ports/audio/yoshimi/work/.build/ConfigUI.cpp:2079
#4  0x0000000000a56593 in MasterUI::Init (this=0x822cb4400, _label=0x7fffdfc79bf9 "yoshimi") at /usr/ports/audio/yoshimi/work/.build/MasterUI.cpp:1782
#5  0x000000000047c960 in GuiThreadMsg::processGuiMessages () at /usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/Misc/Config.cpp:1487
#6  0x0000000000b62957 in mainThread (arg=0x7fffffffe5a0) at /usr/ports/audio/yoshimi/work/yoshimi-2.3.0/src/main.cpp:266
#7  0x0000000800d47b88 in thread_start (curthread=0x81e7dba00) at /disk-samsung/freebsd-src/lib/libthr/thread/thr_create.c:292
#8  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdfc7a000
(gdb) 

Version: 2.3.0 FreeBSD 13.2

abrolag commented 1 year ago

Please try running Yoshimi with the following command:

yoshimi -i

This will run Yoshimi headless, so will tell us if it's a GUI issue or within the main code.

You should get full CLI access, and normal MIDI behaviour.

-- Will J Godfrey {apparently now an 'elderly'} https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song.

yurivict commented 1 year ago

yoshimi -i doesn't crash.

abrolag commented 1 year ago

That narrows it down.

In /home/will/yoshimi-code/src/UI/Themes.h

change line 204 to: const int COLOURLIST = 114;

Please let me know if that fixes it. If so, I push a full bugFix release.

-- Will J Godfrey {apparently now an 'elderly'} https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song.

yurivict commented 1 year ago

It still crashes with this change.

In this line:

2327├─────────────> setColourLine(colourData[lineCount + 1], lineCount, 1); // we don't want the greyscale line!

it reads the element number 122 (lineCount=121) from the array colourData that only has 120 elements. This causes the crash.

abrolag commented 1 year ago

This get weirder by the minute!

This is what the group of lines should be: int lineCount = 0; while (colourData[lineCount + 1].substr(0, 7) != "=======") { setColourLine(colourData[lineCount + 1], lineCount, 1); // we don't want the greyscale line! ++ lineCount; }

Note the line of '=' here, not '-'

How that manages to work here is one of life's mysteries.

-- Will J Godfrey {apparently now an 'elderly'} https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song.

yurivict commented 1 year ago

I suggest making this array std::vector<std::string>> and iterating using vector's iterators.

IMO you should resolve this issue and make a new release with the fix.

abrolag commented 1 year ago

Thanks for the suggestion, however since the structure is now a fixed size, it is simpler to just change this into a 'for' loop. We should have done that some time ago. There will be a bugfix release as soon as the work is completed and exhaustively tested.

Thank you for your assistance with this.

-- Will J Godfrey {apparently now an 'elderly'} https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song.

yurivict commented 1 year ago

2.3.0.2 doesn't crash like this. Was this fixed, or this is accidental?

abrolag commented 1 year ago

On Sat, 22 Jul 2023 19:46:09 -0700 @." @.> wrote:

2.3.0.2 doesn't crash like this. Was this fixed, or this is accidental?

Yes. This is now fixed in 2.3.0.2. Sorry, I forgot to report it!

-- Will J Godfrey {apparently now an 'elderly'} https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song.

yurivict commented 1 year ago

No problem! Thank you.