Closed RattleSN4K3 closed 7 years ago
this is what you get when you try writing to a sqlite file from two different applications. this is not a bug but instead caused by design decision.
It's not by design. It's a bug, That's what I wrote. It checks for an instance with the same window title, but the window title is changed during the loading phase. This is bug #1.
The next thing which is bugging/crashing is this:
try
//...
if Platform.TerminateIfAlreadyRunning(WindowTitle) then
Exit;
//...
DataBase := TDataBaseSystem.Create;
finally
DataBase.Destroy();
Finally section will always be called even if you exit a block. DataBase is trying to destroy itself when the pointer/instance is not existing -> AccessViolation / null pointer crash. Bug #2.
The next which can happen, but program pass the Platform.TerminateIfAlreadyRunning check, by loading the INI file and saving it. I haven't checked what the origin is, but it happened al least like 5 times (using debug or game.exe).
There are additional cases in the finally catch which result in a crash. Database is the first one which is catched by the outer Main try-catch which quits the program.
In relation: UltraStar-Deluxe/mirror@162908ecfe023e2a261ccfaa78fec8acce1a7ecd
That change does break the check for another instance (due to checking for a process with the same window title)
By running USDX twice, at least 1 crashes. (it happend by running ultrastardx.exe but haven't noticed a running process, the app was still loading in the background, started the exe again).
A basic CMD script; crashing EAAccessVoliation (UMain:277 "DataBase.Destroy":
Another fast test crashing sometimes with a INI file creation error.