Page 1 of 1

CTD on /editmacro

Posted: Sun Oct 26, 2003 7:30 pm
by MacroFiend
On a completely clean copy of MQ, I CTD when attempting to /editmacro notes or /editmacro load [filename]. I used the default UI for this test in addition to my custom UI though /editmacro did show the command help.

Crashed with the note window open or closed on the following line:

Code: Select all

SetCXSTRText((*EQADDR_CLASSNOTESWND)->pEditWnd->WindowText,Buffer);
Commenting out the above line, I was able to use the commands and watch them change the notes window title bar.

Posted: Mon Oct 27, 2003 9:46 am
by Mckorr
Looks related to the massive struct overhaul in MQ.h recently. I'll poke around in MQ.h, but I'm betting Lax could answer this pretty quickly.

Posted: Mon Oct 27, 2003 10:02 am
by Lax
Actually it's not directly related to the struct overhaul. Plaz was using the structs in his testing it seems, so I don't think that's whats going on.

I'm not sure specifically how the notes window works, I'll have to look into it and maybe I can post some suggestions.

Posted: Mon Oct 27, 2003 10:28 am
by MacroFiend
From looking at it, the LoadNotes function reads the file in via MQ and is supposed to push it in to the editable field. I know that the function Plaz is using works simply because it is able to change the title. My guess would be that either the notes window struct is off where the pEdit struct pointer is.

I can be pretty sure it isn't a file format error (unix vs. dos) since the /editmacro notes command reloads the EQ created notes.txt and that crashed too.

Posted: Mon Oct 27, 2003 12:47 pm
by EqMule
well its Plaz baby, I noticed the ctd as well, but I figured he would fix whatever the reason is for that crash, so I have not poked at it... if you figure it out though, more power to you :)

Posted: Tue Oct 28, 2003 4:42 am
by Plazmic
It worked for me last time I tested it... I'll look at it some more ;(

Posted: Fri Oct 31, 2003 11:03 am
by Plazmic
The struct was messed a bit...

Code: Select all

typedef struct _EQNOTESWINDOW {
/*0x000*/ struct _CSIDLWND Wnd;
/*0x138*/ BYTE	Unknown0x138[[color=red]0x8[/color]];
/*0x140*/ struct _CSIDLWND *pEditWnd;
} EQNOTESWINDOW, *PEQNOTESWINDOW;

Posted: Fri Oct 31, 2003 11:06 am
by Mckorr
0x8, or 0x08? And wouldn't that change 0x140 to 0x146?

Posted: Fri Oct 31, 2003 11:13 am
by Plazmic
0x08 and 0x8 are the same number
0x8+0x8 = 0x10

It still doesn't work right though, since Lax's CXStr function doesn't want to work on edit windows for some reason.
but at least this way it's not a CTD

Posted: Fri Oct 31, 2003 11:18 am
by Lax
I'll take a look at the edit window