brummer10 / Fluida.lv2

Fluidsynth as LV2 plugin
GNU General Public License v2.0
33 stars 4 forks source link

File selection button never opens the file selection box #9

Closed yurivict closed 3 years ago

yurivict commented 3 years ago

https://user-images.githubusercontent.com/271906/113949656-9e4a8480-97c4-11eb-90de-7821d2e775c7.mp4

OS: FreeBSD 12.2

brummer10 commented 3 years ago

Did it behave the same when run with jalv?

yurivict commented 3 years ago

Did it behave the same when run with jalv?

Yes.

brummer10 commented 3 years ago

That's bad. I've no idea what it could be.

brummer10 commented 3 years ago

@yurivict Have you ever build Mamba on FreeBSD? If so, did the File Dialogue works there, or are there the same issue? https://github.com/brummer10/Mamba

Also, there is a break out of the File Dialogue here: https://github.com/brummer10/XFileSelect It may help to know if that works on FreeBSD.

yurivict commented 3 years ago

Have you ever build Mamba on FreeBSD? If so, did the File Dialogue works there, or are there the same issue?

Selecting "Load New" menu items crashes mamba.

brummer10 commented 3 years ago

could you build a debug version from Mamba (make clean && make debug) and produce a backtrace, maybe I could see were the culprit is.

brummer10 commented 3 years ago

As a first Idea, did the file $HOME/.config/user-dirs.dirs exist on FreeBSD as part of the XDG Base Directory Specification

yurivict commented 3 years ago

fp is null here:

125│ int
126│ fclose(FILE *fp)
127│ {
128│         int r;
129│
130├───────> if (fp->_flags == 0) {  /* not open! */
131│                 errno = EBADF;
132│                 return (EOF);
133│         }

Stack backtrace:

(gdb) bt
[?2004l#0  fclose (fp=0x0) at /usr/src/lib/libc/stdio/fclose.c:130
#1  0x00000000002903e9 in parse_xdg_dirs (file_dialog=0x8021d65a0) at ../xputty/dialogs/xfile-dialog.c:520
#2  0x000000000028f528 in open_file_dialog (w=0x8021db000, path=0x7fffffffdbc1 "/home/yuri", filter=0x20acc1 "midi") at ../xputty/dialogs/xfile-dialog.c:563
#3  0x000000000023a16e in midikeyboard::XKeyBoard::load_midi_callback (w_=0x8021de800, user_data=0x7fffffffd4a4) at MidiKeyBoard.cpp:1796
#4  0x000000000027721d in check_value_changed (adj=0x802112c80, value=0x7fffffffd4a4) at ../xputty/xadjustment.c:268
#5  0x000000000027749e in adj_set_value (adj=0x802112c80, v=0) at ../xputty/xadjustment.c:170
#6  0x000000000028ad65 in _menu_entry_released (w_=0x8021df0c0, item_=0x7fffffffd52c, user_data=0x7fffffffd518) at ../xputty/widgets/xmenu_private.c:119
#7  0x0000000000281128 in _check_submenu (wid=0x8021e0b00, xbutton=0x7fffffffd788, main=0x7fffffffe668) at ../xputty/xwidget_private.c:159
#8  0x000000000027e034 in widget_event_loop (w_=0x8021e0b00, event=0x7fffffffd788, main=0x7fffffffe668, user_data=0x0) at ../xputty/xwidget.c:555
#9  0x000000000027bfda in main_run (main=0x7fffffffe668) at ../xputty/xputty.c:71
#10 0x0000000000242b86 in main (argc=1, argv=0x7fffffffe7e8) at MidiKeyBoard.cpp:3154
yurivict commented 3 years ago

As a first Idea, did the file $HOME/.config/user-dirs.dirs exist on FreeBSD as part of the XDG Base Directory Specification

It doesn't exist.

brummer10 commented 3 years ago

Nice, thanks a lot. Indeed a bug in my code. I've pushed a Fix for it now to Fluida, please let me know if it works, if so I could fix Mamba as well.

regards hermann

yurivict commented 3 years ago

Now this problem is gone.

Thank you!

brummer10 commented 3 years ago

Okay, thanks. I've pushed the same fix to Mamba now.

yurivict commented 3 years ago

Thanks!