Sunday, November 30, 2025
Error ID10T: PEBKAC
Another errand Bunny and I did yesterday was to pick up a new black ink cartridge for the printer (which cost about half the price of the printer, but that's another rant for another time). We got home, and I replaced the cartridge. Later that night, Bunny attempted to print out The New York Times Crossword Puzzle, as she does every night.
Only it did not print properly. No black was being printed. We futzed with it for some time, and Bunny was able to get enough of the crossword puzzle to work with it, but overall, the black was problematic. I was fearful that we to buy a new printer.
After a night's rest, I had a thought—Bunny mentioned a problem with the printer yesterday, and when I checked, it stated it was out of black ink. I opened the printer up, and removed the black catridge, but the existing cartridges we had were for the previous printer. So that's when we went out running several errands and eating dinner. There were several hours when the printer was open, sans an ink cartridge, so maybe whatever ink was left in the print head had dried up, blocking the ink from flowing. Maybe some denatured alcohol could clean that up.
I removed the new cartridge, cleaned the area where the ink goes into the print head, and when I was putting the cartridge back in, I noticed a small tag on the cartridge sticking out.
Don't tell me, I thought. Did I forget to remove the “remove me before installing” tag?
Yup.
D'oh!
The printer works fine now.
Sigh.
Semantic versioning is hard; let's go build a rocket
Wow!
I found another bug from the depths of time in mod_blog,
or rather, CGILib,
which mod_blog uses.
And again,
this goes back right when I first wrote the code,
possibly back in the late 1990s.
And again,
it's amazing that it took me this long (less than an hour ago) to trigger it!
When I made my previous post,
the title came out incorrectly as “Error ID10T” when it should have been “Error ID10T: PEBKAC”.
Somehow,
any text after the colon was being swallowed up somewhere.
It didn't take long to find the culpret in the function PairNew() and this bit of code:
src = *psrc;
p = todelim(src,&sname,delim,eos);
name = malloc(sname + 1);
if (name == NULL)
return NULL;
memcpy(name,src,sname);
name[sname] = '\0';
if (*p == delim)
{
src = p + 1;
p = todelim(src,&svalue,delim,eos); // WRONG!
}
else
svalue = 0;
This function is used to parse a header line like Title: Error ID10T: PEBKAC and turn it into two values,
TITLE and Error ID10T: PEBKAC.
It's the line labeled “wrong” that points to the problem—I was checking for another occurance of delim
(in this case, it's a colon)
and ignoring anything past that when it shouldn't.
Sigh.
Like most bugs, the fix is easy, but what I do next is difficult. I (try to) use semantic versioning for CGILib, although there are two issues here—one, this is a bug so obviously the fixed version should be 8.0.8, but on the other hand, this introduces an incompatible change so the next version should be 9.0.0. On the gripping hand, it changes what I consider incorrect behavior and aligns the function to better reflect its name, so maybe version 8.0.8?
I think for CGILib this is largely academic, as I don't think anyone really uses the library except me. I shall have to think on this one.
![Oh Chrismtas Tree! My Christmas Tree! Rise up and hear the bells! [Self-portrait with a Christmas Tree] Oh Chrismtas Tree! My Christmas Tree! Rise up and hear the bells!](https://www.conman.org/people/spc/about/2025/1203.t.jpg)