Resolved: Debugger Crash
#1
Tested on: pcsx2-v1.3.1-1588-g191453d-windows-x86

Bugs:
  • When hitting break after the shutdown, the debugger will automatically resume as if you had only paused emulation, rather than checking to see if a full shutdown had occurred. Before the debugger was implemented, it was impossible to resume emulation after a shutdown, as there is an additional check at line 614 in MainFrame.cpp. Since this check is never performed by the debugger, the emulator tries to resume with no plugins loaded, and with all registers/memory flushed. A check could potentially be placed in "DebugInterface::resumeCpu(), which starts at line 181 in DebugInterface.cpp.
Note: The issue is not localized to any single game. 

Emulog: http://pastebin.com/dqHGduM6

Video


Steps to reproduce bugs:
Bug #1
  • Open the debugger and hit run to start a game
  • Wait for a game to get passed the Playstation 2 logo. 
  • Go to System>Shutdown
  • Go back to the debugger and hit break. 
Plugins:
  • GSdx 1.0.0 AVX2
  • Lilypad 0.11.0
  • SPU2x 2.0.0
  • cdvdGigaherz 0.9.0
  • USB Null 0.7
  • Dev9 Null 0.5
  • FW Null 0.7
Settings:
EE: Default
IOP: Default
VU0: Default
VU1: Default
GS: Default
GS Window: Default
Speedhacks: None
Manual Gamefixes:None
Plugins:All Default

Hardware Specs:
  • Intel Core i7 5820K @4.4ghz
  • Sapphire R9 Fury 
  • 16 DDR4 2133mhz
  • Windows 10 pro 64bit
[Image: gmYzFII.png]
[Image: dvedn3-5.png]

Sponsored links

#2
I like how you click "Break" and then it crashes. That is so epic.

Anyway on topic: Really nice report. You file on Github too?
[Image: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#3
Feel free to push it, managed to reproduce on my side.
#4
(12-29-2015, 08:57 AM)Blyss Sarania Wrote: I like how you click "Break" and then it crashes. That is so epic.

Anyway on topic: Really nice report. You file on Github too?

not yet, since I was waiting for someone to confirm. Since ssakash has, I will do so
[Image: gmYzFII.png]
[Image: dvedn3-5.png]
#5
I'm not using the latest beta but it also happens if you:
1.Start any game
2.System>Shutdown
3.Open the debugger

I avoid using Shutdown because this almost always lead to crash(at least here)
#6
Sounds like the logic for Shutdown should be reworked a bit. Or at least how it interacts with the debugger. Could Shutdown not just set a global that can be checked by things to see if the system is running or not? I mean globals can be messy, but this sounds like a job for one. Or hell even a local that gets passed. A var should do it. Or maybe there is one and it just isn't checked?
[Image: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#7
(12-29-2015, 09:01 AM)Blyss Sarania Wrote: Sounds like the logic for Shutdown should be reworked a bit. Or at least how it interacts with the debugger. Could Shutdown not just set a global that can be checked by things to see if the system is running or not? I mean globals can be messy, but this sounds like a job for one. Or hell even a local that gets passed. A var should do it. Or maybe there is one and it just isn't checked?

The fix is simple, you need to check the VM state before doing a break. Shutdown uses Corethread.Reset() which means the emulation doesn't have a valid VM state after the function.
#8
I think Nobbs was trying to code that earlier but had an issue because VM was out of scope wherever he was trying to check it and he couldn't get it to pass to the function on his own.

At least that's what it sounded like to me on chat with him.
[Image: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#9
(12-29-2015, 09:09 AM)Blyss Sarania Wrote: I think Nobbs was trying to code that earlier but had an issue because VM was out of scope wherever he was trying to check it and he couldn't get it to pass to the function on his own.

At least that's what it sounded like to me on chat with him.

Yep, and I'm too tired to even think about it at the moment.
[Image: gmYzFII.png]
[Image: dvedn3-5.png]
#10
Thank you for your report.
This bug report has now been marked as Pushed and has been posted as an issue in our Github repository HERE

Issue link: https://github.com/PCSX2/pcsx2/issues/1074

This thread will now be moved in the Pushed bug reports subforum.
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction




Users browsing this thread: 1 Guest(s)