[l2h] No such luck with "ndbm store returned -1, errno 22, key "" at... "

Julius Smith Julius Smith <jos@w3k.org>
Wed, 15 Mar 2000 11:56:37 -0800


This problem just bit me, apparently while processing the bibliography 
environment in a short document.  It was possibly caused by upgrading from 
RedHat Linux 6.0 to 6.1,  but I had also made some cosmetic changes to my 
.latex2html-init file (not involving title length), so I can't be sure.

The error-triggering line in latex2html was

     $global{$key}-- if $making_name;

(line 10583 of latex2html, version 99.2 beta 6 (1.42)).
I inserted the following 5 lines as a start on debugging:

     # jos 3/14/00:
     if (!$key) {
         print STDERR "*** KEY LOST ***'\n";
         $key = "LOST_KEY";
     }

     $global{$key}-- if $making_name;
     ...

I was hoping to fight past the crash and take a look at the output for 
clues to the problem.  To my surprise, the problem seemed to just go 
away!  So far, I can't see anything wrong with my HTML output.  A recursive 
grep for "LOST_KEY" produces no occurrences in either the l2h temp 
directories or the generated HTML.  It's as if a null $key is an ordinary 
occurrence in l2h, but Perl (ndbm) is now crashing on it.

Perhaps the Perl distributed with RH Linux 6.1 crashes on null hash keys, 
while earlier releases did not?  In any case, the above insert seems to 
functionar as a workaround.  Perhaps the fix should really be

    $global{$key}-- if ($key && $making_name);

Julius

At 03:10 PM 3/7/00 -0500, William Sauve wrote:
>We thought we had worked around the error, but it turned out that it
>only worked one time that way.  After that, any attempt to use the
>makefile with "-long_titles <num>" in it resulted in the same error:
>
>ndbm store returned -1, errno 22, key "" at...
>
>Once we deleted each instance of "-long_titles <num>" from the file, the
>error was extinguished, but of course, there are no long titles either.
>Interestingly, this error does not occur on a similar system where
>everything is the same except that the Linux distribution is Mandrake,
>whereas this one is Red Hat 6.1.
>
>I have noticed one or two references to a similar problem in the Mail
>List Archive, but no solution presented.  Has anyone else had this same
>problem - and possible know a fix for it?
>
>Thanks,
>Will Sauve