brummer10 / XUiDesigner

A WYSIWYG LV2 GUI/plugin creator tool
BSD Zero Clause License
100 stars 3 forks source link

Color chooser crashes program. #11

Closed thoth-amon closed 2 years ago

thoth-amon commented 2 years ago

Clicking the color designer show/hide button causes the program to crash with the following error shown in the terminal.


X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  8466
  Current serial number in output stream:  8466

This is in kubuntu 22.04.

brummer10 commented 2 years ago

Could you please build a debug version (make clean && make debug) and run it in the gdb?

thoth-amon commented 2 years ago

I don't really know what to do with gdb but I ran xuidesigner from it and made the crash and the latter part of the output was

Widget_t _dummy callback
Widget_t LeaveNotify 
Widget_t LeaveNotify 
Widget_t EnterNotify 
Widget_t EnterNotify 
Widget_t _dummy callback
Widget_t  ButtonPress 1
Widget_t _transparency 
Widget_t Expose 
Adjustment_t check_value_changed 1.000000
Widget_t _transparency 
Widget_t _dummy callback
Widget_t _dummy callback
Widget_t _dummy callback
Widget_t _dummy callback
Widget_t _dummy callback
Widget_t _dummy callback
Widget_t _dummy callback
Widget_t  ButtonRelease 1
Widget_t _transparency 
Widget_t Expose 
Adjustment_t check_value_changed 1.000000
Adjustment_t check_value_changed 0.100000
Widget_t _transparency 
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  7301
  Current serial number in output stream:  7301
[Inferior 1 (process 10504) exited with code 01]
brummer10 commented 2 years ago

I've not really a idea why that happen, but I've pushed a attempt to fix it. Please let me know if that helps.

thoth-amon commented 2 years ago

I still get the same problem.

I also tried with Manjaro/XFCE. It doesn't crash every time I click color chooser like with kubuntu but it crashes when I open the color chooser, choose a color, close the color chooser and then try to reopen it. I ran that with gdb and got the following output

Widget_t LeaveNotify 
Widget_t EnterNotify 
Widget_t LeaveNotify 
Widget_t EnterNotify 
Widget_t _dummy callback
Widget_t  ButtonPress 1
Widget_t _transparency 
Widget_t Expose 
Adjustment_t check_value_changed 0.000000
Widget_t _transparency 

Program received signal SIGSEGV, Segmentation fault.
0x0000555555598e5a in widget_hide (w=0x55555596d990) at ../xputty/xwidget.c:423
423     for(;i<w->childlist->elem;i++) {
brummer10 commented 2 years ago

could you please, run it under gdb and when it crash, type bt full in the terminal to get the backtrace.

brummer10 commented 2 years ago

Maybe I've forgotten to set the flag (HIDE_ON_DELETE) for the window, I've done now. Still, as I can't reproduce this issue (debian/sid here), I could only guess. Maybe worse a new checkout before try.

thoth-amon commented 2 years ago

I updated but still no joy. When I type bt full it says No stack

brummer10 commented 2 years ago

To bad. I've one more idea were it may goes wrong. Please try a new update.

thoth-amon commented 2 years ago

On Manjaro, the crash is now fixed On Kubuntu, it still happens.

brummer10 commented 2 years ago

Do you use wayland or X11 on kubuntu (seems I need to make a test install and check what happens)

thoth-amon commented 2 years ago

X11

brummer10 commented 2 years ago

what is about the other windows, did it crash as well when you open the settings window or the ttl view window? Or happen that only with the Color chooser?

thoth-amon commented 2 years ago

The whole thing crashes. Here's a video of what I am doing, then you can see if I am using gdb properly as well.

xudesigner-4.webm

brummer10 commented 2 years ago

Okay, I've installed Kubuntu 22.04 in a virtual box and could reproduce the issue now. It should be fixed now with the latest commit.

thoth-amon commented 2 years ago

Tested, can confirm it works now, thanks