Created attachment 167286 [details] Deleted printer still showing. Red arrow pointing to them Fedora 33 LibreOffice-7.0.3-Linux_x86-64_rpm.tar.gz I cleaned out a bunch of unused printers. Libreoffice still see them $ lpstat -a B4350 accepting requests since Thu 29 Oct 2020 01:36:30 PM PDT Cups-PDF accepting requests since Tue 30 Apr 2019 04:05:39 PM PDT Virtual_PDF_Printer accepting requests since Tue 29 Sep 2020 03:13:17 AM PDT Same as show in Printer Admin and CUPS. All the deleted printer still show in LibreOffice Writer and Calc looks like https://ibb.co/3R4BM5F (also attached here) Red arrows on the deleted printers :'( Please fix.
I can't confirm it with Version: 7.0.3.1 (x64) Build ID: d7547858d014d4cf69878db179d326fc3483e082 CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL
(In reply to Dieter from comment #1) > I can't confirm it with > > Version: 7.0.3.1 (x64) > Build ID: d7547858d014d4cf69878db179d326fc3483e082 > CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: > win > Locale: de-DE (de_DE); UI: en-GB > Calc: CL Try it under Fedora 33, not Windows 10. Programs without the problem (a sampling): Brave Browser, Firefox, Vivaldi, Water Fox, Leafpad, Simple scan, Gimp, Inkscape, Thunderbird, Geany, Shotwell, PDF Studio 2019 Programs with the problem (also a sampling): Wine, Libre Office, Free Office, Master PDF Editor
Do the printers still show after closing LibreOffice and starting it again (or even better, a reboot)? (On Linux, LibreOffice retrieves printer once on startup, so changes after that only show up after restarting it.)
(In reply to Michael Weghorn from comment #3) > Do the printers still show after closing LibreOffice and starting it again > (or even better, a reboot)? It still exhibits the issues after about 15 reboot and 50 restarts of LibreOffice, > (On Linux, LibreOffice retrieves printer once on startup, so changes after > that only show up after restarting it.) I suspect LO has a cache of printers that LO adds to be does not overwrite
(In reply to Todd from comment #4) > > (On Linux, LibreOffice retrieves printer once on startup, so changes after > > that only show up after restarting it.) > > I suspect LO has a cache of printers that LO adds to be does not overwrite Not that I know (but I didn't double-check so far), as far as I know, LO just retrieves them from CUPS. In comment 2, you mention that other printers also still show them. Interestingly, all of the printers have an '_rn6' suffix. Are those possibly remote printers shared on the network, e.g. from some other host (maybe called 'rn6') and advertised e.g. using DNS-SD/Bonjour? Do you have cups-browsed installed and running? If so, do the printers still show up after disabling it?
(In reply to Michael Weghorn from comment #5) > (In reply to Todd from comment #4) > > > (On Linux, LibreOffice retrieves printer once on startup, so changes after > > > that only show up after restarting it.) > > > > I suspect LO has a cache of printers that LO adds to be does not overwrite > > Not that I know (but I didn't double-check so far), as far as I know, LO > just retrieves them from CUPS. > > In comment 2, you mention that other printers also still show them. > > Interestingly, all of the printers have an '_rn6' suffix. Are those possibly > remote printers shared on the network, e.g. from some other host (maybe > called 'rn6') and advertised e.g. using DNS-SD/Bonjour? > > Do you have cups-browsed installed and running? If so, do the printers still > show up after disabling it? All the printers are local printers The problem seems to only be associated with long printer names that are only different at the end of the name. I created a printer called MickyMouse and Writer picked it up and dumped it after I deleted it. So, I seems that you may need to increase the string (array of characters) you are using to read in the printer names. But that does not explain why you hold on to a defunct name, unless the comparison between old names and new names is also not being done on enough characters.
Created attachment 167701 [details] Sample program to list printers
Created attachment 167702 [details] Sample program to list printers (binary)
(In reply to Todd from comment #6) > All the printers are local printers > > The problem seems to only be associated with long printer names that are > only different at the end of the name. > > I created a printer called MickyMouse and Writer picked it up and dumped it > after I deleted it. > > So, I seems that you may need to increase the string (array of characters) > you are using to read in the printer names. But that does not explain why > you hold on to a defunct name, unless the comparison between old names and > new names is also not being done on enough characters. Since other applications show the same issue, and LibreOffice retrieves the printers from CUPS, I'd be surprised if this was actually a LO problem and not something on a lower level. However, I'll be happy to test this further. Can you give exact steps how to reproduce the issue? Can you reproduce this by setting up a new local printer with a certain name and then delete it? At a quick glance, LO uses 'cupsGetDests2' from the CUPS library to retrieve available printers [1]. Can you run the attached sample program and paste the output here. It also uses 'cupsGetDests2' to retrieve and list printers (but might use different parameters from what LO does, so the output may vary). Also, do you have CPD (Common Printing dialog) libraries installed? (In this case, LibreOffice uses those to retrieve printers instead.) [1] https://opengrok.libreoffice.org/xref/core/vcl/unx/generic/printer/cupsmgr.cxx?r=6fc2a300#241
$ list-printers B4350 Cups-PDF Cups_PDF_rn6 Oki_B4350_on_dev_lp0_rn6 Virtual_PDF_Printer Virtual_PDF_Printer_rn6 $ lpstat -a B4350 accepting requests since Thu 29 Oct 2020 01:36:30 PM PDT Cups-PDF accepting requests since Tue 30 Apr 2019 04:05:39 PM PDT Virtual_PDF_Printer accepting requests since Tue 29 Sep 2020 03:13:17 AM PDT Hmmmmm..... # rpm -qa cups\* cups-pk-helper-0.2.6-10.fc33.x86_64 cups-pdf-3.0.1-10.fc33.x86_64 cups-libs-2.3.3-18.fc33.x86_64 cups-client-2.3.3-18.fc33.x86_64 cups-ipptool-2.3.3-18.fc33.x86_64 cups-filesystem-2.3.3-18.fc33.noarch cups-2.3.3-18.fc33.x86_64 cups-libs-2.3.3-18.fc33.i686 cups-filters-libs-1.28.5-3.fc33.x86_64 cups-filters-1.28.5-3.fc33.x86_64
I opened the following companion bug: cupsGetDests2 shows deleted printers https://bugzilla.redhat.com/show_bug.cgi?id=1903801 As most programs read the printers list correctly, I am thinking that upsGetDests2 may not the proper way read them now a days, or contains a nasty bug Loved the C code for reading cupsGetDests2. Thank you!
Thanks for testing! Closing as NOTOURBUG then, since there's no problem on LibreOffice level here.
Hi Michael, As most of my programs are not exhibiting this issue, you may not be calling CUPS in the CUPS recommended manner. I will post back the findings what happens on the CUPS a bug report. Until then we wait I files another bug with upstream CUPS: cupsGetDests2 shows deleted printers https://github.com/apple/cups/issues/5862 -T
OK, let's wait then. I'm setting this bug to NEEDINFO for now.
Follow up: These are not extras that did not delete when I deleted the originals. What transpired was the I was experimenting with several way to access a parallel port card and had created several printers using "_rn6" at the end of their names. "_rn6" is the host name of the computer. What I "thought" were un-deleted printers was actually the name cups tacks on to a printer that is shared on the network. Cups was also using my host name. And it took me several day to realize I was looking at a "coincidence". "cupsGetDests2" in its "ultimate wisdom" list both the local name and the shared name: Cups-PDF <-- local printer name Cups_PDF_rn6 <-- shared name Virtual_PDF_Printer <-- local printer name Virtual_PDF_Printer_rn6 <--shared name So, a bit confusing to show a local printer and its shared network name, but that is the way cupsGetDests2 works, so "not a bug". Thank you for all your patience with this.
[Automated Action] NeedInfo-To-Unconfirmed
Thanks for the update! (Closing again, since some automation has reopended this...)