Seg fault when changing the nb of columns, book style

I’m editing a document with the book style and paper page layout. Texmacs crashes every time I try to change the layout from one column to two columns. Everything is fine if the document style is generic, article, … with either paper or payrus page layout.
What is strange to me is that Texmacs doesn’t crash when using the papyrus page layout and book style.

One can note also that this behavior is not reproduced when I open a fresh new document with book style and change the layout from 1 to 2 columns either in paper or papyrus page layout.

Here is below the error message I get.
Any idea ?

TeXmacs] With linked TrueType support
TeXmacs] warning, missing font, loading global substitution list
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 734, resource id: 33556659, major code: 40 (TranslateCoords), minor code: 0
Throwing segmentation fault
-------------------------------------------------
Error message:
  segmentation fault

System information:
  TeXmacs version  : 1.99.19
  Built by         : abuild
  Building date    : Fri Mar  5 15:46:59 UTC 2021
  Operating system : linux-gnu
  Vendor           : pc
  Processor        : @CONFIG_HOST_CPU@
  Crash date       : ven. 30 avril 2021 13:25:41 CEST

Editor status:
  Root path          : [ 1 ]
  Current path       : [ 1, 0, 0 ]
  Shifted path       : [ 1, 0, 0 ]
  Physical selection : [ 1, 0, 0 ] -- [ 1, 0, 0 ]

Backtrace of C++ stack:
  texmacs.bin : () + 0xed2cc6
  texmacs.bin : () + 0x41ff80
  /usr/lib/x86_64-linux-gnu/libc.so.6 : () + 0x46210
  texmacs.bin : () + 0xbc28a6
  texmacs.bin : () + 0xbc2a72
  texmacs.bin : () + 0x5167da
  texmacs.bin : () + 0x516ce3
  texmacs.bin : () + 0x518773
  texmacs.bin : () + 0x518c06
  texmacs.bin : () + 0xbc654b
  texmacs.bin : () + 0xbc7020
  texmacs.bin : () + 0xbca30c
  texmacs.bin : () + 0xc3f2c8
  texmacs.bin : () + 0xb0af28
  texmacs.bin : () + 0xc51757
  texmacs.bin : () + 0xfb2c60
  texmacs.bin : () + 0xfb3462
  texmacs.bin : () + 0xfb4492
  texmacs.bin : () + 0x7676d9
  texmacs.bin : () + 0x769c84
  texmacs.bin : () + 0x6ba8ad
  texmacs.bin : () + 0xee3264
  texmacs.bin : () + 0xd6286a
  texmacs.bin : () + 0x30b3e4
  texmacs.bin : () + 0xba4558
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QMetaObject::activate(QObject*, int, int, void**) + 0x7d0
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QTimer::timeout(QTimer::QPrivateSignal) + 0x3e
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QObject::event(QEvent*) + 0x1d5
  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 : QApplicationPrivate::notify_helper(QObject*, QEvent*) + 0x86
  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 : QApplication::notify(QObject*, QEvent*) + 0x330
  texmacs.bin : () + 0xba3c70
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QCoreApplication::notifyInternal2(QObject*, QEvent*) + 0x18a
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QTimerInfoList::activateTimers() + 0x3d0
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : () + 0x2de1e4
  /lib/x86_64-linux-gnu/libglib-2.0.so.0 : g_main_context_dispatch() + 0x27d
  /lib/x86_64-linux-gnu/libglib-2.0.so.0 : () + 0x52400
  /lib/x86_64-linux-gnu/libglib-2.0.so.0 : g_main_context_iteration() + 0x33
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 0x65
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 0x12b
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QCoreApplication::exec() + 0x96
  texmacs.bin : () + 0x286635
  texmacs.bin : () + 0x10ad423
  texmacs.bin : () + 0x11040ae
  texmacs.bin : () + 0x10eb760
  texmacs.bin : () + 0x11046c7
  texmacs.bin : () + 0x11047b4
  texmacs.bin : () + 0x10e9a1a
  texmacs.bin : () + 0x10ad5ab
  texmacs.bin : () + 0x25ede6
  /usr/lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main() + 0xf3
  texmacs.bin : () + 0x284c0e

-------------------------------------------------
terminate called after throwing an instance of 'string'
Aborted (core dumped)

Hmm it looks like it comes from the the use of Appendix.
No crash anymore if I use a section in place of the Appendix.

Can you produce a minimal document which show the problem? This can be helpful to debug.

Yes of course, I’ll send here a link of a minimal doc.

I don’t know how to attach file here, so I’ve made a repo with the file in it:

I’m using Texmacs v1.99.19 on Ubuntu 20.04

I can confirm this, but have no idea what is going on. It’s probably best to report it on Savannah.

Ok done:
https://savannah.gnu.org/bugs/?60495

2 Likes

It is a curious bug. It disappears when I put some text in the chapters and sections.
Maybe TeXmacs could not find any good point for breaking one of the pages and somehow panicked.
I will have to investigate this.