20140723

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

20140723

Post by warlock45 » Fri Jul 24, 2015 11:49 am

Mucking through this, aint had my coffee yet though... trying to use VS2012 as debugger...

Code: Select all

Unhandled exception at 0x04F15801 (MQ2Main.dll) in eqgame.exe: 0xC0000005: Access violation reading location 0x00000004.
Disassembly address

Code: Select all

DrawHUDText(char *, unsigned long, unsigned long, unsigned long, unsigned long)
pointing at

Code: Select all

04F15801  cmp         dword ptr [eax+4],2
Stack Frame = DrawHUDText

CallStack

Code: Select all

>	MQ2Main.dll!DrawHUDText(char * Text, unsigned long X, unsigned long Y, unsigned long Argb, unsigned long Font) Line 113	C++
 	MQ2HUD.dll!OnDrawHUD() Line 456	C++
 	MQ2Main.dll!PluginsDrawHUD() Line 535	C++
 	MQ2Main.dll!DrawHUD() Line 94	C++
 	MQ2Main.dll!Heartbeat() Line 318	C++
 	MQ2Main.dll!Detour_ProcessGameEvents() Line 378	C++

poped up a window for MQ2CleanUI.cpp, and pointed at line

Code: Select all

   if (ppDWord[1]<=2)
with red dot warnign next to

Code: Select all

DWORD* ppDWord=(DWORD*)((PCXWNDMGR)pWndMgr)->font_list_ptr;
section being

Code: Select all

VOID DrawHUDText(PCHAR Text, DWORD X, DWORD Y, DWORD Argb, DWORD Font)
{
    DWORD sX=((PCXWNDMGR)pWndMgr)->ScreenExtentX;
    DWORD sY=((PCXWNDMGR)pWndMgr)->ScreenExtentY;

    CTextureFont* pFont=0;
    DWORD* ppDWord=(DWORD*)((PCXWNDMGR)pWndMgr)->font_list_ptr;
    if (ppDWord[1]<=2)
    {
        pFont=(CTextureFont*)ppDWord[0];
    }
    else
    {
        pFont=(CTextureFont*)ppDWord[2];
    }
    if(Font!=2 && Font<12)
        pFont->Font=Font;
    pFont->DrawWrappedText(&CXStr((char*)Text),X,Y,sX-X,&CXRect(X,Y,sX,sY),Argb,1,0);
    pFont->Font=2; // reset back to 2 or it screws up other HUD sizes
}
#endif

output window

Code: Select all

[MQ2]mq2custombinds->SetGameState(5)
[MQ2]mq2chatwnd->SetGameState(5)
[MQ2]MQ2ChatWnd::SetGameState()
[MQ2]RemoveMQ2KeyBind(MQ2CSCHAT)
[MQ2]mq2itemdisplay->SetGameState(5)
First-chance exception at 0x04F15801 (MQ2Main.dll) in eqgame.exe: 0xC0000005: Access violation reading location 0x00000004.
Unhandled exception at 0x04F15801 (MQ2Main.dll) in eqgame.exe: 0xC0000005: Access violation reading location 0x00000004.
Attachments
20150723.xml
exported file
(2.17 KiB) Downloaded 47 times

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: 20140723

Post by warlock45 » Fri Jul 24, 2015 12:23 pm

trying to get the windng installed not having much luck ( links are broken, foudn the appropriate files, got it installed, but not finding it... /boggle)

meanwhile foudn that if I remove my MQ2Hud.ini files ( thus generating a fresh one) I can get ingame. But if I add something to draw, it crashes. Testing now to see if it is a specific part of the HUD set up I am using or just anything that draws.

Currently the full HUD I am using is

Code: Select all

[MQ2HUD]
Last=Elements
SkipParse=5
CheckINI=10
UpdateInBackground=on
ClassHUD=on
ZoneHUD=on
UseFontSize=off

