Created attachment 191603 [details] strace of attempt to access python macros menu, crashes LOo Hello, - I was trying to create my first macro in Python in Writer in Linux. - I made a mistake and it started to run in an infinite loop. - LibreOffice was frozen, waiting for the marco to end. - I killed the macro, but it was not sufficient. - I killed LibreOffice too. Now, any attempt I make to access macros (Tools > Macro > Organize > Python) crashes LOo. I tried: - removing ~/.config/libreoffice - purging (apt purge) all libreoffice packages & reinstalling them But nothing works. LOo is still crashing at any attempt to access the Python macros menu. Accessing Basic macros work though. I join an "strace" of simply opening LOo Writer and clicking on Tools > Macro > Organize > Python. I can't find anything bad myself in it, but it might help you...
- Tools > Macro > Run Macro also crashes - Tools > Macro > Organize > Javascript also crashes
- Tools > Macro > Organize > BeanShell also crashes
A backtrace would be useful (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU/Linux:_How_to_get_a_backtrace)
Created attachment 191611 [details] backtrace, LOo crashes before even getting to Macro problem
Created attachment 191612 [details] strace directly from LOo with interesting error message
Created attachment 191613 [details] LDD log1
Created attachment 191614 [details] LDD log2
Could you try this? open a first terminal and launch LO open a second terminal and type: "gdb --pid=$(pidof soffice.bin)" then wait a bit and type "c" for continue Go back to terminal 1 and try to reproduce the pb. On terminal 2, each time you'll get something like "?" or "??", type "c". after these, you'll got something else, at this moment type "bt" and copy paste the result in a txt file that you'll attach.
Created attachment 191620 [details] Attempting to debug with GDB
Comment on attachment 191620 [details] Attempting to debug with GDB Attempting to do as recommended. - As user => GDB cannot attach to process - Ass root => LOo seems to crash too strongly ; results in message "no bt" in GDB
[Automated Action] NeedInfo-To-Unconfirmed
(In reply to LOO Debugger from comment #10) > Comment on attachment 191620 [details] > Attempting to debug with GDB > > Attempting to do as recommended. > - As user => GDB cannot attach to process > - Ass root => LOo seems to crash too strongly ; results in message "no bt" > in GDB Reading your last trace, I see: [New LWP 482951] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007f7ddbd189df in __GI___poll (fds=0x556544072dd0, nfds=3, timeout=61357) at ../sysdeps/unix/sysv/linux/poll.c:29 29 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory. (gdb) c Continuing. [New Thread 0x7f7dbb7fe640 (LWP 484614)] => OK Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. 0x00007f7d6860062d in ?? () (gdb) c Continuing. [New Thread 0x7f7dbbe2d640 (LWP 484676)] => OK but then: [Thread 0x7f7d453ce640 (LWP 484689) exited] Thread 1 "soffice.bin" received signal SIGABRT, Aborted. __pthread_kill_implementation (no_tid=0, signo=6, threadid=140178438963584) at ./nptl/pthread_kill.c:44 44 ./nptl/pthread_kill.c: No such file or directory. (gdb) c Continuing. => No, you should have typed "bt" here since it wasn't "?" or "??".
Created attachment 191624 [details] BackTrace from gdb Not sure I understood where I should do the 'bt' or 'c', but I think I got the BT you asked
Thank you it worked! The relevant part is: #9 0x00007f290a6d8027 in () at /usr/lib/libreoffice/program/libpyuno.so #10 0x00007f290a6e59eb in pyuno::Runtime::extractUnoException(pyuno::PyRef const&, pyuno::PyRef const&, pyuno::PyRef const&) const () at /usr/lib/libreoffice/program/libpyuno.so #11 0x00007f29b40e742d in pyuno_Loader_get_implementation () at /usr/lib/libreoffice/program/libpythonloaderlo.so #12 0x00007f29bc2596a7 in () at /usr/lib/libreoffice/program/libuno_cppuhelpergcc3.so.3 It seems LO can't load Python part. On which Linux distrib are you? I'm on Debian testing updated today and I've got the package libreoffice-script-provider-python installed. I think you need a Libreoffice/Python package.
I was on Ubuntu and switched to Mint. Should not be a problem since the 2nd is based on the 1rst... Also I needed a 7.x LOo a few months ago, so I set up a PPA: ``` $ cat /etc/apt/sources.list.d/libreoffice-ubuntu-libreoffice-still-jammy.list deb https://ppa.launchpadcontent.net/libreoffice/ppa/ubuntu/ jammy main ``` I just did: # apt install libuno* --reinstall # apt install libreoffice-script-provider-python --reinstall But problem is still there...
(In reply to LOO Debugger from comment #15) > ... > I just did: > # apt install libuno* --reinstall > # apt install libreoffice-script-provider-python --reinstall > > But problem is still there... Ok no idea then so uncc myself.
:( Thanks anyway for your time & help!
Additional information: Reading: https://superuser.com/questions/1753373/libre-office-create-is-not-enabled-for-python-macro I tried to install APSO: https://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python And got this error message in attached picture. And now when I open libreoffice, I get the generic GUI proposing to create a Writer/Calc/... document. But whatever I do there (trying to open a Wirter doc or to open the Tools>Extensions menu), now LOo crashes!!! cf. new trace in attachment
Created attachment 191649 [details] Trace dumped displayed on CLI after failed attempt to install APSO
Created attachment 191650 [details] APSO install attempt failure message
Bump? Anyone else could try to help? LOo is totally unusable now... Removing my personal LOo folder, Reinstalling LOo, Reinstalling all UNO python packages, Reinstalling loo-py-provider, using completly new Writer/Calc files, NOTHING helps... I can't use LOo at all, just because I killed a faulty macro... 1) That's already quite a MAJOR problem per-se... 2) Since it's persistent over any re-install/re-configuration, it probably reflects quite a MAJOR problem in LOo code base, where it seem to modify something way out of its expected reach...
Hi again, I found a very hacky workaround: by removing "~/.local/lib/python3.10/site-packages" I managed to regain control of LOo (just removing "uno*" there was not sufficient). **But I still believe there's a BIG problem if killing a macro results in LOo trashing the users' installed python packages directory...**