ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
59.33k stars 10.11k forks source link

ImGui OpenGL 3 + My Backend with emscripten - Yandex Browser memory leak #5863

Closed InfiniteCoder01 closed 1 year ago

InfiniteCoder01 commented 1 year ago

Version/Branch of Dear ImGui:

Version: Commit 5728f2e15fe5354c84254cddcf1f01713c10374a Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_implopengl3.cpp + imguiImpl.cpp (Compiled with -D IMGUI_IMPL_OPENGLES2) Compiler: em++ Operating System: Windows/YandexBrowser

My Issue/Question:

As soon as I open webpage (Using live server vs code extension), I have 1-3 sec before yandex browser reloads the page and tells me that I have not enough memory. I've tested it with Microsoft Edge and UR Browser, but it only occurs with yandex browser

Mova (Develop Branch): https://github.com/InfiniteCoder01/Mova

Standalone, minimal, complete and verifiable example: (see https://github.com/ocornut/imgui/issues/2261)

#include <Mova.h>

int main(int argc, const char** argv) {
  MvWindow window("Ore Asset Editor", openGLRenderer);
  renderer->defaultShader();

  ImGui_ImplMova_Init();

  while (true) {
    ImGui_ImplMova_NewFrame();
    ImGui::DockSpaceOverViewport(ImGui::GetMainViewport());

    ImGui::ShowDemoWindow();

    ImGui::Render();
    renderer->clear(Color::darkgray);
    ImGui_ImplMova_Render();
    Mova::nextFrame();
  }

  ImGui_ImplMova_Shutdown();
  return 0;
}
ocornut commented 1 year ago

You are asking us to debug your code or debug Yandex browser. We cannot do that sorry.

InfiniteCoder01 commented 1 year ago

Also, Everything works if I comment ImGui::Render();

ocornut commented 1 year ago

Then comment it ;)

Render() only allocates to grow buffers which are amortized and rarely allocate on subsequent frames. It is unlikely to be the issue.