Project

General

Profile

Actions

Emulator Issues #5290

closed

Crash in glDrawElements on Linux/OSX with Nvidia drivers

Added by synergism over 12 years ago.

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

0%

Operating system:
OS X
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
Yes
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

  1. Super Smash Brothers Melee - GALE01

  2. I expected the level to start. Instead, it crashed, producing a core file (see backtrace below).

  3. I have only just started using dolphin-emu, so I have no information from earlier versions.

4) What steps will reproduce the problem?

When I start the single player mode event 30 "All Star Match 3" with "Enable DTK Music" turned on, the game crashes. With the option disabled, or with sound disabled entirely, the game does not crash. I used the character "Fox", but so far as I can remember, it crashed with other characters as well. Others on irc tried with the same corefile but could not reproduce the issue (though they did notice some irregularity in the music at around the time where my crash is occurring).

  1. I have tested with bf76b80 from git (shows as Dolphin 3.0-457-dirty), 32 bit, built myself on Debian unstable i386 on an Intel Dual core system with nVidia GeForce 9800 GT graphics card and nVidia 295.20 driver. I'm running the game on a gnome3 desktop, but with the pulseaudio package removed, so it is using the alsa backend.

At the recommendation of one of the people helping me build on irc, I applied this patch to get my build to work properly with sid's libav:

diff --git a/Source/Core/VideoCommon/Src/AVIDump.cpp b/Source/Core/VideoCommon/Src/AVIDump.cpp
index 6706936..4c05a9c 100644
--- a/Source/Core/VideoCommon/Src/AVIDump.cpp
+++ b/Source/Core/VideoCommon/Src/AVIDump.cpp
@@ -319,9 +319,10 @@ void AVIDump::AddFrame(uint8_t *data, int width, int height)
AVPacket pkt;
av_init_packet(&pkt);

+/*
if (s_Stream->codec->coded_frame->pts != (unsigned int)AV_NOPTS_VALUE)
pkt.pts = av_rescale_q(s_Stream->codec->coded_frame->pts,

  •                                   s_Stream->codec->time_base, s_Stream->time_base);
    
  •                                   s_Stream->codec->time_base, s_Stream->time_base); */
              if(s_Stream->codec->coded_frame->key_frame)
                      pkt.flags |= AV_PKT_FLAG_KEY;
              pkt.stream_index = s_Stream->index;
    

It was also suggested on irc I try the FifoBusy branch, but I could not get that to build, so I never tried it.

6) Please provide any additional information below.

Here is a backtrace from the core file produced by the crash:

Thread 5 (Thread 0xb1c749d0 (LWP 15556)):
#0 0xb77c6424 in __kernel_vsyscall ()
#1 0xb4c80746 in poll () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#2 0xb5effafb in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3 0xb63ec7fa in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4 0xb5ef1076 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5 0xb5ef177b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6 0xb5a5394f in gtk_main () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#7 0xb640339a in wxEventLoop::Run() () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#8 0xb6488c3f in wxAppBase::MainLoop() () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#9 0xb64884df in wxAppBase::OnRun() () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#10 0xb60ca946 in wxEntry(int&, wchar_t**) () from /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0
#11 0xb60ca9e6 in wxEntry(int&, char**) () from /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0
#12 0x080834db in main ()

Thread 4 (Thread 0x9d0f5b70 (LWP 15590)):
#0 0xb77c6424 in __kernel_vsyscall ()
#1 0xb4c653dc in sched_yield () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#2 0x0815b5f2 in CoreTiming::Idle() ()
#3 0xaa0388a4 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 3 (Thread 0x9c8f4b70 (LWP 15591)):
#0 0xb77c6424 in __kernel_vsyscall ()
#1 0xb4c86449 in ioctl () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#2 0xb4f6cf17 in ?? () from /usr/lib/i386-linux-gnu/libasound.so.2
#3 0xb4f5b9d4 in snd_pcm_writei () from /usr/lib/i386-linux-gnu/libasound.so.2
#4 0x082da973 in AlsaSound::SoundLoop() ()
#5 0xb4de6917 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#6 0xb75eaf51 in ?? () from /usr/lib/i386-linux-gnu/libGL.so.1
�/���ccess memory at address 0xb4be920

  1. Here is my whole ~/.dolphin-emu including the SSB melee save file.

http://dl.dropbox.com/u/54863919/dolphin-emu.tgz

Here is a screenshot of where the game freezes:

http://dl.dropbox.com/u/54863919/Screenshot%20at%202012-03-12%2016%3A24%3A23.png


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #5126: Dolphin 3.0 - 368 get crash when go loading game Fatal Frame 4 on Macbook pro 2010Duplicate

Actions
Actions #1

Updated by synergism over 12 years ago

Turning off DTK Music (and even disabling sound altogether) was a red herring. Nothing I've tried to do to influence whether it crashes or not reliably changes its behaviour. I have tried again with the version reported above and also current master HEAD and current FifoBusy HEAD. Initially, I had crashes no matter what sound settings I used, then I tried different characters and it stopped crashing, then I went back to the original characters and it continued to work without crashes. So it is likely a timing issue of some sort.

Actions #2

Updated by tommyhl2.SS over 12 years ago

This is an HLE issues only, LLE should work fine. That might consider this not an issue at all since HLE is a pile of garbage. Use LLE.

Actions #3

Updated by synergism over 12 years ago

That may very well be, but LLE is useless to me, as my 1.8Ghz dual core intel CPU (e2160) is incapable of keeping up with LLE (sound stutters maddeningly -- no combination of settings solves this). I must use HLE and cannot justify the cost of an upgrade just to solve this one small issue. So I would not say this is "not an issue at all".

Actions #4

Updated by delroth over 12 years ago

  • Status changed from New to Questionable

@SS: HLE should not cause segfaults for any reason though. This is definitely a valid bug.

Not sure if this is a Dolphin bug though, looking at the backtrace it doesn't seem like it's crashing in our code.

Actions #5

Updated by delroth over 12 years ago

After a lot of debugging over IRC: it's crashing in glDrawElements, called in the GL plugin VertexManager::Draw. Three possibilities:

  • We provide bad data to the nvidia driver and it fails to check it before using it and crashing
  • We have a data corruption somewhere in the code that destroys some of the GL driver state
  • It is an nvidia driver bug and we can't do anything about it.
Actions #6

Updated by delroth about 12 years ago

  • Status changed from Questionable to Accepted

http://forums.dolphin-emulator.com/showthread.php?tid=23667

Looks like the same issue to me. Crash in VertexManager::Draw/glDrawElements, with NV hardware, on OSX though.

Actions #7

Updated by delroth about 12 years ago

Issue 5126 has been merged into this issue.

Actions #9

Updated by kkHAIKE about 12 years ago

but Issue 5126 crash by AMD hardware

Actions #10

Updated by delroth about 12 years ago

It doesn't. From issue 5126 crash log:

Graphics: NVIDIA GeForce GT 330M, NVIDIA GeForce GT 330M, PCIe, 256 MB

Actions #11

Updated by Billiard26 over 11 years ago

  • Issue type set to Bug
  • Relates to usability set to Yes
  • Operating system OS X added
  • Operating system deleted (N/A)
Actions #12

Updated by Sonicadvance1 over 11 years ago

Is this still a issue after GLSL merge?

Actions #13

Updated by Sonicadvance1 over 11 years ago

  • Status changed from Accepted to Fixed

This has been tested with multiple people now. This is fixed.

Actions

Also available in: Atom PDF