emulation-dumper fails for MHWilds (OTB)
chetuna opened this issue · 3 comments
chetuna commented
Describe the bug
I tried to convert the il2cpp_dump.json created in REF Nightly 01032 using emulation-dumper.py, an error occurred.
Upload logs and any crash dumps
68.124025%ace.AceException
68.124402%ace.AceException.AssertException
68.124779%ace.AceGA
Traceback (most recent call last):
File "E:\desktop\REFramework-master\reversing\rsz\emulation-dumper.py", line 284, in hook_code
dis = next(cs.disasm(emu.mem_read(address, size), address, 1))
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\unicorn\unicorn.py", line 462, in mem_read
raise UcError(status)
unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)
EXCEPTION 0x140024F60
after any inputs:
Traceback (most recent call last):
File "E:\desktop\REFramework-master\reversing\rsz\emulation-dumper.py", line 883, in <module>
fire.Fire(main)
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\fire\core.py", line 143, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\fire\core.py", line 477, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\fire\core.py", line 693, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "E:\desktop\REFramework-master\reversing\rsz\emulation-dumper.py", line 856, in main
struct_layout = detect_members_chain(struct_name, chains[struct_name]["deserializer_chain"])
File "E:\desktop\REFramework-master\reversing\rsz\emulation-dumper.py", line 799, in detect_members_chain
"layout": detect_members(int(entry["address"], 16))
File "E:\desktop\REFramework-master\reversing\rsz\emulation-dumper.py", line 770, in detect_members
emu.emu_start(meta_frame["start"], deserializer_start + 0x10000)
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\unicorn\unicorn.py", line 344, in emu_start
raise self._hook_exception
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\unicorn\unicorn.py", line 212, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\site-packages\unicorn\unicorn.py", line 507, in _hookcode_cb
cb(self, address, size, data)
File "E:\desktop\REFramework-master\reversing\rsz\emulation-dumper.py", line 414, in hook_code
if dis.mnemonic != "ret":
UnboundLocalError: local variable 'dis' referenced before assignment
Identify the REFramework version
REF Nightly 01032
Additional context
OS: Windows10 (Japanese)
Python: 3.8.10
I have attached the JSON data for ace.AceGA where the error occurs.
ace.AceGA.json
praydog commented
Working on it. Lots of inlined functions which is causing some massive problems with the dumper, but I can still work around it.
chetuna commented
Understood. I will wait.
Thanks for the big project release and update.
praydog commented
Fixed