Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't use find features
#1
When clicking on the Find window, Find accessible object, etc. buttons of the QM toolbar, QM beeps, displays the error 'Error (RT) in dialog: exception. line: r=DialogBoxIndirectParam(_hinst dt hwndowner &DefDialogProc d), and becomes non-responsive (I have to exit via the system tray icon).

I did install v2.2.1.2 last week, but I uninstalled and reinstalled 2.2.0 and the problem persist. What happened and how do I fix it? Thanks.
#2
Does it happen with all dialogs?
What is your operating system version?
#3
Yeah, it happens with just about anything clicked on the toolbar. Win XP SP2 with latest updates.
#4
Try this:
Exit QM.
Rename your macro list file. If not changed, it is My Documents\My QM\main.qml.
Uninstall QM. Don't delete your personal files.
Install QM 2.2.1.
Run QM. It loads default main.qml file, without your macros.
Test how these dialogs work.
If they work well, exit QM, delete main.qml, rename your file to main.qml, run QM, test how works.
#5
Gintaras Wrote:Try this:
Exit QM.
Rename your macro list file. If not changed, it is My Documents\My QM\main.qml.
Uninstall QM. Don't delete your personal files.
Install QM 2.2.1.
Run QM. It loads default main.qml file, without your macros.
Test how these dialogs work.
The problem persists after these steps.
#6
Code:
Copy      Help
\Dialog_Editor

if(!ShowDialog("" 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020103 "" "" ""

This is a simplest dialog. Create new macro, paste this code and run. Does it work?
#7
No.
#8
I cannot debug this because here works well and I don't see a reason why it could not work. But with your help maybe we'll fix this. Can you create/test several functions if I'll give them?
#9
Yes.
#10
Function ShowDialog2
Code:
Copy      Help
;/
function# [$macro] [dlgproc] [!*controls] [hwndowner] [flags] [style] [notstyle] [param] [x] [y] [$icon] [$menu] ;;flags: 1 nonmodal, 2 macro is DD, 4 set style (default is to add).

;Shows <help "::/user/IDH_DIALOG_EDITOR.html">dialog</help>.

;macro - name of macro containing dialog definition. If flag 2 is set or it is multiline string - dialog definition itself. Default: "" (caller).
;dlgproc - for smart dialogs - address of dialog procedure. Default: 0 (simple dialog).
;controls - address of dialog variables. Default: 0 (don't set/get control values).
;hwndowner - owner window handle. Default: 0.
;flags - see above. Default: 0.
;style - dialog window styles to add or set. Default: 0.
;notstyle - dialog window styles to remove. Default: 0.
;param - some value that dialog procedure can access using DT_GetParam. Default: 0.
;icon - title bar icon. Can be icon file, or icon resource id preceded by : (eg ":133"). Default: "".
;menu - menu. Can be name of item that contains menu definition, or menu definition itself, or menu resource id preceded by : (eg ":1"). Default: "".



#opt nowarnings 1

str txt s
int iid i r de_cb=iif(flags&0x80000000 param 0)
lpstr es=".[][9]First argument of ShowDialog must be name of macro or function that contains dialog definition (text that begins with BEGIN DIALOG)"

;get dialog definition
if(flags&2 or findc(macro 10)>=0) txt=macro
else
,if(len(macro)) iid=qmitem(macro 5); else iid=getopt(itemid 1)
,if(!iid) end "cannot create dialog. Macro not found or is encrypted%s" 0 es
,txt.getmacro(iid)

;convert
i=CompileDialog(txt s de_cb)
if(!i) end "cannot create dialog. Dialog definition not found or is invalid%s" 0 es

;style
int& dst=+(s+12)
if(flags&4) dst=style
;else if(flags&8) dst|style ;;fbc
else if(flags&16) dst~style ;;fbc
else if(flags&32) dst^style ;;fbc
else dst|style
dst~notstyle
if(!hwndowner) dst~WS_CHILD
if(dst&WS_CHILD) flags|1
else
,if(hwndowner) hwndowner=GetAncestor(hwndowner 2)
,if(dst&DS_SETFOREGROUND) AllowActivateWindows

;dialog data
__DIALOG* d._new
d.flags=flags
d.hwndowner=hwndowner
d.pdata=controls
d.param=param
d.x=x
d.y=y
if(dlgproc) d.dlgproc=dlgproc; if(IsBadCodePtr(dlgproc)) end ES_BADARG
if(dst&(WS_VISIBLE|DS_SETFOREGROUND)=0) d.flags2|256

;extra
if(len(icon))
,d.hicon=GetFileIcon(icon 0 0)
,if(!d.hicon) out "Warning: cannot load icon %s" icon
if(len(menu))
,d.hmenu=DT_CreateMenu(menu d.haccel)
,if(!d.hmenu) out "Warning: cannot create or load menu %s" menu

;needs memory allocated by GlobalAlloc
DLGTEMPLATEEX* dt=+GlobalAlloc(0 i)
memcpy(dt s i); s.all

out i
outb dt i 1
out _hinst
out &DefDialogProc
out d

;create dialog window
if(flags&1) ;;nonmodal
,r=CreateDialogIndirectParam(_hinst dt hwndowner &DefDialogProc d)
,if(!r) r=-1
else
,r=DialogBoxIndirectParam(_hinst dt hwndowner &DefDialogProc d)
GlobalFree(dt)
0 ;;process messages, or later something will not work, eg GetKeyState
if(r!=-1) ret r

;ge
end "cannot show dialog"
err+
,if(dt) GlobalFree(dt)
,out "Error (RT) in dialog: %s,[][9]line: %s" _error.description _error.line

Function outb
Code:
Copy      Help
;/
function !*ptr nBytes [flags] ;;flags: 1 show characters too

out _s.encrypt(8 _s.fromn(ptr nBytes) "" 1)
if(flags&1)
,str s.all(nBytes*3 2 32)
,int i c
,for(i 0 nBytes)
,,c=ptr[i]
,,if(c<32) continue
,,s[i*3+1]=c
,out s

Create the above functions and this macro:
Code:
Copy      Help
\Dialog_Editor

if(!ShowDialog2("" 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020103 "" "" ""

Run the macro. What is in the QM output?
#11
64
01 00 FF FF 00 00 00 00 00 01 00 00 44 0A C8 90 00 00 00 00 00 00 DF 00 87 00 00 00 00 00 00 00 08 00 00 00 00 00 4D 00 73 00 20 00 53 00 68 00 65 00 6C 00 6C 00 20 00 44 00 6C 00 67 00 00 00
ÿ ÿ D È
#12
Do you use data execution prevention?

Right click My Computer, select Properties, select Advanced tab, click first Settings button (in Performance box), select Data Execution Prevention tab. If checked is "Turn on DEP for all programs ...", check another option button, or add QM to exceptions. Was it checked? Also probably needs to reboot.
#13
Yes, I did enable that last week, now that you mention it, and excluding QM does resolve the problem -- thanks. Any plans to support DEP enabled for QM?
#14
Possibly. But the problem is that I don't have a computer with DEP-enabled processor. With software-based DEP QM runs well.

Thank you.
#15
QM 2.2.1.3 will work well with DEP. Will be released this week.

On my computer hardware DEP was just disabled in BIOS.


Forum Jump:


Users browsing this thread: 1 Guest(s)