<<Previous Archive | Next Archive>>

How to Analyze C++ Crashes on End User Systems

When a program crashes, it usually means that the programmer did something bad. But crashes happen, no matter how good the programmer is. C++ programmers are facing more difficult situations than for example C# or Java programmers when trying to identify and fix the cause of a crash on end users systems. Modern, high level languages are able to report the exact location of crashes and exceptions. After the crash, they usually show the whole stack trace of the problem by default on the screen, which the end user is able to send to the programmer then. C++ programmers are not that lucky, but Windows has a built-in functionality which is able to report the whole crash information and makes it possible to debug a crash after it happened on another PC. And interestingly, not all C++ programmers know about this Minidump-Feature. Basically, all you need to do is
__try
{
// execute your code and maybe crash here
}
__except(WriteYourCrashFile(GetExceptionInformation()))
{
}
where you only need to implement the WriteYourCrashFile they way you like your program to handle crashes, like sending the info out per email or simply write a .dmp to disk. This MSDN article gives a nice example on how to do this. Alternatively, if you don't like __try and __execpt, you can also use SetUnhandledExceptionFilter to install a function to handle the exception instead. The file written by MiniDumpWriteDump() can then be opened in VisualStudio and shows the debugger as if the crash happend on your local PC (assuming you still have have the correct .exe and .pdb file on your disk).
If this is all to much effort for you, the function GetExceptionInformation() already gives enough information to indentify bugs, so you might want to use this one instead.

I personally used this technique in a lot of software I wrote and am currently using this in irrfuscator, where it already helped to identify one mysterious, evil bug which I would never have found otherwise, I think. So I can really recommend it.



Bienen und Blumen jetzt öffentlich

Seit wenigen Wochen gibt es eine neue kostenlose Singlebörse namens 'Bienen und Blumen'. Wie der Name vermuten läßt ist das ganze deutschsprachig, darum ist auch dieser Blogeintrag mal völlig ungewohnt auf deutsch.

Was zur Hölle ich mit Bienen und Blumen zu tun habe? Das ganze ist mal wieder ein kleines Projekt an dem ich beteiligt bin. Wir haben uns vor ein paar Monaten zusammengesetzt und gedacht wir starten mal eine Dating-Webseite die völlig gratis und trotzdem nicht werbeüberladen ist, sinnvolle Features hat (also z.b. Such/Filterparameter, wirkliche Anonymität, etc) und den Usern nicht wie viele ähnliche Angebote mit irgendwelchen versteckten Kosten kommt. Einfach so, weil wir denken sowas fehlt einfach im deutschsprachigen (DE/AT/CH) Raum.


Wenn Ihr also ein Date sucht oder einfach mal eine von mir programmierte Webseite kritisieren :) wollt, oder das für eine gute Idee haltet, probiert die Seite mal aus und empfehlt sie weiter bzw noch besser: Verlinkt sie (vielen dank!). Wir freuen uns auch über jede Form der konstruktiven Kritik. Danke :)



Sorry for the next blog post

Sorry about the next german-only blog post, it is in german because it's about a german project which I announced on this blog some weeks before.



Shake it

Usually I don't post links to gameplay videos, but this one is great: Wario Land: Shake It



Not Impressed With OpenGL 3.0

Well, looks like another person is not fond of OpenGL 3.0. Don't know if it is funny. But at least it is not funny if you understand german.



Medieval Town - 3rd place on deled's competition

Alvaro, known as Afecelis if you are a Irrlicht user just won the 3rd place on Deled's summer 2008 modeling competition, congratulations!
He also created a walktrough application with Irrlicht for it, you can watch it here on youtube. Nice!



Irrlicht 1.4.2 released

The Irrlicht team is happy to announce that we just released Irrlicht version 1.4.2.
This release contains a lot of bug fixes and improvements, and I personally like the new setAllowZWriteOnTransparent() feature very much. It simply tells the VideoDriver if transparent materials should automatically not write to the ZBuffer when it makes sense (as Irrlicht did before about version 1.3, which made it pretty easy to use the material system) or that users need to set this manually (which gave more options to people extending the material system for example). Until now, we struggled internally in the team which default would be best, and when we decided to switch to the manual version which about 50% of all irrlicht users wanted, the other half of the user base did not like it of course. So now it is simply possible to set the default yourself, which should make anybody happy.
In addition to the Irrlicht release, I also made available a new irrEdit version for Irrlicht 1.4.2 which now works together with the Vista Aero Window renderer. It did not work with it before because of a - IMO - bug by microsoft which I refused to work around, but as I get about one mail per week complaining about this, I fixed it now. :) Looks nice IMO, Irrlicht 1.4.2 in irrEdit:





