Sunday, February 7, 2010

Bugs so far.

0: A lot of issues get resolved by updating graphics drivers.

1: Switch to fullscreen fails on Windows if folder name contain spaces.
Why: microsoft's broken implementation of execv function. execv function takes name of program and list of arguments, then executes the program with arguments. Under any operating system but Windows, that means the list of argument comes into the program as is, no matter what the arguments contain. After all, that's the whole point of passing the list of arguments around instead of a single command string.
Under Windows, the list of arguments is converted into a string like this: arg1+' '+arg2+' '+arg3... , and then, in other place in the runtime, the string is split by ' ' . Meaning that if any argument contains a space, it comes out as 2 arguments. Needless to say, this highly peculiar behaviour is not documented. I need execv for restarting the application on mode change.
I workarounded the bug already but you'll have to wait a few days for the fix because I am in middle of a big change to the gameplay.

2: Old OS X issue. Some people with entry level cheap graphics card (NVidia 7300 gt 256mb for example) combined with dual xeon experience some sort of system hang (spinning beachball of death), requiring them to reboot using power switch.
Never had any reports of such happening on any other operating system, either because it does not happen, or because on other operating systems users tend to understand that if system hangs up like this, that's the system to blame.
One user managed to login remotely into the system and kill game's process, but the OS X GUI remained locked up, clocks not updating (meaning that it's not a keyboard glitch). Which seems to imply that the core of system did not hang, but Quartz (OS X graphics layer) hangs rock solid. Geez. (No credit to Apple for core staying alive, coz the core was ripped off BSD)
The causes unknown, I cannot reproduce it (I don't have that hardware), and WTF are entry level graphics cards doing inside expensive, professional dual-cpu systems anyway? That's just asking for trouble. The driver for cheap-ass card may well poorly support professional dual cpu systems (with 2 cpu chips on board, not just dualcore). In my opinion that's some driver bug which gone unnoticed for ages on OS X due to absence of games with advanced graphics.

3: Linux. For some people something is wrong with audio again, and I'd bet it again has something to do with PuPuPulssssseAAudio[LOUD CLICK] not always working correctly with OpenAL-soft.
Workarounds if you dont want to exorcise the pulseaudio demon:
If you run The Polynomial from console you see "initializing audio" as last words before crash, try edit the start script and add --nosound .
Alternatively, edit
~/.alsoftrc
and add
drivers = port
or
drivers = pulse
or
drivers = alsa
[ALSA]
mmap=off
depending to what you're using.

Actually, I would recommend to remove PulseAudio. Most likely you don't even need it. PulseAudio being installed by default = the WORST thing that ever happened to Linux audio and Linux usability in general. PA may be a greatest thing since sliced bread if you want to play sound from computer A through computer B, but it is far worse than useless on a typical desktop system. It doubles the bloat, and far more than doubles the number of bugs. It is a pre-alpha quality software wrapping around release-quality sound system (ALSA).
I'm far from being the only developer encountering a lot of problems caused by pulseaudio. SpringRTS, the open source game engine which I occasionally contribute to, suffers from same issues. See the FAQ

2 comments:

  1. I was tempted to buy your Polynomial game but I cannot stand people ranting over PulseAudio... which is, in fact, the GREATEST thing to happen to audio on Linux for a long, loooooong time. It actually makes things work.

    ReplyDelete
  2. Hmm. Looks like simple trolling by parroting back a negation of statement from blog post.

    For reader's information: PulseAudio(PA) is a piece of software which puts itself between programs that want to play sound, and standard sound API (ALSA). It plays sound through standard API just like any application does when PA is not running; it is not audio driver.
    When you're running PA you have one extra thing that can go wrong, with 2 extra interfaces that can go wrong. It does not help any that PulseAudio is far less mature than ALSA. It has no business being enabled by default; why it is enabled is a mystery to me, though I suspect that could be attributed to poor understanding of software by distribution maintainers.

    ReplyDelete