Bug 359188 - kwin_x11 crashes if Minecraft 1.6.4 (Modded) starts and finishing loading
Summary: kwin_x11 crashes if Minecraft 1.6.4 (Modded) starts and finishing loading
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: 5.4.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL: https://youtu.be/jHEEnC79HZc
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-09 15:53 UTC by Linus
Modified: 2016-02-19 18:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Kwin-Crashlog (38.49 KB, text/plain)
2016-02-13 12:18 UTC, Linus
Details
Kwin-Crashlog (with 'grep -i buffer') (33.20 KB, text/plain)
2016-02-13 12:19 UTC, Linus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Linus 2016-02-09 15:53:28 UTC
Happens if Minecraft 1.6.4 ('Attack of the B-Team') starts.

Reproducible: Sometimes

Steps to Reproduce:
1. Download and start the "Technic Launcher" from http://www.technicpack.net/ (Note: a premium minecraftaccount from minecraft.net is needed to play this)
2. Install the Modpack "Attack of the B-Team"
3. Play it

Actual Results:  
with a 80% chance, kwin_x11 crashes with result as a shattered screen, till it gets restarted with "$ kwin_x11 --replace"

Expected Results:  
No crash of kwin_x11

I regonized that Minecraft with the current modpack starts in fullscreen and if loaded wants to exit the fullscreen, I tried it with a Window-Rule that deny fullscreen. It works but kwin_x11 is still crashing.

I using Kubuntu 15.10 (no alternate PPA/Repo for KDE)
I using a Nvidia GTX 750 Ti with the Nvidia binary driver 352.22

(The freeze in the video is a another bug related to my Nvidia-Card after boot.)

I don't know weather that is related to this crash, but in case of a V-Sync failure I added following entrys to the file ~/.profile:
export __GL_YIELD="USLEEP"
export __GL_THREADED_OPTIMIZATIONS=1
This forces all applications to use V-Sync.
Comment 1 Thomas Lübking 2016-02-09 15:58:30 UTC
Sounds terribly like bug #344326

Can you run "xev -root -event randr", start minecraft and see whether the former produces any output?

Suspending the compositor before running minecraft (SHIFT+Alt+F12), resp. applying a window rule to have mincraft block the compositor (last tab) should bypass the problem (as toggling the compositor twice should simply clear the stage after the issue occurred)
Comment 2 Linus 2016-02-10 12:23:34 UTC
I tried it.
"$ xev -root -event randr" did not gave me any output while crashing.

Blocking the Compositor with SHIFT + ALT + F12 seems to work best.
As I tried it with the Window-Rule and start Minecraft the Compositor got blocked but then my middle panel (Windowlist) freezed and kwin shuts down (windowdecoration was gone).
After I restarted both (kwin_x11 and plasmashell) I noticed that the Hotkey ALT + F2 to enter commands did not work (sure only till the next reboot) but my Hotkey to pop up my Application-Launcher (SUPER + Y).

To sum it up:
- Not a cause of the "Root-Window" ("$ xev -root -event randr" with no output)
- Disabling Compositor works but caused a big crash as I set it as windowrule.
Comment 3 Linus 2016-02-10 20:50:41 UTC
I found out that if kwin_x11 crashes (shattered screen) I can use the Hotkey to disable/enable the compositor twice instead of restarting kwin_x11.
Then this image is restored.

This means that it definitly is a bug of the compositor.
Maybe a fullscreen or OpenGL problem?
Comment 4 Thomas Lübking 2016-02-11 12:13:15 UTC
The "crash" you report (ie. the distorted image) sounds terribly like bug #344326 while the segfaults of comment #2 sound terribly like bug #341497, what is why I believe minecraft alters the screen resolution (despite you didn't log any event)

run
QT_LOGGING_RULES="kwin_core.debug=true" kwin_x11 --replace &

and watch out for ""Buffer detailed info:" messages (maybe grep -i for "buffer", If the message changed, or workaround won't work anymore)
Comment 5 Linus 2016-02-13 12:18:45 UTC
Created attachment 97174 [details]
Kwin-Crashlog
Comment 6 Linus 2016-02-13 12:19:36 UTC
Created attachment 97175 [details]
Kwin-Crashlog (with 'grep -i buffer')
Comment 7 Linus 2016-02-13 12:21:22 UTC
I run it with the command "QT_LOGGING_RULES="kwin_core.debug=true" kwin_x11 --replace 2> kwin.log"

I added the attachments (Kwin-Crashlog) and (Kwin-Crashlog (with 'grep -i buffer'))
Comment 8 Thomas Lübking 2016-02-13 14:15:34 UTC
Seems as if the VBOs get transferred forth and back when starting minecraft in return of a randr event (the refresh rate output) what certainly means we're in the territory of bug #344326.
KWin also reloads VBOs, so the question is what fails next.

You then seem to apply a kwin rule to block compositing for minecraft
=> is this a resolution or maybe rather the trigger of the problem?
Comment 9 Linus 2016-02-19 17:36:29 UTC
I think yes, because I had a similar bug a long time ago with Plasma where Kwin mostly crashing everytime, I adding/removing/activating/deactivating a monitor.

Currently I have two Monitors:
DVI (BenQ): Primary Monitor [1920x1080]
VGA (Samsung TFT): Secondary Monitor [1024x768]
HDMI (Samung SmartTV): Gaming Monitor (uses when play Steam-Games with Controller) [1920x1080; Mirror of BenQ]

Screenshot of KDE's Monitor-Settings: http://i.epvpimg.com/pkvcd.png

Everytime I starting my SmartTV (if not at current boot), kwin crashes.

My Laptop which I using in School and which is running ArchLinux with latest Updates, crashes often when I unplug a Monitor. But then kwin restarts and shows me a Crash-Dialog.

It seems that kwin has mayor problems with multiple Monitors or screen resolutions.

I think that it isn't a fault of my Nvidia GTX 750 Ti because my Laptop only has a Intel i3 with HD Graphics 2000 which should work fine on Linux.
Comment 10 Thomas Lübking 2016-02-19 18:03:56 UTC
crashes on randr events are a common bug in qt5, see bug #341497 on details - that doesn't indicate anything and is not related to the VBO transfer problem (which is probably the cause for the screen distortion and *may* crash kwin as well, but on different stack positions)

So again: you added the blocking rule to mitigate the distortion?