bugGNU Octave - Bugs: bug #53010, SIGABRT with qt toolkit and print...

 
 

bug #53010: SIGABRT with qt toolkit and print command with an unknown printer

Submitter:  Sahil <batterylow>
Submitted:  Tue 30 Jan 2018 01:31:06 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Sahil Yadav Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 02 Feb 2018 05:54:27 AM UTC, comment #3: 

Bug #50198 has been resolved which fixes this bug.  Closing report.

Rik <rik5>
Group administrator
Wed 31 Jan 2018 12:49:31 AM UTC, comment #2: 

Added a dependency on bug #50198.  The patch that is in progress there also resolves this bug.

Rik <rik5>
Group administrator
Tue 30 Jan 2018 05:53:36 PM UTC, comment #1: 

Confirmed.  Changing the category to Plotting with OpenGL, although it is really only an issue with the qt toolkit.

The issue is a familiar one in that when using the qt toolkit there can be multiple threads and when an error occurs during the print process the wrong thread (i.e, one that does not have a signal handler installed) receives the exception.  Without an installed signal handler it calls the default which is std::terminate.

When running with the FLTK toolkit, for example, I get


print -dpswrite -PXX
/usr/bin/lpr: The printer or class does not exist.
  ./base/gsicc_manage.c:1088: gsicc_open_search(): Could not find default_gray.icc
| ./base/gsicc_manage.c:1708: gsicc_set_device_profile(): cannot find device profile
error: gl2ps_renderer::draw: internal pipe error
error: called from
    __opengl_print__ at line 155 column 7
    print at line 552 column 14


The warnings in gsicc_manage.c are not material.  The important thing is that the gl2ps_renderer is calling the error() function which then then leads to std::terminate.

Rik <rik5>
Group administrator
Tue 30 Jan 2018 01:31:06 AM UTC, original submission:  

When printing something to a printer, if the printer doesn't exist, octave exits with SIGABRT (in case of GUI).
 
The following are the outputs of octave-cli.
The output for version 4.0.0 is (which works fine in handling the exception):


>> clf()
>> surf(peaks)
>> print -dpswrite -PPS_printer
lpr: PS_printer: unknown printer
warning: broken pipe

>>


While the output for version 4.2.1 (stable) is :



octave:1> clf()
octave:2> surf(peaks)
octave:3> print -dpswrite -PPS_printer
lpr: PS_printer: unknown printer
warning: broken pipe
error: gl2ps_renderer::draw: internal pipe error
terminate called after throwing an instance of 'octave::execution_exception'
panic: Aborted -- stopping myself...


Whereas, the following was the output for the dev branch:



octave:1> clf()
octave:2> surf(peaks)
octave:3> print -dpswrite -PPS_printer
lpr: PS_printer: unknown printer
  ./base/gsicc_manage.c:1088: gsicc_open_search(): Could not find default_gray.icc
| ./base/gsicc_manage.c:1708: gsicc_set_device_profile(): cannot find device profile
arg_st =

  scalar structure containing the fields:

    append_to_file = 0
    canvas_size = [](0x0)
    debug = 0
    debug_file = octave-print-commands.log
    devopt = pswrite
    epstool_binary = /usr/bin/epstool
    figure =  1
    fig2dev_binary = /usr/bin/fig2dev
    fontsize =
    font =
    scalefontsize =  1
    force_solid = 0
    formatted_for_printing = 0
    ghostscript =

      scalar structure containing the fields:

        binary = /usr/bin/gs
        debug = 0
        device =
        epscrop = 1
        level =  2
        output =
        papersize =
        pageoffset = [](0x0)
        resolution =  150
        antialiasing = 0
        antialiasing_textalphabits =  4
        antialiasing_graphicsalphabits =  1

    loose = 0
    lpr_binary = /usr/bin/lpr
    name =
    orientation =
    pstoedit_binary = /usr/bin/pstoedit
    preview =
    printer = -PPS_printer
    send_to_printer = 0
    special_flag = textnormal
    tight_flag = 0
    use_color = 0
    lpr_options = -l
    unlink = {}(0x0)

error: gl2ps_renderer::draw: internal pipe error
terminate called after throwing an instance of 'octave::execution_exception'
fatal: caught signal Aborted -- stopping myself...


The above problem exists only in the case of QT graphics toolkit as the other two toolkits do not abort octave and continue after showing the some errors. A familiar bug was :

https://savannah.gnu.org/bugs/?48703

Sahil <batterylow>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by batterylow (Submitted the item)
  • -email is unavailable- added by batterylow
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-02 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-01-31 rik5 Dependencies- Depends on bugs #50198
    2018-01-30 rik5 SummarySIGABRT while using print command with unknown printer SIGABRT with qt toolkit and print command with an unknown printer
    2018-01-30 rik5 CategoryOctave Function Plotting with OpenGL
        StatusNone Confirmed
    2018-01-30 batterylow Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code