Recent

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

440bx

  • Hero Member
  • *****
  • Posts: 3944
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #15 on: December 02, 2019, 04:02:25 pm »

copy into flash drive and run from flash same issue

copy file form flash drive into hard disk same issue.
Though it is unclear, based on the screenshot you posted, it looks like the program may be trying to access one or more files.

The one thing that is critical to recognize in the problem you're having is that CRC errors are almost always caused by a bad sector on a hard drive. 

The fact that you get the CRC check error even when you run the executable from a flash drive is almost guaranteed to indicate that some file(s) the program is attempting to access is on a bad sector.   

You should do what I told you to do in the previous post.  Run a chkdsk /r <drive_letter> against the drive.  At least that way, you'll know if the problem is caused by a bad sector on the hard drive.  It's almost a given that is the problem.

You can choose to ignore the advice but, ignoring it won't help you figure out the cause of the problem.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #16 on: December 02, 2019, 04:36:16 pm »
No anti-virus

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #17 on: December 02, 2019, 05:06:31 pm »
run chkdsk : command not found.

run disk check result attached.

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #18 on: December 02, 2019, 05:08:15 pm »
Look like is related to platform issue

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #19 on: December 02, 2019, 05:27:50 pm »
Please send it to me.

Sending binaries via email, as far as I know will be blocked by some mail server. So you should compress them into a zip file first before sending.

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #20 on: December 02, 2019, 05:30:53 pm »
I have remove win32 gui application (-WG) and created new exe now it shows some detailed about this error

attached screen shot

heejit

  • Full Member
  • ***
  • Posts: 245
[SOLUTION] Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #21 on: December 02, 2019, 05:35:28 pm »
Application is running when Removed Application ICON
« Last Edit: December 02, 2019, 06:09:24 pm by jshah »

heejit

  • Full Member
  • ***
  • Posts: 245
Re: Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #22 on: December 02, 2019, 06:04:15 pm »
Thank you everyone for support

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Application is running when Removed Application ICON

Why that happened? Application icon causes the binary fail to start? Can anyone please explain?

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: [SOLVED] Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #24 on: December 02, 2019, 06:49:57 pm »
He might have a corrupt image file...
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

heejit

  • Full Member
  • ***
  • Posts: 245
Re: [SOLVED] Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #25 on: December 02, 2019, 07:15:50 pm »
If you check the screenshot of dos command it shows there is PNGImageException
and my application dont have any image only application icon so I just
try and remove the icon and it works.

I dont know if i need to copy the icon file with exe.
« Last Edit: December 02, 2019, 07:23:45 pm by jshah »

440bx

  • Hero Member
  • *****
  • Posts: 3944
Why that happened? Application icon causes the binary fail to start? Can anyone please explain?
The PNG format includes a CRC.  Based on the last screenshot he posted, a PNG that he included (and is using) in his program is corrupted (bad CRC.) 

As far as the O/S is concerned, the program is fine but, when the program attempts to use the PNG, it runs into the bad CRC. 

He might have a corrupt image file...
It is possible, actually quite likely, that the image file is fine.  The problem is most likely caused by his including a bad PNG in the exe (apparently as an icon.)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

heejit

  • Full Member
  • ***
  • Posts: 245
Re: [SOLVED] Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #27 on: December 02, 2019, 07:34:21 pm »
Icon file is default created by project and this binary is running in win7 32bit computer without removing the icon.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: [SOLVED] Compiled Win32 Exe not running on Window XP (CRC Check Failed)
« Reply #28 on: December 02, 2019, 07:49:13 pm »
He might have a corrupt image file...
If he is right, and the same exe, with the same image, did work on win-7... Then it sounds like the png reader depends on something that is not working. Or at least not for some subsets of png...

But that is just a guess.

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
He might have a corrupt image file...
It is possible, actually quite likely, that the image file is fine.  The problem is most likely caused by his including a bad PNG in the exe (apparently as an icon.)


Sorry, term overload.  I meant "image" as in graphics image, not binary executable image.   :P
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018