sequencer64
sequencer64 copied to clipboard
[Song Editor] crash with higher number of pattern
When compiled with a higher number of pattern per screenset, the app crashes when opening the Song Editor:
The program 'seq64' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
(Details: serial 147767 error_code 11 request_code 53 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
It doesn't happen for any number of row/columns, it has to be high enough (on my system it starts around 36 patterns per screen).
I traced the problem to these lines. Removing them fixes it for me (the song editor shows normally). Are these really necessary ? Or could there be a more complex problem behind this ?
My bet is a more complex issue, probably due to the code making assumptions about certain numbers. I will look into it. If you want to, you can mark those lines with a "SEQ64_" or "USE_" macro.
I took a look at your seq24-plagiat project, and it looks interesting. But I would like seq64 to implement something like it in the following manner: (1) Provide a configuration value for the number of sets vertically, defaulting to 1, and support 2 and 3 as well; (2) Similarly, horizontally, support 1 or two sets; (3) keep the set size at 32; (4) draw a black box around each of the sets, for clarity; (5) decrement/increment the set spinner by the number of sets in the page, or simply use it to view and highlight the active set (I like the latter better now).
The limits could be based on detecting the screen-size at some pointer.
I think this setup would be a lot easier to get right in all aspects, and would still be very helpful for the musician. What do you think?
In any case, I've got your code to look at, but I also have some higher-priority issues from you and others. Thanks!
Actually, it has occurred to me that it might be easier and better to allow the creation of multiple mainwid objects, each showing whatever set one desires, via a set-spinner for each, with the mainwnd set spinner used to set the active set.
Something to think about, would re-use a lot of code. Definitely would make a separate branch to work on this one!
Okay, the multimainwid branch, supporting multiple main windows, has been merged to master for version 0.91.0. And I'm working in a new, badly-named branch, add_sets, to support sets larger than 32 by increasing the rows or columns in the main window, for pending version 0.92.0. It basically works, but still working out the kinks. Can combine multi-wid and extra sets for a windows that's bigger than your screen. Go ahead and beat on it if you want. Do "seq64 --help" for quick info on the "wid" and "sets" -o options.
Alright lets build it :)
Is this issue still an issue?
Sorry for getting back to this after such a long time... it doesn't crash anymore, cheers :)