Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when exiting QM generated .exe
#1
When exiting one of my QM-generated executables, I get the errors shown in the attached .png file. Any advice will be much appreciated. Many thanks in advance.


Attached Files Image(s)
   
#2
Empirically, I found that the problem above is due to statement :


if(!ShowDialog("dialog_with_progres_Clepsy" &dialog_with_progres_Clepsy 0)) ret

which it calls the following function:


Function dialog_with_progres_Clepsy
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

def PBM_SETRANGE (WM_USER+1)
def PBM_SETPOS (WM_USER+2)
def PBM_DELTAPOS (WM_USER+3)

;BEGIN DIALOG
;0 "" 0x90000844 0x88 0 0 44 15 ""
;3 msctls_progress32 0x54000008 0x4 2 2 40 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040308 "" "" "" ""

ret
;messages
;you can change these values
int step=1
int timerperiod=250 ;;should be >=50 (in msec)

int hpb=id(3 hDlg)
str s

sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam)

,SetTimer hDlg 1 timerperiod 0
,ret 1
,
,case WM_TIMER
,SendMessage hpb PBM_SETPOS 0 0
,
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

I would appreciate any comments and/or advice.
#3
Tested on Windows 10, no exception when exits. Almost impossible to fix it when cannot reproduce.
#4
Thank you. I understand it is a kind of memory conflict. I will try to revise relevant routines. Best regards.
#5
I would kindly ask you Gintaras, one fulrther question, which it might facilitate my investigation : how is this routine (__RegisterWindowClass.Unregister) reported as causing this error is called, by whom? Let me add that this error occurs only when the .exe version is run. No problem when run under QM.
#6
It is called by __RegisterWindowClass class destructor. Destructors of static variables are called before exe process exits. I'll test how it works in exe.
#7
Thank you, sincerely. If you find it useful I can upload the whole application, right now.
#8
Tested, with __RegisterWindowClass works well. I guess it is a memory corruption: something overwrites Unregister bytecode or related memory.
#9
Does it happen with simple macro like this?:

Macro Macro32
Code:
Copy      Help
;/exe
__RegisterWindowClass+ g_rkkk.Register("khfhfhfhfhhf" &DefWindowProc)

if(!ShowDialog("dialog_with_progres_Clepsy" &dialog_with_progres_Clepsy 0)) ret

;g_rkkk.Unregister

;BEGIN PROJECT
;exe_file  $my qm$\Macro32.exe
;END PROJECT
#10
Quote:If you find it useful I can download the whole application, right now.


Yes, I'll test it.
Export its folder to a .qml file, open/test that file (important, because I usually cannot test your macros because of many unknown functions), then attach here.
#11
Macro32 works OK with me. I upload the problematic macro. Please, run the executable and then click cancel. It then gives the error, in my PC. Many thanks, again.


Attached Files
.qml   DataAcq_v4.qml (Size: 10 KB / Downloads: 268)
#12
Cannot run it, unknown identifier.
#13
I am sorry for this inconvenience. I understand this upload does not have any unknown identifiers.

Dear Gintaras, I have just found my error! I am sorry for taking your time. It was absolutely my mistake. Best Regards.


Attached Files
.qml   DataAcq_v5.qml (Size: 8 KB / Downloads: 262)
#14
OK.


Forum Jump:


Users browsing this thread: 1 Guest(s)