hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.43k stars 2.19k forks source link

Trying to use chat while not playing multiplayer crashes the emulator #14142

Closed NABN00B closed 3 years ago

NABN00B commented 3 years ago

What happens?

When I try to use the chat in GTA VCS singleplayer, the emulator window loses focus and soon crashes.

What should happen?

Chat should work offline as well, or the functionality should be ignored when not in multiplayer.

What hardware, operating system, and PPSSPP version?

Windows 10, PPSSPPWindows64.exe v1.11.1

anr2me commented 3 years ago

May be related to this? https://github.com/hrydgard/ppsspp/issues/14044

Btw, which GPU are you using? AMD? Is this happening on all graphics backend?

NABN00B commented 3 years ago

Maybe the cause is related or the same, but my result is different (app freezes [ie hangs] as soon as I press the chat button or invoke the feature with a bound key, a few seconds later it crashes).

See the screenshot for GPU kép

anr2me commented 3 years ago

Hmm.. sometimes i'm also getting this lost focus thing (along with a "ding" sound like a hidden popup supposed to appear) when using OpenGL backend on other games (and i'm not using the chat button), but not to the point of freeze or crash since the game can still progress, it's just that the lost focus thing can be annoying.

May be an assert occurred?

NABN00B commented 3 years ago

May be an assert occurred?

I don't understand what that means, sorry.

anr2me commented 3 years ago

Looks like this is OpenGL issue.

I tried to reproduce on 1x Window with both WLAN enabled/disabled but clicking the chat or typing some chat didn't trigger this crash and working fine. However, when i tried to maximize the Window with the maximize button on top-right while having chat Window opened, PPSSPP suddenly frozen with black frame, when i checked the Log Console i'm seeing alot of OpenGL OUT_OF_MEMORY errors, afterwards my monitor goes blank and never show anything anymore :( i ended powered off my laptop forcefully since i can't see anything.

PS: I'm debugging PPSSPP v1.11.1 directly from VS2019 for this test, but didn't trigger any exception or breakpoint.

Edit: i can't reproduce this with DebugLog.bat, may be only happened with Debugger... image

But i did get this popup when i was trying to reproduce it (but failed) without Debugger on Debug build v1.11.1 when i close down PPSSPPWindow image

@DavidTamas could you checked the Log Console from Debug drop-down menu to see whether there are any errors being logged during the freezes? or you can run the DebugLog.bat to generate a log file where it crashed, and upload the log here.

NABN00B commented 3 years ago

Looks like this is OpenGL issue.

The app hangs up for me on all 4 backends. I've noticed it only happens when I use the key assigned under control settings to open chat. I believe it is something to do with my configuration because it stopped happening when I switched to a fresh download. ppsspp.zip

anr2me commented 3 years ago

Hmm.. you're uploading your INI file in a zip, it would be helpful for the devs if you can upload the log file when it crashed. (you need to run DebugLog.bat to generate the ppsspplog.txt log file)

It seems i can't reproduce this by assigning button T on my keyboard to Open Chat (i don't have gamepad to test with), it didn't freeze or crash. Are you using a gamepad/game controller to open the chat window?

NABN00B commented 3 years ago

Here's my log. ppsspplog.zip

I thought my config file would help to reproduce it.

anr2me commented 3 years ago

Hmm.. i don't see any error near the end of the log.. is this log came after the crash?

