Comments (15)
As I understand Wayland currently doesn't permit application to neither set or get position or size of windows (!) which is causing problem to our approach. I don't think that's related at all to the crash but at least that's what the GLFW error is spewing.
-
Short-term I think your app should disable multi-viewports on Wayland.
-
There's an issue with MouseViewport being null which should be investigated. A quick parsing of the bottom of
UpdateViewportsNewFrame()
hints at the fact that the only possible way this is NULL is ifg.MovingWindow != NULL
butg.MovingWindow->Viewport == NULL
.
I personally haven't used Linux in decades. There is a thread asking for help from Mac/Linux users ocornut/imgui#2117 but it yielded zero patches so far. Apart from the ones I paid for Rokups to do because it was frustrating to see so many glaring Linux/Mac issues. It would be great it someone sat down and tackled those problems, alas multi-viewport it not a simple feature so that person will need patience to go back and forth to find a solution for Wayland.
PS: The negative position shouldn't be a problem.
from imhex.
That doesn't seem to help with the errors or the crashes, sadly. I think it ended up adding transparency though.
That said, I did manage to reproduce one of the crashes that I'm facing:
When using glfw-wayland, dragging one of the sub-windows (such as hex editor) to the side of the screen (and thereby triggering the snap feature) causes a fairly reliable "crash".
On some "crashes", it actually gave an error:
ImHex: /home/ave/Projects/ImHex/libs/ImGui/source/imgui.cpp:11327: void ImGui::UpdateViewportsNewFrame(): Assertion `g.MouseViewport != __null' failed.
[1] 74508 abort (core dumped) ./ImHex
and exited with 6, but on some the window just disappeared without an error, and I had to C-c to exit ImHex. And in some cases, it disappeared without an error, but exited with 0.
However, all cases, this was also in the logs shortly before the actual "crash": xdg_wm_base@9: error 3: xdg_surface must not have a buffer at creation
Anyhow, I managed to record a video of these all. It also shows the Open File thing breaking randomly.
That one seems to resolve itself when I remove the imgui.ini. Here's one that causes such a crash. I think that one is caused by the negative position of the hex editor that somehow ended up there. Changing that to a positive number fixes the crashes that happen as a result of opening the Open File window.
from imhex.
Thanks for your input! I'm going to disable multi-viewports then temporarily.
from imhex.
I do currently have a build setup, will test that and report back.
from imhex.
And, yes, multi-viewports are not supported somehow, but solved by discarding this lineio.BackendFlags |= ImGuiBackendFlags_RendererHasViewports;.
You shouldn't have to modify the backend.
You can just avoid setting io.ConfigFlags |= ImGuiConfigFlags_Viewports
in the app to disable the feature.
from imhex.
Hey!
This seems to be caused by wayland wanting EGL instead of OpenGL. Do you have a build setup right now? If so, you can try changing the OpenGL profile in source/window.cpp
, line 221 to GLFW_OPENGL_COMPAT_PROFILE
instead of GLFW_OPENGL_CORE_PROFILE
and see if that works
from imhex.
Oh this looks like an issue with ImGui's new viewports feature. Maybe @ocornut knows more about this?
from imhex.
Here is a dirty patch that makes ImHex working under pure wayland env without crash(without multi-viewports), link.
I want a pure wayland support in addition to the original request. I did not have x11 on my linux distro. The thing is that: wayland is using GLES+EGL, there is no desktop GL.
And, yes, multi-viewports are not supported somehow, but solved by discarding this lineio.BackendFlags |= ImGuiBackendFlags_RendererHasViewports;
.
from imhex.
I can confirm that @xhebox patch works! Thank you 🚀 !
from imhex.
You can just avoid setting io.ConfigFlags |= ImGuiConfigFlags_Viewports in the app to disable the feature.
Thx for reminding that. But it is just a dirty patch and I don't know much about ImGUI. I would be happy to leave the real PR/commit to someone else.
from imhex.
wayland patch updated to 1.13.0. It is possible to patch imhex only, which means a cmake options is possible to make it compilable under pure wayland env. Any one interested could fire an PR.
The main changes to make it happen are:
- Remove usage of
imgui_impl_opengl3_loader.h
since GLES2 imgui did not use that file. - Replace hardcoded opengl things with
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API)
- define
IMGUI_IMPL_OPENGL_ES2
orIMGUI_IMPL_OPENGL_ES3
, and choose a proper GL backend byOpenGL::XXX
. For me, it isOpenGL::OpenGL
, which is libglvnd.
from imhex.
@xhebox Does GLES2 make other things worse compared to OpenGL3? If not, I'm up to switching to that instead if it means Wayland works fine.
from imhex.
@xhebox Does GLES2 make other things worse compared to OpenGL3? If not, I'm up to switching to that instead if it means Wayland works fine.
I don't think it makes much difference for imhex, since imhex is not really a heavy graphic load. But I like to give some points:
- GLES2 is basically WebGL1, which means you can only use
#version 100
gles shader. This is the primary disadvantage compared to modern desktop GL, because of its limited shader functionality. But almost all wayland apps are using GLES2/3 to render and you could see all kinds of WEBGL1 demo on the web. So I would say there is no performance concern, at least for the current ImHex. (BTW, GLES3 is comparable with OPENGL3, but It is not that widely supported) - There are some problems even with my patch: I mean it is not working perfectly under pure wayland. For example the splash screen looks wrong. And window sizing is clearly wrong, since settings windows are extremely large and it covers all other things. Of course, all these things are likely a problem of GLFW, which did not adapt wayland well even on the master.
- Talking about the portability of GLES2, it is shipped with mesa, which means every linux distro should have it. I don't know much about the support on windows.
from imhex.
If you want to make a PR, I'll make sure to test it out, fix potential issues and merge it if it works fine.
from imhex.
Oh so is that why I can't edit settings lol
from imhex.
Related Issues (20)
- [Bug] Auto-load supported pattern not working anymore
- [Feature] Reload file button HOT 2
- [Feature] Selection size HOT 1
- Add exception stacktraces
- [Bug] Scroll position when moving or selecting bytes down in hex editor using arrow keys HOT 3
- [Bug] "Save As..." Modifies Both the New File and the Original File HOT 1
- [Bug] Data loss, because confirmation dialog logic is inverted
- [Bug] Invalid loop sized array segfault
- [Bug] Endian pragma ignored HOT 3
- [Bug] Bookmarks highlighting is not updating
- [Feature] Open file from CMD and auto go to offset
- [Feature] LZ4 Compressed Bytes HOT 3
- [Bug] Denying server contact in initial wizard still keeps crash reports uploads enabled HOT 1
- [Bug] Setting base address causes Data Inspector and copying issues
- [Bug] Ctrl+G results selection lost after closing GoTo window with Escape
- [Bug] Export selection to file processes for ever at full CPU load.
- [Bug] Why can't I JUMP to a FUCKING address
- [Bug] The "parent" keyword isn't always parsed in patterns HOT 4
- [Bug] no longer works on Sway (wlroots) HOT 5
- [Bug] Pattern placed in section doesn't appear in Pattern Data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imhex.