• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

logistix

VC++ Problem...

5 posts in this topic

And no, I do have a winMain() function. I don''t know what''s going on. I have an app that works fine when compiled in release mode, but when I compile in debug mode I get ASSERT errors that eventually crash the program. Suprise, suprise! But the ASSERT errors all refer to dbgheap.c and dbgdelete.c which are MS library functions. I can''t get any indication of what part of my code is causing this to happen. Any Ideas?
0

Share this post


Link to post
Share on other sites
I can''t really help you, but I just wanted to let you know that you''re not alone. I''ve gotten those before, and I''ve even had times where they just disappear. :-) So I don''t know, maybe felisandria knows something about that.

Kevin
0

Share this post


Link to post
Share on other sites
Ooh. Put on the spot. *nervous look*

Well, this is hard without being able to see the actual assertion failures... but here''s some info...

dgbheap.c is responsible for allocating the heap for the debugger. That would be why you don''t see it in release mode. It''s a lot more protective of memory than release is (release would cheerfully let you write over memory used by other applications, if you asked nicely). Check all of your incoming streams, be they tcp/ip or udp coming in, files being read, user input, whatever, and make sure you have enough space allocated to get them. That''s why some of the errors like this are so elusive... you don''t always have too long of a stream... check for buffer overflows.

dgbdel.c is responsible for deleting globals for the debugger. Check your globals. Don''t delete anything you didn''t new.

dbgheap.c(1039) assertion usually means that you tried to free a client block. Don''t do that.

If none of these are the problem, you might want to go ahead and delete all .obj, .exe, and .lib files you have created and try a rebuild all... don''t trust the VC "clean", do it by hand. You can also try reinstalling Windows and/or Visual Studio if you think your libraries might have gotten corrupted (it happens.)
Also, make sure you''re doing regular scans of your disk, I''ve been called in to help a friend with driver problems only to realize their armature has fallen on their hard drive and their disk is quite literally being smoked (barely got the data off in time. we were lucky.) Windows has a scheduler for scanning. Use it.

g''luck

-fel
0

Share this post


Link to post
Share on other sites
quote:
Original post by logistix

And no, I do have a winMain() function.

I don''t know what''s going on. I have an app that works fine when compiled in release mode, but when I compile in debug mode I get ASSERT errors that eventually crash the program.

Suprise, suprise!

But the ASSERT errors all refer to dbgheap.c and dbgdelete.c which are MS library functions. I can''t get any indication of what part of my code is causing this to happen.

Any Ideas?




Well for starters if I were in your situation the very first thing I would do is this:

POINT AND CLICK ANSWER:
When you get the ASSERT failure choose the RETRY option to go into debug mode and then >>unwind<< your callstack. What is happening, at least from what I am gathering from your post, is that you are being thrown into the debugger mode at the point the assertion is called, not what led up to the assertion.

WHY AND HOW ANSWER:
A similar situation is when you compile for the first time and forget a ; and you get a billion errors. Now we all know that your don''t start from the end of your output window to see where the compliation went wrong, your start from the beginning. Same basic rules apply when debugging your assertion.

So to sum this up:
Look up your CALLSTACK window option and use it. (it''s pretty neat, and pretty simple to use -- see your help file)
OR
Start using ASSERT and/or VERIFY macro''s in your MSVC source builds and throw the assertion before the fact, not after (preferred)

OFF TOPIC BUT RELATED TO ALL POST:
From one bit pusher to another -- this isn''t a patronizing post. If you feel insulted then by all means ignore this. If you already know this, again, ignore the post. If it helps, great, don''t ignore the post.
Don''t flame me for tyring to be helpful, however, if I am giving ass-backwards advice, then by all means let the flames begin, or better yet, educate us all.
0

Share this post


Link to post
Share on other sites
Thank you so much deadlinegrunt (and everyone else)!

CALLSTACK!

I knew I was doing a bad delete, I just couldn't figure out how to tell what function was calling it. I was searching the Debug... menu and even trying to hold my mouse over the var hoping a tooltip showing what it referenced would pop up VB style. Leave it to Microsoft to put that not only on the View... menu but on the View... Debug Windows... menu!

I'm the worst debugger. Forget about ASSERT or try...catch. My debugging consists mostly of MessageBox(NULL, "GOT THIS FAR", NULL, NULL);

And in case anyone is interested, here's the problem:

I've got a struct with some pointers to arrays of data that gets saved to a file format. I went to load the file format, checked to see if the pointers were NULL, and DELETE[] if so. Unfortunately I did this after I loaded in the base struct, which in turn loaded in garbage pointers left over from when it was saved (like it should) which of course weren't equal to NULL.

So I just moved the deletes to the top of the function.

Thanks again,

logistix

Edited by - logistix on 1/8/00 4:10:01 PM
0

Share this post


Link to post
Share on other sites