Monday, January 25, 2010

more complicated than neccessary - silent fail

After watching fefe and Erdgeist bash stupid APIs on the 26C3, I decided to also write/rant about such topics that I came across in the past. So here's the first one, from quite a while ago already...


Solaris-Code reentrant


I think you can safely say that most code these days should be multithread-aware, even if it doesn't feature threads itself. Older API-calls easily cause trouble since they are by design not reentrant - or at least their implementation isn't.

I understand that the programmer has to ensure his code is thread-safe. He has to know to call the right reentrant-variants of syscalls whenever possible. But what I experienced on Solaris really left me baffled.

Seems like on Solaris (at least V2.8 for SPARC), if you want to have certain system-library calls behave correctly in a multithreaded environment, you have to set the compiler(!) flag "_REENTRANT". Yes, you as a programmer have to tell the system header-files that you want them that you are planning to use them in a multithreaded environment!

But the best part: If you don't set that flag, you probably won't notice right away. I noticed when the errno-variable was always 0 in that case. So basically, it fucks up your error-handling - which you will only notice when things actually go wrong.

Monday, January 11, 2010

Dragon Age: Origins and DLC issues on Windows 7

I recently got "Dragon Age: Origins", including promotion codes for 2 additional DLCs: "Blood Dragon Armor" and "The Stone Prisoner". I knew I especially wanted the latter, since having a Golem as Tank in your group is simply cool! And after trying it out, I can only say: It rocks! (pun intended). And so does the game, btw! It's another amazing game from Bioware! Thank you!

But as so often with PCs, I had to tinker with things first to get the DLCs to work at all:

1. DLCs not available


The problem was that even though I successfully registered my unlock-codes on the website for my online-profile, the DLCs didn't show up ingame, not as available, nor pending or installed. In fact, no add-ons did show up at all, no matter if I was signed in to my account in the game or not.

After some searching, I found the answer in the official Bioware-forums: Dragon Age installs a Windows-Service that takes care of the handling of DLCs and that service needs to be running. Well, it didn't on my system. It was installed with the start-method "manual". After actually starting it, I could see the DLCs ingame and download and use them.

A few things came to my mind right away (usually in form of rants, as usual when I'm fixing computer-issues):

  • For one, why does it have to be a Windows-Service? I am no fan of such background-processes constantly running, using up resources, especially when I have no idea that those are installed/running. And for a game? come on! I might have the game installed for a long time, but it doesn't mean I'll be playing it constantly. But the service will... Wouldn't a user-process have been enough for this? Ok, I can see things like background-downloading as an advantage, but not as a big enough one to justify using a windows-service.



  • Second: if using a service, then at least have your game check that it's up and running, and not silently fail/ignore if it's not. If I wouldn't have known that I have DLCs, I wouldn't have ever found out about them when playing the game, since it simply does not show any. This is actually quite counter-productive regarding the fact that Bioware tries to establish an additional income-source via the DLCs they provide for their games.


Anyway, once I installed the DLCs and played the game some more, I ran into another problem...

2. DLCs not "authorized"


When I tried running the game again later and wanted to resume my last savegame: I got an error saying that the savegame requires additional DLCs that are not enabled. So I checked the DLC status ingame and it did show them as installed, but also had (unauthorized) next to the status. I was guessing that it's an online-verification thing, so I tried logging out of my game-account and back in. Then I realized that when I was logged out, the "(unauthorized)" status disappeared and I was able to play the game again. As soon as I logged back in, I had the same problem again.

Well, solution for that one was to run the game "as Administrator". Well, Windows 7 is still Windows, so I'm not too surprised about that "fix", but it still annoyed me. Maybe it has to do with the fact that there is a service involved. But I don't really want to have to think about such issues! These things should work out-of-the-box, and I do neither have a very special system nor a very special configuration. I simply installed the game from DVD, created an online-profile and registered my 2 promo-codes.

But despite all my ranting, I still think that "Dragon Age: Origins" is an amazing game! It has depth, nice graphics, great voice-acting and an epic, exciting story that really takes you in. When a game has that much spoken dialogue and I don't mind at all sitting through it and really listening to it without skipping and when I start to genuinely care about my party-members and their personalities, the game achieved what is hardest: an atmosphere!

So if you have a faible for RPGs and Tolkien-style fantasy-worlds, then go and get this game! And hopefully, you won't be running into problems like I did. And if you do, I hope my post helped you resolve them.