Re: (dsssl) Aborting (exit code 134)

Subject: Re: (dsssl) Aborting (exit code 134)
From: daniel lance herrick <dan.herrick@xxxxxxxxxxxxxxxx>
Date: Fri, 19 Jul 2002 10:42:51 -0400 (EDT)

On 19 Jul 2002, Ian Castle wrote:

> On Fri, 2002-07-19 at 13:25, daniel lance herrick wrote:
> > I have about 19 large sgml documents 
> 
> snip
> 
> > [herrick@dabney dsssl]$ jade -E5 -G -d GMErfq.dsl -t xml C90.sgm >C90.xml
> > Aborted
> > 
> > So jade is printing "Aborted" and exiting with
> > exit code 134 (0x86).
> > 
> 
> How large is large?
> 
> I've not seen it before - having you tried reducing the size of a file
> to see if that makes a difference - and confirms your theory?

Thanks for the response. (If I seem to drop off
the face of the earth, it's because I'm going to
drop all this for a week of vacation in about
three hours.)

The first .sgm it failed on had 145 picture names
to normalize, the first .sgm it did not fail on
had only 17. Those files are 500k and 50k. I
chopped <wrksqnc>...</wrksqnc> elements out of the
tail until it failed with 20 and succeeded with 19
(numbers from memory, might have been a bit
larger), this was using case-fold-down. This told
me which element it was failing on and I studied
that one hard.

Then I tried to construct a less complicated test
case by chopping out stuff that wasn't necessary
in the <wrksqnc>-s I was keeping. This changed the
number of calls to case-fold-down that it took to
make jade "abort". (In other words, it wasn't a
particular call with bad data that was killing
it.) The this-is-required features of someone
else's dtd spread over a dozen files (many
short) made that become more complicated than it
was worth and, after sleeping on it, I started
writing my own normalize function. Thought I could
keep the nesting level shallower because only the
first character needed folding. It took two or
three days (interrupted by higher priority
tasks) to realize it was the nesting structure of
my parentheses and not my datatypes that was
causing the error messages jade was generating.

Last night, my normalize function worked through
all the 145 picture names in the 500k file, but it
died on several other files in the collection. So
I made it less complex (?) and the new version
failed on a different, overlapping, subset of the
files.

Just for the record, my normalize function looks like this, now
(the first version used only one of everything instead of two):


(define lowera (car (list #\a #\f)))
(define lowerb (car (list #\b #\f)))
(define lowerc (car (list #\c #\f)))
(define lowerd (car (list #\d #\f)))
(define lowere (car (list #\e #\f)))
(define lowerf (car (list #\f #\f)))
(define lowerg (car (list #\g #\f)))
(define lowerh (car (list #\h #\f)))
(define loweri (car (list #\i #\f)))
(define lowerj (car (list #\j #\f)))
(define lowerk (car (list #\k #\f)))
(define lowerl (car (list #\l #\f)))
(define lowerm (car (list #\m #\f)))
(define lowern (car (list #\n #\f)))
(define lowero (car (list #\o #\f)))
(define lowerp (car (list #\p #\f)))
(define lowerq (car (list #\q #\f)))
(define lowerr (car (list #\r #\f)))
(define lowers (car (list #\s #\f)))
(define lowert (car (list #\t #\f)))
(define loweru (car (list #\u #\f)))
(define lowerv (car (list #\v #\f)))
(define lowerw (car (list #\w #\f)))
(define lowerx (car (list #\x #\f)))
(define lowery (car (list #\y #\f)))
(define lowerz (car (list #\z #\f)))

(define upperA (car (list #\A #\F)))
(define upperB (car (list #\B #\F)))
(define upperC (car (list #\C #\F)))
(define upperD (car (list #\D #\F)))
(define upperE (car (list #\E #\F)))
(define upperF (car (list #\F #\F)))
(define upperG (car (list #\G #\F)))
(define upperH (car (list #\H #\F)))
(define upperI (car (list #\I #\F)))
(define upperJ (car (list #\J #\F)))
(define upperK (car (list #\K #\F)))
(define upperL (car (list #\L #\F)))
(define upperM (car (list #\M #\F)))
(define upperN (car (list #\N #\F)))
(define upperO (car (list #\O #\F)))
(define upperP (car (list #\P #\F)))
(define upperQ (car (list #\Q #\F)))
(define upperR (car (list #\R #\F)))
(define upperS (car (list #\S #\F)))
(define upperT (car (list #\T #\F)))
(define upperU (car (list #\U #\F)))
(define upperV (car (list #\V #\F)))
(define upperW (car (list #\W #\F)))
(define upperX (car (list #\X #\F)))
(define upperY (car (list #\Y #\F)))
(define upperZ (car (list #\Z #\F)))

(define CAPS1
  (list #\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M
	)
  )
(define CAPS2
  (list #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z
	)
  )
(define lowercase1
  (list->string
   (list #\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m
	 )
   )
  )
(define lowercase2
  (list->string
   (list #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z
	 )
   )
  )

(define (normalize-illus-id str)
  ;; the first character may be a letter to lowercase
  (let* ((lst (string->list str))
	  (first (car lst))
	  (location1 (member first CAPS1))
	  (location2 (member first CAPS2))
	  (ordinal1
	   (if location1
	       (- 14 (length location1)) ;; 1 for A, 2 for B, ... 13 for M
	       #f
	       )
	   )
	  (ordinal2
	   (if location2
	       (- 27 (length location2)) ;; 14 for N, 15 for O, ... 26 for Z
	       #f
	       )
	   )
	  (folded
	   (if ordinal1
	       (car (string->list (substring
				   lowercase1
				   (- ordinal1 1) ordinal1)))
	       (if ordinal2
		   (car (string->list (substring
				       lowercase2
				       (- ordinal2 14) (- ordinal2 13))))
		   first
		   )
	       )
	   )
	  )
    (list->string (cons folded (cdr lst)))
    )
  )

The defines for UpperZ, etc., are strange, but they are the first
version that had my (equal? ...) tests giving the results I was trying
for in the 26 level nested (if ...) version of this.

And I would eagerly devour any comments about programming style.

dan


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread