FP.exe error in x86_64-Win64

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

FP.exe error in x86_64-Win64

Zaaphod

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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Pierre Muller
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  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Zaaphod
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  -  [hidden email] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Pierre Muller
  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  -  [hidden email] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Zaaphod
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
-----Original Message-----
From: fpc-pascal <[hidden email]> On Behalf Of Pierre Muller
Sent: Wednesday, August 7, 2019 8:07 AM
To: [hidden email]
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  -  [hidden email]
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Jean SUZINEAU
In reply to this post by Pierre Muller

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)

_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Zaaphod

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

 

From: fpc-pascal <[hidden email]> On Behalf Of Jean SUZINEAU
Sent: Wednesday, August 7, 2019 7:00 PM
To: [hidden email]
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)

_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Zaaphod

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?

 

 


_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Jean SUZINEAU
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.


_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Zaaphod

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

 

From: fpc-pascal <[hidden email]> On Behalf Of Jean SUZINEAU
Sent: Friday, August 9, 2019 9:24 AM
To: [hidden email]
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.


_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FP.exe error in x86_64-Win64

Jean SUZINEAU
Le 09/08/2019 à 15:39, James Richters a écrit :

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

Sorry, I didn't understood correctly, I thought you were trying with one  of pas-libusb examples.

May be you can try to list the dll dependencies of your compiled program. I searched for ldd equivalents for Windows, Google points to http://dependencywalker.com/

May be that in 32 bits your executable uses another (older) version of msvcr.dll which is already installed on your test machine.


_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal