Windows 7 / MSVS 2022 Crash

Windows 7 / MSVS 2022 Crash

Postby TimStone » Wed Apr 05, 2023 6:01 pm

I have an application that runs perfectly in Windows 8-11. However, it crashes on startup under Windows 7.

I am using the latest FWH, plus Microsoft Visual Studio 2022 Community, and Harbour.

This occurs in both 32 bit and 64 bit.

I am comparing any changes in the program that might account for this. Any thoughts on where to look ? Any suggestions are appreciated.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Windows 7 / MSVS 2022 Crash

Postby Antonio Linares » Wed Apr 05, 2023 6:43 pm

Dear Tim,

Does it generate a log file ?

Does it report any info ?

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Windows 7 / MSVS 2022 Crash

Postby TimStone » Wed Apr 05, 2023 6:55 pm

Not really. Windows crashes it.

Other apps built with the same link script work fine. I'm thinking it may have to do with a newer set of features we use in the current builds of FWH/Harbour that are not supported in Win 7.

I'm not sympathetic since most Win 7 installs came with a free upgrade to Win 8 which was then free to upgrade to Win 10 / 11.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Windows 7 / MSVS 2022 Crash

Postby Jimmy » Wed Apr 05, 2023 7:13 pm

hi Tim,

did you use Manifest :?:

there might be some Setting which Windows 7 don´t know
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Windows 7 / MSVS 2022 Crash

Postby karinha » Wed Apr 05, 2023 8:24 pm

TimStone wrote:Not really. Windows crashes it.

Other apps built with the same link script work fine. I'm thinking it may have to do with a newer set of features we use in the current builds of FWH/Harbour that are not supported in Win 7.

I'm not sympathetic since most Win 7 installs came with a free upgrade to Win 8 which was then free to upgrade to Win 10 / 11.


???????????

What new feature set do we use in current FWH/Harbour builds? Do you have any executables for me to test on my Windows 7?

¿Qué nuevo conjunto de características usamos en las versiones actuales de FWH/Harbour? ¿Tiene algún ejecutable para probar en mi Windows 7?

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Windows 7 / MSVS 2022 Crash

Postby TimStone » Wed Apr 05, 2023 8:40 pm

Jimmy,

I did have a Manifest, but yesterday I found it created major problems with a Dell Super Hi-Res Monitor that was running 3840x2160. It was very strange. Removing the manifest solved that problem. However it did not solve the problem running on Windows 7.

Karinha,

We have actually added many new capabilities into FWH. I first noticed the problem with a late VS 2019 update, and consistently with 2022.

My exe is far too large, and requires registered file, to send you one for testing. Thanks for the offer.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Windows 7 / MSVS 2022 Crash

Postby Antonio Linares » Thu Apr 06, 2023 6:39 am

Dear Tim,

Do you use Total Commander ? If possible doble click your EXE from Total Commander. If there is a missing DLL it will let you know it.

I am installing VirtualBox and Win7 to test it...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Windows 7 / MSVS 2022 Crash

Postby Antonio Linares » Thu Apr 06, 2023 7:02 am

Dear Tim,

I just built FWH\samples\fivedbu.exe and executed it from (virtualbox) Windows 7 and it properly worked.

If you could install Visual Studio in such Windows 7 machine, running your EXE from the Visual Studio IDE will surely tell you whats the problem

I use this technique to get some info when no info is found and it works really well :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Windows 7 / MSVS 2022 Crash

Postby Antonio Linares » Thu Apr 06, 2023 7:07 am

I just tried to run te VisualStudioSetup.exe from Win7 and it also fails :-)

So I guess we need to find one Visual Studio that works on Win7...

chatGPT just told me to use the Visual Studio 2019 version
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Windows 7 / MSVS 2022 Crash

Postby TimStone » Thu Apr 06, 2023 4:03 pm

I did a build with 2019 but my client never called so I could connect and test it.


Sent from my iPhone using Tapatalk
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Windows 7 / MSVS 2022 Crash

Postby Giovany Vecchi » Sun Apr 09, 2023 2:04 pm

The only problem I had compiling with MSVC on Windows 7 I solved it by including the "profile.c" module.
Compile and test on windows 7.
User avatar
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Windows 7 / MSVS 2022 Crash

Postby Antonio Linares » Sun Apr 09, 2023 9:37 pm

Dear Giovany,

Do you mean the FWH "profile.c" file ? It is already included in FWH.

Can you explain it ? Thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Windows 7 / MSVS 2022 Crash

Postby Giovany Vecchi » Sun Apr 09, 2023 11:12 pm

Yes, it's Fivewin's sources\winapi\profile.c.
I don't know why this happens. Compiling with MSVC 2022 the program caused GPF in the windows 7 system. In the 'GETPROFSTRING' function.
With the memory stack address of the GPF number I looked in my .MAP file generated by the MSVC compiler and it corresponded to this function.
It just included it so that it could be compiled again in the program and the problem no longer occurred.
User avatar
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Windows 7 / MSVS 2022 Crash

Postby Enrico Maria Giordano » Mon Apr 10, 2023 7:36 am

I confirm the problem and the solution.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Windows 7 / MSVS 2022 Crash

Postby Antonio Linares » Mon Apr 10, 2023 10:37 am

It seems as this should be the right fix for it:
Code: Select all  Expand view
#ifdef __HARBOUR__
   HB_FUNC( GETPROFSTRING )
#else
   HB_FUNC( GETPROFSTR )
#endif
{
   #define BUFSIZE  16384
   BYTE * bBuffer = hb_xgrab( BUFSIZE );
   WORD wLen = GetProfileString( hb_parc( 1 ),   // Section
                                 IF( HB_ISCHAR( 2 ), hb_parc( 2 ), 0 ),   // Entry
                                 hb_parc( 3 ),   // Default
                                 ( char * ) bBuffer,      // Destination Buffer
                                 BUFSIZE - 1 );
   if( wLen )
      hb_retclen( ( char * ) bBuffer, wLen );
   else
      hb_retc( "" );

   hb_xfree( bBuffer );  
}

I appreciate it if you test it and let me know your results, many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests