ElvUI-TBC / ElvUI

ElvUI for World of Warcraft - The Burning Crusade (2.4.3)
https://discord.gg/UXSc7nt
104 stars 24 forks source link

[Bug] ElvUI core crashes WoW 2.4.3 when ctrl-clicking helmets/shoulders twice in OpenGL mode (Yes, confirmed...) #417

Open Arcitec opened 6 years ago

Arcitec commented 6 years ago

This may sound like an impossible bug. "How can ElvUI CRASH WOW!?". But it is 100% true!

Setup:

Steps to reproduce:

Steps to NOT reproduce:

Here is a screenshot:

screen shot 2018-11-10 at 18 26 08

Arcitec commented 6 years ago

I really wish I could help track this down since I am a programmer and I am seeing this issue on my system, but I don't know where to begin to look... I don't know ElvUI's codebase.

Arcitec commented 6 years ago

Okay! After a ton of crashes, I've finally discovered what's causing it, and found a reliable way to reproduce it 100% of the time:

I tried different addon combos:

So it is probably something about how ElvUI hooks into/takes over the Dressing Room window!

I can take a look at the code if you can guide me about what potential places to look in.

Arcitec commented 6 years ago

So far I've tested 1 thing:

ghost commented 5 years ago

I can't replicate this on Windows 10 with ElvUI 1.45.

Unsure of where I got the client from, but I am fairly certain it wasn't Warmane.

Arcitec commented 5 years ago

@Saben65 Thanks for confirming that it does not happen when WoW runs natively on Windows.

And I decided to check if the client version had anything to do with it.

So I checked:

Both crash exactly the same way. Here's the Excalibur enUS client, with ElvUI+ElvUIConfig+Compatibility+DevTools, no other addons:

screen shot 2018-11-25 at 08 17 27

Interestingly, the illegal instruction happens at the exact same memory address, 0xA7589132, in both the enGB and enUS clients. If I knew anything about patching assembly code, I'd love to add a null-pointer check there and possibly fix the Wow.exe client...


I also tried with removing SET gxApi "opengl" from Config.wtf, to ensure the game uses the Direct3D API instead. Guess what? It doesn't crash. So the crash is related to the OpenGL rendering mode.

But remember: There are no game-crashes in OpenGL mode if ElvUI is disabled. Only when ElvUI is enabled.


Here's the thing: In Direct3D mode, Wine has to translate all D3D calls to OpenGL. If you instead tell the game to use the OpenGL renderer, you get 2-3x higher FPS, and no more constant stuttering (which happens while D3D shaders are being rewritten as OpenGL by Wine). Which matters a lot. It's impossible to raid in Direct3D mode, due to the terrible performance.

So even though we now know that OpenGL mode + Wine is what's causing SOME ElvUI feature (it could be anything) to crash the game, I'll be staying in OpenGL mode. I simply avoid ctrl-clicking on any equipment while the Dressing Room is open, since that's what causes the crash.

It's not a matter of being stubborn. The game performance is unplayable in Direct3D mode. ;-)


One more question: Does Windows also crash when WoW is in OpenGL Mode?

@Saben65, please go into your WTF folder and edit Config.wtf and add this line:

SET gxApi "opengl"

Now try ctrl-clicking a helmet (or shoulder) item twice in the game, so that your 2nd click happens while the Dressing Room frame is already open. Let's see what happens!

tdymel commented 5 years ago

Having the same issue running the game with opengl on linux