Sign in to follow this  
  • entries
    570
  • comments
    2427
  • views
    216197

Untitled

Sign in to follow this  

66 views

Ugh, I'm having issues. I'm integrating my virtual file system with the texture/font loaders and shit, and for some reason the application is crashing when it exits. I mean, its annoying, and shouldn't be happening, especially since I unit-tested the virtual file system crap and didn't find any weird errors like this.

In any case, I stripped the whole thing down to the skeleton code, and the following code *should* duplicate the error, I think -
#include 
#include
#include "SDL_TTF.h"

int main( int argc, char* argv[] ) {
FILE* file = fopen( "data/testfile.txt", "r+b" );
char buffer[256];
memset( buffer, 0, sizeof( buffer ) );
fread( buffer, 1, sizeof( buffer )-1, file );
fclose( file );

system( "pause" );

return 0;
}

It should raise an unhandled exception when you click a button after the pause. I'm using MSVC7 right now, I couldn't built it in MSVC6 yet (SDL_TTF's messing with the main function, which yes omg is defined as int main( int argc, char* argv[] ) but I still get "cannot find _main" errors.

But yeah. Does anyone else get that error with the above code? Or did I manage to completely fuck something up like I did with MSVC8?

EDIT: Got it working with MSVC6. Forgot to link the SDL libs (lol). Lets see if that's the same issue with MSVC7.

EDIT2: Nope, still crashed in MSVC7. Grah.

EDIT3: lolz, just including "SDL_TTF.h" is making it crash. No idea why though - it was working fine before. *siiiigh*.

EDIT4: ...building with /MD instead of /MDd corrects the issue. Weird, and whatever.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now