Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#354 print preview + save causes crash

1.0
closed-fixed
nobody
None
7
2013-05-30
2012-09-27
No

running LC 2.0.0 alpha 4.

1) create a new drawing, save it. Or open any existing drawing.
2) add any lines/ circles / artifacts and / or
3) open print preview. Then close the print preview.
4) Click the save button.

The program crashes and wipes out all content in the file. It does not delete the file however.

regards

Discussion

  •  
    Attachments
  • I am running ubuntu 12.04 64 bit on amd phenom II X4
    if that is relevant.

     
  • one modification to the report.
    I have to add something to the drawing after I close the print preview. Then attempting to save crashes the program.
    Not if nothing was added since the print preview.

     
  • Dongxu Li
    Dongxu Li
    2012-09-28

    • priority: 5 --> 7
    • status: open --> open-accepted
     
  • Dongxu Li
    Dongxu Li
    2012-09-28

    back trace:

    Program received signal SIGSEGV, Segmentation fault.
    0x00000000004e7ef5 in RS_FilterDXFRW::writeVports (this=0x1854900)
    at lib/filters/rs_filterdxfrw.cpp:1686
    1686 vp.height = gv->getHeight()/fac.y;
    (gdb) bt full
    #0 0x00000000004e7ef5 in RS_FilterDXFRW::writeVports (this=0x1854900)
    at lib/filters/rs_filterdxfrw.cpp:1686
    fac = {x = 2.3350242746182388e-313, y = 0, valid = true}
    vp = {<DRW_TableEntry> = {tType = DRW::UNKNOWNT, handle = "",
    handleBlock = "", name = "*Active", flags = 0}, lowerLeft = {x =
    0, y = 0, z = 0}, UpperRight = {x = 1, y = 1, z = 0}, center = {x =
    0.65182799999999996, y = -0.16, z = 0}, snapBase = {x = 0, y = 0, z = 0},
    snapSpacing = {x = 10, y = 10, z = 0}, gridSpacing = {x = 10, y =
    10, z = 0}, viewDir = {x = 0, y = 0, z = 1}, viewTarget = {x = 0, y = 0,
    z = 0}, height = 5.1373199999999999, ratio = 2.4426877,
    lensHeight = 50, frontClip = 0, backClip = 0, snapAngle = 0,
    twistAngle = 0, viewMode = 0, circleZoom = 100, fastZoom = 1,
    ucsIcon = 3, snap = 0, grid = 1, snapStyle = 0, snapIsopair = 0,
    gridBehavior = 7}
    spacing = {x = 0, y = 0, valid = true}
    gv = 0x185e478
    #1 0x000000000072ecf0 in dxfRW::writeTables (this=0x182eec0)
    at src/libdxfrw.cpp:1322
    No locals.
    #2 0x0000000000720716 in dxfRW::write (this=0x182eec0, interface_=0x1854908,
    ver=DRW::AC1021, bin=false) at src/libdxfrw.cpp:123
    isOk = false
    filestr = <incomplete type>
    ---Type <return> to continue, or q <return> to quit---
    header = {vars = std::map with 1 elements = {["$ACADVER"] =
    0x1824140}, comments = "", name = "", curr = 0x7fffffffbf50}
    #3 0x00000000004e4b3d in RS_FilterDXFRW::fileExport (this=0x1854900, g=...,
    file=..., type=RS2::FormatDXFRW) at lib/filters/rs_filterdxfrw.cpp:1212
    path = {static null = {<No data fields>}, static shared_null = {ref = {
    _q_value = 3932}, alloc = 0, size = 0, data =
    0xd0bdda <QString::shared_null+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 51},
    alloc = 0, size = 0, data =
    0x7ffff6a098da <QString::shared_empty+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, d = 0x1778900, static codecForCStrings = 0x0}
    exportVersion = DRW::AC1021
    success = false
    #4 0x00000000004d9b72 in RS_FileIO::fileExport (this=0xf19df0, graphic=...,
    file=..., type=RS2::FormatDXFRW) at lib/fileio/rs_fileio.cpp:104
    filter = std::tuple containing = {[1] = , [2] =
    {<std::default_delete<RS_FilterInterface>> =
    {<No data fields>}, <No data fields>}}
    #5 0x0000000000488215 in RS_Graphic::save (this=0x167eec0, isAutoSave=false)
    at lib/engine/rs_graphic.cpp:344
    finfo = 0x20
    ---Type <return> to continue, or q <return> to quit---
    actualName = 0x1788ab0
    actualType = RS2::FormatUnknown
    ret = false
    #6 0x00000000006ef177 in QC_MDIWindow::slotFileSave (this=0x11be550,
    cancelled=@0x7fffffffc46f: false, isAutoSave=false)
    at main/qc_mdiwindow.cpp:451
    ret = false
    #7 0x00000000006de10d in QC_ApplicationWindow::slotFileSave (this=0xf54400)
    at main/qc_applicationwindow.cpp:2915
    cancelled = false
    w = 0x11be550
    name = {static null = {<No data fields>}, static shared_null = {ref = {
    _q_value = 3932}, alloc = 0, size = 0, data =
    0xd0bdda <QString::shared_null+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 51},
    alloc = 0, size = 0, data =
    0x7ffff6a098da <QString::shared_empty+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, d = 0xd0bdc0 <QString::shared_null>,
    static codecForCStrings = 0x0}
    #8 0x000000000071e210 in QC_ApplicationWindow::qt_static_metacall (_o=
    0xf54400, _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0x7fffffffc730)
    ---Type <return> to continue, or q <return> to quit---
    at ../../generated/librecad/moc/moc_qc_applicationwindow.cpp:201
    _t = 0xf54400
    #9 0x00007ffff66c8acf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
    No symbol table info available.
    #10 0x00007ffff6bcee82 in QAction::triggered(bool) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #11 0x00007ffff6bcf070 in QAction::activate(QAction::ActionEvent) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #12 0x00007ffff6f8ee5f in ?? () from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #13 0x00007ffff6f8f10c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #14 0x00007ffff704919a in QToolButton::mouseReleaseEvent(QMouseEvent*) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #15 0x00007ffff6c247f0 in QWidget::event(QEvent*) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #16 0x00007ffff6bd508c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    ---Type <return> to continue, or q <return> to quit---
    () from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #17 0x00007ffff6bd9d6b in QApplication::notify(QObject*, QEvent*) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #18 0x00007ffff66b35ee in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
    No symbol table info available.
    #19 0x00007ffff6bd5ecb in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #20 0x00007ffff6c50974 in ?? () from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #21 0x00007ffff6c4f701 in QApplication::x11ProcessEvent(_XEvent*) ()
    from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #22 0x00007ffff6c75892 in ?? () from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #23 0x00007ffff4a18475 in g_main_context_dispatch ()
    from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #24 0x00007ffff4a187a8 in ?? () from /usr/lib/libglib-2.0.so.0
    ---Type <return> to continue, or q <return> to quit---
    No symbol table info available.
    #25 0x00007ffff4a18864 in g_main_context_iteration ()
    from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #26 0x00007ffff66e1746 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    No symbol table info available.
    #27 0x00007ffff6c7550e in ?? () from /usr/lib/libQtGui.so.4
    No symbol table info available.
    #28 0x00007ffff66b233f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    No symbol table info available.
    #29 0x00007ffff66b25c8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    No symbol table info available.
    #30 0x00007ffff66b7268 in QCoreApplication::exec() ()
    from /usr/lib/libQtCore.so.4
    No symbol table info available.
    #31 0x00000000006ff37e in main (argc=2, argv=0x7fffffffe058)
    at main/main.cpp:269
    lang = {static null = {<No data fields>}, static shared_null = {ref = {
    _q_value = 3932}, alloc = 0, size = 0, data =
    0xd0bdda <QString::shared_null+26>, clean = 0, simpletext = 0,
    ---Type <return> to continue, or q <return> to quit---
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 51},
    alloc = 0, size = 0, data =
    0x7ffff6a098da <QString::shared_empty+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, d = 0xf1cc70, static codecForCStrings = 0x0}
    app = <incomplete type>
    prgDir = {static null = {<No data fields>}, static shared_null = {
    ref = {_q_value = 3932}, alloc = 0, size = 0, data =
    0xd0bdda <QString::shared_null+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 51},
    alloc = 0, size = 0, data =
    0x7ffff6a098da <QString::shared_empty+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, d = 0xf01f30, static codecForCStrings = 0x0}
    fileList = {<QList<QString>> = {{p = {static shared_null = {ref = {
    _q_value = 3078}, alloc = 0, begin = 0, end = 0,
    sharable = 1, array = {0x0}}, d = 0xf229f0}, d =
    0xf229f0}}, <No data fields>}
    langCmd = {static null = {<No data fields>}, static shared_null = {
    ref = {_q_value = 3932}, alloc = 0, size = 0, data =
    0xd0bdda <QString::shared_null+26>, clean = 0, simpletext = 0,
    ---Type <return> to continue, or q <return> to quit---
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 51},
    alloc = 0, size = 0, data =
    0x7ffff6a098da <QString::shared_empty+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, d = 0xf31db0, static codecForCStrings = 0x0}
    appWin = 0xf54400
    r = 0
    prgInfo = {d_ptr = {d = 0xf09600}}
    unit = {static null = {<No data fields>}, static shared_null = {ref = {
    _q_value = 3932}, alloc = 0, size = 0, data =
    0xd0bdda <QString::shared_null+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 51},
    alloc = 0, size = 0, data =
    0x7ffff6a098da <QString::shared_empty+26>, clean = 0, simpletext = 0,
    righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, d = 0xf1d310, static codecForCStrings = 0x0}
    pixmap = 0xf1a660
    files_loaded = true
    (gdb)

     
  • Rallaz
    Rallaz
    2012-11-23

    • status: open-accepted --> open-fixed
     
  • Rallaz
    Rallaz
    2012-11-23

    Added a patch in master branch commit 98c747b0f5884fec2dddf7688916eea2438a2d56

    Please test if work and close the bug report if is solved

     
  • Dongxu Li
    Dongxu Li
    2013-05-30

    • status: open-fixed --> closed-fixed
    • Group: --> 1.0