Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Certain PDFs immediately crash Windows connector #308

Closed
jay0lee opened this issue Sep 21, 2016 · 12 comments
Closed

Certain PDFs immediately crash Windows connector #308

jay0lee opened this issue Sep 21, 2016 · 12 comments
Assignees

Comments

@jay0lee
Copy link
Contributor

jay0lee commented Sep 21, 2016

Steps to reproduce:

  1. Build connector on Windows using Wiki instructions:
    https://github.com/google/cloud-print-connector/wiki/Build-from-source#windows
    as of today, this installs cairo 1.15.2.
  2. Start the connector and attempt to print:
    https://www.cendio.com/bugzilla/attachment.cgi?id=710

Expected result:
PDF is printed

Actual result:
Connector crashes showing error:

Google Cloud Print Connector.info(3): DEBUG [Job b79in5idpo1h] Received job: &{NativePrinterName:Generic / Text Only Filename:C:\Users\Jay\AppData\Local\Temp\cloud-print-connector-privet-094832851 Title:About User:[email protected] JobID:b79in5idpo1h Ticket:0xc0820c6580 UpdateJob:0x4bcb80}
Assertion failed!

Program: C:\Program Files\Google\Cloud Print Connector\gcp-windows-connector.exe
File: ../../cairo-1.15.2/src/cairo-recording-surface.c, Line 599

Expression: ! surface->unbounded

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Downgrading cairo to an older version seems to solve the issue but may introduce other issues. More details at:
https://www.cendio.com/bugzilla/show_bug.cgi?id=5922

Downgrade package at:
http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-cairo-1.14.2-2-any.pkg.tar.xz

@jay0lee
Copy link
Contributor Author

jay0lee commented Sep 21, 2016

Example PDF that crashes Windows connector consistently attached.

Note that I don't think anything is wrong with the PDF itself and I've seen cloudprint jobs regularly cause the crash, sometimes when printing www.google.com.

this-pdf-crashes-windows-connector.pdf

@jay0lee
Copy link
Contributor Author

jay0lee commented Sep 21, 2016

This is fixed in upstream Cairo by:
https://cgit.freedesktop.org/cairo/commit/?id=90d50cd92315d6760069ad8062aba5e297370b20

but the fix has not yet made it into a new release of Cairo or msys2's cairo package. I've submitted a pull request to msys2 to include the patch:
https://github.com/Alexpux/MINGW-packages/pull/1742

Attached is a fixed cairo package for msys2 that should be installed after following the build from source wiki instructions. Download it and install with:

pacman -U mingw-w64-x86_64-cairo-1.15.2-4-any.pkg.tar.xz

Also attached is the fixed libcairo-2.dll which can be copied into the c:\program files\google\cloud print connector\ folder if you've already installed the MSI.

I'll leave this issue open until upstream fix is in place.

.zip extension added to both files so they can be attached to GitHub bug, remove the .zip from the filename to use.
mingw-w64-x86_64-cairo-1.15.2-4-any.pkg.tar.xz.zip
libcairo-2.dll.zip

@jay0lee jay0lee self-assigned this Sep 21, 2016
@sicklittlemonkey
Copy link
Contributor

Thanks a lot for logging this. (Following.)

Any chance of a source tar so I could ship this? No worries if not - I'll downgrade.

MSYS2 looks severely backlogged. I noticed the current rtmpdump package source is a git repo - possibly not the "preferred form of the work". : - /

@jay0lee
Copy link
Contributor Author

jay0lee commented Sep 22, 2016

The patch has been accepted into msys2. I used the instructions at:

https://sourceforge.net/p/msys2/wiki/Contributing%20to%20MSYS2/

to build the attached Cairo package, now that it's merged that should just work. I'm not sure how often the packages get built and pushed via pacman update though.

@sicklittlemonkey
Copy link
Contributor

Aaaand it's there. Pacman installed it and my script grabbed the source.

@jacobmarble
Copy link
Contributor

Is there a way to rollback Pacman to a known-to-work snapshot? Maybe by YYYYMMDD?

@jay0lee
Copy link
Contributor Author

jay0lee commented Sep 23, 2016

Actually msys2 pushed out a new version with the fix last night so updating packages should resolve. Closing.

@jay0lee jay0lee closed this as completed Sep 23, 2016
@jacobmarble
Copy link
Contributor

@jay0lee I understand, but I'm worried about this kind of problem happening again. If today's msys2 version is stable for our purposes, can we roll back to it later?

@jay0lee
Copy link
Contributor Author

jay0lee commented Sep 23, 2016

The only way I found to rollback was to uninstall the bad update of 1.15.2-3 and then manually installing the package file with:

pacman -U

@agoode
Copy link
Contributor

agoode commented Sep 23, 2016

Issue #266 addresses the general problem.

@sicklittlemonkey
Copy link
Contributor

sicklittlemonkey commented Sep 23, 2016 via email

@drewtl
Copy link

drewtl commented Jan 27, 2017

Getting this error:
Error:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
File: ../../cairo-1.15.2/src/cairo-recording-surface.c, Line 599

We started from command line:

Google Cloud Print Connector.info(3): Finished synchronizing 18 printers
Google Cloud Print Connector.info(3): Ready to rock as proxy '64d5cd86-964e-46ca
-8c92-f480af32fb57'
Google Cloud Print Connector.info(3): [Job 549d00b4-55ca-3a19-d1b9-fe358862cf0d]
Received from cloud
Google Cloud Print Connector.info(3): [Job 549d00b4-55ca-3a19-d1b9-fe358862cf0d]
Downloaded in 2.352s
Assertion failed!

Program: C:\Program Files\Google\Cloud Print Connector\gcp-windows-connector.exe

File: ../../cairo-1.15.2/src/cairo-recording-surface.c, Line 599

Expression: ! surface->unbounded

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

  1. Looked up print job info and printer id using google.comc/cloudprint/simulate

  2. Printer-ID lookup didn't provide a printer name. Maybe it was deleted?

  3. Print job was just what you see when you print htttps://google.com/cloudprint .

  4. Tried to grab libcairo-2.dll and replace from another working machine no luck.

Seems like the printer either got deleted, but the print queue was still there or something. We could delete all the printers or start over from scratch.

The concern is if a user prints something or a printer goes offline or is deleted by an admin, or just goes missing from an unknown reason, it should stop the connector from working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants