Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-08

FP.exe error in x86_64-Win64

11 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

James Richters

I’m trying to use FPC3.0.4 for x86_64-win64.

I built it with: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.6.2x - fpcupdeluxe-x86_64-win64.exe

I am trying to use the Text IDE using the same FP.CFG FP.INI and FP.DSK that worked with the i368-win32 version…

When I try to compile a program I Instantly get:

Program generated a RTE 217

at address $0000000000000000.

Save your sources and restart the IDE.

I am able to compile my project on the command line with:

"..\..\FPC\3.0.4-x86_64-Win64\Bin\x86_64-win64\FPC" -Fi..\..\FPC\3.0.4-x86_64-Win64\units\$fpctarget\* -Fu..\..\FPC\3.0.4-x86_64-Win64\units\$fpctarget\* -Fu. -FU. -FE. Promill.pas

I tried deleting FP.DSK and still get the same thing. I’ve tried several programs, even

writeln('Hello World!');

causes this error

Any ideas why this is bombing immediately or what this error even means?

James

Reply by email

Pierre Muller
to James Richters

Hi,

Le 07/08/2019 à 13:17, James Richters a écrit :

Show quoted text 17 lines
I’m trying to use FPC3.0.4 for x86_64-win64.  I built it with: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.6.2x   -  fpcupdeluxe-x86_64-win64.exe   I am trying to use the Text IDE using the same FP.CFG FP.INI and FP.DSK that worked with the i368-win32 version… When I try to compile a program I Instantly get:          Program generated a RTE 217           at address $0000000000000000.     Save your sources and restart the IDE.

The problem is that the DSK file is a binary file
which has a format that makes it impossible to use the same file on different targets.
the win64 IDE will assume that some fields have a length of 8 bytes, while the win32 IDE saved those fields using a 4 byte slot.

This leads to complete incompatibility between win32 and win64 IDE.

Try to rename the win64 IDE to something like fp64.exe

In that case, IIRC, the executable should look for fp64.cfg, fp64.ini and fp64.dsk and avoid the problem above.

Could you please tell us if this solution works, because I am not 100% sure anymore this is the solution...

Pierre

Reply by email

James Richters
to Pierre Muller

I deleted all files that start with FP so it would have to make new ones and tried to compile: Writeln('Hello World!');
And it did not work.. it has the exact same error.

James

Earlier message 39 lines
-----Original Message----- Hi, Le 07/08/2019 à 13:17, James Richters a écrit : > I’m trying to use FPC3.0.4 for x86_64-win64. > > I built it with: > https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.6.2x > - fpcupdeluxe-x86_64-win64.exe > > > > I am trying to use the Text IDE using the same FP.CFG FP.INI and > FP.DSK that worked with the i368-win32 version… > > When I try to compile a program I Instantly get: > > > > Program generated a RTE 217 > > at address $0000000000000000. > > Save your sources and restart the IDE. The problem is that the DSK file is a binary file which has a format that makes it impossible to use the same file on different targets. the win64 IDE will assume that some fields have a length of 8 bytes, while the win32 IDE saved those fields using a 4 byte slot. This leads to complete incompatibility between win32 and win64 IDE. Try to rename the win64 IDE to something like fp64.exe In that case, IIRC, the executable should look for fp64.cfg, fp64.ini and fp64.dsk and avoid the problem above. Could you please tell us if this solution works, because I am not 100% sure anymore this is the solution... Pierre

Reply by email

Pierre Muller
to James Richters

I misunderstood your previous problem,
it only crashes when you try to compile the
source, not at startup...

Did you ever try to debug a program on Win64?

Now is the time to try:
you will need a win64 GDB
and recompile the IDE using -gw option.

The important GDB option here is
set win32 new-console on

This will create a new Console when you start the IDE.

As it seems that the IDE generated an access-violation, you should directly see that in the GDB console and be able to get a back-trace (udsing GDB 'bt' command)
which would help to understand where the problem is coming from.

Pierre

Le 07/08/2019 à 13:59, James Richters a écrit :

