Bug 152770 - Insert - Envelope in a new document: warnings in console with debug LO
Summary: Insert - Envelope in a new document: warnings in console with debug LO
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Envelope
  Show dependency treegraph
 
Reported: 2022-12-31 11:08 UTC by BogdanB
Modified: 2023-02-14 15:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
file (212.77 KB, text/plain)
2023-01-17 20:26 UTC, BogdanB
Details
text-only printer definition for HP Fax4 (2.57 KB, text/plain)
2023-01-18 08:34 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BogdanB 2022-12-31 11:08:34 UTC
Description:
Open a new Writer document. Insert - Envelope - Insert.

In the dbg build of LibreOffice I get in terminal this warning:
warn:vcl.unx.print:1619436:1619436:vcl/unx/generic/printer/ppdparser.cxx:845: no Resolution in /tmp/63b017fa8a4a2
warn:legacy.osl:1619436:1619436:sw/source/core/access/accmap.cxx:1064: invalid event combination


Steps to Reproduce:
see description

Actual Results:
warnings

Expected Results:
no warnings


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 12e8d57e791bb1befc0716d4d02af7d1d1ccb4ae
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2022-12-31 16:05:27 UTC
Repro in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 12e8d57e791bb1befc0716d4d02af7d1d1ccb4ae
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 2 Caolán McNamara 2023-01-13 09:11:53 UTC
A warning of:

"warn:vcl.unx.print:1619436:1619436:vcl/unx/generic/printer/ppdparser.cxx:845: no Resolution in /tmp/63b017fa8a4a2"

*might* be specific to your printer. Locally here I get the
"warn:legacy.osl:1619436:1619436:sw/source/core/access/accmap.cxx:1064: invalid event combination"
but not the other.