EEE at work

It totally sucks to waste 2 hours of your life every day just to go to work. Something I am not used to that much anymore since I am self employed. But from time to time, I have to do this since I am working as Freelancer as well, and I found that my EEE PC is the ideal tool to utilize these 2 hours. In contrast to usual notebooks, it has the perfect size to just pull it out and do some work here and there, or to just try out an idea you just had, especially in the subway or busses. Although, it feels a bit strange to have a full webserver and database server running on this tiny machine. :)





Irrlicht Forum Down

Yes, we know, the Irrlicht Forum is down. Thanks for all your mails :) We are currently working on a solution. Try the Irrlicht wiki in the meantime :)



Darkness Springs update 1.0.2b released

There is now an update of the Darkness Springs browser role playing game available. A few bug fixes (thanks for reporting to a lot of readers of this blog) and speed improvements are included, as well as the possibility to level up to level 50 now, for premium users.

Darkness Springs is one of my side projects if you are wondering why I'm writing this here ;)



Future of graphics programming

Just read an interesting interview with Tim Sweeney [Epic/Unreal/JazzJackrabbit ;)] about Graphics APIs, Larrabee, CUDA etc:
Basically he thinks that current Graphics APIs will not make sense anymore in the very near future - DirectX 9 is the last graphic API that really mattered - and soon everything will return to 100% programmable custom rendering. Sounds very nice and could be true. I personally like that view. Sounds like graphics programming could become fun again, and it's not anymore about who knows how to squeeze the best tricks out of a restricting API. And maybe new games then will not look the same anymore. :)



World of Goo gone gold

2D Boy's World of Goo is a physics based puzzle / construction game and just has gone gold, very nice. Maybe you've heard of this game via penny arcade or the Independent Games Festival before.
Maybe worth mentioning on this blog that World of Goo uses irrKlang as sound library. :)





Spore DRM

Remember when I blogged that I won't buy DRM infested software anymore which phones home and which only works as long as the game developers web servers are running? (HL2, Bioshock, ..) Looks like this attitude has become mainstream now: There are now about 1000 negative Spore reviews on Amazon.com, where people are complaining about that DRM shit.
Interestingly, amazon.co.uk seems to have deleted all those reviews.
Great, maybe someone will listen now.

(logo created by Alfredo Daniel Rezinovsky, licensed under Creative Commons BY-SA 2.5 Argentina)



How software pirates again influenced my work

I always was opposed against software piracy. Since I was a teenager:
Although I didn't get much pocket money, I always bought my computer games. I simply thought this would just be fair. I only knew BASIC, and thought it would be an immense amount of work to create commercial computer games, because I wasn't even able to image how they did it :)

I couldn't afford much of those games because I always bought them, so I quickly started to learn Delphi, began to write my own games and sold them as shareware. So I was able to afford a lot more games and it made me a better programmer :)

Recently, a new chapter of my relationship with software pirates began:
Some weeks ago I noticed that the orders of a software I developed nearly dropped
down to zero. Summer holidays - I thought. But strangley, email support requests and downloads for this software started to increase. Curiously, I googled a bit and found that that piece of software was now available 'for free' on several cracker websites.

Yipee. So basically, some stupid teenagers with too much time and no honor are able to ruin your whole work. I don't know yet what my next steps will be, but at least I'm not depending on these software sales. But of course this is really bad. And quite interesting that even companies seem to prefer using cracked versions of software than spending some very few bucks to use their software legally.
[/rant mode off]



Back

Finally back from my short trip around the world, which was very nice (Woha, Koreans are incredible friendly and helpful). A lot of work is waiting for me here, together with tons of emails, waiting to be answered. But I'm also starting to blog again as well. Soon. Once I have catched up with everything. (What? Google released a browser?! Wow.)