Blog
Page: 0 ... 5 ... 10 ... 15
Arrrgh!!!!
Date: 4/11/2003
My flaming hard drive died!

Peice 'o trash IBM drive... no I didn't store anything that valuable on an "IBM" drive ;) Just all my carefully encoded movies... *sob* And this is the replacement drive for the 1st one that died.
(0) Comments | Add Comment

One for the Windows Refugees
Date: 3/11/2003
Like most Windows refugees I use Mozilla (and no NOT firebird, cause it's still woefully buggy) and there is this little annoying thing that it does differently on linux to the windows build. When you (mostly accidently) click the middle mouse button Mozilla loads whatever is in the clipboard as a URL.

This is purely the most annoying thing about Mozilla.

But there is hope! Type in "about:config" in the address bar, find the value "middlemouse.contentLoadURL", double click it and set it to false.

Then just browse on in peace, safe from stray clicks.
(0) Comments | Add Comment

The Abysmal State of Debugging Under Linux
Date: 26/10/2003
This happens all the time:
lemon% gdb ./scribe
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) r
Starting program: /home/lemon/matthew/Lgi/Scribe/scribe
[New Thread 1078238400 (LWP 10623)]
Screen: 1600 x 1200 @ 24 bpp
InScribe v1.86 (Test43, Linux v2.4, Debug, Kde)
[New Thread 1086864688 (LWP 10640)]
[Thread 1086864688 (zombie) exited]
[New Thread 1097809200 (LWP 10644)]
[New Thread 1116949808 (LWP 10647)]
[New Thread 1125342512 (LWP 10648)]
[New Thread 1133735216 (LWP 10649)]
[Thread 1116949808 (zombie) exited]
[Thread 1125342512 (zombie) exited]
Couldn't get registers: No such process.
(gdb) q
The program is running.  Exit anyway? (y or n) y
"No such process" AND "The program is running"... great... just great. The application just 'exits' somewhere... who knows... gdb won't tell. However it runs fine outside the debugger. So the debugger is screwing up the execution environment so programs exit at strange points. I LOVE gdb... it's the best! *vomit*

So most of the time, to debug non-trivial applications on this supposedly "enterprise ready" operating system you are left with printf.

Super! I love printf!
(0) Comments | Add Comment

More Linux Whining
Date: 22/10/2003
I thought it'd be nice to add cursor support to my LGI apps, so that the mouse cursor changes over splitters, and other active areas of various widgets.

So I discovered XDefineCursor pretty quickly, and it works just fine to change the cursor.

Then comes trying to reset it back to the normal system arrow, and according to the docs you just:
XDefineCursor(Display, Widget, None);
Yeah right. Well THAT didn't work. Crummy implementation, or bad docs, I don't know but the end result is that the cursor just inverts all it's pixels when I try and change it back to the normal arrow. And XUndefineCursor does the same thing before you post some rebuttal in the forums ;)

Stupid X. Bring on Y!
(0) Comments | Add Comment

Loathing Linux
Date: 21/10/2003
Right now I've just had to power cycle my linux box twice! For the same stupid reason that Windows XP raised my ire: it can't multitask to save itself.

I don't care whether you can run 20 apps at once. I do care that when user land task "A" starts chewing up all available memory (inc. virtual) as fast as it can that I have at least a 1 minute window of opportunity to kill the sucka via the Task Manager or the command line, or SOMETHING!

Linux gave me about 5 key strokes on the xterm before it locked solid... which I used to type "top" and watch the first line of output half appear and then stop... Ctrl-Alt-1... nothin... even Ctrl-Alt-Del wouldn't shut the machine down. The scheduler was simply stuck paging massive amounts of memory onto disk.

So reboot... and use ulimit to limit the memory size of that process. Great idea! If ulimit worked as advertised! Good 'ol Linux reliability kicking in.
ulimit -Sd 100000
100mb should be safe enough I think...

"ps -A"

Ctrl-Alt-1?

Ctrl-Alt-Del?

OH COME ON!!!!

*kicks the power button*
(0) Comments | Add Comment

When Linux sucks, it sucks more than anything else.
Date: 14/10/2003
Did you know that popen wasn't thread safe?

Yeah well it ain't. So those nice little 3 liners (popen, fgets, pclose) now turn into a pipe, fork, dup, close, exec, waitpid, hndstate mess. Of course put it in a function and forget about it.

But why? Why not fix the function! It's not the '90s anymore people, where Linux is just for uni students with too much time on their hands.

Btw gdb 6.0 is out. And it fails nicely when you call fork in a program linked to pthreads (not even calling pthreads yet). However with gdb 5.3 you can call fork, exec etc and it all works but popen is still poison.

So now I have the joy of hunting through LGI and removing all calls to popen so that things "Just Work (tm)".
(0) Comments | Add Comment