Hi all,
I'd try to build an hwgui app, perfectly running as 32bit app, using 64bit flavour.
The app seems to run fine, but crashes on every dialog window opening with:
Called from HWG_DLGBOXINDIRECT(0)
Called from HDIALOG:ACTIVATE(177) in C:\SVN\hbSys...\hwgui\source\winapi\hdialog.prg
Do you have some experience or suggestion about?
Hello Maurizio,
i will check the 64 bit compile (MingW64) with my app "CLLOG" the next few days
and will report.
With regards
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hello Maurizio,
i checked a HWGUI sample and my app CLLOG on Windows 10-64 compiled with MinGW64 and it runs with no trouble.
The appended text file contains my report.
I used the recent code snapshot of HWGUI for the test.
If the trouble exists any more, please post a little sample program and i will
look for it.
If you want to check your case with CLLOG, please download the recent code snapshot i committed just before a moment.
With regards
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried, many thanks for your support.
Unluckily my code is based on my development tool, a kind of homemaid
CASE, and is very difficult to isolate a sample in a small source.
Just to be more precise, my app runs flawlessly at 64bit but crashes
only on activation of modal dialog windows.
The controls are generated by code and not by resource descriptors.
I'm compiling with updated MSYS2 gcc (12.2 AFAIR) and my system runs Win11.
Are you sure that your app CLLOG uses modal dialogs?
Did you have tried to activate that kind of window?
Thanks again.
--
Maurizio
Il 14/09/2022 11:10, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Hello Maurizio,
my app CLLOG is very big and has a lot of modal and non modal dialogs.
Can you try some sample programs or modify one it, so that
the problem appears ?
I use Windows 10 without any Internet access, i am a LINUX fan,
i transport data between the systems with an USB stick.
If not, is your app open source, so that i can download and check it ?
With regards
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
no need to modify sample programs.
I think the problem is about resource files.
Can you confirm that you aren't using resource file in your CLLOG app?
What's the way you're compiling 64bit apps on Windows (hbmk2.exe,
bldmingw64.bat, hwmake,exe, etc.)?
I just tried to compile dbchw.exe without any change and the app,
working fine in 32bit version, crashes in same way of mine.
Can you test on your site, compiling dbchw.exe using your usual command?
My console apps (based on gtwvt) runs smoothly in 64bit mode without any
change in resource file, but maybe some difference is present for window
based applications.
I'll wait for your test and, if confirmed, I'll try to change the
resource file or the parameters for windres.
Thanks in advance for your effort in helping me.
Best regards.
--
Maurizio
Il 15/09/2022 09:28, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Hi Wilfried,
I'd forgot to say that the error happens with File->Open menu choice.
That's the error, same as for my app:
Called from HWG_DLGBOXINDIRECT(0)
Called from HDIALOG:ACTIVATE(177) in
C:\SVN\hbSys...\hwgui\source\winapi\hdialog.prg
Called from OPENFILE(695) in C:\SVN\hbSys...\hwgui\utils\dbc\dbchw.prg
Called from (b)MAIN(188) in C:\SVN\hbSys...\hwgui\utils\dbc\dbchw.prg
Called from ONCOMMAND(660) in
C:\SVN\hbSys...\hwgui\source\winapi\hwindow.prg
Called from (b)HMAINWINDOW(317) in
C:\SVN\hbSys...\hwgui\source\winapi\hwindow.prg
Called from HMAINWINDOW:ONEVENT(423) in
C:\SVN\hbSys...\hwgui\source\winapi\hwindow.prg
Called from HWG_ACTIVATEMDIWINDOW(0)
Called from HMAINWINDOW:ACTIVATE(405) in
C:\SVN\hbSys...\hwgui\source\winapi\hwindow.prg
Called from MAIN(296) in C:\SVN\hbSys...\hwgui\utils\dbc\dbchw.prg
Thanks again.
Maurizio
Il 15/09/2022 09:28, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Hello Maurizio
you can download a ready to install (as portable version)
from my CLLOG project page:
https://sourceforge.net/projects/cllog/files/contrib/
File: MinGW64.zip
This is the version i used on Windows 10 and works perfect.
Extract the archive to install location:
C:\MinGW64
More information in the Readme file in this directory.
Use environment script
samples/dev/pfad64.bat
to switch to MinGW64.
Try to compile your app and post the
result.
If this is OK for you,
can this ticket be closed ?
With regards
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
I'd rebuild Harbour, HWGui and my app using your MinGW 8.1 distro and
all gone fine.
Thus my issue is due to compiler version (I'm using 12.2 from MSYS2).
Probably the windres bin introduced some kind of incompatibility in
newer versions, because only programs using resource files are hanging.
I'll deeper investigate...
Yes, this ticket can be closed also if it should be reopen with "64bit
apps fails if compiled with gcc > 8.1 and are using resource files.
Many thanks for your aid, it's very appreciated.
Best regards.
--
Maurizio
PS: I'd noticed that you're using separate folders for 32bit and 64bit
HWGui builds, as for Harbour tree structure.
I'm repeating something suggested some time ago: why not to change the
HWGui scripts to obtain natively that structure, adding <comp>32 and
<comp>64 bin folders?
Previously my suggestion was ignored, but maybe now could be take in
consideration.
Just a little change in hbp and hbc files...
What do you think about it?</comp></comp>
Il 22/09/2022 14:31, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Hello Maurizio,
i'll think about your suggestion. For saving time please post a sample hbp file.
Otherwise i will wait for your report with 12.2 from MSYS2.
Could you also post a download link for this compiler ?
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
you can download MSYS2 at
https://repo.msys2.org/distrib/x86_64/
then run the executable and using the command
pacman -S mingw-w64-x86_64-toolchain
the compiler will be installed.
More informations at
https://www.msys2.org/wiki/MSYS2-installation/
Please, try to rebuild Harbour, HWGui and your CLLOG project with gcc
12.2 (path: \msys64\mingw64\bin) to control if the same error is issued
in your app.
I'm expecting that you'll no have errors if your app doesn't use
resource files.
Thanks in advance.
Maurizio
Il 22/09/2022 23:24, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Hello Maurizio,
i downloaded the MSYS base package and tried to install the
MingW64 environment with the "pacman" command.
For me it seems, this is a simuation of a LINUX like environment (bash ,..) on Windows.
My problem is:
All my Windows systems are forever "offline".
The pacman command tries the get the package from the internet, and this is not possible.
What i need is a "portable" revision of the MingW64 components for
transport from my LINUX system to Win by an USB-Stick.
This i have done for every years.
Is there a location where i can download the full package ?
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
Il 26/09/2022 14:52, Wilfried Brunken ha scritto:
https://packages.msys2.org/group/mingw-w64-i686-toolchain
You'll need zstd.exe to unpack the package files to tar before to expand it.
Isn't a simple and short job, but with a batch file could be easily done.
In the meaning I'd tried to set some fine tuning for windres, but
unsuccessfully.
I'll try to compile also hwgui C sources with debug to inspect what's
the instruction causing the crash. Not a simple job for me...
About the separate storing of 32 and 64bit libraries and executables,
I'm attaching a diff file to show how I'm doing it.
Obviously also a little change is needed in application hbp or hbm file,
storing the built executable in the correct folder, i.e.:
-o./ // store
the executable in the same folder of hbp file
-instpath=./install/${hb_cpu}/ // and prepare a separate set
for installer
Please, let me know if you agree with this change.
Best regards.
Maurizio
Related
Support Requests:
#55Hello Maurizio,
i tried to start an offline installation of MSys2, but i have some problems.
The toolchain is not complete.
See report (with list of downloaded files) in the appended text file.
What is the problem? What is the database ?.
I have not so much time, but please send me list/links of files to download to complete the installation.
I tried wine on LINUX , but the start of the MSys shell fails:
surfer@afu-DA320-Series:~$ wine cmd
Microsoft Windows 6.1.7601
Z:\home\surfer>c:
c:
c:>cd MSys
c:\MSys>mingw64.exe
:\MSys>Cygwin WARNING:ion from https://cygwin.com/. If the problem persists,
Couldn't compute FAST_CWD pointer. This typically occurs if you're using
an older Cygwin version on a newer Windows. Please update to the latest
available Cygwin version from https://cygwin.com/. If the problem persists,
please see https://cygwin.com/problems.html
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
I zipped the complete mingw64 folder of MSYS2 and tested it successfully
building Harbour, HWGui and my app.
Just unzip it and point to mingw64/bin as compiler path.
No need to use MSYS at all.
You can download the zip at:
https://www.mlacecilia.com/dati/msys64.zip
Best regards.
Maurizio
Il 28/09/2022 14:50, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Hello Maurizio,
there are 2 reasons of start errors in GCC 12:
1.) Die Anwendung konnte nicht korrekt gestartet werden.
(0xc000007b).
==> The german text means:
The application could not be started
correctly.
To fix:
1 24 "../image/WindowsXP.Manifest"
(i used an extra rc file for compiling)
Load icons from file in the *.rc file, for example:
HWGUI ICON image\hwgui_32x32.ico
2.) I detected, that all GCC x64 from version 11 or higher uses
now full 64 bit pointers (of type ULONGLONG).
Trace log see hb_out.log:
.. 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
dialog.c :
LPDLGTEMPLATE pdlgtemplate =
s_CreateDlgTemplate( pObject, x1, y1, dwidth, dheight, ulStyle );
static LPDLGTEMPLATE s_CreateDlgTemplate( PHB_ITEM pObj, int x1, int y1,
int dwidth, int dheight, ULONG ulStyle )
...
p = s_lpwAlign( p );
*p = 0; <== crashes here, because pointer is invalid
so i modified the function "s_lpwAlign":
...
if defined(GNUC) && (GNUC >= 11)
ULONGLONG ul;
ul = ( ULONGLONG ) lpIn;
else
ULONG ul;
ul = ( ULONG ) lpIn;
endif
...
The provocate the errors, the samples "bincnts.prg"
and "icons.prg" are good enough.
In "icons.exe" go to menue "Dialog" and "With Background".
This is now fixed with commit r3128 .
I checked the fix with my app CLLOG and it
works also at ist best with the last commit there.
I found a copy of this function in the Harbour source code:
C:\harbour\core-master\contrib\gtwvw\gtwvwd.c:
LPWORD lpwAlign( LPWORD lpIn )
{
ULONG ul;
ul = ( ULONG ) lpIn;
ul += 3;
ul >>= 2;
ul <<= 2;
return ( LPWORD ) ul;
}
This must be sent to the Harbour developper team.
For your information:
Used GCC versions:
:\cltest>gcc --version
gcc (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\msys64>gcc --version
gcc (Rev1, Built by MSYS2 project) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
With the next step i create installation instructions for MSys2.
Please give feedback.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
I'd try your patch and all worked fine, no need to modify anything in my
sources.
Already I was loading icons from file in my resource file and I'm
referencing the manifest in the resource file using the following syntax:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "<pathtomyappmanifestfile>"</pathtomyappmanifestfile>
thus windres doesn't fail using
1 24 "<pathtomyappmanifestfile>"</pathtomyappmanifestfile>
That's consistent with the absence of issues in gtwvt, gtwin, etc. based
applications and thus my though about a resource file issue was wrong.
If you agree I'll commit your patch to contrib\gtwvw\gtwvwd.c
Thanks a lot for your good catch.
When you've some spare time, let me know about the changes to hbp/hbm to
store separate lib/binary files.
Best regards.
--
Maurizio
PS: FYI, the Rev 2 of gcc 12.2 is ready on MSYS2
Il 09/10/2022 20:59, Wilfried Brunken ha scritto:
Related
Support Requests:
#55Ticket closed.
Hello Maurizio,
i detected a new behavior of Combobox, so i added a new description
in the HWGUI documentation, be care of y size. But
it works ok.
Also i described the new syntax adding the manifest file into the *.rc
file.
It is a good idea, that you commit the patch for the defines for GCC >= 11 in the
Harbour source code. But i don't use the hbgwvw feature.
And my test with my app "CLLOG" was also successful.
So it is time to close this ticket.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried