DOOMSaveManager icon indicating copy to clipboard operation
DOOMSaveManager copied to clipboard

mac check in GCM failed

Open alllexx88 opened this issue 3 years ago • 6 comments

Hi, I'm getting a mac check in GCM failed error when trying to export saves from Steam version of the game (which includes the DLC saves, if it matters). Here's the debug log from the currently latest 1.3.0.5 version (I also tried older 1.3.0.3-1.3.0.4 versions with similar results):

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Org.BouncyCastle.Crypto.InvalidCipherTextException: mac check in GCM failed
   at Org.BouncyCastle.Crypto.Modes.GcmBlockCipher.DoFinal(Byte[] output, Int32 outOff)
   at DOOMSaveManager.Crypto.DecryptAndVerify(String aad, Byte[] data)
   at DOOMSaveManager.DoomEternalSavePath.Compress(String filename)
   at DOOMSaveManager.Form1.actionOkBtn_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
DOOM Save Manager
    Assembly Version: 1.3.0.5
    Win32 Version: 1.3.0.5
    CodeBase: file:///D:/Games/DOOMSaveManager%201.3.0.5/DOOM%20Save%20Manager.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4320.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version: 1.2.0.246
    Win32 Version: 1.2.0.246
    CodeBase: file:///D:/Games/DOOMSaveManager%201.3.0.5/ICSharpCode.SharpZipLib.DLL
----------------------------------------
BouncyCastle.Crypto
    Assembly Version: 1.8.5.0
    Win32 Version: 1.8.19031.1
    CodeBase: file:///D:/Games/DOOMSaveManager%201.3.0.5/BouncyCastle.Crypto.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

TIA, Alex

P.S. Seems to be the same as #11

alllexx88 avatar Mar 02 '21 11:03 alllexx88

Is there by any chance any file in your saves folder that shouldn't be there? I accidentally put idCrypt.exe on it which caused the error, since it tries to decrypt all files.

brunoanc avatar Mar 16 '21 21:03 brunoanc

@PowerBall253 Thank you for your reply! Here's the list of all files in the saves dir:

$ find -type f
./999203116
./remote/DLC1-AUTOSAVE3/game.details
./remote/DLC1-AUTOSAVE3/game.details-BACKUP
./remote/DLC1-AUTOSAVE3/game_duration.dat
./remote/DLC1-AUTOSAVE3/game_duration.dat-BACKUP
./remote/GAME-AUTOSAVE0/game.details
./remote/GAME-AUTOSAVE0/game.details-BACKUP
./remote/GAME-AUTOSAVE0/game_duration.dat
./remote/GAME-AUTOSAVE0/game_duration.dat-BACKUP
./remote/game_duration.dat
./remote/PROFILE/profile.bin
./remotecache.vdf

Only saves written by the game, nothing excessive.

alllexx88 avatar Mar 17 '21 10:03 alllexx88

@alllexx88 isn't that a bash command? have you, in any way, modified any of the files?

brunoanc avatar Mar 17 '21 12:03 brunoanc

@PowerBall253 It's Git bash, part of Git GUI for Windows distribution. No, I haven't modified any of the files, and the saves are fully functional.

alllexx88 avatar Mar 19 '21 10:03 alllexx88

If I had a copy of the game I would look into it.

GoobyCorp avatar Mar 20 '21 23:03 GoobyCorp

I think it's because of the DLC saves. I deleted the DLC Saves and got no more GCM error.

Hansukie avatar Nov 16 '21 12:11 Hansukie