On 07-06-2019 05:26, Alex X wrote:
After trying the new idea of drawing on to the parent widget I am getting crashes in the code
static extern(C) void gtkd_container_remove(GtkContainer* c, GtkWidget* w) { import gobject.c.functions : g_object_get_data; if ( auto container = cast(Container)g_object_get_data(cast(GObject*)c, "GObject") ) if ( auto widget = cast(Widget)g_object_get_data(cast(GObject*)w, "GObject") ) { import std.algorithm : remove; container.children.remove!(a => a is widget)(); } }
in Container.d
I'm not sure exactly why, it might be my code, but obviously it should not crash.
Exception thrown: read access violation.
std.range.primitives.front!(gtk.Widget.Widget).front(...) returned 0xFFFFFFFFFFFFFFFF.The code should probably check for this and ignore such errors?
Should be fixed in:
https://github.com/gtkd-developers/GtkD/commit/68b055389b0c35cf7c5b16e198ffd7ac3c060e89