Dolphin, the GameCube and Wii emulator - Forums

Full Version: Linux dual core crash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

Brad4423

I'm running the 64bit Linux version on ubuntu 9.04. Everything works fine with dual core disabled, although my framerates are too low so thats a problem for me. When I enable dual core mode and start emulating any game it will run for 2-5 seconds then crash or more rarely will simply freeze. Am I doing something wrong or does this simply not work for this version.

cmccmc

I think it's a linux issue but im not sure
(07-27-2009, 06:50 PM)Brad4423 Wrote: [ -> ]I'm running the 64bit Linux version on ubuntu 9.04. Everything works fine with dual core disabled, although my framerates are too low so thats a problem for me. When I enable dual core mode and start emulating any game it will run for 2-5 seconds then crash or more rarely will simply freeze. Am I doing something wrong or does this simply not work for this version.

try a different build

Brad4423

Thanks for the responses I just tried the two older builds the 3091 release seemed to last slightly longer before crashing but all three builds are crashing on me in dual core mode.
I can confirm this issue.
Dolphin rev 3978

The error i get is:
Code:
Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

seems that multiple threads are trying to access a X-Server ressource instead of waiting until the ressource is free.

Dugie

Q: How to run Linux builds without constant Crashes
A: You don't. Download Windows XP x86 (It's free now)
Your crashes will probably go away if you change from kbd to njoy plugin.
You are right, it doesn't crash with nJoy plugin.
But i can't use it, I have no gamepad, it would be great if someone would fix the Dolphin KB plugin.

Thanks
Sky
I really want to use the dual core mode under linux. so i took a look at the code and searched for the problem myself.
The main problem seems to be, that the X11Lib isn't thread safe.

The problem is that the Core.cpp of Dolphin starts two threads. They are called "Video Thread" and "CPU Thread".
But this ONLY happens in dual core mode, in single core mode these both threads are just ONE, so there is no conflict in accessing X11Lib.

By putting in some debug lines I found 2 locations in the code where there is active polling of XEvents with XNextEvent(...) , one in GLUtil.cpp and the other in PadSimple.cpp.


I'am pretty sure that there is a problem. I testet a few things:

I ran Zelda TP, the intro plays a few seconds, then the game crashes with either: "Dolphin: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0"
or "Dolphin: xcb_io.c:242: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed."

When i comment out the polling in PadSimple: The intro works, but no keyboard input Smile

Then i created a mutex for X11Lib access in GLUtil and PadSimple, but that doesn't really work as i wished. But the game seems to crash a little bit later, i could even play now a WHOLE minute sometimes Big Grin

So i guess there must be another active thread or something that i have missed.

The funny thing is that nJoy plugin works, its using SDL, maybe its worth thinking about rewriting PadSimple using SDL instead X11Lib directly.

WindPower

Same here, except that it crashed when opening any game (segfault), no matter the settings or plugins in use. Huh
Pages: 1 2