Created attachment 83360 [details] gdb backtrace @caolan: this is your assert. An opinion? Something I should try? 1) Using a *dbgutil* build of master 2) Open writer document 3) Open print dialog 4) click on "options" Result: assertion failure Console: soffice.bin: /home/master/src/libreoffice/workdirs/libreoffice-4.2/padmin/source/prtsetup.cxx:364: padmin::RTSDevicePage::RTSDevicePage(padmin::RTSDialog*): Assertion `nLevelEntryData != 0 || bAutoIsPDF == m_pParent->m_aJobData.m_nPDFDevice' failed. Backtrace attached. The interesting frame is frame 9 or 55? The stack is a bit weird; the abort signal handler seems to indirectly call the same code again... Here's the code around that: sal_uLong nLevelEntryData = 0; //automatic if( m_pParent->m_aJobData.m_nPDFDevice == 2 ) //explicitly PDF nLevelEntryData = 10; else if (m_pParent->m_aJobData.m_nPSLevel > 0) //explicit PS Level nLevelEntryData = m_pParent->m_aJobData.m_nPSLevel+1; else if (m_pParent->m_aJobData.m_nPDFDevice == 1) //automatically PDF nLevelEntryData = 0; else if (m_pParent->m_aJobData.m_nPDFDevice == -1) //explicitly PS from driver nLevelEntryData = 1; bool bAutoIsPDF = officecfg::Office::Common::Print::Option::Printer::PDFAsStandardPrintJobFormat::get(); assert(nLevelEntryData != 0 || bAutoIsPDF == m_pParent->m_aJobData.m_nPDFDevice); and: (gdb) print nLevelEntryData $1 = 0 (gdb) print bAutoIsPDF $2 = true (gdb) print m_pParent->m_aJobData.m_nPDFDevice $3 = 0 (gdb) print m_pParent->m_aJobData.m_nPSLevel $4 = 0
So, using gdb I skipped that assert *once* and then ran again in gdb. Now that assert succeeds because m_Parent->m_aJobData.m_nPDFDevice==1. However, when I dismiss the properties page (click "OK"), I ultimately get into this code: padmin::RTSDialog::ClickButton if( m_pDevicePage ) { m_aJobData.m_nColorDepth = m_pDevicePage->getDepth(); m_aJobData.m_nColorDevice = m_pDevicePage->getColorDevice(); m_aJobData.m_nPSLevel = m_pDevicePage->getLevel(); m_aJobData.m_nPDFDevice = m_pDevicePage->getPDFDevice(); } This sets m_aJobData.m_nPDFDevice to 0, but well after the assert. So in a nutshell, I cannot reproduce anymore. Let's look at the .odt file... settings.xml contains: <office:document-settings> <office:settings> <config:config-item-set config:name="ooo:configuration-settings"> <config:config-item config:name="PrinterSetup" config:type="base64Binary"> And (decoded), this contains: pslevel=0 pdfdevice=0 Aha. So let's try to restart the LibreOffice process on the same file... More analysis / notes: m_pParent->m_aJobData seems to be essentially constructed in PspSalInfoPrinter::Setup (file vcl/generic/print/genprnpsp.cxx). In this case, since pJobSetup->mpDriverData is not NULL, we go into SetData( ~0, pJobSetup ), which calls JobData::constructFromStreamBuffer. JobData::constructFromStreamBuffer *does* set m_nPDFDevice to 1. SetData then goes on to create a new StreamBuffer from the information, and returns to PspSalInfoPrinter::Setup, which calls ... JobData::constructFromStreamBuffer again on the StreamBuffer with same contents as the one that SetData worked on, which thus *also* sets m_nPDFDevice to 1. So we enter Sal_SetupPrinterDriver (file padmin/source/prtsetup.cxx) with a rJobData that has m_nPDFDevice==1, which creates a padmin::RTSDialog passing it the same rJobData; that class copies it into its m_aJobData.
Yup, if I restart LibreOffice, I get the assertion failure again. So it seems that LibreOffice trusts settings.xml "too much".
In a run where the assert happens: In PspSalInfoPrinter::Setup, before the call to SetData: gdb) print (char*)pJobSetup->mpDriverData $95 = 0x299e9b0 "JobData 1\nprinter=C353\norientation=Portrait\ncopies=1\nmargindajustment=0,0,0,0\ncolordepth=24\npslevel=0\npdfdevice=0\ncolordevice=0\nPPDContexData\nInputSlot:Tray1" So, the pdfdevice=0 from settings.xml somehow gets there. Not sure why / how; that setting seems like it is printer-dependent to me. Why would it be trusted from an .odt (and why it is saved there in the first place), I'm not completely sure, since the printer environment may have changed since the file was saved. It may even be a different printer. From there, it trickles down to RTSDialog's m_aJobData and triggers the assert.
When creating a new file, I cannot reproduce the "pdfdevice=0" setting being included. It must have been inherited from a save with an older version of LibreOffice. Manually emptying PrinterSetup in settings.xml fixes the crash. The assert-failure-inducing "pdfdevice=0" survives: - file / save as - 'print directly' from toolbar then file / save - 'print' (dialog) / OK, then file / save It does not survive: - print (dialog), select other printer, select default printer again, OK (it prints), then file / save
Hmmm... This seems extremely related to the situation / scenario described in bug 58080. My guess: In bug 58080, the "Generic Printer" business pollutes the "pdfdevice" setting (in memory) and puts 0 there. Then I save the file (in bug 58080, the assert fails only the second time the print dialog is opened). After printing the file *once* in the "Generic Printer" situation, I saved the file, which saved the bad "pdfdevice=0" in the file, leading to this bug.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: *Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later) https://www.libreoffice.org/download/ *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT *Update the version field *Reply via email (please reply directly on the bug tracker) *Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2015-04-01
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.5 or 5.1.2 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT - Update the version field - Reply via email (please reply directly on the bug tracker) - Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2016-04-16
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.2.7 or 5.3.3 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170522
Hi Lionel, Could you please check if it's still asserting ?
Dear Bug Submitter, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping-20180129
Dear Bug Submitter, Please read this message in its entirety before proceeding. Your bug report is being closed as INSUFFICIENTDATA due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided): a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present b) Provide easy to reproduce steps – the simpler the better c) Provide any test case(s) which will help us confirm the problem d) Provide screenshots of the problem if you think it might help e) Read all comments and provide any requested information Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. Please do not: a) respond via email b) update the version field in the bug or any of the other details on the top section of our bug tracker Warm Regards, QA Team MassPing-NeedInfo-20180302