Show quoted text 51 lines
I deleted all files that start with FP so it would have to make new ones and tried to compile: Writeln('Hello World!'); And it did not work.. it has the exact same error. James -----Original Message----- Hi, Le 07/08/2019 à 13:17, James Richters a écrit : > I’m trying to use FPC3.0.4 for x86_64-win64. > > I built it with: > https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.6.2x > - fpcupdeluxe-x86_64-win64.exe > > > > I am trying to use the Text IDE using the same FP.CFG FP.INI and > FP.DSK that worked with the i368-win32 version… > > When I try to compile a program I Instantly get: > > > > Program generated a RTE 217 > > at address $0000000000000000. > > Save your sources and restart the IDE. The problem is that the DSK file is a binary file which has a format that makes it impossible to use the same file on different targets. the win64 IDE will assume that some fields have a length of 8 bytes, while the win32 IDE saved those fields using a 4 byte slot. This leads to complete incompatibility between win32 and win64 IDE. Try to rename the win64 IDE to something like fp64.exe In that case, IIRC, the executable should look for fp64.cfg, fp64.ini and fp64.dsk and avoid the problem above. Could you please tell us if this solution works, because I am not 100% sure anymore this is the solution... Pierre _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

James Richters
to Pierre Muller

That is correct, it starts up fine, I can use the pull down menus.. but it gives me the error as soon as I try to compile anything.

What is the proper way to recompile the IDE? I didn't compile it to start off with, I used FPCupDeluxe from https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.6.2x to compile the x86_64-Win64 package

I don't know what a win64 GDB is either. Can you point me in the right direction?

James

Earlier message 80 lines
-----Original Message----- From: fpc-pascal On Behalf Of Pierre Muller Sent: Wednesday, August 7, 2019 8:07 AM To: Subject: Re: [fpc-pascal] FP.exe error in x86_64-Win64 I misunderstood your previous problem, it only crashes when you try to compile the source, not at startup... Did you ever try to debug a program on Win64? Now is the time to try: you will need a win64 GDB and recompile the IDE using -gw option. The important GDB option here is set win32 new-console on This will create a new Console when you start the IDE. As it seems that the IDE generated an access-violation, you should directly see that in the GDB console and be able to get a back-trace (udsing GDB 'bt' command) which would help to understand where the problem is coming from. Pierre Le 07/08/2019 à 13:59, James Richters a écrit : > I deleted all files that start with FP so it would have to make new ones and tried to compile: > Writeln('Hello World!'); > And it did not work.. it has the exact same error. > > James > > -----Original Message----- > > > Hi, > > Le 07/08/2019 à 13:17, James Richters a écrit : >> I’m trying to use FPC3.0.4 for x86_64-win64. >> >> I built it with: >> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.6.2x >> - fpcupdeluxe-x86_64-win64.exe >> >> >> >> I am trying to use the Text IDE using the same FP.CFG FP.INI and >> FP.DSK that worked with the i368-win32 version… >> >> When I try to compile a program I Instantly get: >> >> >> >> Program generated a RTE 217 >> >> at address $0000000000000000. >> >> Save your sources and restart the IDE. > > The problem is that the DSK file is a binary file which has a format that makes it impossible to use the same file on different targets. > the win64 IDE will assume that some fields have a length of 8 bytes, while the win32 IDE saved those fields using a 4 byte slot. > > This leads to complete incompatibility between win32 and win64 IDE. > > Try to rename the win64 IDE to something like fp64.exe > > In that case, IIRC, the executable should look for fp64.cfg, fp64.ini and fp64.dsk and avoid the problem above. > > Could you please tell us if this solution works, because I am not 100% sure anymore this is the solution... > > Pierre > _______________________________________________ > fpc-pascal maillist - > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > _______________________________________________ > fpc-pascal maillist - > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >

Reply by email

James Richters
to Jean SUZINEAU

I tried using fpcupdeluxe to compile x86_64-win64 - Trunk, I was then able to compile 64bit programs with the text IDE. I guess the problem was already fixed at some point.

James

