Skip to content

GtkD 3.4.0 Destroy Dialog Assertion Failure #169

@gnunn1

Description

@gnunn1

I use the following style of code in Terminix when showing dialogs where a scope(exit) is used tod estroy the dialog:

EditTriggersDialog dlg = new EditTriggersDialog(cast(Window) getToplevel(), gsProfile);
scope (exit) {
    dlg.destroy();
}
dlg.showAll();
if (dlg.run() == ResponseType.APPLY) {
    gsProfile.setStrv(SETTINGS_PROFILE_TRIGGERS_KEY, dlg.getTriggers());
}

This worked fine in 3.3.0 but in the new 3.4.0 version it seems to be generating an assertion failure in GObject:

GLib-GObject:ERROR:gobject.c:2899:toggle_refs_notify: assertion failed: (tstack.n_toggle_refs == 1)

It looks to be caused by the unref added in ObjectG.d from this commit, if I comment that out I do not get the assertion failure any longer:

c622205

That commit was to fix a memory leak I reported in #165.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions