duckstation icon indicating copy to clipboard operation
duckstation copied to clipboard

Possible fix for bug mentioned in Discord

Open PugsyMAME opened this issue 2 years ago • 6 comments

May possibly be a fix for this as well:- https://github.com/stenzek/duckstation/issues/1662

PugsyMAME avatar Aug 07 '21 19:08 PugsyMAME

Maybe this prevents crash but... why Bus::g_ram is null there?

Nucleoprotein avatar Aug 07 '21 21:08 Nucleoprotein

It crashes when it goes back to the frontend, after the power down of the emulator core. I'm surmissing that because the memory scanner window was closed down prior to power down it didn't close it properly when you hit power down. And it possibly does a clean up after and Bus::g_ram would be null at that time.

But I'm just guessing - it was a quick fix and didn't investigate more.

PugsyMAME avatar Aug 07 '21 21:08 PugsyMAME

May possibly be a fix for this as well:- #1662

Yes, boot and debug fixed!

image

andercard0 avatar Aug 07 '21 21:08 andercard0

@PugsyMAME Thanks for exploitation, seems good.

Nucleoprotein avatar Aug 07 '21 22:08 Nucleoprotein

I can confirm that this change fixes #1662 Thanks!

Sekai9 avatar Aug 12 '21 18:08 Sekai9

There's still a race condition here - Bus::g_ram could go null between the if and memcpy, since the system shutdown happens on the emu thread. I've held off in fixing this because the proper solutions aren't really great (make shutdown synchronous, or do the search on the emu thread, the latter is probably the least rubbish of the two).

stenzek avatar Aug 13 '21 02:08 stenzek