-
Notifications
You must be signed in to change notification settings - Fork 3
Use python3. Apply ImageBase address #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.