Healix / Gw2Launcher

Manages and allows for multiple Guild Wars 2 clients to be launched
MIT License
179 stars 24 forks source link

GW2Launcher closing itself after auto logging into launcher? #333

Open VIERcntHOLZ opened 1 year ago

VIERcntHOLZ commented 1 year ago

Hey @Healix,

Just wanted to login getting my daily rewards using Gw2Launchers latest beta version which worked like a charm for days now and now - after some logins - gw2launcher closes, w/o error message or anything, after he started a launcher, logged in automatically and before he presses play, he closes himself?

Downloaded the latest stable version from here and it shows the same anomaly.

Its interesting that this "error" started after already successfully launching ~25 accounts before it started to occur?

Healix commented 1 year ago

Check if there's anything in the log file:

%appdata%\Gw2Launcher\Gw2Launcher.log

Check the event viewer (search the start menu) > Windows Logs > Application for any related errors at the time.

If you're using the option to hide the initial window (Settings > General > Windows), that could potentially cause Gw2Launcher to close if GW2 crashes.

barbarolucente commented 1 year ago

Gw2 fail.zip Here's my evtx Yesterday all was good, now it keeps crashing Haven't found Gw2Launcher.log anywhere

HppyDedPxl commented 1 year ago

I'll chime in as this is also happening for me right now.

Gw2Launcher seems to not be writing a log file for me, however here's the output of the EventViewer

I also do not have the hide initial window option enabled

EventViewer.log

Also to give more info, the crash for me occurs after opening the first instance, then opening the Launcher for the second instance and auto entering the login data. Gw2Launcher crashes the moment it finishes entering the login data and the play button appears.

VIERcntHOLZ commented 1 year ago

I'll once again chime in - it worked normally yesterday again, today the same behaviour shows (interestingly I am not the only one)

For me also there is no log under %appdata%\Gw2Launcher - but the event viewer shows two errors:

.NET Runtime with Anwendung: Gw2Launcher.exe Frameworkversion: v4.0.30319 Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet. Ausnahmeinformationen: System.AccessViolationException bei System.Buffer.__Memmove(Byte, Byte, UInt64) bei System.Buffer._Memmove(Byte, Byte, UInt64) bei System.Buffer.Memmove(Byte, Byte, UInt64) bei System.String.CtorCharPtrStartLength(Char*, Int32, Int32) bei System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr, Int32) bei Gw2Launcher.Client.Launcher+CoherentWatcher.GetString(Int32) bei Gw2Launcher.Client.Launcher+CoherentWatcher.GetNextEvent() bei Gw2Launcher.Client.Launcher+WindowWatcher.WaitForCoherentEvent(System.Diagnostics.Process, IntPtr, CoherentWatcher, System.Func`1) bei Gw2Launcher.Client.Launcher+WindowWatcher.WatchWindow() bei Gw2Launcher.Client.Launcher+WindowWatcher.WatchWindow2() bei System.Threading.Tasks.Task.Execute() bei System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) bei System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) bei System.Threading.Tasks.Task.ExecuteEntry(Boolean) bei System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) bei System.Threading.ThreadHelper.ThreadStart(System.Object)

and the second one is an .NET Runtime error: Name der fehlerhaften Anwendung: Gw2LauncherOld.exe, Version: 1.0.0.7254, Zeitstempel: 0x6485fc48 Name des fehlerhaften Moduls: VCRUNTIME140_CLR0400.dll, Version: 14.32.31326.0, Zeitstempel: 0xbfc4c5aa Ausnahmecode: 0xc0000005 Fehleroffset: 0x0000000000001470 ID des fehlerhaften Prozesses: 0x0x1950 Startzeit der fehlerhaften Anwendung: 0x0x1D9B1769FF886FB Pfad der fehlerhaften Anwendung: C:\Users\kguen\Desktop\Gw2LauncherOld.exe Pfad des fehlerhaften Moduls: C:\Windows\SYSTEM32\VCRUNTIME140_CLR0400.dll Berichtskennung: f8ea1d9c-5884-4ef1-b931-cf08f442dbb2 Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

(sorry for being german, tho :D)

Its funny, because two days ago, it showed the errors in the eventlog - yesterday it worked flawlessly, today, it doesnt work from the first account on.

VIERcntHOLZ commented 1 year ago

I concur with the behaviour @HppyDedPxl described (crash [...] occurs after opening the first instance, then opening the Launcher for the second instance and auto entering the login data. Gw2Launcher crashes the moment it finishes entering the login data and the play button appears.), however, if you open them "one by one", i.e. let one instance open/close after login and manually start the next one via gw2L it doesnt crash.

Edit: it now crashed after the fifth one by one launch, sadly

VIERcntHOLZ commented 1 year ago

also, on a crashed instance, the launcher doesnt seem to load properly: grafik

VIERcntHOLZ commented 1 year ago

@Healix just investigated further - to me the crash happens right after entering the login/pw and starting the login process - i.e. is not linked to just showing the Play button

barbarolucente commented 1 year ago

@VIERcntHOLZ @HppyDedPxl are you using -usecoherent argument in launch option? Removing that solved the issue for me

edit: nvm, is working even with -usecoherent

HppyDedPxl commented 1 year ago

@barbarolucente removing the launch argument seems to have fixed it for me for now as well. Considering coherent is legacy anyway perhaps this is not all that pressing an issue. But it seems to stay fixed even when re-adding the argument?

VIERcntHOLZ commented 1 year ago

I assume its also linked to GW itself - Tradingpost seems laggy/crashing occasionally + the launcher (as it is bugged above) occures even without gw2launcher involved - lets see what @Healix can say about it.

barbarolucente commented 1 year ago

@HppyDedPxl I tried to add it back cause I had too many accounts stuck with CEF, and it's working so the issue is somewhere else. And I think is gw2 side cause we all 3 had the same issue at the same time this morning, while now seems gone.

Healix commented 1 year ago

All of the logs are the same and show the problem is specific to CoherentUI, so this wouldn't be a problem with CEF. CoherentUI is apparently running out of memory, so when Gw2Launcher tries to access it, it goes beyond its available memory, causing the crash. I had no handling for this, since it shouldn't be possible.

I've updated the beta version (build 7334) to ensure it doesn't go beyond its memory limit. When this happens however, what CoherentUI is doing can no longer be detected, so wherever it was crashing is where it's going to stop trying to login, enter the authenticator or play.

VIERcntHOLZ commented 1 year ago

@Healix - thanks - working again! :)

VIERcntHOLZ commented 1 year ago

However - I still am curious - how does this error/memory leak/out of memory just start out of the sudden 3 days ago - be good for one day and starting again to appear today even for several people? It has do be related to changes ANet made to the launcher, right?

Also, in that manner - I still am running with the -usecoherent Argument - is that still needed, or does gw2launcher already support the new CEF?

Healix commented 1 year ago

However - I still am curious - how does this error/memory leak/out of memory just start out of the sudden 3 days ago - be good for one day and starting again to appear today even for several people? It has do be related to changes ANet made to the launcher, right?

CoherentUI keeps a log in shared memory of all of the requests it makes. It can store around 260 KB and normally only uses about 50 KB of it to complete the login. I use this to know exactly what CoherentUI is doing.

Judging by the screenshot with the missing latest news, I'm assuming it's related to that. It would have needed to make a lot of requests to fill up the memory. The launcher downloads a few files (news, carousel and alerts), so there's potential for something to go wrong without anything else changing if there's a problem with those files.

Also, in that manner - I still am running with the -usecoherent Argument - is that still needed, or does gw2launcher already support the new CEF?

CEF has been supported for a while.