Hi, I think tomorrow I will be ready to release beta version of nav library. However Ocassionaly I get Exception on callstack:
Code:
Enigma.D3.dll!Enigma.ProcessMemory.ReadBytes(int address, byte[] buffer, int offset, int count) Line 82 C#
Enigma.D3.dll!Enigma.MemoryBase.ReadBytes(int address, int count) Line 77 C#
Enigma.D3.dll!Enigma.MemoryBase.Read<int>(int address) Line 41 C#
Enigma.D3.dll!Enigma.MemoryObject.Field<int>(int offset) Line 140 + 0x5e bytes C#
Enigma.D3.dll!Enigma.D3.Sno.SerializeMemoryObject.Field<int>(int offset) Line 17 + 0xf bytes C#
Enigma.D3.dll!Enigma.D3.Sno.Scene.x00_Id.get() Line 13 + 0x8 bytes C#
SnoDefinition look like this:
Code:
- sno_def {123CBBC0 SnoDefinition`1} Enigma.D3.SnoDefinition<Enigma.MemoryObject>
+ base {123CBBC0 SnoDefinition`1} Enigma.MemoryObject {Enigma.D3.SnoDefinition<Enigma.MemoryObject>}
x00_Id 0xd3840bd0 int
x04_CreationLoop 0x00000641 int
x08_SnoGroupId Scene Enigma.D3.Enums.SnoGroupId
x0C_Size 0x00004a64 int
+ x10_SnoItem {8145D2F0 MemoryObject} Enigma.MemoryObject
I use following method in SnoDefinition to convert it to Sno.Scene:
Code:
public S x10_SnoItemAs<S>() { return Dereference<S>(0x10); }
getting Sno.Scene like this:
Code:
Enigma.D3.Sno.Scene sno_scene = sno_def.x10_SnoItemAs<Enigma.D3.Sno.Scene>();
- sno_scene {8145D2F0 Scene} Enigma.D3.Sno.Scene
- base {8145D2F0 Scene} Enigma.D3.Sno.SerializeMemoryObject {Enigma.D3.Sno.Scene}
- base {8145D2F0 Scene} Enigma.MemoryObject {Enigma.D3.Sno.Scene}
_address 0x8145d2f0 int
+ _memory {Enigma.ProcessMemory} Enigma.MemoryBase {Enigma.ProcessMemory}
_snapshotOffset 0x00000000 int
Address 0x8145d2f0 int
+ Memory {Enigma.ProcessMemory} Enigma.MemoryBase {Enigma.ProcessMemory}
Snapshot null byte[]
+ Static members
_baseAddress null int?
BaseAddress 0x8145d2f0 int
+ x00_Id 'sno_scene.x00_Id' threw an exception of type 'System.ArgumentOutOfRangeException' int {System.ArgumentOutOfRangeException}
+ x00C 'sno_scene.x00C' threw an exception of type 'System.ArgumentOutOfRangeException' int {System.ArgumentOutOfRangeException}
+ x010_AABB {8145D300 AABB} Enigma.D3.Sno.Scene.AABB
+ x028_AABB {8145D318 AABB} Enigma.D3.Sno.Scene.AABB
+ x040_NavMeshDef {8145D330 NavMeshDef} Enigma.D3.Sno.Scene.NavMeshDef
+ x068_SerializeData 'sno_scene.x068_SerializeData' threw an exception of type 'System.ArgumentOutOfRangeException' Enigma.D3.Sno.SerializeData {System.ArgumentOutOfRangeException}
+ x070_Snos 'sno_scene.x070_Snos' threw an exception of type 'System.ArgumentOutOfRangeException' Enigma.D3.Sno.Sno[] {System.ArgumentOutOfRangeException}
+ x0A8_SerializeData 'sno_scene.x0A8_SerializeData' threw an exception of type 'System.ArgumentOutOfRangeException' Enigma.D3.Sno.SerializeData {System.ArgumentOutOfRangeException}
+ x0B0_Snos 'sno_scene.x0B0_Snos' threw an exception of type 'System.ArgumentOutOfRangeException' Enigma.D3.Sno.Sno[] {System.ArgumentOutOfRangeException}
...
Any idea what I'm doing wrong? I assume this specific Sno.Scene might be released as everything works 99% of the time and I get correct data from other SNOs. However in this case I have no idea how can i distinguish released released SnoDefinition from legit one. All above is from release version of Enigma.
EDIT: Why any attempt of reading from address over 0x80000000 (-214748364 is supposed to fail due to following code in ProcessMemory:
Code:
public override void ReadBytes(int address, byte[] buffer, int offset, int count)
{
if (address < 0)
throw new ArgumentOutOfRangeException("address");
...
}
EDIT 2: I guess thats why, nevermind xD
The virtual address space is divided into partitions as follows: The 2 GB partition in low memory (0x00000000 through 0x7FFFFFFF) is available to the process, and the 2 GB partition in high memory (0x80000000 through 0xFFFFFFFF) is reserved for the system.
EDIT 3: I resolved this issue by additional check
Code:
sno_def.x10_SnoItem.Address > 0