Recent

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

440bx

  • Hero Member
  • *****
  • Posts: 1409
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.
using FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

jshah

  • Full Member
  • ***
  • Posts: 200
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

jshah

  • Full Member
  • ***
  • Posts: 200
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.

jshah

  • Full Member
  • ***
  • Posts: 200
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: 3328
  • 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.

jshah

  • Full Member
  • ***
  • Posts: 200
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

jshah

  • Full Member
  • ***
  • Posts: 200
[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 »

jshah

  • Full Member
  • ***
  • Posts: 200
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: 3328
  • 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

  • Sr. Member
  • ****
  • Posts: 298
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
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.0.7 r62618 / FPC v3.2.0-beta-r44160 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1909 (Build 18363.657)
Other Systems: Windows 10 Pro x64, Version 1909 or greater

jshah

  • Full Member
  • ***
  • Posts: 200
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: 1409
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.)
using FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

jshah

  • Full Member
  • ***
  • Posts: 200
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: 5956
    • 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

  • Sr. Member
  • ****
  • Posts: 298
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
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.0.7 r62618 / FPC v3.2.0-beta-r44160 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1909 (Build 18363.657)
Other Systems: Windows 10 Pro x64, Version 1909 or greater