Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

There seems to be an implicit maximum column width for input in the Cadabra 2 interface. (Or something else is occurring...)

I need to insert a very long plain text formula into an input file to be read by Cadabra 2. At the moment, I am trying to use the native GUI interface for that (I haven't tried if I can work around this with a jupyter notebook) and I find that the program crashes if I cut and paste a very long formula (~4700 columns).

in Bug reports by (1.1k points)

1 Answer

+1 vote

Can you run cadabra2-gtk from inside gdb and get me a backtrace when this happens? I suspect it crashes in gtk itself.

by (83.1k points)

The backtrace reads:

#0  0x00007ffff74860b5 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ffff7488a9c in g_log_writer_default () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff7486cf7 in g_log_structured_array () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff7487724 in g_log_structured_standard () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff6615cea in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#5  0x00007ffff6622d13 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#6  0x00007ffff5c330db in _XError () at /lib/x86_64-linux-gnu/libX11.so.6
#7  0x00007ffff5c2fe47 in  () at /lib/x86_64-linux-gnu/libX11.so.6
#8  0x00007ffff5c2fee5 in  () at /lib/x86_64-linux-gnu/libX11.so.6
#9  0x00007ffff5c30832 in _XEventsQueued () at /lib/x86_64-linux-gnu/libX11.so.6
#10 0x00007ffff5c22171 in XPending () at /lib/x86_64-linux-gnu/libX11.so.6
#11 0x00007ffff661d183 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#12 0x00007ffff747fbc1 in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff7480132 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff74802c3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff62abfd5 in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#16 0x00005555555dcd19 in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at /usr/local/src/cadabra2/frontend/gtkmm/main.cc:21
(gdb) 

The error itself is:

(cadabra2-gtk:15516): Gdk-ERROR **: 17:24:56.276: The program 'cadabra2-gtk' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 6312 error_code 11 request_code 130 (MIT-SHM) minor_code 5)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Thread 1 "cadabra2-gtk" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff74860b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
...