Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Crash when opening multiple instances of the game #218

Open
KeltonMVP opened this issue Sep 6, 2024 · 4 comments
Open

Game Crash when opening multiple instances of the game #218

KeltonMVP opened this issue Sep 6, 2024 · 4 comments

Comments

@KeltonMVP
Copy link

Hi there,

Ever since I updated to the final release of the launcher (https://github.com/openmultiplayer/launcher/releases/tag/v1.4.0) my game crashes when trying to open multiple instances.

I have tested this on samp R1 client and it works fine with that, opening multiple instances of the game without causing the already opened ones to crash.
I also retested on the previous launcher version I used (this one here https://github.com/openmultiplayer/launcher/actions/runs/9905220882 release on 10th July) and it also works fine. Tested as well with the R1 version when launching the game.

I use R1 because I have cleo and sampfuncs mods installed which I use. I also tried removing most of the mods but the issue still persists.
Please note that when testing the newest release of the launcher I tried R1 as well, so this does not seem to be an incompatibility between the samp version and the mods.

https://youtu.be/Z-yZWoUDKDw

In the above video I am testing with the previous launcher version from July. You can connect multiple instances of the game without an issue.

https://youtu.be/8MDlI2mRuMg

Here I tested the latest release of the launcher on the same server. It crashed after the 3rd instance, but usually it crashes the game at the second one in over 90% of the time. Somehow I got „lucky” here.

https://youtu.be/j709hcXvyzc

This is a retest of the old launcher from July with many more instances to show that it could open many more without any issues. I think I had 6 open there.

This is the omp-launcher.log of the July launcher:

[00:00:00.001] (607c) INFO   starting 16 workers
[00:00:00.001] (607c) INFO   Tokio runtime found; starting in existing Tokio runtime
[00:00:46.375] (6c04) WARN   NewEvents emitted without explicit RedrawEventsCleared
[00:00:46.392] (6c04) WARN   RedrawEventsCleared emitted without explicit MainEventsCleared

This is the omp-launcher.log of the latest released launcher:

[00:00:00.001] (76f8) INFO   starting 16 workers
[00:00:00.001] (76f8) INFO   Tokio runtime found; starting in existing Tokio runtime
[00:00:39.080] (1d8c) WARN   NewEvents emitted without explicit RedrawEventsCleared
[00:00:39.087] (1d8c) WARN   RedrawEventsCleared emitted without explicit MainEventsCleared

That's basically the same.

This is the game crash output when using the new launcher and the multiple instance crashes:

SA-MP 0.3.7
Exception At Address: 0x007F5A3A
Exception: 0xC0000005 - Access violation reading location 0x00000000

Possible fixed

Registers:
EAX: 0x00000000	EBX: 0x00000070	ECX: 0x00040000	EDX: 0x00000000
ESI: 0x040CBAA4	EDI: 0x00000070	EBP: 0x00000001	ESP: 0x0177FC4C
EFLAGS: 0x00210202

Backtrace:
0x007F5A3A in gta_sa.exe
0x007F5BF6 in gta_sa.exe
0x007FBBEC in gta_sa.exe
0x00705743 in gta_sa.exe
0x05083057 in audio.asi+0x3057
0x006819EE in gta_sa.exe
0x0508326E in audio.asi+0x326E

ASI plugins:
audio.asi
cleo.asi
InterfaceEditor.asi
NormalMapFix.asi
OutFitFix.asi
radarrect.asi
samp.asi
SAMPFUNCS.asi
SAMPGraphicRestore.asi
ShellFix.asi
StreamMemFix.asi
_chat.asi

SF plugins:
PSize Original.sf
PSize.sf

Cleo:
DigiInfo.cs
Fast Weapon Switch.cs
FPSUnlock.cs
infiniterun.cs
Reconnect.cs
ScreenShot_ByKrash.cs
SelfPhoto_ByKrash.cs
SensitivityFix.cs
SmoothCameraWork_Ver05.cs
Surfly - Updated.cs
Teleport.cs
Wall-Hack0.3.7.cs

Address code: 8B 08 FF 51 08
Before address code: 2E 8B 46 08 50

Stack:
+0000: 0x00000000   0x00000070   0x00000000   0x00000070
+0010: 0x007F5BF6   0x00000070   0x00C97BBC   0x00000000
+0020: 0x19842C78   0x00000002   0x00000004   0x007FBBEC
+0030: 0x0000001C   0x00000004   0x00C980E8   0x0177FCA0
+0040: 0x00C980E4   0x199F91D8   0x199F91D8   0x00000001
+0050: 0x00000000   0x00000000   0xFFFFFFFF   0x00705743
+0060: 0x00000004   0x0177FCE4   0x00000004   0x0000000B
+0070: 0x00000001   0x0000000A   0x0000000A   0x0000000C

SCM Op: 0x77E, lDbg: 0 LastRendObj: 353

Game work: 28 sec

Pos: -1423.217407 86.006683 1032.278687

Game Version: US 1.0

Memory: 264 MB
Stream memory: 40/1024 MB

Windows 10 64 bit

So I find this strange and maybe it's a launcher issue? I mean, it works with exactly the same game and mods on an older version of the launcher as well as the samp r1 client, but it crashes on the latest release. I will do some more testing and see from which version of the launcher this problem happens. Maybe it that would make it easier to spot what has changed between version and pinpoint the problem.

For those wondering why are multiple instances of the game useful, they could be used for connecting to multiple servers at once if you play on multiple servers, or in my case, very useful for testing changes to the server gamemode without having to rely on multiple other people to come help you test stuff that needs multiple accounts connected.

@KeltonMVP
Copy link
Author

So I continued testing out versions and the last one that was working is this one https://github.com/openmultiplayer/launcher/actions/runs/9931390735 from 15th July.

The next one after that https://github.com/openmultiplayer/launcher/actions/runs/10069919744 from 24th July starts causing this issue.

Seems very strange as the difference only seems to be the version number and some strip value being added.

@AmyrAhmady
Copy link
Member

What are you mods? and what happens when you try it with a clean gtasa?

@KeltonMVP
Copy link
Author

KeltonMVP commented Sep 8, 2024

By default samp unmodded doesn't allow multiprocess (multipleinstances). So when I try it with unmodded gta, nothing happens when you try opening a second game. Basically your game is already open and doesn't allow opening other sessions.

This feature of multiporcess is present in sampfuncs. It might also be present in samp addon if I am not mistaken (I also have that installed).

I did some more testing and I found out the file which is causing the issue. It's called audio.asi and I think it gets installed by samp addon, need to do some further testing to make sure that file belongs to samp addon or not. This file is placed in the main game folder.

The reason I am saying this might belong to samp addon is because I see a couple of differences with and without the file. Without it, when launching a server you get presented with the device selection pop-up, then you get connected to the server and have the regular black background when hitting escape and going to the pause menu.

image

When adding that file, the pop-up doesn't appear anymore (which I remember is a feature of samp addon to remember your resolution and stop asking you about it every time) and the pause menu is transparent (another feature specific to that multimod).

Maybe it has something to do with the resolution, I am not sure. I will make some more tests, probably reinstall samp addon and try other settings for it.

EDIT:
I did some testing with the samp addon, it appears that is the issue after all. Unfortunately no matter what option I ticked when installing it (it's an executable installer), it still crashes even if I leave the option to still display the resolution selection pop-up. So who knows what modifications it does that interfere with something in the latest release of the launcher.

@AmyrAhmady
Copy link
Member

Thanks for your research, I'll see if I can make omp file compatible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants