I don't know so much about exception processing or lowlevel ios stuff, so this is a bit of a guess.

The code is clearing a stream and setting some flags; the flags being set aren't supported by the Z C++ RTL. I would grep the code for "clear(" and look for an iostream. You'll need to change the parameters to clear(), probably some weird default that doesn't really matter or something new that isn't supported by the Z RTL.

Don't know about the what(); maybe it's the what() function that is calling clear() ? Another thing to grep for.

You may also want to put it some debug output statements and do a trace.btw, was there a coredump? From your output, don't seem to have one. You could potentially trace the faulty statement with the dump.

EDIT3: Now, after making NO changes other than adding in some debug output, it's just segfaulting () after it tries to move to the last character of the map. I think I've got this now, so, unless you are really bent on helping, go enjoy your Thanksgivings (if you're in the US, otherwise, just enjoy your day).

I should really stop posting these types of issues at night when everything looks hopeless...

Thanks again for your help!

EDIT4: Yup, I got it (one too few characters in my array. Funny that it worked on the laptop...). I'll leave the source up as a teaser.

EDIT3: Now, after making NO changes other than adding in some debug output, it's just segfaulting () after it tries to move to the last character of the map. I think I've got this now, so, unless you are really bent on helping, go enjoy your Thanksgivings (if you're in the US, otherwise, just enjoy your day).

I should really stop posting these types of issues at night when everything looks hopeless...

Thanks again for your help!

EDIT4: Yup, I got it (one too few characters in my array. Funny that it worked on the laptop...). I'll leave the source up as a teaser.

Something came up ... checking it out. Might be awhile, 'cos I'm outta town for 2 weeks ... sorry!

QUOTE(koan @ Nov 23 2007, 05:26 PM)

QUOTE(Capn_Fish @ Nov 22 2007, 09:49 AM)

EDIT3: Now, after making NO changes other than adding in some debug output, it's just segfaulting

When the behaviour of the program changes after making such slight changes that's a clear indication of reading/writing to illegal memory.

You should have run valgrind on the program when compiled on your desktop to make sure there are no obvious errors, it would have caught the problem and told you where it was.

btw, if you wish, you can also include the functions GetLevelFromMap, ReadMap and SetTiles can be included as functions in the Tile class, since they seem to mainly manipulate the tiles. Well, but that's software architecture ... I digress ... hehe

Anyway, in case if you wish to have some classing done for your app, let me know, I happen to have a 'fetish' for doing classing etc ...

4. I was thinking if I used some globals that would be used commonly, I could sacrifice a tiny bit of RAM to gain some speed from not having to create and destroy them so often. Misconception?

Yes. Making the variable global pollutes the name space, any savings are insignificant.

Say for example you have a map class with public members width and height. All you need is a reference to the map object and you can access these variables.

If you keep a pointer to the map object then you spend an extra 32/64 bits to store the memory address and there might be 1 extra look up (go to map object, access member). Hardly a huge cost.

QUOTE

5. I don't usually do that (I never expect anybody else to look at my code), but I actually have comments in this stuff. I'm slowly adding more as I work on different sections.

It's design methodology. When you come back to that code to add something or hunt down some bug you'll be looking at a function and trying to work out if it's correct or not. Before I write any functions I write the class definition and comments on what the functions are supposed to do.

Some other comments:

In input.cpp:

CODE

bool eXit = false;

This kind of variable naming is asking for trouble. In map.cpp

CODE

const int TileSize = 32;

this is also not good: you have hard coded a global variable and the value is only accessible in a specific source file.