[yoshimi] Re: Crash happening when I enter /usr/share/

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Tue, 6 Apr 2021 12:41:47 +0100

On Mon, 5 Apr 2021 14:08:14 +0200
Frank Neumann <beachnase@xxxxxx> wrote:

Hi Will and all,

I found a reproducible crash (SIGSEGV) today, based on current Yoshimi (git
commit 22beca9b4).  

[..]

Can anyone reproduce this? Or, would you have suggestion how I should 
further
instrument the code to find out more?

Thanks,
Frank
 
I never expected anyone to have so many files in a directory!
FilerLine size shares MIDI_LEARN_BLOCK which is currently set to 400.

As a test, try temporarily changing all occurrences of this in
src/UI/MasterUI.fl to something like 600.

Originally I tried to make this variable size, but kept hitting obscure
problems. I guess I'll have to give that another try :(  

Yep, confirmed - that fixes it. Thanks! :-)

Yeah, hard-coded "guessed maximum" values are dangerous - as in "640kB is 
enough for anyone".
In my case, that large number of entries in /usr/share/ comes from my default
setup operation of installing some 2000+ packages on my machine for all kinds
of -dev packages and their dependencies.
I want to be able to build a lot of sw from source myself, so this machine is
currently listing some 3680 packages installed..that's "normal" for me.

I've now applied a provisional fix for this.
First off the maximum entries per directory is now 1000.
Secondly, if there are more entries they will simply be ignored.

This is far from ideal. A much better way would be to use an std::list type.
I've made several attempts to do this in the past but always failed. I tried
again over most of yesterday - still no good.
It seems quite easy to make an array of functions/methods but there is
something weird about lists that I don't understand :(

-- 
Will J Godfrey
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.
Yoshimi source code is available from either: 
https://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: