We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Freeze with 100% CPU after opening documents via API [closed]

asked 2015-05-21 10:51:57 +0200

urbanhusky gravatar image

updated 2020-07-24 14:31:53 +0200

Alex Kemp gravatar image


I'm using the C++ API/SDK to open documents in fullscreen on Ubuntu Desktop 14.04.02 LTS. Libreoffice is version (English)

I open the document via the XComponentLoader->loadComponentFromUrl with the "Hidden" property set. Then I use the XLayoutManager to hide all controls before showing the corresponding XWindow.

After a few iterations the API hangs at the call


In the terminal I see the message

(soffice:44857): GLib-CRITICAL **: g_hash_table_iter_next: assertion 'ri->version == ri->hash_table->version' failed

The soffice process is now blocked (and would also prevent the bootstrap from completing etc.)

44857 boss 20 0 2189916 210692 141440 R 169,1 10,3 59:20.48 soffice.bin

I tried killing the office process before opening a new document, but that causes the following issue on the same line of code:

(soffice:55244): GLib-CRITICAL **: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed

(soffice:55244): GLib-CRITICAL **: g_hash_table_iter_next: assertion 'ri->version == ri->hash_table->version' failed

The soffice.bin process then also is stuck at 100% CPU and my application eats more and more memory until it freezes at that call.

What could be the cause of this?

Edit It sometimes also fails when bootstrapping (using the new, simple bootstrap):

Warning: failed to launch javaldx - java may not function correctly ERROR 4 forking process

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-07-24 14:33:00.979729

2 Answers

Sort by » oldest newest most voted

answered 2015-06-03 21:48:21 +0200

Alex Kemp gravatar image

updated 2015-06-03 22:21:16 +0200

I've found similar behaviour on a standard, brand-new, default desktop install. See http://ask.libreoffice.org/en/question/51449/sofficebin-at-44%-cpu-under-debian-any-thoughts-fixes/. Not good.

(extra added later): And this recent q: http://ask.libreoffice.org/en/question/51358/libre-office-43-shows-not-responding-windows764/ (I've seen more than one like this recently)

edit flag offensive delete link more


There is a known memory leak that hasn't been fixed for years now, which is most likely the issue here. Happens when starting OO/LO in headless mode (which is also what the bootstrap does).

urbanhusky gravatar imageurbanhusky ( 2015-06-26 10:47:08 +0200 )edit

answered 2015-06-03 13:13:08 +0200

urbanhusky gravatar image

This is most likely related to the memory leak in headless office processes...

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-05-21 10:51:57 +0200

Seen: 1,298 times

Last updated: Jun 03 '15