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

QRenderDoc crash on Fedora 24 #366

Closed
Corralx opened this issue Sep 19, 2016 · 7 comments
Closed

QRenderDoc crash on Fedora 24 #366

Corralx opened this issue Sep 19, 2016 · 7 comments
Labels
Bug A crash, misbehaviour, or other problem

Comments

@Corralx
Copy link

Corralx commented Sep 19, 2016

QRenderDoc crash during startup on Fedora 24.
Apparently the crash happens during the window creation, attemping to call glXGetVisualFromFBConfig(...).
At that point the debugger shows that the glhooks table is uninitialized and all the pointers are set to 0x0, and setting a breapoint on PopulateHooks reveals that the function is not called at all.
I attached the stack trace recovered from gdb.
qrenderdoc_crash.txt

Matteo

@baldurk
Copy link
Owner

baldurk commented Sep 19, 2016

This looks like maybe a clash between recent fixes to the GL hooking code and Qt, it's picking up some of the exported symbols that are only intended for hooking external applications not really used for internal symbols.

It should be fixable, but honestly at this point it's probably not worth reporting bugs against qrenderdoc - it's barely runnable and even if you get it working, it has no usable functionality. Given the current status it's just not mature enough to be worth tracking individual bugs.

@baldurk baldurk added Bug A crash, misbehaviour, or other problem Unresolved Waiting for a fix or implementation labels Sep 19, 2016
@svenstaro
Copy link

svenstaro commented Sep 19, 2016

Funny, I was just about to report this issue and then @Corralx showed up and already did it. This is also crashing for me on Arch Linux compiled with gcc (gcc (GCC) 6.2.1 20160830) with the exact same stacktrace. It also crashes when compiled with clang 3.8.1.

@Corralx
Copy link
Author

Corralx commented Sep 19, 2016

Well that's no great news.
Since I've used it with success on Windows on my personal projects, I was just about the test it at work to see if it was feasible on Linux.
I understand that being alone, maintaining all the platform/API combinations is really hard and Linux is not a priority in the 3D graphics world :)
I'll see what I can do to contribute onto the Linux/OGL path.
May I contact you privately at this point to see the state of the work and what could be done for it?

Matteo

@svenstaro
Copy link

I would prefer if the roadmap were open so that contributors like us could just choose to tackle random issues here and there.

@baldurk
Copy link
Owner

baldurk commented Sep 19, 2016

Yeh you can always email me if you want to, but I don't think there's any reason to take this privately. Right now though there's not a specific roadmap - it's just "get everything ported to Qt, doing some clean up & refactor along the way".

Getting the UI up and running on linux is definitely a priority though. The survey results indicated that the next two priorities are D3D12 support and Linux native UI, so those are what I'm working on right now.

It's hard to give exact timelines as I like to stay flexible enough to respond to things when they come up and changing priorities, but I'm hoping at least there will be some basic functionality there by the start of next year. As in - not necessarily feature complete and comparable to the winforms UI, but at least usable to debug a bit.

You're welcome to PR improvements, just be aware that since the Qt UI is still pretty raw, the code will be churning a lot so there's more chance of clashes, constant rebasing and duplicated work 😄.

baldurk added a commit that referenced this issue Sep 20, 2016
* Upstream stb_image.h uses __builtin_cpu_supports to detect if SSE2 is
  available, but GCC versions from at least 5.4 and up to apparently
  6.1.1 on Fedora 24 then give an error about a missing hidden symbol
  __cpu_model when the resulting code is compiled into a DSO.
* Avoiding this by just assuming x64 gives SSE2 will fix 99% of cases,
  and it's not a big loss for the tiny minority with SSE2 on x86 to miss
  out. Thanks to @Anteru for this suggested fix!
baldurk added a commit that referenced this issue Sep 20, 2016
* These functions are intended only for hooking via LD_PRELOAD, but they
  will also be picked up by any replay application calling into GL. We
  need to make sure then that the real function pointer is fetched in
  time to be able to call it.
baldurk added a commit that referenced this issue Sep 20, 2016
* Upstream stb_image.h uses __builtin_cpu_supports to detect if SSE2 is
  available, but GCC versions from at least 5.4 and up to apparently
  6.1.1 on Fedora 24 then give an error about a missing hidden symbol
  __cpu_model when the resulting code is compiled into a DSO.
* Avoiding this by just assuming x64 gives SSE2 will fix 99% of cases,
  and it's not a big loss for the tiny minority with SSE2 on x86 to miss
  out. Thanks to @Anteru for this suggested fix!
baldurk added a commit that referenced this issue Sep 20, 2016
* These functions are intended only for hooking via LD_PRELOAD, but they
  will also be picked up by any replay application calling into GL. We
  need to make sure then that the real function pointer is fetched in
  time to be able to call it.
@baldurk
Copy link
Owner

baldurk commented Sep 20, 2016

Oops, well one of those commits (which github decided to double-report because I pushed to two branches) should have been for #365.

Either way, I think this is fixed now and qrenderdoc is back to being working but severely non-functional :). Let me know if it fixes it for you, or if you're still having some issues.

@baldurk baldurk added status: to be verified and removed Unresolved Waiting for a fix or implementation labels Sep 20, 2016
@Corralx
Copy link
Author

Corralx commented Sep 21, 2016

Thanks, I can see QRenderDoc launching correctly now.
As soon as I find time (this week I'm a bit constrained at work) I'll look into what needs to be done to take the Qt UI on par with the .NET one.

@baldurk baldurk closed this as completed Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A crash, misbehaviour, or other problem
Projects
None yet
Development

No branches or pull requests

3 participants