Closed michaelrsweet closed 8 months ago
Adding some details here to reproduce.
Test environment: Hardware: Raspberry Pi 400 OS: Raspberry Pi OS (Debian 11 "bullseye")
Running CUPS 2.3.3op2 included with OS with one printer queue, the CUPS-PDF printer.
Steps to reproduce: -Clone current master of libcups3 -Configure with --prefix=/usr/ -Compile and install -Built the "simple" application in the CUPS API docs that calls cupsEnumDests() and prints out the results. -Application segfaults when calling cupsEnumDests().
Issue is not just limited to calling cupsEnumDests(). The application I am testing and updating for libcups3 support is also segfaulting when calling cupsGetDests().
Note: I tried testing with the tagged 3.0b2 release. It does not segfault, but still has issues. The sample application outputs a list of printer destinations and then hangs. Have to Ctrl-C at that point.
OK, so the segfault is an easy fix - the value formatter didn't handle dateTime values...
The hang is occurring when shutting down the DNS-SD thread, not sure why yet.
Looks like zdohnal fixed the hang in CUPS 2.5, so I brought that fix over:
[master 778600ccc] Fix hang and crash in cupsGetDests (Issue #74)
Just synced the changes and re-built. Looks like everything is working now, including my project. 👍
Discussed in https://github.com/OpenPrinting/libcups/discussions/73