[Elements]
Time1=3,10,42,255,255,255,TIME:
Time2=3,40,42,0,255,0,${Time.Time12}
TimeBG=3,8,41,000,000,000,||||||||||||||||||||||||||||||||||||||||
TimeBG2=3,9,42,000,000,000,||||||||||||||||||||||||||||||||||||||||
TimeBG3=3,8,38,000,000,000,=============
TimeBG4=3,8,46,000,000,000,=============

LastTell1=3,10,54,255,255,255,LAST TELL =
LastTell2=3,75,54,0,255,0,${MacroQuest.LastTell}
RegExp1=3,10,66,255,215,0,EXP =
RegExp2=3,40,66,0,255,0,${Me.PctExp}%
AAExp1=3,10,78,255,255,0,AAEXP =
AAExp2=3,57,78,0,255,0,${Me.PctAAExp}%
6
Macro1=3,110,111,0,250,0,${If[${Macro.Name.NotEqual["NULL"]},${Macro.Name},]}
Macro2=3,10,111,225,250,225,MACRO RUNNING =

RDPauseInd1=3,10,122,225,250,225,${If[${Macro.Name.Equal["raiddruid.mac"]},RD PAUSED = ,]}
RDPauseInd2=3,85,122,225,0,0,${If[${RDPause},YES,]}
RDPauseInd3=3,85,122,0,225,0,${If[!${RDPause} && ${Macro.Name.Equal["raiddruid.mac"]},NO !!,]}
RDPauseBG1=3,8,121,000,000,000,${If[${Macro.Name.Equal["raiddruid.mac"]},|||||||||||||||||||||||||||||||||||||||||||||||||||||,]}
RDPauseBG2=3,9,123,000,000,000,${If[${Macro.Name.Equal["raiddruid.mac"]},||||||||||||||||||||||||||||||||||||||||||||||||||||,]}
RDPauseBG3=3,9,113,000,000,000,${If[${Macro.Name.Equal["raiddruid.mac"]},_________________,]}
RDPauseBG4=3,9,122,000,000,000,${If[${Macro.Name.Equal["raiddruid.mac"]},_________________,]}
RDPauseBG5=3,9,112,000,000,000,${If[${Macro.Name.Equal["raiddruid.mac"]},_________________,]}

Players1=3,10,99,200,200,200,Players In Zone =
Players2=3,95,99,0,255,0,${SpawnCount[pc]}

GMInd1=3,10,89,255,140,0,${If[${Spawn[gm].ID},GM,]} 
GMInd2=3,10,89,255,140,0,${If[${Spawn[gm].ID},,GM]}              
GMInd3=3,30,89,255,0,0,${If[${Spawn[gm].ID},GM In Zone!,]} 
GMInd4=3,30,89,0,250,0,${If[${Spawn[gm].ID},,None In Zone]}

LOS=5,-5,-5,0,255,8,${If[${Target.ID} && ${Target.LineOfSight},SEE,]}
BeneRange=5,-5,15,0,150,255,${If[${Target.Distance}<=190 && ${Target.ID} && ${Target.Type.Equal[PC]},HEAL,]}
DetriRange=5,-5,15,255,0,0,${If[${Target.Distance}<=295 && ${Target.Type.Equal[NPC]},HURT,]}
which has been working fine for me for years. Will update

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: 20140723

Post by EqMule » Fri Jul 24, 2015 12:27 pm

I'll take a look at this today I was in the middle of other coding when they ninja patched so it's very likely I pushed a zip with devcode in it not meant for production.
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: 20140723

Post by warlock45 » Fri Jul 24, 2015 12:31 pm

--nods-- thanks hoss, trying to help narrow it down.

Looks like anything I put in that actually draws is causing the crash.

I know you hear this a lot but, if there is anything else I can cough up to help, let me know.

Off to commit breakfast activities at the kids in the hopes of quietness

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: 20140723

Post by EqMule » Fri Jul 24, 2015 2:59 pm

nm still broken ill be back
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: 20140723

Post by EqMule » Fri Jul 24, 2015 4:32 pm

try this one:

Code: Select all