Earlier message 43 lines
From: fpc-pascal On Behalf Of Jean SUZINEAU Sent: Wednesday, August 7, 2019 7:00 PM To: Subject: Re: [fpc-pascal] FP.exe error in x86_64-Win64 Hello, I reproduced the problem. I run fpcupdeluxe x86_64-win64-win32, this is the log of what I've done: button Setup+, Options Override, FPC options -gw, then click OK, then click FPC Only After recompilation by fpcupdeluxe: Open cmd, cd to fpcupdeluxe\fpc\bin\x86_64-win64 gdb.exe fp.exe set new-console run Open a program and try to compile it. Screenshot of gdb: (gdb) set win32 new-console on No symbol "win32" in current context. (gdb) set new-console on (gdb) run Starting program: E:\fpcupdeluxe\fpc\bin\x86_64-win64/fp.exe [New Thread 24056.0x4d64] [New Thread 24056.0x12c0] [New Thread 24056.0x632c] [New Thread 24056.0x6344] [New Thread 24056.0x59c] [New Thread 24056.0x3ca8] Program received signal SIGSEGV, Segmentation fault. fpc_shortstr_to_shortstr (RES=..., highRES=255, SSTR=Cannot access memory at address 0x3e2110 ) at ../inc/generic.inc:867 867 slen:=length(sstr); (gdb) bt #0 fpc_shortstr_to_shortstr (RES=..., highRES=255, SSTR=Cannot access memory at address 0x3e2110 ) at ../inc/generic.inc:867 #1 0x00000000006dfc10 in ?? () #2 0x0000000000000000 in ?? () (gdb)

Reply by email

James Richters
to James Richters

Now I have a new problem. I am able to successfully compile and run my project with the text IDE if I use the trunk version of FPC, and I can run the resulting exe just fine on the computer I compiled it on, but when I run it on one of my other computers, one that I was always able to run the win32 version of my program on just fine, the x64 version now comes up with

‘The code execution cannot proceed because MSVCR110.dll was not found. Reinstalling the program may fix this problem’

I do not understand this at all, I never needed anything like that dll before, and I have no idea what it is or why the 64bit version would need it, and I also don’t know why this works fine on my development computer without it and why I need it on my other computers that I have been running the 32bit version of the exact same program on for years.

Any thoughts on this?

Reply by email

James Richters
to Jean SUZINEAU

I am not using libusb in my project yet… all that is still just in separate test programs. This is the original version of my project, just compiled for 64bits… I had to make some other changes to it. I have never needed to install anything else to get my program to run. I re-compiled it back to win32 and it runs fine again.

I think what your are saying is that I probably have something that has a dependency on it, and somehow I already end up having the win32 version of the DLL but I don’t have the 64 bit version

Earlier message 32 lines
From: fpc-pascal On Behalf Of Jean SUZINEAU Sent: Friday, August 9, 2019 9:24 AM To: Subject: Re: [fpc-pascal] FP.exe error in x86_64-Win64 Le 09/08/2019 à 14:19, James Richters a écrit : Now I have a new problem. I am able to successfully compile and run my project with the text IDE if I use the trunk version of FPC, and I can run the resulting exe just fine on the computer I compiled it on, but when I run it on one of my other computers, one that I was always able to run the win32 version of my program on just fine, the x64 version now comes up with ‘The code execution cannot proceed because MSVCR110.dll was not found. Reinstalling the program may fix this problem’ I do not understand this at all, I never needed anything like that dll before, and I have no idea what it is or why the 64bit version would need it, and I also don’t know why this works fine on my development computer without it and why I need it on my other computers that I have been running the 32bit version of the exact same program on for years. Any thoughts on this? Yes , it just seems that libusb relies on MSVCR110.dll. Very likely you have another version on this machine. I googled for MSVCR110.dll, it pointed to me to the MSVCR fro VisualStudio 2012: https://www.microsoft.com/en-us/download/details.aspx?id=30679 It happens to me frequently when installing a product on a customer's computer. Depending on the product you can have to install a different version of the redistributable. On some computers the dll is already there, sometimes not. As far as I know Microsoft now forbids you to include the dll directly in your distribution, you need to use their install program which installs it reliably (I think in C:\Windows\System32) and maybe some other stuff around and in the registry.

Reply by email