bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspac


From: G. Branden Robinson
Subject: [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0'
Date: Thu, 2 Sep 2021 09:10:21 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #7, bug #61089 (project groff):

Getting to John's actual code, the problem appears to be the emission of an
empty line while inside a diversion, but only sometimes.

The trouble occurs in a string-downcasing macro (which uses the new groff
.stringdown request if it is available).

I added crude instrumentation to the macro file.  It is at present a mystery
to me why outputting an empty line inside a diversion is causing the assertion
failure in one case, but not the other.

John, is this enough information for you to put together a (much) smaller
reproducer?


603 .de ..                                                              
604 .       tm GBR entering macro ..                                    
605 .       ie ''\\n(.z' .tm GBR we're not in a diversion               
606 .       el           .tm GBR we're in diversion '\\n(.z'            
607 .       \" Use Groff's .stringdown request if available             
608 .       if d stringdown \{\                                         
609 .               tm GBR using groff .stringdown                      
610 .               if '\&'\\$1' .if d \\$2 \{\                         
611 .                       tmc GBR first arg was an input break and second
612 .                       tm arg is defined                           
613 .                       stringdown \\$2                             
614 .                       return                                      
615 .               \}                                                  
616 .               tm GBR string to be downcased is '\\*(!^B'          
617 .               ds !^B \\$*                                         
618 .               stringdown !^B                                      
619 .               tm GBR downcase successful; emitting string (BOMBS HERE)
620 \&\\*(!^B                                                           
621 .               tm GBR done emitting string                         
622 .               rm !^B                                              
623 .               return                                              
624 .       \}                                                          
625 .       tm GBR done with groff conditional in macro ..              
626 .
627 .       \" Modify by reference


Here's the tail of the output the foregoing produces.


troff: t/6.2-string-slugs.roff:3: warning: macro '>>' not defined
GBR calling macro .. to downcase string
GBR entering macro ..
GBR we're in diversion '~'
GBR using groff .stringdown
GBR string to be downcased is ''
GBR downcase successful; emitting string (BOMBS HERE)
GBR done emitting string
GBR calling macro .. to downcase string
GBR entering macro ..
GBR we're in diversion '~'
GBR using groff .stringdown
GBR string to be downcased is ''
GBR downcase successful; emitting string (BOMBS HERE)
troff: ../src/roff/troff/env.cpp:2073: distribute_space(): assertion failed:
'desired_space.is_zero() && nspaces == 0'
/home/branden/src/GIT/groff/build/groff: error: troff: Aborted (core dumped)


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61089>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]