KhloeLeclair / WTSync

A Dalamud plugin for sharing your Wondrous Tails state with other people in your party.
0 stars 0 forks source link

WTSync says it's disconnected with an exception in the log #2

Open mraof opened 3 weeks ago

mraof commented 3 weeks ago

WTSync says it's disconnected, there's a button to re-submit my status but it's unclear if it's doing anything There are a bunch of exceptions in the dalamud log that say

2024-11-02 17:02:35.358 -04:00 [ERR] Exception during raise of Void <InvokeSafely>b__0()
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Interop.BCrypt.BCryptHash(UIntPtr hAlgorithm, Byte* pbSecret, Int32 cbSecret, Byte* pbInput, Int32 cbInput, Byte* pbOutput, Int32 cbOutput)
   at System.Security.Cryptography.HashProviderDispenser.OneShotHashProvider.HashDataUsingPseudoHandle(String hashAlgorithmId, ReadOnlySpan`1 source, ReadOnlySpan`1 key, Boolean isHmac, Span`1 destination, Int32& hashSize)
   at System.Security.Cryptography.HashProviderDispenser.OneShotHashProvider.HashData(String hashAlgorithmId, ReadOnlySpan`1 source, Span`1 destination)
   at System.Security.Cryptography.SHA256.HashData(ReadOnlySpan`1 source, Span`1 destination)
   at System.Security.Cryptography.SHA256.HashData(ReadOnlySpan`1 source)
   at System.Security.Cryptography.SHA256.HashData(Byte[] source)
   at WTSync.Helpers.ToSha256(String input) in /work/repo/Helpers.cs:line 30
   at WTSync.GameState.get_LocalPlayerId() in /work/repo/GameState.cs:line 104
   at WTSync.GameState.ReadNormalGroup() in /work/repo/GameState.cs:line 152
   at WTSync.PartyMemberTracker.OnUpdate(IFramework framework) in /work/repo/PartyMemberTracker.cs:line 48
   at Dalamud.Utility.EventHandlerExtensions.HandleInvoke(Action act) in C:\goatsoft\companysecrets\dalamud\\Utility\EventHandlerExtensions.cs:line 124
2024-11-02 17:02:35.425 -04:00 [INF] LASTEXCEPTION:eyJXaGVuIjoiMjAyNC0xMS0wMlQxNzowMjozNS40MjU1NDE0LTA0OjAwIiwiSW5mbyI6IlN5c3RlbS5BY2Nlc3NWaW9sYXRp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aERhdGEoUmVhZE9ubHlTcGFuYDEgc291cmNlKVxyXG4gICBhdCBTeXN0ZW0uU2VjdXJpdHkuQ3J5cHRvZ3JhcGh5LlNIQTI1Ni5IYXNoRGF0YShCeXRlW10gc291cmNlKVxyXG4gICBhdCBXVFN5bmMuSGVscGVycy5Ub1NoYTI1NihTdHJpbmcgaW5wdXQpIGluIC93b3JrL3JlcG8vSGVscGVycy5jczpsaW5lIDMwXHJcbiAgIGF0IFdUU3luYy5HYW1lU3RhdGUuZ2V0X0xvY2FsUGxheWVySWQoKSBpbiAvd29yay9yZXBvL0dhbWVTdGF0ZS5jczpsaW5lIDEwNFxyXG4gICBhdCBXVFN5bmMuR2FtZVN0YXRlLlJlYWROb3JtYWxHcm91cCgpIGluIC93b3JrL3JlcG8vR2FtZVN0YXRlLmNzOmxpbmUgMTUyXHJcbiAgIGF0IFdUU3luYy5QYXJ0eU1lbWJlclRyYWNrZXIuT25VcGRhdGUoSUZyYW1ld29yayBmcmFtZXdvcmspIGluIC93b3JrL3JlcG8vUGFydHlNZW1iZXJUcmFja2VyLmNzOmxpbmUgNDhcclxuICAgYXQgRGFsYW11ZC5VdGlsaXR5LkV2ZW50SGFuZGxlckV4dGVuc2lvbnMuSGFuZGxlSW52b2tlKEFjdGlvbiBhY3QpIGluIEM6XFxnb2F0c29mdFxcY29tcGFueXNlY3JldHNcXGRhbGFtdWRcXFxcVXRpbGl0eVxcRXZlbnRIYW5kbGVyRXh0ZW5zaW9ucy5jczpsaW5lIDEyNCIsIkNvbnRleHQiOiJFeGNlcHRpb24gZHVyaW5nIHJhaXNlIG9mIFwiVm9pZCA8SW52b2tlU2FmZWx5PmJfXzAoKVwiIn0=
KhloeLeclair commented 3 weeks ago

Interesting. I didn't think that could throw with how I'm using it. I'll need to ask someone who knows more about C# than me if they've got any ideas what's up there. My best guess is multithreading being wild so I could try adding a lock, but that still doesn't make sense. At worst it should compute it multiple times concurrently, wasting effort.

What operating system are you using?

mraof commented 3 weeks ago

I am on arch linux, probably should have included that detail, I was tired yesterday Using wine GE 8.26

KhloeLeclair commented 3 weeks ago

Right, that makes more sense.

This is more a bug with Wine than a bug with WTSync from what I can see. I'm calling a completely normal API in a completely normal way, and Wine's implementation of it is throwing an access violation.

That said, I'll probably release an update that switches to the older implementation of hashing for .NET that doesn't make use of bcrypt for the sake of Linux support.

No current ETA for an update, but hopefully sometime this week.

KhloeLeclair commented 2 weeks ago

Just a quick update:

I'm holding back on a release until after the patch drops since I'll need an update then regardless to update duty matching for new WT entries.