39:13:613 idle0        D[G3D]: Common\FramebufferManagerCommon.cpp:202 Est: 04088000 V: 512x320, R: 512x320, S: 508x319, STR: 512, THR:1, Z:00000000 = 512x320
39:13:613 idle0        D[G3D]: Common\FramebufferManagerCommon.cpp:202 Est: 04088000 V: 512x320, R: 512x320, S: 513x321, STR: 512, THR:1, Z:00000000 = 512x320
39:13:614 idle0        D[G3D]: Common\FramebufferManagerCommon.cpp:202 Est: 04088000 V: 512x320, R: 512x320, S: 181x62, STR: 512, THR:1, Z:00000000 = 512x320
39:13:614 idle0        D[SCEGE]: HLE\sceGe.cpp:348 35000010=sceGeListEnQueue(04044000, 00000000, 0, 08bafad8[00000010])
39:13:614 threadmain   D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: idle0 -> threadmain (272->278, pc: 08000000->08a06e28, left interrupt) +805us
39:13:614 threadmain   D[SCEKERNEL]: HLE\sceKernelTime.cpp:132 sceKernelSysClock2USecWide(clock = 12545145, lo = 09ff6d38, hi = 09ff6d3c)
39:13:614 idle0        D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: threadmain -> idle0 (278->272, pc: 08a06e44->08000000, interrupt) +8us
39:13:614 idle0        D[CPU]: HLE\sceGe.cpp:121 Entering GE interrupt handler 08a07bb0
39:13:614 idle0        D[G3D]: GPU\GPUCommon.cpp:1202 Can't execute a list yet, still busy for 5513711 ticks
39:13:614 threadmain   D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: idle0 -> threadmain (272->278, pc: 08000000->08a06e44, left interrupt) +5us
39:13:614 mix sound th D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: threadmain -> mix sound thread (278->364, pc: 08a09c10->08aac380, audio drain) +843us
39:13:614 mix sound th D[SCEKERNEL]: HLE\sceKernelSemaphore.cpp:413 0=sceKernelWaitSema(362, 1, 0)
39:13:614 mix sound th D[SCESAS]: HLE\sceSas.cpp:321 0=__sceSasCoreWithMix(08bc5680, 08c42cc0, 435, 435)
39:13:614 threadmain   D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: mix sound thread -> threadmain (364->278, pc: 08b64318->08a09c10, sas core) +19us
39:13:614 mix sound th D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: threadmain -> mix sound thread (278->364, pc: 08a09258->08b64318, woke from sas mix) +327us
39:13:614 mix sound th D[SCEKERNEL]: HLE\sceKernelSemaphore.cpp:305 sceKernelSignalSema(362, 1) (count: 0 -> 1)
39:13:614 mix sound th D[SCEAUDIO]: HLE\sceAudio.cpp:356 512=sceAudioOutput2OutputBlocking(00008000, 08c42cc0)
39:13:614 threadmain   D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: mix sound thread -> threadmain (364->278, pc: 08aac380->08a09258, blocking audio) +61us
39:13:616 threadmain   D[SCEKERNEL]: HLE\sceKernelEventFlag.cpp:507 800201af=sceKernelPollEventFlag(335, 00000004, 00000001, 09ff6f50[00000000])
39:13:616 threadmain   D[SCEKERNEL]: HLE\sceKernelTime.cpp:132 sceKernelSysClock2USecWide(clock = 12555725, lo = 09ff6f18, hi = 09ff6f1c)
39:13:616 SysManager   D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: threadmain -> SysManager (278->279, pc: 08a070c8->08b3ad90, vblank start waited) +9323us
39:13:616 SysManager   D[SCEKERNEL]: HLE\sceKernelThread.cpp:2516 0=sceKernelDelayThreadCB(00002710): delaying 10010 usecs
39:13:616 idle0        D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: SysManager -> idle0 (279->272, pc: 08b3ad90->08000000, thread delayed) +21us
39:13:616 mix sound th D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: idle0 -> mix sound thread (272->364, pc: 08000000->08aac380, audio drain) +1857us
39:13:616 mix sound th D[SCEKERNEL]: HLE\sceKernelSemaphore.cpp:413 0=sceKernelWaitSema(362, 1, 0)
39:13:616 mix sound th D[SCESAS]: HLE\sceSas.cpp:321 0=__sceSasCoreWithMix(08bc5680, 08c434c0, 435, 435)
39:13:616 idle0        D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: mix sound thread -> idle0 (364->272, pc: 08b64318->08000000, sas core) +12us
39:13:616 mix sound th D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: idle0 -> mix sound thread (272->364, pc: 08000000->08b64318, woke from sas mix) +327us
39:13:616 mix sound th D[SCEKERNEL]: HLE\sceKernelSemaphore.cpp:305 sceKernelSignalSema(362, 1) (count: 0 -> 1)
39:13:616 mix sound th D[SCEAUDIO]: HLE\sceAudio.cpp:356 512=sceAudioOutput2OutputBlocking(00008000, 08c434c0)
39:13:616 idle0        D[SCEKERNEL]: HLE\sceKernelThread.cpp:3096 Context switch: mix sound thread -> idle0 (364->272, pc: 08aac380->08000000, blocking audio) +54us
39:13:616 idle0        D[CPU]: HLE\sceKernelInterrupt.cpp:152 Entering interrupt handler 08a079c8
39:13:616 idle0        D[FRAMEBUF]: Common\FramebufferManagerCommon.cpp:1 Displaying FBO 04178000

May be these lines were the cause? i'm not familiar with any of these

...
39:13:614 idle0        D[CPU]: HLE\sceGe.cpp:121 Entering GE interrupt handler 08a07bb0
39:13:614 idle0        D[G3D]: GPU\GPUCommon.cpp:1202 Can't execute a list yet, still busy for 5513711 ticks
...
39:13:616 idle0        D[CPU]: HLE\sceKernelInterrupt.cpp:152 Entering interrupt handler 08a079c8
...
unknownbrackets commented 3 years ago

That's just GE list management, it shouldn't cause this.

The BindTexture error means that something tried to attach a texture for drawing (including UI or game) without a framebuffer bound. I guess that could happen if you don't have FPS/DevMenu/etc. showing. Did a quick fix in #14154.

-[Unknown]

anr2me commented 3 years ago

Ah no wonder i can't reproduce it, i always have the FPS shown

NABN00B commented 3 years ago

I also always have FPS and speed counter enabled.

unknownbrackets commented 3 years ago

And it's still crashing even with #14154 merged? This isn't in libretro right?

For me, regardless of backend, trying to use chat is just like talking to a brick wall.

-[Unknown]

NABN00B commented 3 years ago

And it's still crashing even with #14154 merged? This isn't in libretro right?

Yes, it is still crashing in v1.11.2-78-g6155b265f. I'm not using libretro.

NABN00B commented 3 years ago

It stopped happening in v1.11.2-78-g6155b265f when I reset to the default settings. Must be something in my configuration that's affecting it.

anr2me commented 3 years ago

Probably you're using System native keyboard, which was fixed recently

NABN00B commented 3 years ago

Probably you're using System native keyboard, which was fixed recently

Yeah, disabling that fixes the issue even in the current stable release. I guess this can be closed then if that is already fixed. Thanks!

unknownbrackets commented 3 years ago

Okay, given the above I'm going to close this - please comment if you're still seeing issues in the latest git builds.

-[Unknown]