-
Notifications
You must be signed in to change notification settings - Fork 561
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
I keep getting nk_popup_close: Assertion 'popup->parent' failed.
Aborted (core dumped)
whenever I try using a popup, not sure why
#683
Comments
nk_popup_close: Assertion
popup->parent' failed. Aborted (core dumped)` whenever I try using a popup, not sure whynk_popup_close: Assertion 'popup->parent' failed.
Aborted (core dumped) whenever I try using a popup, not sure why
nk_popup_close: Assertion 'popup->parent' failed.
Aborted (core dumped) whenever I try using a popup, not sure whynk_popup_close: Assertion 'popup->parent' failed.
Aborted (core dumped)
whenever I try using a popup, not sure why
Where is your if (nk_popup_begin(ctx, NK_POPUP_STATIC, "Example", 0, bounds)) {
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "Example", NK_TEXT_LEFT);
/* Is it in the braces */
}
/* or outside */ If it's outside the braces then moving it inside the if statement should fix this. If the |
This snippet fails for example: if (nk_popup_begin(ctx, NK_POPUP_STATIC, "ERROR", NK_WINDOW_BORDER, nk_rect(0,0,100,100))){
nk_layout_row_dynamic(ctx, 30, 1);
nk_label(ctx,"tom", NK_TEXT_LEFT);
nk_popup_end(ctx);
} Along with the snippet from |
This is what the backtrace gives me
|
If it helps, I'm using the glfw_opengl3 backend |
Are you using |
I have this code preceding it: if (nk_widget_is_hovered(ctx)){
nk_tooltip_begin(ctx, 450);
nk_layout_row_dynamic(ctx, 25, 1);
nk_label(ctx, "Your password MUST:", NK_TEXT_LEFT);
nk_labelf(ctx, NK_TEXT_LEFT, "1) Be at least %d characters long", MINIMUM_PASSWORD_LENGTH);
nk_label(ctx, "2) Contain at least 1 lowercase letter", NK_TEXT_LEFT);
nk_label(ctx, "3) Contain at least 1 uppercase letter", NK_TEXT_LEFT);
nk_label(ctx, "4) Contain at least 1 digit", NK_TEXT_LEFT);
nk_label(ctx, "5) Contain at least 1 symbol", NK_TEXT_LEFT);
nk_tooltip_end(ctx);
} if I comment out this block, no issue ... |
This is bizarre |
If you change your tooltip code to if (nk_widget_is_hovered(ctx) && nk_tooltip_begin(ctx, 450)) {
nk_layout_row_dynamic(ctx, 25, 1);
nk_label(ctx, "Your password MUST:", NK_TEXT_LEFT);
nk_labelf(ctx, NK_TEXT_LEFT, "1) Be at least %d characters long", MINIMUM_PASSWORD_LENGTH);
nk_label(ctx, "2) Contain at least 1 lowercase letter", NK_TEXT_LEFT);
nk_label(ctx, "3) Contain at least 1 uppercase letter", NK_TEXT_LEFT);
nk_label(ctx, "4) Contain at least 1 digit", NK_TEXT_LEFT);
nk_label(ctx, "5) Contain at least 1 symbol", NK_TEXT_LEFT);
nk_tooltip_end(ctx);
} a different assert should trigger and show the root of the issue. nuklear.h:21065: nk_popup_begin: Assertion `!((int)panel->type & (int)NK_PANEL_SET_POPUP) && "popups are not allowed to have popups"' failed. Nuklear currently doesn't allow nested popups or multiple active popups at the same time. You could try closing the popup before ending it. if (nk_popup_begin(ctx, NK_POPUP_STATIC, "Example", NK_WINDOW_BORDER, nk_rect(100,100,100,100))) {
...
/* close before ending popup */
nk_popup_close(ctx);
nk_popup_end(ctx);
} This will allow your to have multiple popups, but some widgets won't work properly in the popup. Due to how tooltips are implemented there is currently no way to have multiple. |
well, my solution: I reverted to using labels instead of the second popup |
Happens when you hover the cursor in and out of the popup window
The text was updated successfully, but these errors were encountered: