haxifix / PlugY

PlugY updated to Diablo II v1.14d
GNU General Public License v3.0
110 stars 20 forks source link

Joining a peer-to-peer multiplayer game crashes the game #2

Open Salvoxia opened 4 years ago

Salvoxia commented 4 years ago

Hi,

I was very excited to see a 1.14d compatible PlugY version, thanks for that! However, I encountered a problem when trying to join a peer-to-peer mulitplayer game. Hosting a game works fine, but when trying to join, the "progress bar" in the loading screen always fills up completely, then the game crashes. I attached the crash log and minidump file here: 2020-05-31 15.41.11.zip

Hope you can help :)

Best Regards, Salvoxia

purpley commented 4 years ago

Turning off shared stash and multiple stash pages makes connecting possible, but opening the character stat screen causes the connecting player to crash.

SnithTV commented 4 years ago

Experiencing the same issue. The host's game crashes as soon as a player finishes loading in and the joining player never enters the world. I haven't attempted purpley's temporary "solution" yet, but would be eternally grateful if someone could come up with a complete fix.

shiningdracon commented 4 years ago

Did some investigation myself.

Game crashed at InfinityStash.cpp:121 in the getStash() function. Stash* ptStash = isShared ? PCPY->sharedStash : PCPY->selfStash;

I added some debug logs, it shows the first parameter (ptChar) passed in getStash() is a null pointer.

The ptChar is returned by D2GetClientPlayer(), which reference to a global variable.

It seems that the address of this variable is different between a single player game and a joining game.

alikhan866 commented 4 years ago

@shiningdracon can you please fix this issue ? i would really love big chests :P

skylight102 commented 4 years ago

You can have the extended stash working.

And also you can have plugy on tcp with 1.13c.

Just ensure that everyone’s files match perfectly

On 6 Oct 2020, at 05:21, Ali Khan notifications@github.com wrote:



@shiningdraconhttps://github.com/shiningdracon can you please fix this issue ? i would really love big chests :P

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/haxifix/PlugY/issues/2#issuecomment-704018174, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWP375QCHEFNGLZSIET3SJKLL5ANCNFSM4NPFKZBA.

alikhan866 commented 4 years ago

@skylight102 but i am using 1.14d .. i have like level 54 necro cant start a new game on 1.13c unfortunately :(

skylight102 commented 4 years ago

With Diablo sometimes you just have to bite the bullet. :p

Also I wonder if it’s possible to transfer characters from 1.14 to 1.13 anyway?

On 6 Oct 2020, at 16:57, Ali Khan notifications@github.com wrote:



@skylight102https://github.com/skylight102 but i am using 1.14d .. i have like level 54 necro cant start a new game on 1.13c unfortunately :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/haxifix/PlugY/issues/2#issuecomment-704378577, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZRWP7AMSZ3LCECC7ZBYJLSJM45RANCNFSM4NPFKZBA.

anzz1 commented 3 years ago

maybe the offset for the D2GetClientPlayer() is simply wrong. in Commons/D2Funcs.h D2GetClientPlayer() is mentioned with offset 6FB283D0 with D2Client.dll as base. D2Client among other dlls do not even exist in 1.14 anymore, but the functions are integrated in Game.exe with a different offset. in this case D2GetClientPlayer() = offset 00463DD0

see pic below for D2GetClientPlayer() function in 1.10 D2Client.dll vs 1.14d Game.exe

kuva

anzz1 commented 3 years ago

or @shiningdracon do you mean that blizzard's implementation of D2GetClientPlayer() is wrong and even calling it correctly will result in a null pointer being returned when joining a game?

ghost commented 3 years ago

@anzz1 Thanks for pointing this out. I fixed this and now multiplayer works.

ChaosMarc commented 3 years ago

Now fixed on https://github.com/ChaosMarc/PlugY. @markm11 Thank you very much. I will create a new release with a precompiled binary very soon

Kupoman commented 3 years ago

@ChaosMarc Any ETA on that release? I do not currently have a Windows development environment set up to build those Visual Studio project files.

milkmanmatty commented 3 years ago

@ChaosMarc doesn't look to be any updates on your repo. I'm looking forward to the updated binaries, will they be arriving in this new year? :D

ChaosMarc commented 3 years ago

Hey guys, sorry for the radio silence. I'm waiting for Yohann to release the new official PlugY Release with some very cool new features and all changes from both this and my repository. It should be releases in the very next few days. After the official release I will create a new github release as well.

ChaosMarc commented 3 years ago

v14.00 is out: https://github.com/ChaosMarc/PlugY/releases/tag/v14.00