News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

MDI muilti edit control app crashes. why

Started by xandaz, November 16, 2020, 08:43:39 AM

Previous topic - Next topic

xandaz

    Hey. I'm making a multiple document interface app with multiple edit controls. the application crashes sometimes when loading the text files. does anyone know anything about this? thanks in advance :thumbsup:

jj2007

You are kidding, xandaz... "help, my program crashes" without any code???

xandaz

   sorry.... i thought someone might have been through the same issue. I'll givre you the code right away.

jj2007

The culprit is LoadIconW in mdichild.asm
If you replace that with LoadIcon, 0, IDI_HAND you've got an icon but RegisterClass fails for other, unknown reasons.

I can't tell you more because I don't have the energy to deal with a project that has no comments and is distributed over a dozen files. Sorry to be rude but you should rethink your approach to programming.


xandaz

   ok ... i'll think about that. Thanks JJ.

HSE

Hi Xandaz!

Look like something is pointing nowhere.

I only can see a window popup without any parent  :biggrin:
Equations in Assembly: SmplMath

daydreamer

I only get an empty messagebox with OK button
invoke with a missing addr to filename in CreateFile or somewhere else?

you could check for invoke's that return eax==NULL afterwards with Messagebox =found one problem with failed api call

or use debugger to singlestep the suspicious area

well I prefer m2m macro,than bare metal push/pops because if forget one push or one pop get unbalanced stack
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

jj2007

Quote from: daydreamer on November 17, 2020, 03:03:24 AM
invoke with a missing addr to filename in CreateFile or somewhere else?

If you had read my answer above, you would know that it's "somewhere else"

@xandaz: If you comment out this line, you will see a window; however, there are heap errors afterwards - test the Open menu.

        invoke  InitCommonControlsEx,addr iccx
        ; invoke  ManageOpenMode,0

HSE

Hi Xandaz!

You have:
        invoke  ManageOpenMode,0
        invoke  WinMain,hInstance,0,0,SW_SHOWNORMAL


and must be:        invoke  WinMain,hInstance,0,0,SW_SHOWNORMAL
        invoke  ManageOpenMode,0

Equations in Assembly: SmplMath

jj2007

@HSE: That doesn't solve it. Of course, the call does no harm right before ExitProcess, but check the Open menu.

xandaz

    the manageopenmode was put there test purposes only.

HSE

Quote from: jj2007 on November 17, 2020, 04:14:25 AM
@HSE: That doesn't solve it. Of course, the call does no harm right before ExitProcess, but check the Open menu.
Ok. ManageOpenMode crash before WinMain.
Equations in Assembly: SmplMath

jj2007

Quote from: xandaz on November 17, 2020, 04:41:53 AM
    the manageopenmode was put there test purposes only.

Even if you comment it out, the program crashes when you use the Open menu.