News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

DialogBoxParam causes excessive CPU usage??

Started by Shooter, December 15, 2010, 04:36:09 PM

Previous topic - Next topic

Shooter

I'm not sure where to put this problem. I've taken a MASM32 demo project and have attempted to convert it to a GoASM demo project using RadASM 3.x.

Using OllyDbg I've found that the program never exits from this line (it gets stuck between kernel32 and ntdll if I use Animate Trace):


invoke DialogBoxParam,[hInstance],IDD_DLG1,0,ADDR DlgProc,0


The entire project is attached.

I'm thinking it could be either a problem with my command line switches, or possibly a glitch in a dll on my computer.

Any help would be greatly appreciated.

Thanks,
-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

dedndave

i am running XP
it crashes immediately with c0000005

Shooter

Quote from: dedndave on December 15, 2010, 04:51:55 PM
i am running XP
it crashes immediately with c0000005


It actually crashes on you? I'm running XP Pro SP3 and all it does is chew up my CPU usage, +90%.

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Neil

Runs on Win 7 (64 bit) with 24 % CPU usage

Edit, that's on one core of a quad core.

dedndave

sounds a little unstable - lol
i don't use GoAsm - hard to read the code   :P

jj2007

Replace the FF at 40104E with 90, and it will run fine...

Shooter

Quote from: Neil on December 15, 2010, 05:02:36 PM
Runs on Win 7 (64 bit) with 24 % CPU usage

Edit, that's on one core of a quad core.

Neil,
Does the tabstrip operate correctly on Win 7?

Quote from: jj2007 on December 15, 2010, 05:10:55 PM
Replace the FF at 40104E with 90, and it will run fine...

JJ,
I'm not sure what you mean... is that in the debugger itself and not in the .asm?

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Neil

Tabs do nothing.

Sorry, I meant they operate OK but nothing happens.

jj2007

Quote from: Shooter on December 15, 2010, 05:13:16 PM
JJ,
I'm not sure what you mean... is that in the debugger itself and not in the .asm?

Seen from Olly. The point where it chokes is FF - replace with nop (90) or set new origin, and the dialog works.
Sorry that I can't tell you where it is in the asm code, but I have an allergy against archives with many files...

dedndave

doesn't fix it here, Jochen
maybe i am mashing the buttons wrong

Shooter

Quote from: dedndave on December 15, 2010, 05:32:48 PM
well - you may be able to play it in a regular DVD player
but, that doesn't help you get the files off

Huh?
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

jj2007

OK, I'll give you a hint:
      invoke GetDlgItem,[hWin],[IDD_TAB1]
In standard Masm, we use them strange brackets only in rare cases :toothy

Shooter

Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Shooter

Update:

The high CPU usage only appears to occur if the .exe is launched from within RadASM. It operates normally, albeit not correctly at the moment, from Explorer. However, it's still causing issues within OllyDbg.

Btw, I went back and replaced those fancy bracket thingies with numbers. :green

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Farabi

I bet you access a wrong memory address. Maybe you should replace the "[variable]" with "variable".
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"