Skip to main content
gamedev.net
🔒 Locked

strange problem when using new

Started by sebb_hysteria Sep 1, 2003 at 5:32 PM 4 replies 550+ views
Original Post
sebb_hysteria
sebb_hysteria
hi all, i''ve got a very strange problem in my program, sometimes it crashes with a simple call to new. I really don''t know why it doesn''t work. Why calling new could fail ? i don''t think it could be a memory problem, because there''s much memory left when the code crashes. Is there a reason why new could fail ? I use Visual studio 6.0, and the code allways crashes after _heap_alloc_base( ), in NTDLL! ... does anybody got an idea about what this problem could be ? i really need help, i''m so confused with this thanks.
RenderTarget
RenderTarget
Nobody can say much of anything without code and errors/messages.

I like pie.
[sub]My spoon is too big.[/sub]
Leffe
Leffe
You might need to replace your heap.

Go to your closest computer hardware store and ask them if they have a memory heap, possibly also a new stack.

Alternatively you could just download a new heap from the internet and print it with your printer. Just insert the paper(after some cutting) in your processor and off you go, to the afterworld probably.
daerid
daerid
Leffe, that''s just mean.
daerid@gmail.com
JohnBolton
JohnBolton
quote:
Original post by sebb_hysteria
i''ve got a very strange problem in my program, sometimes it crashes with a simple call to new. I really don''t know why it doesn''t work.



Most likely, the problem is that you are writing past the ends of another allocation and overwriting heap manager data.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.