[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:20:44 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #8, bug #61089 (project groff):
Returning to the groff side of things, and why my infinite-loop-fixing commit
caused this problem, here is the code change in question. (There were no
other changes in that commit except to the ChangeLog and to add editor aid
comments to env.cpp.)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 9cbc13048..cb6b1b1af 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2142,6 +2142,14 @@ void environment::possibly_break_line(int start_here,
int forced)
}
distribute_space(pre, bp->nspaces, extra_space_width);
hunits output_width = bp->width + extra_space_width;
+ // This should become an assert() when we can get reliable width
+ // data from CJK glyphs. See Savannah #44018.
+ if (output_width <= 0) {
+ double output_width_in_ems = output_width.to_units();
+ output_warning(WARN_BREAK, "line has non-positive width %1m",
+ output_width_in_ems);
+ return;
+ }
input_line_start -= output_width;
if (bp->hyphenated)
hyphen_line_count++;
Reverting this one change definitely restores groff 1.22.4 behavior for John's
ono.tmac...and definitely resurrects the infinite loop that the change
corrected, since I didn't revert the regression test for it.
Bummer.
Well, as the guru says, the road to enlightenment is paved with HTFs and WTFs.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61089>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61089] distribute_space(): assertion failed:, John Gardner, 2021/09/01
- [bug #61089] distribute_space(): assertion failed:, G. Branden Robinson, 2021/09/01
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/01
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', Dave, 2021/09/02
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', Dave, 2021/09/02
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/02
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/02
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0',
G. Branden Robinson <=
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', John Gardner, 2021/09/02
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', Dave, 2021/09/02
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/03
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', John Gardner, 2021/09/03
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/04
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/04
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/04
- [bug #61089] [troff] assertion failed: 'desired_space.is_zero() && nspaces == 0', G. Branden Robinson, 2021/09/04