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

Triggered IM_ASSERT when building font ranges #2353

Closed
r-lyeh opened this issue Feb 16, 2019 · 8 comments
Closed

Triggered IM_ASSERT when building font ranges #2353

r-lyeh opened this issue Feb 16, 2019 · 8 comments

Comments

@r-lyeh
Copy link

r-lyeh commented Feb 16, 2019

Hello @ocornut,

Just upgraded to latest 1.68 + docking branch and related custom add-ons.
This assertion fails now:
Assertion failed: src_tmp.GlyphsList.Size == src_tmp.GlyphsCount, file C:/prj/#AVA/editor/3rd/@ocornut/imgui_draw.cpp, line 1879

Also, this is the minimal repro-steps case that used to work before.
Apparently, overlapping font ranges were ok before but now it wont build atlas :D

ImGuiIO& io = ImGui::GetIO();
ImFontConfig *cfg = &ImFontConfig();

static const ImWchar default_ranges[] =
{
	0x0020, 0x00FF, // Basic Latin + Latin Supplement
	0x0080, 0x00FF, // Latin_Supplement

	0,
};

io.Fonts->AddFontFromMemoryCompressedTTF( FONT_MAIN_BUF, FONT_MAIN_LEN, FONT_MAIN_SIZE, cfg, default_ranges );
@r-lyeh
Copy link
Author

r-lyeh commented Feb 16, 2019

Managed to compile after fixing (manually) many overlapping ranges in many locales (phiew)

The two issues that you mentioned somewhere else are gone :D

Quick feedback after comparing new 1.68+docking against old 1.66+docking.
Minor issues mainly, I understand the branch is under development still, so no hurries :D

  • Loading old imgui.ini crashed; had to delete file to get it working, then recreate previous docking layout . Assertion failed: tab->NameOffset != -1 && tab->NameOffset < TabsNames.Buf.Size, file c:\prj\#ava\editor\3rd\@ocornut\imgui_internal.h, line 1475
  • There is some new random flickering in the blue drop regions when dragging tabs. Even I do not move mouse, there is random flickering going on and off.
  • Also, some minor z-order issues with those very same blue drop regions. At some point one of the tabs went out of focus even if no other tab was overlapping at all. Couldnt give that bar any kind of focus with mouse. Fixed it by reordering layout of surronding tabs. Cannot give repro steps for this.

And now the juicy bits :D
image

@ocornut
Copy link
Owner

ocornut commented Feb 16, 2019 via email

@r-lyeh
Copy link
Author

r-lyeh commented Feb 17, 2019

  1. It was an assert in fact: Assertion failed: tab->NameOffset != -1 && tab->NameOffset < TabsNames.Buf.Size, file c:\prj\#ava\editor\3rd\@ocornut\imgui_internal.h, line 1475 Ini file here: https://github.com/r-lyeh/AVA/blob/30eda74515838554749718668ec3cd5e81daae68/editor/editor.ini

  2. Sure, I will try to record sth.

@r-lyeh
Copy link
Author

r-lyeh commented Feb 17, 2019

The issue is much less noticeable in the gif due to low framerate. Sorry.
Repro-steps (I think). Maximize client window. Pick any tab which is large enough. Scroll it so it overlaps right and bottom screen borders. Notice the issue. Note: I am using a single monitor setup right now.

gif

@r-lyeh
Copy link
Author

r-lyeh commented Feb 17, 2019

About the z-order issue, I will try to record a gif whenever I found it again, but I havent been able to reproduce it again :)

@ocornut
Copy link
Owner

ocornut commented Feb 18, 2019

(1) Fixed the overlapping font range within same font issue now.

(2) For the assert I'll need to investigate further for a repro. If you can get it to repro, a callstack would be helpful. Could you also confirm that tab->NameOffset == -1 there? (And it's not a value referring past the array size?)

(3) For the docking drop overlay moving: do you have multi-viewport enabled? and does the dragged window leads to a new viewport being created? It is frequent to see unsynchronized renders (not always easy to fix depending on codebase/engine, there is a workaround but I'll like to first confirm if your bug is related to multi-viewport).

Please open separate issues when the topics are unrelated (don't hesitate to open 3 issues for 3 different bugs!). Thanks a lot!

@r-lyeh
Copy link
Author

r-lyeh commented Feb 18, 2019

  1. Nice!
  2. Cannot reproduce that assert anymore.
  3. Multi? yes. dragging to new viewport? no idea, it is overlapping with the physical monitor borders. ie, there is no more space left so dunno what imgui would do.

ps: oook. i just found 2 new bugs today :) feel free to close this issue and i'll re-open as needed.

@r-lyeh
Copy link
Author

r-lyeh commented Feb 18, 2019

Created 3 new issues from derived issues. Original issue is fixed.

@r-lyeh r-lyeh closed this as completed Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants