-
Notifications
You must be signed in to change notification settings - Fork 171
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
imgui IM_ASSERT(g.FrameScopeActive) failure #113
Comments
Did you try to run minimal example from README.md? Does it work? This line looks suspicious - you don't need to do it: ImGui::CreateContext(); Also please check with debugger that ImGui::NewFrame really gets called. Maybe vcpkg package is not correct and patches something out... |
Running the example also triggers this for me: |
I ran the minimal example from the README and still get the same result. I don't think ImGui::NewFrame() is actually being called. |
Can you please debug why it doesn't get called? At the moment I'm not able to reproduce this on my machine. See the call to You need to make sure that this |
I encountered the same issue! |
@chenzdshao can you please debug it a bit as I've described in my previous comment? |
@eliasdaler When I build and link ImGui-SFML.lib with vcpkg or cmake, here comes the error. When I compile and link imgui-SFML.cpp manually, the error disappears! |
This means there are some problems with imgui-sfml's vcpkg package, and so the issue should probably be created in vcpkg repo... |
I encounter the same thing as @chenzdshao. I will open a new issue in the vcpkg repo. |
After debugging, I found that there are multiple variable Anyone can help me? |
Might be something to do with linking and having multiple copies of one static object. |
@esduran Why is |
This is not something that I can control - it's an ImGui thing... Both static and dynamic linking work fine for me if I compile sources myself. vcpkg does something wrong, I can't tell what... |
The issue is also opened in vcpkg. |
The vcpkg port of imgui enforces to build it as a static library. Its portfile.cmake has a But imgui-sfml is built as dll by vcpkg (default triplet). Then your executable and the dll will be linked to the static library twice. https://stackoverflow.com/questions/31209693/static-library-linked-two-times |
Then maybe ImGui-SFML should only be build as static lib as well? |
Looks like it's been fixed in vcpkg package. |
Compiler: Visual Studio Community 2019 (MSVC 16)
Operating System: Windows 10 64-bit
My Issue/Question:
When running my application in x64-Debug I get:
Assertion failed: g.FrameScopeActive, file C:\vcpkg\buildtrees\imgui\src\v1.73-a85d24b4b8\imgui.cpp, line 5400
only when I add
ImGui::Begin
andImGui::End
calls to my source file.I am attempting to start a new C++ project using vcpkg, CMake, and Visual Studio on windows. I installed the following packages through vcpkg:
In my CMakeLists.txt I include the following:
My main.cpp file consists of the following:
When running my application in Visual Studio using the x64-Debug configuration I immediately get the following assertion failure for
IM_ASSERT(g.FrameScopeActive)
. This only happens when I add the linesWithout them I get a running black window (first image below).
I have been unable to find a solution to this problem. I am unsure if this is an issue with ImGui-SFML or ImGui itself. Any help with this would be greatly appreciated. Thank you!
Screenshots/Video
The text was updated successfully, but these errors were encountered: