PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.3k stars 1.58k forks source link

Outbreak freezing when playing online #520

Closed scrubbrush closed 9 years ago

scrubbrush commented 9 years ago

The people over at http://obsrv.org/ have revived the server for RE:Outbreak, but when trying to play online via PCSX2 using gigherz's dev9 plugin, the game will unpredictably freeze after playing for a certain amount of time. This happens for the entire community when playing via an emulator and there is no known solution.

Are there any plans to update the dev9 plugin? I have heard gigaherz is still developing PCSX2. the entire Outbreak community would be grateful if a fix was found.

bositman commented 9 years ago

I thought this was fixed back then: https://github.com/PCSX2/pcsx2/issues/439 Meaning if you use any build after January 30 it should be fixed in the dev9 plugin

scrubbrush commented 9 years ago

Unfortunately if you ask anyone playing via emulator on the Outbreak forums or in the chat: obsrv.org | http://obsrv.org/viewforum.php?f=13

You'll find that the freezing is still an issue for everyone playing via an emulator, even when using the latest version of Gigaherz's dev9 plugin. I myself have tested multiple versions of the plugin (including the most up to date version) and the freezing is sadly still an issue.

The only counter measure the community has found thus far is to use a "TAP" method to connect which is said to reduce but not stop the freezing issue. Some say it doesn't make a difference. If you need further details you can ask in the chat or the forum on the obsrv website.

If you found a fix for this issue it'd make you a god among men. :D

scrubbrush commented 9 years ago

Just for the sake of demonstration, I tested the plugin that you linked. 5 mins into a game I crashed: http://oi59.tinypic.com/2rc1nxv.jpg

And the emu log was as follows: http://pastebin.com/5ca6SWjc

bositman commented 9 years ago

Does it freeze right after this message is displayed? rDMA @TheLastRar Could you take a look at it?

TheLastRar commented 9 years ago

@scrubbrush Can you also test a GIT build of PCSX2 as-well?

scrubbrush commented 9 years ago

No. I believe it froze somewhere around line 1106 I think. But when the game freezes it continues to repeat the message " * pcap io: Sending 64 byte packet." over and over while the game is frozen. I think after the game has been frozen for a while rDMA comes up. But every time I've crashed it has always been stuck on sending 64 byte packets in every instance.

In this particular instance I let the game stay frozen for a couple of minutes before closing down the emulator.

And I'll take up your advice and try a github version of PCSX2, I assume It'd be the latest version on here, I'll also see if I can record the emulator in real time so you can see at what point exactly the emu crashes.

bositman commented 9 years ago

Yeah you can grab it here: http://buildbot.orphis.net/pcsx2/index.php

scrubbrush commented 9 years ago

I'm getting a very strange but unrelated issue when trying to play online with the newer build of PCSX2, when I try to enter my username on the login screen it immediately starts loading a new page and comes up with this error: http://oi62.tinypic.com/3163l84.jpg

With "Hoxton" being my username. Very strange, I don't get this in the older version of PCSX2. I normally use "pcsx2-1.2.1-r5875" and I'm trying to use"pcsx2-v1.3.1-244-g6d31124-windows-x86"

If you want I can just do a log of another version...

Edit: Never mind I fixed it somehow, I don't know how. I'll try and get this recorded for you.

scrubbrush commented 9 years ago

@TheLastRar @bositman As requested I have retrieved a crash log from the latest build of PCSX2 and I have also recorded a video with the emu log visible.

Crash log: http://pastebin.com/BZRSUK7Z Video: https://mega.nz/#!2ZgzwILZ!_MZ8Xa4kEuGjpy_3PWGjoxlp6GNIknRJMrUcC7oMMtA

Couldn't upload to youtube due to the file size, but you should still be able to dl it fairly quickly.

TheLastRar commented 9 years ago

Do you also have a packet.log file?

scrubbrush commented 9 years ago

I'm not sure how to get a packet log.

TheLastRar commented 9 years ago

is it not in D:\The Matrix\newemu\pcsx2-v1.3.1-244-g6d31124-windows-x86\pcsx2-v1.3.1-244-g6d31124-windows-x86\logs?

PCSX2 might not always create it,

