readpe icon indicating copy to clipboard operation
readpe copied to clipboard

PEREAD.EXE Does not work on Windows 10 64 bit

Open electric-socket opened this issue 4 years ago • 4 comments

is some sort of problem when running peread in that it does not work. I use SUBST to assign drive letters to directories on my computer so I don't have to use long path names. Here are the relevant assignments:

P:: => C:\lazarus\fpc\3.2.0\bin\x86_64-win64 (This is where the Pascal compiler is located) V:: => C:\Users\Paul\Documents\Programming\pev-0.80-win32 (location of PE tools)

Tried locating both on subst drives: V:>dir readpe* Volume in drive V is Windows Volume Serial Number is 09C8-AE90

Directory of V:\

01/09/2017 09:38 AM 108,224 readpe.exe 1 File(s) 108,224 bytes 0 Dir(s) 271,177,908,224 bytes free

V:>dir p:ppc* Volume in drive P is Windows Volume Serial Number is 09C8-AE90

Directory of P:\

07/07/2020 03:59 PM 3,262,464 ppcx64.exe 1 File(s) 3,262,464 bytes 0 Dir(s) 271,177,351,168 bytes free

V:>readpe.exe p:ppcx64.exe ERROR [-15]: open() failed (No such file or directory)

V:>dir C:\lazarus\fpc\3.2.0\bin\x86_64-win64\ppc* Volume in drive C is Windows Volume Serial Number is 09C8-AE90

Directory of C:\lazarus\fpc\3.2.0\bin\x86_64-win64

07/07/2020 03:59 PM 3,262,464 ppcx64.exe 1 File(s) 3,262,464 bytes 0 Dir(s) 271,180,337,152 bytes free

V:>readpe.exe C:\lazarus\fpc\3.2.0\bin\x86_64-win64\ppcx64.exe assertion "g_format != NULL" failed: file "output.c", line 242, function: output_open_document_with_name 1 [main] readpe 21540 cygwin_exception::open_stackdumpfile: Dumping stack trace to readpe.exe.stackdump

V:>

I'd say that qualifies as an error.

Paul Robinson [email protected] or [email protected] "The lessons of history teach us - if they teach us anything - that no one learns the lessons that history teaches us."

electric-socket avatar Jan 09 '21 00:01 electric-socket

Thanks for the report, Paul! We'll investigate.

merces avatar Jan 11 '21 13:01 merces

@electric-socket did you try building pev from source to check if the problem persists? I'll take a look.

jweyrich avatar Jan 12 '21 00:01 jweyrich

It is likely fixed in v0.81. I've downloaded Lazarus IDE (from where I assume this ppcx64.exe binary is from) and couldn't reproduce the problem:

C:\Users\admin\Desktop\pev-0.81-win>subst
P:\: => C:\lazarus\fpc\3.2.0\bin\x86_64-win64\

C:\Users\admin\Desktop\pev-0.81-win>readpe.exe -h dos p:\ppcx64.exe
DOS Header
    Magic number:                    0x5a4d (MZ)
    Bytes in last page:              144
    Pages in file:                   3
    Relocations:                     0
    Size of header in paragraphs:    4
    Minimum extra paragraphs:        0
    Maximum extra paragraphs:        65535
    Initial (relative) SS value:     0
    Initial SP value:                0xb8
    Initial IP value:                0
    Initial (relative) CS value:     0
    Address of relocation table:     0x40
    Overlay number:                  0
    OEM identifier:                  0
    OEM information:                 0
    PE header offset:                0x80

merces avatar Jan 12 '21 03:01 merces

I ran across assertion "g_format != NULL" failed: file "output.c", line 242, function: output_open_document_with_name the other day. This happens when it finds a pe.conf that points to a plugin folder without any output libraries. Gave me a major freakout since I thought I just released a broken version. I wanted to test my freshly installed system version from within my build directory (I have some test executables there). But I had run make clean before so the config file pointed to a directory without any plugin libraries.

I don't know if this was the error that had happened here but it seems likely since this is the same error message. Frankly I will just add the text output to the executable for the next release. That way this at least doesn't happen if no output plugin is specified.

GoGoOtaku avatar May 14 '23 20:05 GoGoOtaku