logoalt Hacker News

fweimer • yesterday at 5:56 PM • 10 replies • view on HN

Well, OpenOffice wouldn't print on Tuesdays:

“ What a fascinating bug!! My wife has complained that open office will never print on Tuesdays!?! Then she demonstrated it. Sure enough, won't print on Tuesday. Other applications print. I think this is the same bug. Here is my guess:

Print to a postscript file. Observe the line: %%CreationDate: (Tue Mar 3 19:47:42 2009)

Change "Tue" to anything else: %%CreationDate: (XTue Mar 3 19:47:42 2009)

Save the file and it prints. Tools like evince work because they simply omit the "CreationDate" tag to begin with.

Now something odd happens when my cups script (I am using the Brother MFC420CN) copies the file to a temp file. Some of the code is rearranged, not sure how or why, but it uses a command called "file" to identify the file as "PostScript". This check would work on the original file you printed, but by the time it runs the check on the temp file, it misidentifies. Normally it would return:

   PostScript document text conforming at level 3.0
But there is another check that happens before the PostScript check. If it finds "Tue" at the fourth byte of the file, it identifies it as:

   Jan 22 14:32:44 MET 1991\011Erlang JAM file - version 4.2
So it's not a problem w/ openoffice.org, cups, or the brother printer drivers. It is a bug in the `file` utility, and documented at https://bugs.launchpad.net/ubuntu/+source/file/+bug/248619. ”

https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161...


Replies

redbell • today at 12:02 AM

This was one of the funniest humor stories in software history. You can find some submissions about the topic here:

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

h1bslop • yesterday at 6:08 PM

these types of bugs are epic. often due to people trying to mix and match date and int math

askvictor • yesterday at 8:29 PM

But "Tue" is not at the fourth byte of the file in your example

TacticalCoder • yesterday at 7:23 PM

> It is a bug in the `file` utility

OK but although I love the file utility, why does OpenOffice and/or CUPS rely on it to... print a file that ends with the .ps extension?

It's kinda begging for troubles.

➕ show 1 reply
glitchc • yesterday at 8:21 PM

Thank you for sharing such a brilliant bug.

ssl-3 • yesterday at 6:05 PM

That's really neat.

But now, I really want to know why my office suite needs to tell my printer what day of the week it is.

If the printer is smart enough to make use of that kind of information, then isn't it also smart enough to sort that out on its own? If so, then it seems superfluous.

➕ show 2 replies
k0morebi • yesterday at 9:08 PM

This is up there with the "wifi only works when it's raining" story

cyberpunk • yesterday at 6:47 PM

I miss Joe Armstrong.

monegator • yesterday at 7:59 PM

reminds me of the "email fails over 500 miles" bug lol

➕ show 1 reply
ivanche • yesterday at 6:05 PM

Sure, Ubuntu bug from 2008 (!) exposed in an abandoned project must be super relevant for LibreOffice in 2026.

➕ show 2 replies