foomatic-rip crashes on titles with some special characters on Ricoh PS PPDs

Đang mở
#52 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
shell
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi crash với PDF đính kèm và PPD Ricoh MP C3004, sau đó kiểm tra lệnh trình kết xuất foomatic-rip được hiển thị trong các log, đặc biệt là lời gọi printf của shell. Hoàn tất khi job hoàn thành mà không có lỗi invalid format character hoặc broken-pipe và được in thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug
Job title TPS7A52 2-A, High-Accuracy (0.5%), Low-Noise (4.4 µVRMS), LDO Voltage Regulator datasheet (Rev. A) consistently crashes foomatic-rip filter.

To Reproduce
Steps to reproduce the behavior:

  1. Open attached PDF, or generate your own with this title. TPS7A52 2-A, High-Accuracy (0.5%), Low-Noise (4.4 µVRMS), LDO Voltage Regulator datasheet (Rev. A).pdf

  2. Print it to a foomatic-rip enabled PPD. In my case Ricoh MP C3004

  3. See this error in the logs.

D [02/Jul/2025:18:50:21 +0000] [Job 5009144] New page: %%Page: 1 1
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] \"Setup\" section is missing, inserting it.
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Found: %%BeginPageSetup
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Inserting option code into \"PageSetup\" section.
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] New page found but previous not printed, print it now.
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Found: %%Page: 2 2
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] --> Output goes directly to the renderer now.
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Starting renderer with command: \"printf \"%%!PS-Adobe-3.0
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] %%%%Title: (TPS7A52 2-A, High-Accuracy 0.5%, Low-Noi)
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] %%
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] %%\\n/usrid(shengwen)def\\n/lppswd()def\\n/dspswd()def\\n/usrcode()def\\nmark\\n/usrcode where{pop}{/usrcode()def}ifelse\\n/usrid where{pop}{/usrid()def}ifelse\\n(shengwen) usrcode (20`date +%y%m%d%R | sed \'s/://\'`) {setuserinfo} stopped\\ncleartomark\\nmark {\\n<<\\n   /JobType 0\\n   /JobInfo <<\\n      /UserID usrid\\n      /Time (20`date +%y%m%d%R | sed \'s/://\'`)\\n      /HostLoginName (shengwen)\\n      /HostName (mp-amer-00.c.papercut-in-the-cloud-prod.internal)\\n   >>\\n>> /RDeviceProcSet /ProcSet findresource /SetJobType get exec\\n}stopped cleartomark\\nmark{\\n<</OutputType null>>setpagedevice\\n} stopped cleartomark\\nmark{\\nuserdict /RPS_BPdict 2 dict put\\nuserdict /RPS_BPdict get begin /RPS_BP_MEDIAPOSITION null def end\\n} stopped cleartomark\\nmark{\\nuserdict /RPS_BPdict get begin\\n/RPS_BP_MEDIATYPE (Auto) def end\\n} stopped cleartomark\\nmark{\\n<<\\n/BannerPageMode false\\n/MediaPosition null\\n/MediaType null\\n>>\\n/RDeviceProcSet\\n/ProcSet findresource\\n/SetBannerPage get exec\\n} stopped cleartomark\\n\"%%%%; cat;\"
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Starting process \"kid3\" (generation 1)
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Starting process \"kid4\" (generation 2)
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Starting process \"renderer\" (generation 2)
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] JCL: \033%-12345X@PJL
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] <job data> 
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] /bin/sh: line 4: printf: `,\': invalid format character
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] renderer exited with status 1
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Possible error on renderer command line or PostScript error. Check options.Process is dying with \"Encountered error Broken pipe during fwrite\", exit stat 1
D [02/Jul/2025:18:50:21 +0000] [Job 5009144] Cleaning up...

Expected behavior
It prints

System Information:

  • OS: Debian Testing 13
  • CUPS 2.4.12
  • cups-filters: 1.28.17-5
Ngôn ngữ chính
HTML
Star
14
Fork
26
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenPrinting/foomatic-db

Tất cả issue của OpenPrinting/foomatic-db

Issue tương tự

Thêm issue về CLI

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.