cups icon indicating copy to clipboard operation
cups copied to clipboard

segmentation fault for transient print on forked process

Open doritostains opened this issue 13 years ago • 6 comments

On my Rails application cups works perfectly fine but when I set up resque to create workers, for printing, cups gem crashes with a segmentation fault. Here is the output: http://pastie.org/2387372

All other workers are fine and the printing code works fine all the way up to the point that I call Cups::PrintJob::Transient.new and it immediately segfaults. Any help with this would be highly appreciated.

doritostains avatar Aug 17 '11 19:08 doritostains

I'll look into it. I've been rather hands-off lately and the last pull request I merged passed all the tests so assumed things were ok. What version of OS X are you using?

m0wfo avatar Aug 17 '11 19:08 m0wfo

OSX 10.7 but I had the same issue with 10.6

doritostains avatar Aug 17 '11 20:08 doritostains

This is either an issue with tempfile instantiation or something more profound in the PrintJob object. It's 11.30 at night here so I'll take a look tomorrow.

I hadn't really mentioned it to anybody but I have a limited subset of the gem methods ported to the FFI, if there's interest I'll consider spending some more time on getting something to release.

m0wfo avatar Aug 17 '11 20:08 m0wfo

I know I keep pressing the wrong button. My bad.

m0wfo avatar Aug 17 '11 20:08 m0wfo

Thank you for looking in to this.

doritostains avatar Aug 17 '11 21:08 doritostains

I tried using the cupsffi gem and my app segfaults in a very similar way when i reaches cupsGetDests. Could this be a general problem with the cups library?

doritostains avatar Aug 22 '11 20:08 doritostains