Use python3. Apply ImageBase address - #2
Conversation
|
I tested it with engine 714, and this infolog (that is known to crash in Barb), and I got an empty translation, even for engine symbols. https://logs.springrts.com/logfiles/7471/ Result of translation:
|
|
How did you test without xmlrpc? As i tested with it. |
|
It works with fixed Win64 crash-handler. 105.1.1-714-ge909643 doesn't provide exe load address beyond-all-reason/RecoilEngine@925e1ed Local test without xmlrpc: |
|
For DLLs infolog stores only offsets from ImageBase, thus it's safe to assume that it will never be > low 32bit (4GB dll won't happen soon). |
| pe = pefile.PE(name=tempfile.name, fast_load=True) | ||
| image_base = pe.OPTIONAL_HEADER.ImageBase | ||
| load_base = 0 if module.endswith('.dll') else EXEBASE | ||
| return [hex(int(x, 16) - load_base + image_base) for x in addresses] |
There was a problem hiding this comment.
return [hex(int(x, 16) & 0xFFFFFFFF - load_base + image_base) for x in addresses]
could work for current broken crashhandler, but it would be unexplained hax. Also exe in this case would require different treatment
|
Ok, thanks dude, ill deploy once we update engine :) |
|
This can be useful, as parsing some infolog crashed: But i don't know why |
|
So, it's time to apply this PR. First line after spring passes control to AI from rts/ExternalAI/SkirmishAIHandler.h should be https://github.com/rlcevg/CircuitAI/blob/49b99e9cc5617ea985bd35facccde0816d60c384/src/AIExport.cpp#L75: |
|
Ok, bumping priority on this |
Warning:
stacktrace_translator.pybecame python3.Added to ignore local virtualenv files.
pip install -r requirements.txtinstalls requirements (onlypefileand its dependency so far).EXEBASE is unfortunately global, as required only once for
spring.exemodule.Running as XMLRPC server was not tested.