I wonder if its possible to attach the "/tmp/63b017fa8a4a2" ppd file to this report to see what's in it
Comment 3 BogdanB 2023-01-13 16:31:07 UTC
(In reply to Caolán McNamara from comment #2)
> A warning of:
> 
> "warn:vcl.unx.print:1619436:1619436:vcl/unx/generic/printer/ppdparser.cxx:
> 845: no Resolution in /tmp/63b017fa8a4a2"
> 
> *might* be specific to your printer. Locally here I get the
> "warn:legacy.osl:1619436:1619436:sw/source/core/access/accmap.cxx:1064:
> invalid event combination"
> but not the other.
> 
> I wonder if its possible to attach the "/tmp/63b017fa8a4a2" ppd file to this
> report to see what's in it

I could NOT find the file. I tested again the bug but I don't find the /tmp/name_of_the_file anywhere on my linux machine.
Comment 4 Caolán McNamara 2023-01-17 09:36:44 UTC
looking at the source, it might be that if you try...

export SAL_CUPS_PPD_RETAIN_TMP=1

in the terminal before you launch it then it won't delete the file and it should be available
Comment 5 BogdanB 2023-01-17 20:26:32 UTC
Created attachment 184720 [details]
file

warn:vcl.unx.print:63961:63961:vcl/unx/generic/printer/ppdparser.cxx:845: no Resolution in /tmp/0f9d963d23ceb

I attached the mentioned file.
Comment 6 Caolán McNamara 2023-01-17 21:03:40 UTC
There are indeed no Resolution (or DefaultResolution) entries in that ppd file. Unlike e.g. vcl/unx/generic/printer/configuration/ppds/SGENPRT.PS
The spec http://www.lprng.com/RESOURCES/PPD/5003.PPD_Spec_v4.1.pdf is basically silent on no Resolution entries one way or the other.

This ppd has a comment of:

*%%%% PPD file for Generic Text-Only Printer with CUPS.
*%%%% Created by the CUPS PPD Compiler CUPS v2.3.1.
*% (c) 2014 OpenPrinting

in it and this appears to be originally named textonly.ppd. 

On the face of things this seems to be a ppd for an unusual edge case where a warning is justified seeing as LibreOffice is going to hope for the best and assume it can do 300x300 if forced to attempt to print to it.

Though I'm interested in if you really have a (ancient?) line printer installed that can only print text, or have some virtual one installed for some deliberate reason.

@stragu
was the "Repro in:" for just the "invalid event combination" warning (which I think is now fixed in trunk), or do you also have a "no Resolution in ..." warning?
Comment 7 BogdanB 2023-01-17 21:08:42 UTC
(In reply to Caolán McNamara from comment #6)

> Though I'm interested in if you really have a (ancient?) line printer
> installed that can only print text, or have some virtual one installed for
> some deliberate reason.


If I go to printers I have L3150 (Ready) Generic Text-Only Printer
Comment 8 BogdanB 2023-01-17 21:12:08 UTC
(In reply to BogdanB from comment #7)
> (In reply to Caolán McNamara from comment #6)
> 
> > Though I'm interested in if you really have a (ancient?) line printer
> > installed that can only print text, or have some virtual one installed for
> > some deliberate reason.
> 
> 
> If I go to printers I have L3150 (Ready) Generic Text-Only Printer

Here I am on the computer where I don't use this printer. I don't remember if it worked on my network at least once.

The printer is connected to another computer with USB.
I can't test that computer now.
Comment 9 Stéphane Guillou (stragu) 2023-01-18 08:34:46 UTC
Created attachment 184736 [details]
text-only printer definition for HP Fax4

(In reply to Caolán McNamara from comment #6)
> @stragu
> was the "Repro in:" for just the "invalid event combination" warning (which
> I think is now fixed in trunk), or do you also have a "no Resolution in ..."
> warning?

In that version, I got both, as well as a "no Font" issue in the printer definition file (attached):

warn:vcl.unx.print:250076:250076:vcl/unx/generic/printer/ppdparser.cxx:845: no Resolution in /tmp/3d0dc63d369d4
warn:vcl.unx.print:250076:250076:vcl/unx/generic/printer/ppdparser.cxx:857: no Font in /tmp/3d0dc63d369d4
warn:legacy.osl:250076:250076:sw/source/core/access/accmap.cxx:1064: invalid event combination

The printer is not connected, and to be honest, I can't even remember where that printer comes from...
Comment 10 Caolán McNamara 2023-01-18 10:02:13 UTC
Unusual that both of you have such odd printer ppds. In this new case of the missing "Font", we don't use that information anymore so that's an old holdover from removed unused code that can certainly be dropped: https://gerrit.libreoffice.org/c/core/+/145712
Comment 11 Caolán McNamara 2023-01-18 10:09:43 UTC
lets try moving the "Resolution" warning to only show if the resolution is queried, it might help quieten the noise: https://gerrit.libreoffice.org/c/core/+/145734
Comment 12 Commit Notification 2023-01-18 12:25:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ae76a67623a3d4063de4d2be7dc94ec5b977b7b2

Related: tdf#152770 we don't use the font list, so don't warn if its empty

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2023-01-18 20:35:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f93d4062c92e0508dc6a5272350ad98b9f0bfd72

tdf#152770 move warning about ppd with no resolution to use of resolution

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Caolán McNamara 2023-01-18 20:43:41 UTC
Maybe that makes a difference, to defer until the resolution is needed the warning that the resolution is a guess because the ppd lists no resolutions.
Comment 15 BogdanB 2023-01-21 19:57:28 UTC
Now, I am getting these messages:

warn:vcl.unx.print:152429:152429:vcl/unx/generic/printer/ppdparser.cxx:1546: no DefaultResolution in CUPS:L3150 assuming 300x300
warn:vcl.unx.print:152429:152429:vcl/unx/generic/printer/ppdparser.cxx:1546: no DefaultResolution in CUPS:L3150 assuming 300x300
warn:vcl.unx.print:152429:152429:vcl/unx/generic/printer/ppdparser.cxx:1546: no DefaultResolution in CUPS:L3150 assuming 300x300
warn:vcl.unx.print:152429:152429:vcl/unx/generic/printer/ppdparser.cxx:1546: no DefaultResolution in CUPS:L3150 assuming 300x300
warn:vcl.unx.print:152429:152429:vcl/unx/generic/printer/ppdparser.cxx:1546: no DefaultResolution in CUPS:L3150 assuming 300x300
warn:vcl.unx.print:152429:152429:vcl/unx/generic/printer/ppdparser.cxx:1546: no DefaultResolution in CUPS:L3150 assuming 300x300

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 24c9373409dda957ad6e1f1b4e3ec6c7135ecf1a
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 16 Caolán McNamara 2023-01-26 20:59:21 UTC
I think this ppd comes about when something or other wasn't able to determine the type of printer and this is provided as the minimum fallback so I now get this as well after some experimenting with printers
Comment 17 Commit Notification 2023-01-31 19:58:08 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fa7d25625fa327ebc49ec8d0f96c192f4ed0c17b

tdf#152770 undo move warning about ppd with no resolution to use of resolution

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 BogdanB 2023-02-11 11:09:42 UTC
Thanks, Caolan, no warning in
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9d44236a62bf59d120dda89924d0d1407b2bd52b
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded