Project

General

Profile

Actions

Emulator Issues #4397

closed

Segfaults 9/10 times on emulation start on linux + patch

Added by debian.micove about 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Logic
% Done:

0%

Operating system:
N/A
Issue type:
Other
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem?
Same issue described in comments of r7428 and that was supposed to be fixed in r7429.

Dolphin version with the problem (as it appears in the title bar, Ex.: "R
4779" or "R 6403M"):

r7424: Fine but the stop button closes the emulator
r7428/r7429/.../7454: Fix stop button but I go on 9+ segfaults in a row streaks most of the time. I first noticed this on 7454 btw but tested the others too.

(optional) Dolphin version that does not have the problem:
r7424

Operating system and version:
32-bit or 64-bit: 64bit Debian sid

Game ID (as it appears in game properties, Ex.: "GZ2P01" or "RSBE01"): Should be game independent or the emulator hates Tales of Symphonia :P. GQSEAF

Build command-line (not on Windows):
Same way as in the PPA.

Please provide any additional information below.

I have not used dolphin in a week or two. Tried it yesterday and it failed hard. Went back revision until I found it worked on r7424 and r7425 broke it while fixing the stop button issue. I locally reverted r7424/r7428/r7429 and slowly reapplied them until the stop button crashes got fixed , and the segmentation faults fest did not start. Decided to create a patch with the minimum amount of changes to fix the reported behavior since in theory most of r7425 could have been reverted and it fixed all but this minimizes breakage.

Conclusion:

Moving the HW::Init() call further back and into the Init() function like in r7424 made it all work again with the minimum amount of changes (from what I remember only the change in the stop function in r7425 was needed to fix the stop issue). Trying to put HW::Init() at the start of the Emuthread function did not work. Moving it between:

g_pWindowHandle = Host_GetRenderHandle();

HW::Init(); <--- HERE

// Start the emu thread
g_EmuThread = std::thread(EmuThread)

It was between those line in r7424 and moving it there again made it all nice again. Since r7429 fixed some cases, hopefully this is not just the complement and break the cases that r7429 fixed heh.

Simple patch to move the one line attached.

Thanks for the work in the emulator.

Actions #1

Updated by debian.micove about 13 years ago

Oh yeah besides fixing all the typos I did before falling asleep while writing this, I forgot to mention that issue 4385 is the only similar issue I found while searching. He/she said "may result in a crash sometimes when Clear code cache message appears" and the emulator was crashing on start right after that message appeared. Not sure if related but might as well mention it.

Actions #2

Updated by DimitriPilot3 about 13 years ago

  • Category set to logic
  • Issue type set to Bug

"Degfaults" => "Segfaults"

Actions #3

Updated by beistin about 13 years ago

Hi,

Thanks for this patch, it also corrects issue 4357. The patch I supplied corrected the segfault, but it did not corrected all the side effects due to the "bad" memory mapping.

With your patch, nearly everything is fine.

Actions #4

Updated by debian.micove about 13 years ago

Oh It was 5am and I missed the obvious original issue 4357. My bad.

Also I wrote "I locally reverted r7424/r7428/r7429" but it should be "I locally reverted r7425/r7428/r7429". The other typos/errors should be at least understandable like Degfaults heh.

Actions #5

Updated by skidau about 13 years ago

  • Issue type changed from Bug to Other
Actions #6

Updated by pierre about 13 years ago

  • Status changed from New to Fixed

This issue was closed by revision r7465.

Actions

Also available in: Atom PDF