Skip to content

Commit

Permalink
fix: add logs to try and debug the issue
Browse files Browse the repository at this point in the history
It's hard to debug locally because it doesn't happen and my machine's architecture is different
  • Loading branch information
LSViana committed Dec 3, 2023
1 parent db0167c commit f4e6069
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions YDotNet/Infrastructure/MemoryReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ internal static byte[] ReadBytes(nint handle, uint length)
{
var data = new byte[length];

Console.WriteLine($"(1) Data: {data == null} | {data.Length} | Handle={handle} | Length={length}");

Marshal.Copy(handle, data, startIndex: 0, (int) length);

Console.WriteLine("(2) Copied to data");

return data;
}

Expand Down
3 changes: 3 additions & 0 deletions YDotNet/Native/UndoManager/Events/UndoEventNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ internal struct UndoEventNative
return null;
}

Console.WriteLine($"OriginHandle: {OriginHandle}");
Console.WriteLine($"OriginLength: {OriginLength}");

return MemoryReader.ReadBytes(OriginHandle, OriginLength);
}
}

0 comments on commit f4e6069

Please sign in to comment.