Menu

#38 gthwg freeze using Harbour 3.4

v1.0_(example)
open
nobody
None
1
2022-03-05
2021-04-27
No

I compile using this:
test1.prg
../../../hwgui.hbc
-lgthwg
Show window, freeze, and close window after some seconds.

Unrecoverable error 6005: Exception error:

Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:00A33526
EAX:00A27D90  EBX:00000000  ECX:00000000  EDX:00000000
ESI:00000008  EDI:00B9753D  EBP:009DC264
CS:EIP:0023:00A33526  SS:ESP:002B:005FF700
DS:002B  ES:002B  FS:0053  GS:002B
Flags:00010246
Exception Parameters: 00000000 00000000
CS:EIP: 8B 03 8B B3 7C 02 00 00 8B BB 78 02 00 00 8B 10
SS:ESP: 004C04AA FFFFFFFC 00A31440 00A53DEE 009DC274 00000001 00020002 00A4D9C9 00000016 005FF78C 00000008 00A981FC 00000001 009DC4C8 009DC264 75E7DF20

Called from GTHWG_SETWINDOW(0)
Called from GTHWG_CREATEMAINWINDOW(22)
Called from CREATEWINDOW(62)
Called from MAIN(30)

Discussion

  • Alexander S.Kresin

    Harbour 3.4, Victor's fork?
    I never tried it. I use 3.2 and gthwg looks normally here. I compiled with it few console applications and they works without problems.
    Probably, there are some changes in GT layer, which give such result. I will review 3.4 GT modules if I will have a spare time for it, but I can't promise that this will be soon.

     
  • José M. C. Quintas

    Called from GTHWG_SETWINDOW(0)
    Called from GTHWG_CREATEMAINWINDOW(22) in gthwg\gt_hwg.prg
    Called from CREATEWINDOW(62) in test1.prg
    Called from MAIN(30) in test1.prg

    Only today I test using Harbour 3.2.0dev (r2104281802) nightly version.
    hwgui R2985
    rebuild all hwgui using hbp
    rebuild contrib using hbp
    compile test1.prg using same hbp

    same error using Harbour 3.2

    Windows 10 may/2021

    I use \harbour folder as default, then:
    rename \harbour to \hb34 (to disable it)
    rename \hb32 to \harbour (to enable it)
    Each one has it's own mingw compiler
    Use -rebuild to recompile hwgui, hwgui\contrib and hwgui\contrib\gthwg\tests

    try changing order too.

    test1.prg
    -lgthwg
    ../../../hwgui.hbc

     

    Last edit: José M. C. Quintas 2021-05-06
  • Alexander S.Kresin

    Hm... I use bcc and all works normally with it, even such applications as hbedit.
    But now I've tried it with mingw and get the same error. Strange... I'll dig in it.

     
  • Alexander S.Kresin

    Due to some dark) reasons, the gtgui was registered as a main gt driver in mingw compiled apps.
    I've added two empty functions hb_gt_gui() and hb_gt_gui_default() to hthwg code to prevent this beviour. It seems Ok now.

     
  • José M. C. Quintas

    some libraries create hb_gtsys on own library, and add ANNOUNCE HB_GTSYS on that source.
    This forces a default gt. (on user side too).
    Other libraries add -gtgui on commands to link, or REQUEST HB_GT_GUI.
    Not sure on Harbour, because -gui assumes gui default for Windows (WVT) or Linux (GTK).
    I will make new tests, including use of hb_gtsys and annouce hb_gtsys.

     
  • José M. C. Quintas

    R2986 solve problem.
    This ticket can be closed.
    Test using Harbour 3.4.

     
  • Marco

    Marco - 2022-02-23

    i build hwgui apps, but all works on windows 7 sp1 and get error in windows 10, the logs od building is:
    2022-02-14 12:52:38.275 hbmk2: Elaborazione in corso delle opzioni d'ambiente: -comp=mingw64
    2022-02-14 12:52:38.275 -cpu=x86_64
    2022-02-14 12:52:38.276 hbmk2: Piattaforma auto-rilevata: win
    2022-02-14 12:52:38.277 hbmk2: Harbour in uso: E:\harbour-64\bin E:\harbour-64\include
    2022-02-14 12:52:38.277 E:\harbour-64\lib\win\mingw64 E:\harbour-64\bin E:\harbour-64\contrib
    2022-02-14 12:52:38.278 E:\harbour-64\addons E:\harbour-64\doc
    2022-02-14 12:52:38.279 hbmk2: Opzioni compilazione Harbour: pcre2 zlib
    2022-02-14 12:52:38.280 hbmk2: Sto elaborando: E:\harbour-64\addons\hwgui\hwgui.hbc
    2022-02-14 12:52:38.302 hbmk2: Uso del compilatore C versione: 1102 (auto-rilevato dopo)
    2022-02-14 12:52:38.303 hbmk2: Treads compilazione: 1
    2022-02-14 12:52:38.303 hbmk2: Comando compilatore Harbour (integrato):
    2022-02-14 12:52:38.304 ("E:\harbour-64\bin\harbour.exe") -n2 dbchw.prg commands.prg modistru.prg move.prg view.prg -ql -ge1 -jobs=2 -DUNICODE -m -n -l- -w2 -es0 -DHBMK_HAS_HWGUI=1 -oC:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir\ -iE:\harbour-64\include -iE:\harbour-64\addons\hwgui\include
    2022-02-14 12:52:38.306 Harbour 3.4.0dev () (2021-09-26 11:27)
    2022-02-14 12:52:38.307 Copyright (c) 1999-2021, https://github.com/vszakats/hb/
    2022-02-14 12:52:38.308 Compiling 'dbchw.prg'...
    2022-02-14 12:52:38.344
    2022-02-14 12:52:38.345 dbchw.prg:458: warning W0004 Codeblock parameter 'V' declared but not used in function 'SELECTINDEX'
    2022-02-14 12:52:38.346
    2022-02-14 12:52:38.346 dbchw.prg:459: warning W0004 Codeblock parameter 'V' declared but not used in function 'SELECTINDEX'
    2022-02-14 12:52:38.348
    2022-02-14 12:52:38.348 dbchw.prg:460: warning W0004 Codeblock parameter 'V' declared but not used in function 'SELECTINDEX'
    2022-02-14 12:52:38.349
    2022-02-14 12:52:38.350 dbchw.prg:479: warning W0003 Variable 'WIDTH' declared but not used in function '436:SELECTINDEX'
    2022-02-14 12:52:38.351
    2022-02-14 12:52:38.351 dbchw.prg:479: warning W0003 Variable 'HEIGHT' declared but not used in function '436:SELECTINDEX'
    2022-02-14 12:52:38.353
    2022-02-14 12:52:38.354 dbchw.prg:593: warning W0003 Variable 'I' declared but not used in function '566:UPDBROWSE'
    2022-02-14 12:52:38.361
    2022-02-14 12:52:38.361 dbchw.prg:751: warning W0004 Codeblock parameter 'O' declared but not used in function 'OPENDBF'
    2022-02-14 12:52:38.378
    2022-02-14 12:52:38.379 dbchw.prg:1155: warning W0003 Variable 'I' declared but not used in function '1133:FICLOSE'
    2022-02-14 12:52:38.385
    2022-02-14 12:52:38.386 dbchw.prg:1262: warning W0004 Codeblock parameter 'V' declared but not used in function 'EDITREC'
    2022-02-14 12:52:38.387
    2022-02-14 12:52:38.388 dbchw.prg:1263: warning W0004 Codeblock parameter 'V' declared but not used in function 'EDITREC'
    2022-02-14 12:52:38.395
    Lines 5166, Functions/Procedures 28
    2022-02-14 12:52:38.396 Generating C source output to 'C:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir\dbchw.c'...
    2022-02-14 12:52:38.397 dbchw.prg:1396: warning W0034 STATIC Function 'RESIZEBRWQ' defined but never used
    2022-02-14 12:52:38.402 Done.
    2022-02-14 12:52:38.403 Compiling 'commands.prg'...
    2022-02-14 12:52:38.456
    2022-02-14 12:52:38.457 commands.prg:652: warning W0004 Codeblock parameter 'V' declared but not used in function 'C_REL'
    2022-02-14 12:52:38.458
    2022-02-14 12:52:38.459 commands.prg:653: warning W0004 Codeblock parameter 'V' declared but not used in function 'C_REL'
    2022-02-14 12:52:38.460
    2022-02-14 12:52:38.461 commands.prg:654: warning W0004 Codeblock parameter 'V' declared but not used in function 'C_REL'
    2022-02-14 12:52:38.461
    Lines 4399, Functions/Procedures 6
    2022-02-14 12:52:38.462 Generating C source output to 'C:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir\commands.c'... Done.
    2022-02-14 12:52:38.465 Compiling 'modistru.prg'...
    2022-02-14 12:52:38.482
    2022-02-14 12:52:38.483 modistru.prg:61: warning W0004 Codeblock parameter 'V' declared but not used in function 'STRUMAN'
    2022-02-14 12:52:38.484
    2022-02-14 12:52:38.484 modistru.prg:62: warning W0004 Codeblock parameter 'V' declared but not used in function 'STRUMAN'
    2022-02-14 12:52:38.485
    2022-02-14 12:52:38.486 modistru.prg:63: warning W0004 Codeblock parameter 'V' declared but not used in function 'STRUMAN'
    2022-02-14 12:52:38.486
    2022-02-14 12:52:38.487 modistru.prg:64: warning W0004 Codeblock parameter 'V' declared but not used in function 'STRUMAN'
    2022-02-14 12:52:38.488
    2022-02-14 12:52:38.489 modistru.prg:65: warning W0004 Codeblock parameter 'V' declared but not used in function 'STRUMAN'
    2022-02-14 12:52:38.494
    Lines 3780, Functions/Procedures 2
    2022-02-14 12:52:38.494 Generating C source output to 'C:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir\modistru.c'... Done.
    2022-02-14 12:52:38.497 Compiling 'move.prg'...
    2022-02-14 12:52:38.519
    2022-02-14 12:52:38.520 move.prg:174: warning W0003 Variable 'I' declared but not used in function '119:F_FILTER'
    2022-02-14 12:52:38.522
    Lines 3786, Functions/Procedures 9
    2022-02-14 12:52:38.522 Generating C source output to 'C:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir\move.c'... Done.
    2022-02-14 12:52:38.524 Compiling 'view.prg'...
    2022-02-14 12:52:38.546
    2022-02-14 12:52:38.546 view.prg:141: warning W0003 Variable 'STRLEN' declared but not used in function '100:WRVIEW'
    2022-02-14 12:52:38.548
    Lines 3867, Functions/Procedures 2
    2022-02-14 12:52:38.548 Generating C source output to 'C:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir\view.c'... Done.
    2022-02-14 12:52:38.550 hbmk2: Comando del compilatore di Risorse:
    2022-02-14 12:52:38.551 windres.exe -c65001 --target=pe-x86-64 -I"E:/harbour-64/include" -I"E:/harbour-64/addons/hwgui/include" dbchw.rc -O coff -o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/dbchw.reso
    2022-02-14 12:52:38.650 hbmk2: 'cd' su: C:\Users\utente\AppData\Local\Temp\hbmk_mfo7l1.dir
    2022-02-14 12:52:38.651 hbmk2: Comando del compilatore C/C++:
    2022-02-14 12:52:38.652 gcc.exe -c -O3 -fno-ident -DUNICODE -DHB_OPENSSL_STATIC -D__USE_MINGW_ANSI_STDIO=0 -DHWG_USE_POINTER_ITEM -W -Wall -Wlogical-op -Wduplicated-cond -Wshift-negative-value -Wnull-dereference -m64 -pipe -I"E:/harbour-64/include" -I"E:/harbour-64/addons/hwgui/include" C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/dbchw.c C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/commands.c C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/modistru.c C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/move.c C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/view.c "E:/hwgui-code/hwgui/utils/dbc/procs_c.c" C:/Users/utente/AppData/Local/Temp/hbmk_g0xtif.c
    2022-02-14 12:52:39.258 hbmk2: 'cd' indietro.
    2022-02-14 12:52:39.259 hbmk2: Link in corso di... ....\bin\dbchw.exe
    2022-02-14 12:52:39.260 hbmk2: Comando Linker:
    2022-02-14 12:52:39.261 gcc.exe C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/dbchw.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/commands.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/modistru.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/move.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/view.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/procs_c.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/hbmk_g0xtif.o C:/Users/utente/AppData/Local/Temp/hbmk_mfo7l1.dir/dbchw.reso -m64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--pic-executable,-e,mainCRTStartup -Wl,--high-entropy-va -Wl,--image-base,0x140000000 -mwindows -Wl,--start-group -Wl,-Bstatic -lhwgui -lprocmisc -lhbxml -lhwgdebug -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtstd -lgtpca -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre2 -lhbzlib -Wl,-Bdynamic -Wl,--end-group -o../../bin/dbchw.exe -L"E:/harbour-64/lib/win/mingw64" -L"E:/harbour-64/addons/hwgui/lib/win/mingw64"
    2022-02-14 12:52:40.193 hbmk2: ....\bin\dbchw.exe copiato in E:\harbour-64\bin\dbchw.exe

     
  • Alexander S.Kresin

    These warnings may be ignored.

     
  • Marco

    Marco - 2022-03-02

    Yes, ok for the warnings but the strange thing is that app run without problem in windows 7 64 and don't run on windows 10 with errors like first message in the thread...

     
  • José M. C. Quintas

    These are warnings, using compilation -w3 -es2.
    You can reduce check to -w1 or -w0.
    Are you compiling using same configuration on both Windows?

    About the first error: I am with problems using GTWVG on Windows 10, may be anything changed on Windows 10 OS. Same application can runs all time ok, but for any reason, get error eventually. "1" + "1" (result of a function with fixed value) cause type mismatch error, and there are another errors too. It is a crazy thing.

     

    Last edit: José M. C. Quintas 2022-03-02
  • Alexander S.Kresin

    don't run on windows 10 with errors like first message in the thread...

    Do you build hwgui from sources or use ready binaries? If the second, maybe, the problem is that the library is built with another mingw version. I just suppose, I haven't other ideas, it works normally on my windows 10 system.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.