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

Bug: imDrawData->TotalVtxCount == 0 when reload application using imGUI.ini #1905

Closed
Rominitch opened this issue Jun 26, 2018 · 6 comments
Closed

Comments

@Rominitch
Copy link

Version of Dear ImGui:
1.62

Renderer/OS:
Vulkan/Windows 10 x64

My Issue:
I try to update https://github.com/SaschaWillems/Vulkan project with latest imGui v1.62 but strangely I find a crash with empty VtxCount after move dialog and relaunch exe.
I identify that if remove imGui.ini I can replay without issue.

So, I removed file configuration support temporarily (don't forget to comment it if you try).
See io.IniFilename = NULL;

I can't reproduce it on imgui_examples.sln. It's may be an implement issue inside SaschaWillems/Vulkan project ?

Workflow:
On my fork https://github.com/Rominitch/Vulkan,

  • Compile and execute imgui project
  • Resize dialog more larger and move imGUI window out of original dialog size.
  • Close (check imgui.ini is correctly created)
  • Reopen application
  • Crash happens

Good Luck !
Regards

@ocornut
Copy link
Owner

ocornut commented Jun 26, 2018

but strangely I find a crash with empty VtxCount after move dialog and relaunch exe.

When you report a crash anywhere please try to provide a assert/line/callstack, thanks!

See #1893 i think it is the same problem (a missing zero test in some buffer updating code).
I guess @SaschaWillems code would need to be tweaked accordingly? And perhaps take a chance to update since 1.50 is rather old one.

@Rominitch
Copy link
Author

Ok I will try soon to check where is issue into my fork code.

Sorry to forget information: currently crash doesn't happens inside ImGUI but Vulkan buffer's creation (because size of buffer is 0). So I don't have data to you.
I read very quickly you can dump a log of ImGUI, I 'm not very familliar with how to enable it.
I will attach it to ticket if I don't find solution myself ?

Thanks for your support !

@ocornut
Copy link
Owner

ocornut commented Jun 27, 2018

In your Vulkan renderer, Just don't create any buffer and commands if the ImDrawData is empty.

@Rominitch
Copy link
Author

Hi !
All is OK now ! #1893 was my solution too.
I produce a new commit with fix on my fork.

Thanks !

@ocornut
Copy link
Owner

ocornut commented Jun 27, 2018

@Rominitch May I suggest pushing your changes as a Pull Request to the original SaschaWillems repository, so other people won't stumble on the same issue as much?

@Rominitch
Copy link
Author

Yep ! Don't worry ! I created a ticket about that to inform community about this topic.

See SaschaWillems/Vulkan#496

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