Hi,
For \"testing\" purposes, I have been doubleclicking on my \"avatar\".
I am compiling a modified version of PS.
It crashes.
Looking at the bt this is what I can determine:
msvcr71d.dll!_NMSG_WRITE(int rterrnum=10) Line 195 C
msvcr71d.dll!abort() Line 44 + 0x7 C
msvcr71d.dll!_assert(const char * expr=0x0070eba8, const char * filename=0x0070ebb4, unsigned int lineno=559) Line 306 C
> psclient.exe!csArray,csArrayMemoryAllocator >::Get(unsigned int n=2) Line 559 + 0x1f C++
psclient.exe!csArray,csArrayMemoryAllocator >::operator[](unsigned int n=2) Line 585 C++
psclient.exe!psEntityTypes::BuildDfltBehaviors() Line 122 + 0x28 C++
psclient.exe!psMainWidget::OnMouseDown(int button=1, int keyModifier=0, int x=502, int y=439) Line 250 + 0x26 C++
psclient.exe!PawsManager::HandleMouseDown(iEvent & event={...}) Line 279 + 0x27 C++
psclient.exe!PawsManager::HandleEvent(iEvent & event={...}) Line 213 + 0xc C++
psclient.exe!psEngine::HandleEvent(iEvent & ev={...}) Line 606 + 0x12 C++
psclient.exe!psEngine::EventHandler::HandleEvent(iEvent & ev={...}) Line 209 C++
psclient.exe!csEventQueue::Dispatch(iEvent & e={...}) Line 250 + 0x26 C++
psclient.exe!csEventQueue::Process() Line 233 C++
psclient.exe!csDefaultRunLoop(iObjectRegistry * r=0x00b166c8) Line 82 C++
psclient.exe!main(int argc=1, char * * argv=0x00b14cb0) Line 1881 + 0x9 C++
psclient.exe!mainCRTStartup() Line 398 + 0x11 C
KERNEL32.DLL!7c59893d()
In psmainwidget
it is here ->
csString psEntityTypes::BuildDfltBehaviors()
{
csString dflt;
for (size_t i=0; i < types.Length(); i++)
{
if (i > 0)
dflt += \"|\";
dflt += types->commands[types->usedCommand];
}
return dflt;
}
more exactly this line -> dflt += types->commands[types->usedCommand];
i is equal to 0
Then, if we go further, i go to array.h
/// Get an element (non-const).
T& Get (size_t n)
{
CS_ASSERT (n < count);
return root[n];
}
CS_ASSERT is the point.
n = 2 and count = 2.
There it crashes.
Would it be like that also in a debug version of PS or have I introduced some problem somewhere?
Ary