Recent

Author Topic: [SOLVED] Compiled Win32 Exe not running on Window XP (CRC Check Failed)  (Read 5977 times)

heejit

  • Full Member
  • ***
  • Posts: 245

Cross compile platform : 
OS=WIN32, CPU FAMILY=i386, Target process=Try all of them none of them work

Deployment Platform Detail :
OS Name    Microsoft Windows XP Professional
Version                  5.1.2600 Service Pack 3 Build 2600
OS Manufacturer   Microsoft Corporation
System Type   X86-based PC
Processor   x86 Family 5 Model 8 Stepping 6 Vortex86 SoC ~933 Mhz
BIOS Version/Date   AdvanPOS CP-2010 BIOS Rev: 8.9" A5LCD (05/07/2010), 5/7/2010
Windows Directory   C:\Windows
System Directory   C:\Windows\system32
Boot Device   \Device\HarddiskVolume1
Hardware Abstraction Layer   Version = "5.1.2600.5512 (xpsp.080413-2111)"
Total Physical Memory   511.55 MB
Available Physical Memory   308.40 MB
Total Virtual Memory   2.00 GB
Available Virtual Memory   1.96 GB
Page File Space   1.22 GB
Page File   C:\pagefile.sys

« Last Edit: December 02, 2019, 06:04:36 pm by jshah »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #1 on: December 02, 2019, 12:21:36 pm »
What version of compiler etc.?
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #2 on: December 02, 2019, 12:26:36 pm »
Lazarus : 2.0.2
FPC     : 3.0.4
OS      : Ubuntu x86_64-linux-gtk2

440bx

  • Hero Member
  • *****
  • Posts: 3945
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #3 on: December 02, 2019, 01:11:46 pm »
First, I want to make sure I understand the conditions that lead to the problem.

My questions are:

You compile the program on Ubuntu, specifying the target as Win32.  Correct ? (yes/no)

What O/S is giving you the CRC check failed ? also, when does the CRC check fail error occur ?  Is it when you try to run the executable in Windows or at some other time ?  Can you post a screenshot of the error message you're getting ?  Are you running the Windows program from a network drive ?

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #4 on: December 02, 2019, 01:16:23 pm »
(assuming you mean crosscompiling linux->windows)

To target 32-bit x86 targets use a 32-bit x86 compiler. IOW make sure your installed *nix compiler is 32-bit.

And show commandlines etc.

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #5 on: December 02, 2019, 01:32:32 pm »
@440bx

You compile the program on Ubuntu, specifying the target as Win32.  Correct ? -> Yes

What O/S is giving you the CRC check failed ? -> Window XP

also, when does the CRC check fail error occur ?  Is it when you try to run the executable in Windows or at some other time ?  ->
When try to run the executable

Can you post a screenshot of the error message you're getting ?  -> Attached

Are you running the Windows program from a network drive ?  -> NO
« Last Edit: December 02, 2019, 02:06:21 pm by jshah »

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #6 on: December 02, 2019, 01:35:14 pm »
Yes crosscommpiling form Linux -> Windows

Application is running in win32 window-7


(assuming you mean crosscompiling linux->windows)

To target 32-bit x86 targets use a 32-bit x86 compiler. IOW make sure your installed *nix compiler is 32-bit.

And show commandlines etc.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #7 on: December 02, 2019, 02:05:09 pm »
Can you send me the binaries to my email? One using default configuration and the other one without any debug info. I will try to run it on my Windows and I will also try to compile the source (from my Linux 64 to Win32) and compare them with yours to find out what are the differences.

If you're interested, you can pm me then I'll give you my email address.

Please also provide the source code. A simple hello world program should be enough.

440bx

  • Hero Member
  • *****
  • Posts: 3945
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #8 on: December 02, 2019, 02:48:29 pm »
Are you running the Windows program from a network drive ?  -> NO
The Windows loader doesn't check the executable.  It couldn't even do a CRC check since all there is in the executable, is a basic checksum (and the loader ignores it.)

The most likely reason you are getting that message box is because the executable is residing on a bad sector on your hard drive.

Run a chkdsk /r <drive_letter> on the drive.  Make sure /r is there to ensure the bad sector is isolated.

HTH.

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #9 on: December 02, 2019, 03:09:00 pm »
I remember a Thread some time ago, where the OP of that thread also had trouble running an executable.
The solution was the way of his deployment, since he deployed via FTP, but in the wrong mode (ascii vs. binary).

Oh, and never forget any possibly installed Anti-Vir-Programs.
That screenshot doesn't look like a "native" Windows-Message-box (wouldn't remember Windows using "graphical" Buttons in any of its Dialogs),
and doesn't MS use "Cancel" (and not "Abort") in its Dialogs?
And the "OK"-Button has an Accelerator ("O").....
« Last Edit: December 02, 2019, 03:30:50 pm by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #10 on: December 02, 2019, 03:15:47 pm »
i try to download file in two different way
1. from http server
2. from ftp server

both way is same issue.

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #11 on: December 02, 2019, 03:16:57 pm »
i try to download file in two different way
1. from http server
2. from ftp server

both way is same issue.

Transfer in binary mode?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #12 on: December 02, 2019, 03:18:11 pm »
i am not sure about ftp-download-mode let me check

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #13 on: December 02, 2019, 03:37:06 pm »

copy into flash drive and run from flash same issue

copy file form flash drive into hard disk same issue.

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #14 on: December 02, 2019, 03:51:25 pm »
Any AntiVir-Programs on that XP-RustBucket?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018