Fri 23 Sep 2016 04:57:55 AM UTC, original submission:
When I open an older document which was finished being written in February, 2016--and I've been using svn trunk the entire time, updating regularly--TeXmacs crashes. The same thing happens when I build from my github "mirror" on my work branch and when I build from the svn trunk, which I did just to be sure. The crash backtrace here is from the svn trunk build.
I think it may be due to nr_pages = 0 here, causing ny = 0... and so what does that do where it constructs yy?
What's weird is that the document has over 150 pages, not 0.
I will preserve the document as is, and I can send it via direct email on request. It's a large legal document and I can't post it here. I have no way of knowing what it is about it that is causing this. Newer documents appear to work fine.
The diff to add the --gdb switch to the texmacs wrapper script is:
8<--------------------------------------->8
--- a/src/misc/scripts/texmacs.in
+++ b/src/misc/scripts/texmacs.in
@@ -35,4 +35,11 @@ PATH="$TEXMACS_BIN_PATH/bin:$PATH"
@CONFIG_LIB_PATH@="$TEXMACS_BIN_PATH/lib${@CONFIG_LIB_PATH@+":$@CONFIG_LIB_PATH@"}"
export PATH @CONFIG_LIB_PATH@
-exec texmacs.bin "$@" < /dev/null
+if [ "$1" = "--gdb" ]; then
+ shift
+ stty -tostop
+ exec gdb -s /usr/lib/debug$TEXMACS_BIN_PATH/bin/texmacs.bin \
+ -args $TEXMACS_BIN_PATH/bin/texmacs.bin "$@"
+else
+ exec texmacs.bin "$@" < /dev/null
+fi
8<--------------------------------------->8
So now I can start it with it running under gdb. I used the debian build that's in svn trunk, except that I had to re-run ./configure adding the --enable-debug option, then re-run debian/rules binary; also, I've got the pkg-create-dbgsym package installed, and I have:
export DEB_BUILD_OPTIONS=parallel=8 nostrip
So it builds a texmacs-dbgsym package also, which you see gdb loading, below.
% texmacs --gdb 2016-02-18_104906439_Petition_for_Writ_of_Error_Coram_Nobis.tm
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/texmacs/TeXmacs/bin/texmacs.bin...Reading symbols from /usr/lib/debug//usr/lib/texmacs/TeXmacs/bin/texmacs.bin...done.
done.
(gdb) run
Starting program: /usr/lib/texmacs/TeXmacs/bin/texmacs.bin 2016-02-18_104906439_Petition_for_Writ_of_Error_Coram_Nobis.tm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Gtk-Message: Failed to load module "/home/karlheg/gail"
Gtk-Message: Failed to load module "unity-gtk-moduleil"
- (texmacs.bin:7009): WARNING **: (bridge.c:991):atk_bridge_adaptor_init: runtime check failed: (root)
[New Thread 0x7fffbd577700 (LWP 7019)]
[New Thread 0x7fff77fff700 (LWP 7020)]
[New Thread 0x7fff2ffff700 (LWP 7021)]
[New Thread 0x7ffee7fff700 (LWP 7023)]
[Thread 0x7fff2ffff700 (LWP 7021) exited]
running my-init-texmacs
TeXmacs] With linked TrueType support
[New Thread 0x7fff2ffff700 (LWP 7084)]
TeXmacs] missing 'calligraphic' master
TeXmacs] warning, missing font, loading global substitution list
[Thread 0x7ffee7fff700 (LWP 7023) exited]
Thread 1 "texmacs.bin" received signal SIGSEGV, Segmentation fault.
0x0000000000b98537 in pager_rep::make_pages (this=0x8fbad28) at ./Typeset/Page/pager.cpp:291
291 yy[0]= 0;
(gdb) where full
#0 0x0000000000b98537 in pager_rep::make_pages() (this=0x8fbad28) at ./Typeset/Page/pager.cpp:291
nr_pages = 0
nx = 1
d = 0
ny = 0
pixel = 756
pg = {rep = 0x8f8a5e0}
xx = {rep = 0x8fa8f80}
yy = {rep = 0x94a03a8}
x = {rep = 0x7fffffffc350}
y = {rep = 0x7fffffffc3c0}
#1 0x0000000000e2504d in typesetter_rep::typeset() (this=0x34f51a8) at ./Typeset/Bridge/typesetter.cpp:169
st = {rep = 0x2f457f0}
i = 1
n = 566
ppp = 0x8fbad28
rb = {rep = 0xffffc730}
#2 0x0000000000e253e4 in typesetter_rep::typeset(int&, int&, int&, int&) (this=0x34f51a8, x1b=@0x7fffffffcd80: 43499232, y1b=@0x7fffffffcd90: 21098928, x2b=@0x7fffffffcda0: 41165328, y2b=@0x7fffffffcdb0: 46576512) at ./Typeset/Bridge/typesetter.cpp:179
b = {rep = 0xffffc730}
r = {rep = 0x0}
new_bgs = {rep = 0x0}
rs = {rep = 0x2bf1768}
#3 0x0000000000e26c06 in typeset(typesetter_rep*, int&, int&, int&, int&) (ttt=0x34f51a8, x1=@0x7fffffffcd80: 43499232, y1=@0x7fffffffcd90: 21098928, x2=@0x7fffffffcda0: 41165328, y2=@0x7fffffffcdb0: 46576512) at ./Typeset/Bridge/typesetter.cpp:274
#4 0x000000000081f937 in edit_typeset_rep::typeset_sub(int&, int&, int&, int&) (this=this@entry=
0x363f960, x1=@0x7fffffffcd80: 43499232, y1=@0x7fffffffcd90: 21098928, x2=@0x7fffffffcda0: 41165328, y2=@0x7fffffffcdb0: 46576512)
at ./Edit/Editor/edit_typeset.cpp:797
#5 0x0000000000822d51 in edit_typeset_rep::typeset(int&, int&, int&, int&) (this=0x363f960, x1=@0x7fffffffcd80: 43499232, y1=@0x7fffffffcd90: 21098928, x2=@0x7fffffffcda0: 41165328, y2=@0x7fffffffcdb0: 46576512) at ./Edit/Editor/edit_typeset.cpp:853
missing_nr = 2147483647
redefined_nr = 2147483647
#6 0x0000000000789b74 in edit_interface_rep::apply_changes() (this=0x363f778) at ./Edit/Interface/edit_interface.cpp:648
x1 = 43499232
y1 = 21098928
x2 = 41165328
y2 = 46576512
sb = <optimized out>
wb = <optimized out>
#7 0x0000000000d8b2d1 in tm_server_rep::interpose_handler() (this=<optimized out>) at ./Texmacs/Server/tm_server.cpp:157
vw = <optimized out>
buf = 0x34f5058
i = 1
j = 0
#8 0x0000000000c6b1b2 in qt_gui_rep::update() (this=0x1985700) at ./Plugins/Qt/qt_gui.cpp:776
count_events = 1
now = 4992
delay = <optimized out>
#9 0x0000000000c6b360 in gui_start_loop() (this=<optimized out>) at ./Plugins/Qt/qt_gui.cpp:459
#10 0x0000000000c6b360 in gui_start_loop() () at ./Plugins/Qt/qt_gui.cpp:483
#11 0x0000000000d51e51 in TeXmacs_main(int, char**) (argc=2, argv=<optimized out>) at ./Texmacs/Texmacs/texmacs.cpp:434
sv = {rep = 0x1985808}
where = {rep = 0x1b362a0}
i = <optimized out>
flag = <optimized out>
the_default_font = {rep = 0x178f860}
#12 0x00000036586669bf in invoke_main_func (body_data=0x7fffffffd8b0) at init.c:367
closure = 0x7fffffffd8b0
#13 0x000000365863ddca in c_body (d=d@entry=0x7fffffffd850) at continuations.c:349
data = 0x7fffffffd850
#14 0x00000036586a4a10 in scm_c_catch (tag=tag@entry=0x104, body=body@entry=0x365863ddc0 <c_body>, body_data=body_data@entry=0x7fffffffd850, handler=handler@entry=0x365863dde0 <c_handler>, handler_data=handler_data@entry=0x7fffffffd850, pre_unwind_handler=pre_unwind_handler@entry=0x36586a4ff0 <scm_handle_by_message_noexit>, pre_unwind_handler_data=0x0) at throw.c:203
jbr =
{buf = {{__jmpbuf = {233414067120, -8118987530126333125, 0, 233411596272, 21776592, 140735296232736, -8118987530120041669, 8124705867859913531}, __mask_was_saved = 0, __saved_mask = {__val = {0, 0, 0, 0, 0, 4278190080, 0, 0, 0, 6510615555426900570, 6510615555426900570, 0, 0, 2314885530818453536, 2314885530818453536, 0}}}}, throw_tag = 0x0, retval = 0xffffff00ffffff00}
jmpbuf = 0x7fff7d56dd20
answer = 0x404
pre_unwind = {handler = 0x36586a4ff0 <scm_handle_by_message_noexit>, handler_data = 0x0, running = 0, lazy_catch_p = 0}
#15 0x000000365863e3a4 in scm_i_with_continuation_barrier (body=body@entry=0x365863ddc0 <c_body>, body_data=body_data@entry=0x7fffffffd850, handler=handler@entry=0x365863dde0 <c_handler>, handler_data=handler_data@entry=0x7fffffffd850, pre_unwind_handler=0x36586a4ff0 <scm_handle_by_message_noexit>, pre_unwind_handler_data=pre_unwind_handler_data@entry=0x0) at continuations.c:325
stack_item = 233411173824
thread = 0x14c48d0
old_controot = 0x7fffbf034490
old_contbase = 0x7fffffffd880
old_lastframe = 0x0
result = <optimized out>
#16 0x000000365863e480 in scm_c_with_continuation_barrier (func=func@entry=0x36586669a0 <invoke_main_func>, data=data@entry=0x7fffffffd8b0) at continuations.c:367
c_data = {func = 0x36586669a0 <invoke_main_func>, data = 0x7fffffffd8b0, result = 0x36586669a0 <invoke_main_func>}
#17 0x00000036586a2d96 in scm_i_with_guile_and_parent (func=0x36586669a0 <invoke_main_func>, data=0x7fffffffd8b0, parent=<optimized out>) at threads.c:733
res = <optimized out>
really_entered = 1
base_item = 0
#18 0x0000003658666b25 in scm_boot_guile (argc=<optimized out>, argv=argv@entry=0x7fffffffda18, main_func=main_func@entry=0xa38dc0 <new_call_back(void, int, char*)>, closure=closure@entry=0x0) at init.c:350
res = <optimized out>
c = {main_func = 0xa38dc0 <new_call_back(void, int, char*)>, closure = 0x0, argc = 2, argv = 0x7fffffffda18}
#19 0x0000000000a39180 in start_scheme(int, char*, void ()(int, char*)) (argc=<optimized out>, argv=argv@entry=0x7fffffffda18, call_back=call_back@entry=0xd50ef0 <TeXmacs_main(int, char*)>) at ./Scheme/Guile/guile_tm.cpp:49
#20 0x0000000000436c49 in main(int, char**) (argc=2, argv=0x7fffffffda18) at ./Texmacs/Texmacs/texmacs.cpp:593
|