//Actual size 0x1a4 Jul 18 2015 (see 4ACB15) - eqmule
typedef struct _CXWNDMGR {
/*0x000*/ LPVOID CXWNDMGR__vtable;
/*0x004*/ DWORD Count;
/*0x008*/ struct _CSIDLWND **pWindows;
/*0x00c*/ BYTE Unknown0x00C[0x40];
/*0x04c*/ DWORD LastInteractionTimeStamp;//when mouse or keyboard was last clicked
/*0x050*/ DWORD MouseMoveTimeStamp;//when mouse was last moved
/*0x054*/ DWORD KeyHeldTimeStamp;//how long current/last key has been held
/*0x058*/ BYTE Unknown0x058[0xc];
/*0x064*/ PCSIDLWND LastWindowSelected;//when you select a window its pointer shows up here
/*0x068*/ PCSIDLWND CurrDraggedWindow;//when you drag a window its pointer shows up here
/*0x06c*/ BYTE Unknown0x06c[0x4];
/*0x070*/ PCSIDLWND CurrWindowUnderMouse;//Current window pointer is over if this is 0 we are above MAIN Window
/*0x074*/ PCSIDLWND CurrWindowUnderMouseCopy;//Current window pointer is over if this is 0 we are above MAIN Window
/*0x078*/ BYTE Unknown0x078[0x1c];
/*0x094*/ DWORD ScreenMouseX;
/*0x098*/ DWORD ScreenMouseY;
/*0x09c*/ BYTE Unknown0x09c;
/*0x09d*/ bool KeyboardFlags[4];    // 7d-80
/*0x0a1*/ BYTE Unknown0x0a1[0x27];
/*0x0c8*/ DWORD ScreenMouseXCopy;
/*0x0cc*/ DWORD ScreenMouseYCopy;
/*0x0d0*/ CHAR Unknown0x0d0[0x3c];
/*0x10c*/ DWORD ScreenExtentX;
/*0x110*/ DWORD ScreenExtentY;
/*0x114*/ DWORD Unknown;
/*0x118*/ DWORD font_list_ptr;
/*0x11c*/ BYTE Unknown0x11c[0x14];
/*0x130*/ DWORD ScreenMouseLookX;//last position MouseX was at before we mouselooked
/*0x134*/ DWORD ScreenMouseLookY;//last position MouseY was at before we mouselooked
/*0x138*/ BYTE Unknown0x138[0x6c];
/*0x1a4*/ 
} CXWNDMGR, *PCXWNDMGR;
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: 20140723

Post by warlock45 » Fri Jul 24, 2015 5:47 pm

sorry, but to which file would you like for me to try this in?

klaarg
decaying skeleton
decaying skeleton
Posts: 5
Joined: Wed Dec 26, 2007 1:55 pm

Re: 20140723

Post by klaarg » Fri Jul 24, 2015 5:57 pm

That replaces existing structures in EQUIStructs.h

I'm was having the same crash problems and I've replaced the old structure with this one and it appears to have solved the problem.

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: 20140723

Post by warlock45 » Fri Jul 24, 2015 8:03 pm

ah, learn something new every day. Thanks hoss

And to add a second , yes it appears t have fixed the issue. Thank you EQMule =D

User avatar
htw
a grimling bloodguard
a grimling bloodguard
Posts: 512
Joined: Wed Feb 18, 2004 8:30 pm
Location: Albuquerque, NM USA
Contact:

Re: 20140723

Post by htw » Fri Jul 24, 2015 9:24 pm

warlock45 wrote:trying to get the windng installed not having much luck ( links are broken, foudn the appropriate files, got it installed, but not finding it... /boggle)

<snip>
If you are still interested in windbg.

The tools are part of the SDK/WDK now, you download that, and just choose that when you go to do the install of said package. Refer to here: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

After you install it (or if you do find an old package installer), it should be in your start menu, Programs \ Debugging Tools for Windows or Debugging Tools for Windows (x64)

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: 20140723

Post by warlock45 » Sat Jul 25, 2015 7:46 am

Ah, I was looking for wndbg and not finding it after installing. Thanks for the heads up =D