Bug 42673 - With disconnected network printers, Calc hangs opening some files waiting on the Windows print spooler
Summary: With disconnected network printers, Calc hangs opening some files waiting on ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
3.4.3 release
Hardware: All All
: low major
Assignee: Not Assigned
: 116559 (view as bug list)
Depends on:
Blocks: Network Print
  Show dependency treegraph
Reported: 2011-11-07 09:56 UTC by erikmjacobs@gmail.com
Modified: 2021-04-19 19:39 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:

Example file that causes Calc to hang (45.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-11-07 10:09 UTC, erikmjacobs@gmail.com
soffice.bin wait chain with spoolsv.exe (11.79 KB, image/png)
2019-07-07 12:05 UTC, drakkai

Note You need to log in before you can comment on or make changes to this bug.
Description erikmjacobs@gmail.com 2011-11-07 09:56:40 UTC
Recently went to open .ods files that I have never had problems with.  When trying to open, calc will come up but hang and never completes opening the file. The files open fine with zip utilities as well as with LibreOffice on other OS (Linux).

It appears to be this computer and not necessarily LibreOffice itself.  If there are any ways to debug please let me know and I will provide additional information.  I will upload a sample file shortly that suffers from this issue.  Note that new files that are saved and some old files do not appear to be affected.
Comment 1 erikmjacobs@gmail.com 2011-11-07 10:09:09 UTC
Created attachment 53252 [details]
Example file that causes Calc to hang

I have an .xls that opens fine.  I saved said .xls as an .ods and tried to re-open it with Calc, and Calc hangs.  This file opens fine in Calc on Linux.
Comment 2 Markus Mohrhard 2011-11-07 11:44:27 UTC
try to backup your user profile, delete the existing one and thenre start calc and try to open the file again

might just be a corrupted user profile dir
Comment 3 erikmjacobs@gmail.com 2011-11-07 11:55:53 UTC
Where is the user profile stored in Windows 7?

I attempted a complete uninstall/reinstall before I posted the bug:
- Uninstall all Libreoffice
- Uninstall all Visual C++
- Uninstall all Java
- Remove everything I could find (Program Files (x86), Program Data/Libre Office, AppData/Roaming/Libreoffice, etc).
- Reinstall

The problem persisted, which is then why I posted the bug.

Are there any debug modes or other logging that I can do on Windows here?
Comment 4 erikmjacobs@gmail.com 2011-11-07 13:54:48 UTC
I had also run cccleaner and performed windows updates before reinstalling Libre.
Comment 5 erikmjacobs@gmail.com 2011-11-07 13:58:04 UTC
Application Log:
Fault bucket , type 0
Event Name: AppHangXProcB1
Response: Not available
Cab Id: 0

Problem signature:
P1: soffice.bin
P2: 3.3.9556.500
P3: 4d061efd
P4: cc55
P5: 128
P6: spoolsv.exe:spoolss

Attached files:

These files may be available here:

Analysis symbol: 
Rechecking for solution: 0
Report Id: 32fb2eb2-098b-11e1-a8d7-0030675a3caf
Report Status: 1
Comment 6 erikmjacobs@gmail.com 2011-11-07 15:10:35 UTC
What an annoying problem.  I figured out the fix.

Someone on IRC suggested that spoolsv had to do with printers:
17:09 <julien2412> spoolsv.exe is a Microsoft Windows system executable which
handles the printing process to your local printers.

After some sleuthing, I realized that I have a network-connected printer that
was offline.  Apparently this makes Windows 7 *extremely* angry.  After much
dorking around, I was able to remove this printer.

Guess what?  Calc starts up just fine!

This leads me to believe that there is a more sinister issue at hand.  Why
would .xls files and .odt files open just fine, but .ods files hang?  What was
it about this particular file that caused Calc to really want to get down with
the printers and to hang because this printer was not connected?

I will change the title of the bug.
Comment 7 erikmjacobs@gmail.com 2011-11-07 15:46:51 UTC
This is on Win7 x64 Ultimate.
Comment 8 Mas 2012-09-13 10:15:07 UTC

I am marking this ticket as resolved. The issue was resolved by you removing the printer on your network. 

The application have been unable to open the file due to an existing lock on the file by another application.
Comment 9 erikmjacobs@gmail.com 2012-09-13 13:39:25 UTC
"The application have been unable to open the file due to an existing lock on
the file by another application."

Which application?  Calc was the only program not able to open the file, and calc hung hard.  If the file was simply locked, the expectation would be for calc to report that "this file is in use by another application."

At best, this is an issue with how Calc handles file locking.

At worst, this is an issue with how Calc interacts with the print stack on Windows.

Saying that it's not a bug because removing the printer fixed the issue is folly.  The resultant implications are that:

* Temporary printer outages mean that Calc may at any moment be unusable. I guess printers never go down?

* Users who travel between multiple locations (home/office, etc) and have printers in each location will have to remove and reinstall printers before leaving the previous location so that calc will work.

Does this sound like it makes any sense to you?
Comment 10 Tyson Whitehead 2015-04-29 04:05:28 UTC
I would add that the latest version of calc hangs for a long time and then crashes on loading an ods file unless your network printer is turned on.

Took me most of the night to figure out what the heck was wrong as it was working fine earlier in the week (when the printer was on).  I tried upgrading and bunch of other stuff to no avail.

It wasn't until I accidentally picked print in another application that sitting there watching the pin wheel to time out triggered a memory about issues that power point has with off network printer


and made me think maybe that we my libreoffce problem too.  Sure enough.

I'm re-opening in hopes you will reconsider if for no other reason that libreoffice doesn't just hang but actually crashes now too.

Cheers!  -Tyson

PS:  I'm running Build ID: c4c7d32d0d49... on Windows Vista.
Comment 11 Buovjaga 2015-10-09 18:08:08 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2016-09-11 19:50:04 UTC Comment hidden (obsolete)
Comment 13 Heinz Repp 2016-10-04 12:15:51 UTC
Hello, jumping in because I have this issue with Windows 10 Pro v1607 and LibO 5.2.2. 64bit (that's why I changed Hardware from x32 to all).

When opening local simple ods files, Libreoffice shows an undecorated empty and unresponsive window for about one minute. Digging with sysinternals Process Monitor, I see it continuing right after having loaded the printer spooler dll (ps5ui.dll), having dealt with printers when starting to be unresponsive. I have network printers not connected at this moment, that use the Postscript interface, so I guess Libreoffice hangs waiting for Windows loading the spooler ui dll, but that is clearly not the intended behavior.

I would expect to load the spooler dll from a non blocking thread while proceeding to open the file would solve this issue - showing an empty hanging windows to the user should never happen.
Comment 14 frugal 2017-06-16 04:18:01 UTC
I am having the same issue with LibreOffice_5.2.7_Win_x86 under Windows 8 x64.

When I load a file in Calc, it hangs for up to 2 minutes with the windows "Loading wheel icon" and becomes completely unresponsive. Afterwards it works
as normal.

My main printer is a network printer that is usually offline. No issues if the printer is online.

Here is someone else with the same issue - 
Like them, If I stop the windows process splwow64.exe as Calc is being unresponsive, calc resumes instantly (it becomes responsive) - 

Or, if I do "ipconfig /release" while Calc is being unrespnsive, it instantly becomes responsive.

Comment 15 frugal 2017-06-16 04:20:43 UTC
To be clear, loading any Calc file in Calc causes this, not a specific file. Also, this freezing does not seem to happen if I load Libreoffice and click CREATE - Calc Spreadsheet.
Only loading an existing file.
Comment 16 frugal 2017-06-18 08:45:41 UTC
Also, this does NOT happen if I load an existing .xlsx file in Calc, only .ods
Comment 17 szz 2017-08-24 18:38:22 UTC
I could fix an ods whcih hangs when network printer was unavailable.
There is a section in ods (renamed to zip and extract settings.xml file from it) where the printer related option stored.

My netowork printer adreess was:  \\\lp

If I delete printer related data section from settings.xml ods file opens like a charm even the network printer is unavailable :)

So delete XML data tags: PrinterName and PrinterSetup (whole xml data tags)
(of course make a backup from ods 1st)


In My case the printer was an usb printer connected to my NAS and it was used by some Windows machines on home network.
When the NAS was turned off (or its LAN cable unplugged)
ods files freezed at opening.

In Calc File/Printer settings without deletion I could see the old network printer IP, after deletion there I could see my current default printer (also a network printer but connected to my router) however the settings.xml did not have the deleted tags.

So the final fix should be using some timeout at opening or a popup window about unavailable network printer and an option to delete old printer info from ods.

LO version x64 & WIN10 Pro
Comment 18 frugal 2017-12-16 23:22:58 UTC
I wanted to add that this freezing can happen with an opened document that I'm editing, when I do certain tasks like highlight data and Ctrl-Rightclick-Format cells. Sometimes (not always) that action can freeze for 30 seconds before the Format cells dialog comes up. Again this won't happen if my network printer is ONLINE only when it is OFFLINE.

szz, I tried your trick but it did not work for me. (Although I do see mentions of an offline printer in many of my .ods files)
Comment 19 frugal 2017-12-16 23:39:00 UTC
szz, actually I think I spoke too soon. I think you're right. If I set my default printer to the "windows XPS writer" and create a new .ods, that file loads fine and has no issues. Only the files I created when my network printer was default have freezing issues .
Comment 20 frugal 2017-12-17 03:20:20 UTC
a partial fix: Load the file, pick File-> Printer Settings and select "Microsoft XPS Document Writer" or some other non-network printer, then re-save the file.

however there is still some freezing if your windows default printer is set to a offline network printer, despite doing the above. But it helps somewhat.
Comment 21 Tim 2018-01-21 12:24:30 UTC
Calc hang on open any ods files until I cleared print queue and completely removed virtual printer (ImagePrinter) from OS. The queue appeared from some bug in that printer during printing a .pdf file into images by other software (not LO).

Win7 x32
Comment 22 Jean-Baptiste Faure 2018-04-14 16:00:19 UTC
*** Bug 116559 has been marked as a duplicate of this bug. ***
Comment 23 Jean-Baptiste Faure 2019-02-04 14:23:10 UTC
I have the same problem under Linux (Ubuntu 16.04 x86-64) with LO 6.1.4 and network printers not reachable. If I disconnect my PC from the network, Calc opens the file instantly.

Best regards. JBF
Comment 24 drakkai 2019-07-07 12:02:56 UTC
I have the same problem on Windows 10 (version 1903 and 1809). When network printer is disconnected Calc hangs opening any files, I've tried couple version 6.2.x, 6.1.x and 6.0.x.
Comment 25 drakkai 2019-07-07 12:05:52 UTC
Created attachment 152615 [details]
soffice.bin wait chain with spoolsv.exe
Comment 26 Tim van der Meij 2020-01-12 21:25:34 UTC
I also encountered this problem today and it took a long time to find the root cause. I have some additional details to share.

I did a clean install of Windows and found that LibreOffice Calc would take 13 seconds to open even the most basic ODS files while this didn't happen before. XLSX files worked just fine. I tried everything from reinstalling LibreOffice to removing the profile directory with no result. I finally reinstalled Windows again and kept track of when LibreOffice Calc would stop working. I found that it started occurring when I installed the printer (Epson XP 630) through Windows and the printer was offline, and found this bug.

Like others noticed above, ODS files (for most likely a good reason) contain a reference to the printer, so I presume LibreOffice Calc is trying to locate this printer upon startup. Unticking the "Load printer settings with the document" as suggested in https://bugs.documentfoundation.org/show_bug.cgi?id=116559 did not work for me, but what did work was changing the default printer to e.g., the Microsoft XPS Writer.

I looked into this and found that Windows installed the default Microsoft IPP drivers for the printer instead of the Epson drivers, and I can only assume that the spooler keeps on trying to connect to the printer even though it's offline. The moment I installed the Epson-specific drivers, the problem was gone. I guess it has a faster way to tell the spooler that the printer cannot be reached.

I would say that Windows is at fault for not installing the Epson drivers by default and for having a default driver that apparently makes the spooler wait for a long time before reporting that the printer is offline. However, I agree with Comment 13 that LibreOffice Calc can mitigate the issue by querying the spooler in a separate thread. Removing the spooler actions from the main thread would allow the rest of LibreOffice Calc to work correctly and the document to open normally, while in the background the spooler is queried. This would make the issue invisible for the user because having to wait 10+ seconds for a document to open is too long.

I'm hoping this will help to get the issue resolved. Thank you for all your work on LibreOffice!
Comment 27 himajin100000 2020-08-09 12:15:26 UTC
just out of curiousity, I wonder what would happen if we do EITHER of



setting DisablePrinting in Expert configuration to true

Comment 28 krabat 2021-01-24 12:13:09 UTC
Bug is still present / reproducible in version:

Version: (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 16; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL

Issue documented:
Comment 29 Mike Kaganski 2021-01-26 06:55:25 UTC
(In reply to Tim van der Meij from comment #26)
> I found that it started occurring when I installed the printer
> (Epson XP 630) through Windows and the printer was offline, and found this
> bug.

This promised to be helpful to reproduce the problem. However, I still was unable to repro.

What I did:

1. I went to Epson web site [1], chose "Windows 10 (64-bit)" to download "Drivers and Utilities Combo Package Installer" (XP630_Lite_NA.exe from 2019-05-20, 11.9 MB)
2. I started the installer, and allowed it to install "drivers and utilities" only (and allowed Windows Firewall)
3. I didn't configure printer there in the installer (I don't have one)
4. I opened Windows 10 Start Manu->Settings->Devices->Printers and Scanners
5. [+] Add a printer or scanner -> The printer that I want isn't listed
6. Add a printer using a TCP/IP address or hostname
7. Device type: TCP/IP Device; Hostname or IP address: e.g. (a random unused IP in my subnet); "[ ] Query the printer ..." unchecked
8. Device Type: Standard -> EPSON Network Printer
9. I chose Epson XP 630 model in the list
10. Clicked Next and checked "[x] Set as the default printer", and finished

Starting Calc (either from the start center, or using dedicated Start Menu shortcut (soffice --calc)) still does not give a timeout problem here.

If someone could provide detailed steps to follow to have the problem appear, please provide them very verbosely, so that one could be sure one uses the known problematic configuration. There are many variables on each step, as I shown above. Which driver for which model, architecture and which version to use? How to install? which networking settings to configure? ... Knowing these could allow a developer to see and fix this. Thanks!

[1] https://epson.com/Support/Printers/All-In-Ones/XP-Series/Epson-XP-630/s/SPT_C11CE79201
Comment 30 Uwe Auer 2021-01-27 12:50:36 UTC
Next report on ask.libreoffice.org: https://ask.libreoffice.org/en/question/289789/calc-loading-native-ods-file-is-very-slow-hanging/
Comment 31 dainius.mazuika 2021-01-27 12:59:49 UTC
Bug is still present in:

Version: (x64) / LibreOffice Community
Build ID: 53d68d29d90fd16448721a60aad68c28ff0809f5
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL