Calc hangs on opening ODS file - seems related to printer availability?

I have a strange problem. A few weeks ago a ods document I use almost every stopped loading. Calc just froze. I was able to open the file with 7-zip and everything in it looked ok. I restarted the computer, updated to the latest LO, cleaned out my user profile and just about everything else I could think of. Nothing helped. When I tried to open it a couple of days later everything worked as expected. Since then it seems that if I open the file the first thing I do when I switch on the computer, I get the biggest chance of it working. If I wait a while the chance is smaller. Very strange. I have no idea what it could be. I need some help getting ideas. What can I do to debug this issue? Can I switch on any logging or something like that to find what’s causing it?

It’s not only that ods file that has the problem. When it fails, any ods file fails. If I open calc without loading a file it starts but hangs when I open ods files from the menu.

Is it possible to attach the file here? (hopefully contains no confidential information)

What is your OS and GUI environemnt?

I have windows 7 home premium 64 bit. It is not just that file. It is any ods file. I’d rather not put it up here.

I did a test right now. I started calc. Entered a number and a formula. Saved it and tried to open it again and the same freeze happened. Seems like calc is waiting for something that never happens.

This is not an answer, but it can be a faulty firewall or antivirus settings. You can check in the Windows Task Manager if the LibreOffice (process name soffice) is running and try to restart it.

Do you have 32bit or 64bit Java installed? You will need 32bit even though your platform is 64bit.

Another possibility is that you have enormous amount of equations and loadable object count is exceeded. To correct this open Tools → Settings → Memory and set number of objects in memory to something like 1000, also you could raise memory caps, e.g LibreOffice loading will be faster if you allow at least 100 MB for it, but you could raise it even to a few hundred megabytes.

Same thing today. I started the computer, logged in and checked my gmail and looked at a few websites before I tried to open the ods. I then shut down the computer, switched it on again and then the first thing I did was opening the ods. It worked. Now it seems to work all evening no matter what I do. Very strange.

oweng, if I had the wrong java version it wouldn’t work at all, would it? mahfiaz, I tried to set the number to 1000 and it did not help. Same here, it would never work if it exceeded the memory, right?

I found an old bug report for version 3.something. The bug was that calc stopped loading because it waited for windows print spooler in some cases. I don’t know if it could be something like that. It would be good if there were some settings that enables logging of some sort.

You could delete all printers and install them later to rule that one out.

But I think you can get a backtrace if you kill LibO when it has hanged, this way you would get to know where it got stuck: https://wiki.documentfoundation.org/BugReport#How_to_get_a_backtrace_on_Windows

I am going to post this in an answer, even though it deals with several possible options and is not specific to the question. This is partly due to the lack of detail provided in the question. For clarity you are using “Windows 7 Home Premium 64 bit” with “the latest LO” (presumably v4.0.3.3). The issue appears to be one of Calc not responding (freezing/hanging) rather than performance degredation, although you are not clear to what degree this may be. I have grouped a few considerations below under these two headings for clarity.

The fact that you suddenly experienced this problem without changing LO (I have inferred this) would suggest that the problem is most likely related to the operating system. This however does not discount the possibility that you have encountered a bug.

Unresponsive

In order to determine whether Calc has become unresponsive it can be necessary to leave it for some time (e.g., 30+min or until you receive a system notification) to see if it does eventually respond. Some times other system components need to reach their timeout limits. Have you done this? It can be informative. The print spooler issue you mention in a comment is bug fdo#42673 which is not overly clear in its conclusion. It may have been closed as NOTOURBUG due to being a problem on the network management side of things i.e., CUPS handling of network printers. Most other “print hang” Calc bugs are equally uninformative.

While there are bugs that indicate Calc hanging on fileopen they mainly relate to the XLS/XLSX file formats. Some (like fdo#40650 and fdo#44420 which indicate auto-adjusting row height) are simply not reproducible, which again tends to point to an operating system issue on the user’s computer.

Performance degradation

Java should not prevent LO from working as LO is essentially not dependent on Java, however there are instances reported where certain Java versions adversely impact performance. Making sure you have the 32bit version on Windows may help. As you suggest though this should not cause Calc to hang, so I am going to discount this (in this respect).

Indexing / anti-virus services can badly effect performance but should not cause a hang. If possible it can be worth temporarily turning off these services or preventing them from scanning the location you are working from. That will at least discount this possibility.

The memory settings of LO are only applicable to graphic objects. If you have a lot of charts in your spreadsheet then increasing these settings can help, otherwise from a purely calculation perspective these settings will hang no impact.

These bugs indicate some areas that are likely to cause performance issues. All are related things like conditional formatting, filtering, and functions that perform lookup and match type operations. The degree to which they will affect your machine will depend upon their extent:

  • fdo#48312, v3.5 series regression, OFFSET(), MATCH(), and HLOOKUP() functions.
  • fdo#53576, v3.6 series performance issue / regression, matrix lookup.
  • fdo#54887, v3.6 series performance issue / regression, extensive combinations of functions.
  • fdo#55269, v3.6 series AutoFilter conflict with the Windows 7 performance option (System Properties > Performance Options) named “Use visual styles on windows and buttons”.
  • fdo#61484, v3.6-4.0 series conditional formats performance.
  • fdo#63696, v4.0 series performance issue, complex calculations are making Calc unresponsive under more recent version, while earlier versions appear less affected.

Ok. Thank you for your interest in my problem. I will try to clarify things. I am using LO 4.0.3.3. If I start calc with the ods document quickly after I login in windows everything works normally. The document is rather big but loads in 2-3 seconds. However, if I wait a few minutes and then starts calc with the same document it never loads and calc stops responding. I’ve left it for a very long time to see if it would “wake up” eventually but it doesn’t.

If I get calc to work normally when I log in it will work normally until I restart the computer. I won’t be home for a few days now but next time I’ll try with another, much smaller ods document.

That is quite odd. It sounds like a system (or other) service gets into a conflict with LO/Calc. Can you repeat with a Writer document? Can you open a Writer document after the Calc hang? Are the files stored locally or on a network? Is an attached printer turned on/off at the time? You will likely have to work your way through a series of these types of tests to determine exactly what is happening. As @mahfiaz indicated you can run a backtrace, although under Windows it is more complicated.

Yes, this kind of problems are likely to take some time. I’m starting to suspect Google Chrome or maybe some of it’s addons. I will have to do some tests with it.

Some more info. When calc is hanging the following happens: Some writer documents works, some not. I will analyze the difference in a moment. Base documents works. No .ods files works but, and this is strange, .xls file works fine!

New info. I tried to stop processes and then restart calc. I think I found the conflicting thing. I ran Spybot Search & Destroy. Ver 1.6.something. It has some sort of resident protection called tea timer. I have uninstalled it now to see if it helps. So far it’s ok.

Are you using marcos? Perhaps check to see if ODS-with-macro vs ODS-without-macro makes any difference (with Tea Timer I mean). Anti-virus / anti-malware programs tend to be fairly aggressive towards macros.