Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the old color in ColorPicker for easier comparison (3.x) #48611

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 10, 2021

3.x version of #34840.

This only affects ColorPickerButton nodes that spawn a ColorPicker, not standalone ColorPickers.

Preview

image

@Calinou Calinou requested a review from a team as a code owner May 10, 2021 13:47
@Calinou Calinou added this to the 3.4 milestone May 10, 2021
@Calinou Calinou changed the title Display the old color in ColorPicker for easier comparison Display the old color in ColorPicker for easier comparison (3.x) May 10, 2021
@akien-mga
Copy link
Member

The regression test project crashes:

ColorPickerButton._about_to_show --- executing with 0 parameters []
GDSCRIPT CODE:     ColorPickerButton.new()._about_to_show()
scene/gui/color_picker.cpp:913:23: runtime error: member call on null pointer of type 'struct ColorPicker'
scene/gui/color_picker.cpp:913:23: runtime error: member access within null pointer of type 'struct ColorPicker'
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on godotengine/godot/issues
[1] bin/godot.x11.tools.64s() [0x173065a] (/home/runner/work/godot/godot/platform/x11/crash_handler_x11.cpp:54)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f589dc4a210] (??:0)
[3] ColorPickerButton::_about_to_show() (/home/runner/work/godot/godot/scene/gui/color_picker.cpp:913)
[4] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (/home/runner/work/godot/godot/./core/method_bind.gen.inc:61 (discriminator 4))
...

This only affects ColorPickerButton nodes that spawn a ColorPicker,
not standalone ColorPickers.
@Calinou Calinou force-pushed the colorpicker-display-old-color-3.x branch from 997f93d to 6d03fe5 Compare May 10, 2021 15:36
@Calinou
Copy link
Member Author

Calinou commented May 10, 2021

The regression test project crashes:

ColorPickerButton._about_to_show --- executing with 0 parameters []
GDSCRIPT CODE:     ColorPickerButton.new()._about_to_show()
scene/gui/color_picker.cpp:913:23: runtime error: member call on null pointer of type 'struct ColorPicker'
scene/gui/color_picker.cpp:913:23: runtime error: member access within null pointer of type 'struct ColorPicker'
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on godotengine/godot/issues
[1] bin/godot.x11.tools.64s() [0x173065a] (/home/runner/work/godot/godot/platform/x11/crash_handler_x11.cpp:54)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f589dc4a210] (??:0)
[3] ColorPickerButton::_about_to_show() (/home/runner/work/godot/godot/scene/gui/color_picker.cpp:913)
[4] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (/home/runner/work/godot/godot/./core/method_bind.gen.inc:61 (discriminator 4))
...

I added a null check, hopefully this should fix it. I'll also port this fix to master in another PR.

@akien-mga akien-mga merged commit 368765d into godotengine:3.x May 10, 2021
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the colorpicker-display-old-color-3.x branch August 3, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants