[C++/win32] HeapAlloc () crash

Pagina: 1
Acties:
  • 51 views sinds 30-01-2008

  • .oisyn
  • Registratie: September 2000
  • Laatst online: 16:18

.oisyn

Moderator Devschuur®

Demotivational Speaker

Topicstarter
Verdomme, hier kan ik dus echt pissed om worden :(
Ons programma crasht bij een aanroep van HeapAlloc (), zonder dat er ook maar enige indicatie is van waarom nou eigenlijk

De code die hiervoor zorgt is een simpel regeltje C++:

C++:
1
std::istringstream stream;


Zodra die hier komt zegt ie pats! User breakpoint hit
De stacktrace ziet er zo uit:
ntdll.dll!DbgBreakPoint()

ntdll.dll!RtlpNtMakeTemporaryKey() + 0x3baf

ntdll.dll!RtlCaptureContext() + 0x9f9f

ntdll.dll!RtlImpersonateSelf() + 0x525

server.exe!_heap_alloc_base(unsigned int size=40) Line 212 C

server.exe!_heap_alloc_dbg(unsigned int nSize=4, int nBlockUse=2, const char * szFileName=0x0062827c, int nLine=21) Line 397 + 0x9 C

server.exe!_nh_malloc_dbg(unsigned int nSize=4, int nhFlag=0, int nBlockUse=2, const char * szFileName=0x0062827c, int nLine=21) Line 260 + 0x15 C

server.exe!_malloc_dbg(unsigned int nSize=4, int nBlockUse=2, const char * szFileName=0x0062827c, int nLine=21) Line 176 + 0x1b C

server.exe!operator new(unsigned int sz=4, const std::_DebugHeapTag_t & tag={...}, char * file=0x0062827c, int line=21) Line 10 + 0x17 C++

server.exe!std::basic_streambuf >::basic_streambuf >() Line 22 + 0x3f C++

server.exe!std::basic_stringbuf,std::allocator >::basic_stringbuf,std::allocator >(int _Mode=1) Line 24 + 0x40 C++

server.exe!std::basic_istringstream,std::allocator >::basic_istringstream,std::allocator >(int _Mode=1) Line 336 C++

server.exe!db::ObjectInstantiator::load(db::Object::id pIndex={...}) Line 106 + 0xf C++
De cursor staat in _heap_alloc_base na een regel waar HeapAlloc () aangeroepen wordt, met een grootte van 40 bytes. Ik snap er werkelijk helemaal niets van. Het is een vrij groot project qua code, maar erg veel wordt er nog niet gedaan (de code is er wel, maar wordt nog niet aangeroepen). De debug build neemt zo'n 4 mb geheugen in beslag, dus dat moet het probleem niet zijn

Heeft iemand enig probleem wat er aan de hand kan zijn?

Give a man a game and he'll have fun for a day. Teach a man to make games and he'll never have fun again.


  • .oisyn
  • Registratie: September 2000
  • Laatst online: 16:18

.oisyn

Moderator Devschuur®

Demotivational Speaker

Topicstarter
En hop, fout al gevonden :Y)

Er werd naar geheugen geschreven van een object dat al was gedelete |:(

Give a man a game and he'll have fun for a day. Teach a man to make games and he'll never have fun again.


Dit topic is gesloten.