Edit, It might just appear as "packet"

scrubbrush commented 9 years ago

You were right: https://mega.co.nz/#!eQA1DSza!bxTnBXTy5De8_oo8dxIgmj1hT5CIzOtOSP4CUBFivDM

I'll also see if the community can share any of their logs aswell.

TheLastRar commented 9 years ago

Looking at the packet logs, the game continuous to acknowledge receiving data from the server (that's the " * pcap io: Sending 64 byte packet." message spam)

The game seems to stop sending actual data around the same time the game freezes.

I can't see any obvious hint in the packet log indicating what's wrong.

scrubbrush commented 9 years ago

The game does not freeze in single player. And the game seems to freeze unpredictably. Rarely it freezes in the menu, but often it will freeze either at random ingame or on the loading screen for a new room.

People playing on a console do not get the freezing glitch, but occasionally an emulator user can cause a console user to crash.

If you need any other crash related stuff let me know.

scrubbrush commented 9 years ago

Got another crash log: https://mega.nz/#!CMZWTa7b!AEob1Pp1lgOkthlAICqMKXTmEb0B66Tqg_ymk7ovK-o https://mega.nz/#!CMox1KRA!_olxZ45nAPezt2vS7zsUuniHF52QC9XYK-1RvGZrXno

This time it decided to crash on a cutscene.

TheLastRar commented 9 years ago

Looking though both logs; Every packet I can read from the log is valid, and, looking at the TCP headers sent, accounted for.

There are some cases where a transmitted packet and send packet are written to the log at the same time, producing something like this

PACKET SEND: 64 BYTES
3c 81 d8 3f 1d e0 76 6d 61 63 30 31 08 00 45 00PACKET RECV: 60 BYTES
76 6d 61 63
00 28 1e 36 00 00 78 06 06 c8 c0 a8 01 30 31 3c 81 d8 3f 1d e0 08 00 45  4d00
00  51 07
0a d6 05 45 21 8e 02 59 ca 28 97 97 40 00 31 06 94 66 51 07 0a d6 c0 a8
01 4d 21 8e 05 45 91 d2 91 3b e8 b7 50 10
3b e8 b720 00 04 10 00 00 02 59 ca d2 50 40 41 3c 10 02 00 04 3c 10
a3 50 80 bf 00 00 00 00 00 00 00 00 
 d6 93

@bositman The plugin code mentions doing things that aren't thread safe

//decrease frame count -- this is not thread safe
dev9Ru8(SMAP_R_TXFIFO_FRAME_CNT)--;
_DEV9irq(SMAP_INTR_RXEND,0);//now ? or when the fifo is full ? i guess now atm
//note that this _is_ wrong since the IOP interrupt system is not thread safe.. but nothing i can do about that

I don't know what effect this has when two threads alter these values at the same time.

I also don't see where SMAP_R_TXFIFO_FRAME_CNT is accessed by more then one thread, unless the write8/16/32 functions can be called by different threads.

The RXFIFO frame counter is accessed by more then one thread, yet no mention of thread safety about it.

scrubbrush commented 9 years ago

I'm not sure if this info is useful at all but, consoles users do not crash. However as I've stated earlier the community has said that when an emulator user crashes, it can also cause others to crash aswell. One person I know in particular said that this happened to him, and the symptoms he described were the same as the crashes emulator users get, suddenly freezing up.

TheLastRar commented 9 years ago

Does this issue occur when all the players in the game use PCSX2? or has it only happened when emu players play with PS2 players?

TheLastRar commented 9 years ago

"Rarely it freezes in the menu" What kind of menu did it freeze at?

scrubbrush commented 9 years ago

Well I'm not a console user yet so I can't give you further details but from what I've heard, the only time consoles crash is occasionally when an emulator user crashes. IE if consoles play with consoles there's no issues, but if a console player plays with an emulator player, on a rare occasion the emulator user might cause the console player to crash aswell. These are only things I have heard from other people and I haven't tested this out myself properly. So take that info with a grain of salt. One thing is certain though, that is a game with purely console players will not crash.

When I'm in the online menu, that is after logging into the server. I can usually leave the game running for hours without any issue. But on a rare occasion I've had the game suddenly freeze in the menu. The menu it froze at was when I entered the "West Town " lobby. It's the menu that lists all the player lobbies. I've only crashed on there a couple of times, but I mainly crash when I am actually ingame.

I'm not entirely sure if PCSX2 user can cause other PCSX2 users to crash. It seems logical to assume so. But when I've played with a friend, it has always been one of us that freezes up, I can't recall a time where we both froze at once. When I've played with pubs, there's been times where I've froze and then seen other players disappear from the same game around the time I crashed, but that may not necessarily be down to simultaneous crashes. I've also played with emulator users and have crashed, but not caused them to crash. So the chain crash doesn't seem to happen 100% of the time.

The most common time that I've crashed, and this could be down to just pure luck is when I enter a door and start loading a new room. I get frozen on the loading screen and I am stuck listening to the heartbeat sound effect.

scrubbrush commented 9 years ago

I should clarify, I haven't personally experienced the multiple freeze issue. But many people on OBSRV have reported it happening.

I dug up some old threads on obsrv, and some reported emulator users causing other emu users to chain crash.

TheLastRar commented 9 years ago

Can you try this plugin? http://www.mediafire.com/download/vzl2ls40265jrwg/DEV9ghzdrk-fixedmaybe.7z

scrubbrush commented 9 years ago

I'll try it out tomorrow and let you know the results.

scrubbrush commented 9 years ago

@TheLastRar I tried the new plugin. Unfortunately it is way too unstable. The game takes ages to connect. When I tried to join any games, I would instantly desync from the other players because it was taking too long to load. I've seen the same problem occur when someone has downloads running in the background interfering with the connection. I was frequently getting the disconnect screen.

One other thing. The game froze in the lobby menu when trying out this plugin. But this was before I was properly testing it and I had a youtube video open in the background. Unfortunately I forgot to grab a log of this.

I did grab a log of me desyncing when trying to join a game: https://mega.co.nz/#!jMZxBYCL!OLafPcrOQ-zsT1NCYnrl2djJThf-KRbRkeIyHuqjEYs

When I returned to the standard version of the dev9 plugin, the connection returned to normal.

TheLastRar commented 9 years ago

Was afraid that would happen, I'll try to see if I can produce a more stable version.

TheLastRar commented 9 years ago

Can you try this plugin + PCSX2 build?

http://www.mediafire.com/download/vd029s903hcccif/PCSX2-Dev9.7z

scrubbrush commented 9 years ago

Ok so I've been trying the new build for the past 2 days and haven't crashed yet, which is very rare. However I'm gonna need to test it more to make sure I'm not just getting lucky.

I'll come back in a few more days or if I crash again and let you know the results.

scrubbrush commented 9 years ago

I've been testing this latest build every day and amazingly I have experienced no crashes at all. I'm going to share this with the community and see if any of them experience freezes. I'll keep you up to date.

TheLastRar commented 9 years ago

OK

Ezzz-dev commented 9 years ago

Hello, trying to use the above linked files and Dev9 I can't seem to be able to get them to work. PSX2 won't let me select DEV9 plugin to the one linked, and it will show this error on the log:

[wx] Failed to load shared library 'C:\Users\Alejandro\Desktop\pcsx2-v1.3.1-244-g6d31124-windows-x86\plugins\DEV9ghzdrk-2.dll' (error 126: the specified module could not be found.) Path: C:\Users\Alejandro\Desktop\pcsx2-v1.3.1-244-g6d31124-windows-x86\plugins\DEV9ghzdrk-2.dll File is not a valid dynamic library.

bositman commented 9 years ago

You need to have winpcap installed.

bositman commented 9 years ago

@scrubbrush Still stable I guess? I've submitted a build with PR #541 to our testing team so we can check if it breaks any other online games, else we should merge. If you guys can also test other online games, we'd appreciate it. Here's a link with the pcsx2.exe and dev9 plugin from that PR: http://bositman.pcsx2.net/pcsx2_online_branch.rar

scrubbrush commented 9 years ago

Yes I've had no reports of crashing yet from anyone and I haven't crashed myself at all. The only issue I've had is that on a rare occasion I might get massive lag for about 8 seconds then it goes away. That said I've only been able to get solid feedback from a handful of people.

I would test other online games but unfortunately Outbreak is the only one I have.

TheLastRar commented 9 years ago

@scrubbrush FPS lag or network lag? (and did you get it before this version of the plugin?)

has anybody else gotten a similar issue?

scrubbrush commented 9 years ago

The fps will occasionally drop to like 3 fps for a couple of seconds. But it doesn't happen often and it doesn't last long.

And I think it could be exclusive to this version. Before I'd just freeze before I got the chance so I couldn't tell you. It's only a minor issue really.

Isles487 commented 9 years ago

Hey everyone- I'm one of the administrators over at obsrv.org. Thanks for taking the time to attempt to fix this. To add to scrubbrush's comments, a few other users have reported successful results. I will be testing this as well and report back!

scrubbrush commented 9 years ago

Yes there's multiple reports from various users that the freezing has stopped.

Isles487 commented 9 years ago

I used your modified plugin for several games on Outbreak: File 2- no freezing to report!

bositman commented 9 years ago

@Isles487 What about the frame drops @scrubbrush mentioned, have you experienced anything like that?

Isles487 commented 9 years ago

@bositman, I've not experienced any severe (or even significant) FPS drops. @scrubbrush, how long do the drops last? Because frame rate stays relatively consistent throughout for me.

scrubbrush commented 9 years ago

Like a couple of seconds, but it doesn't happen often enough to be a hindrance.

Isles487 commented 9 years ago

No "freezing" yet, but I did suffer a crash just now:

pcsx2-2.exe has stopped working: Problem signature: Problem Event Name: BEX Application Name: pcsx2-2.exe Application Version: 0.0.0.0 Application Timestamp: 555075b7 Fault Module Name: XAudio2_7.dll_unloaded Fault Module Version: 9.29.1962.0 Fault Module Timestamp: 4c0641e5 Exception Offset: 0003a5e0 Exception Code: c0000005 Exception Data: 00000008 OS Version: 6.3.9600.2.0.0.768.101 Locale ID: 1033 Additional Information 1: 5861 Additional Information 2: 5861822e1919d7c014bbb064c64908b2 Additional Information 3: a10f Additional Information 4: a10ff7d2bb2516fdc753f9c34fc3b069

Emulog: http://pastebin.com/xupsShh9

There wasn't a packet log in the logs folder. I couldn't save any additional logs since the program forced a close.

A user reported to me yesterday that the game "froze," but they weren't aware of the importance of the logs. Is there a way to know if/when the packet logs will be present in the log folder?

scrubbrush commented 9 years ago

@TheLastRar People on the forum are requesting a version of the fix which supports multiple players on the same connection, do you think you could help them out?

TheLastRar commented 9 years ago

@Isles487 That crash seems more a problem with the SPU plugin than anything else, given the Fault Module Name @bositman what do you think?

You mentioned a freeze report, is that user tekknobabblr? he has elaborated on the freeze issue, it sounds like a slightly different issue is occurring there.

The packet logs are only created when using winPcap and get overwritten the next time PCSX2 is started (I think)

@scrubbrush I've created https://github.com/PCSX2/pcsx2/issues/552, ref said that they are going to look into it.

bositman commented 9 years ago

@Isles487 @TheLastRar Yes that does seem like an xaudio issue of SPU2-X, try using portaudio as module in SPU2-X and it shouldn't happen again

scrubbrush commented 9 years ago

@TheLastRar People tried changing the mac address in the plugin I think using a hex editor, but it is causing freezes when they do it like that.

Isles487 commented 9 years ago

@TheLastRar I talked to the user about the problem, and the user described a freeze at one of the in-game "now loading" screens while online. Unfortunately the user did not have logs.

TheLastRar commented 9 years ago

@Isles487 Hmmm... I don't know then. How often is that user getting the issue? or was it just once?

Poking around on http://obsrv.org/, there seems to be a user that is suffering from a "ghost player" issue as well.

I think have an idea on how to fix this, give me a moment to produce an updated build.

TheLastRar commented 9 years ago

Hopefully this build improves things http://www.mediafire.com/download/x7gn63dtzs5qwc1/pcsx2_online_build4.7z