FS#141SIGABRT drawing circle crashes
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- High
- Priority
- Normal
- Reported version
- Development
- Operating system
- All
- Reported
- 2011-07-12 by anonymous
- Closed
- 2011-07-12 by andrew
- new drawing
- tools -> circle
- click center -> crash
source code segment:
void RGraphicsSceneQt::exportArcSegment(const RArc& arc) {
RPainterPath& path = draftMode ? currentPainterPathDraft : currentPainterPath;
// try QPainterPath arcTo method first but this can be very
// inaccurate (+/- 0.01 difference from start- / end point):
RPainterPath p;
RBox box(arc.center - RVector(arc.radius, arc.radius), arc.center
+ RVector(arc.radius, arc.radius));
p.moveTo(arc.getStartPoint());
p.arcTo(box.toQRectF(), 360 - RMath::rad2deg(
arc.startAngle), -RMath::rad2deg(arc.getSweep()));
=> QPainterPath::Element e1 = p.elementAt(1);
double errorStart = RVector(e1.x, e1.y).getDistanceTo(arc.getStartPoint());
QPointF ep = p.pointAtPercent(1.0);
double errorEnd = RVector(ep.x(), ep.y()).getDistanceTo(arc.getEndPoint());
if (errorStart<1.0e-5 && errorEnd<1.0e-5) {
// TODO: check if this is ever reached:
path.addPath(p);
return;
}
stack trace:
Thread [1] 6814 (Suspended : Signal : SIGABRT:Aborted)
__kernel_vsyscall() at 0xffffe424
raise() at 0xb4efc8df
abort() at 0xb4efe220
RMainWindow::messageHandler() at RMainWindow.cpp:63 0x8ee4076
qt_message_output() at 0xb5356f65
0xb53571ab
qFatal() at 0xb53572c9
qt_assert() at 0xb5357355
QPainterPath::elementAt() at qpainterpath.h:400 0x8a8163e
RGraphicsSceneQt::exportArcSegment() at RGraphicsSceneQt.cpp:210 0x8dc5c5d
RExporter::exportArc() at RExporter.cpp:831 0x8ec82c7
RGraphicsSceneQt::exportArc() at RGraphicsSceneQt.cpp:125 0x8dc570f
RExporter::exportCircle() at RExporter.cpp:911 0x8ec899e
RCircleEntity::exportEntity() at RCircleEntity.cpp:110 0x8de6a2a
RExporter::exportCurrentEntity() at RExporter.cpp:603 0x8ec7430
RGraphicsScene::exportCurrentEntity() at RGraphicsScene.cpp:244 0x8ecff0b
RExporter::exportEntity() at RExporter.cpp:557 0x8ec7220
RDocumentInterface::previewOperation() at RDocumentInterface.cpp:1,882 0x8ebc561
REcmaDocumentInterface::previewOperation() at REcmaDocumentInterface.cpp:5,247 0x88ce888
0xb6bd813c
0xb6ac1f68
0xb6a9164c
0xa7fd43b8
0xb6a423e3
0xb6af06e0
0xb6ac201e
QScriptValue::call() at 0xb6bd2e67
REcmaShellActionAdapter::coordinateEventPreview() at REcmaShellActionAdapter.cpp:1,341 0x8c306d6
RDocumentInterface::previewClickEvent() at RDocumentInterface.cpp:770 0x8eb996a
RDocumentInterface::mouseMoveEvent() at RDocumentInterface.cpp:621 0x8eb91b7
RGraphicsScene::handleMouseMoveEvent() at RGraphicsScene.cpp:152 0x8ecfbd1
RGraphicsView::handleMouseMoveEvent() at RGraphicsView.cpp:427 0x8ed23aa
RGraphicsViewQt::mouseMoveEvent() at RGraphicsViewQt.cpp:191 0x8dd213b
QWidget::event() at 0xb58da661
RGraphicsViewQt::event() at RGraphicsViewQt.cpp:102 0x8dd1fb8
QApplicationPrivate::notify_helper() at 0xb5871d7c
QApplication::notify() at 0xb58772c4
QCoreApplication::notifyInternal() at 0xb547215b
QApplicationPrivate::sendMouseEvent() at 0xb5875152
0xb59066b5
QApplication::x11ProcessEvent() at 0xb5905d26
0xb5932f04
g_main_context_dispatch() at 0xb4af3509
0xb4af3d10
g_main_context_iteration() at 0xb4af3fce
QEventDispatcherGlib::processEvents() at 0xb54a2741
0xb5932a55
QEventLoop::processEvents() at 0xb547131d
QEventLoop::exec() at 0xb54715aa
QCoreApplication::exec() at 0xb5473701
qtscript_QCoreApplication_static_call() at 0xb0a9c4b7
0xb6bd813c
0xb6ac1f68
0xb6a9164c
0xb09fe9e9
0xb6a44262
0xb6a445f7
0xb6bb0f92
QScriptEngine::evaluate() at 0xb6bba46f
RScriptHandlerEcma::eval() at RScriptHandlerEcma.cpp:728 0x8787984
RScriptHandlerEcma::doScript() at RScriptHandlerEcma.cpp:724 0x8787868
RScriptHandler::init() at RScriptHandler.cpp:31 0x8f0163a
main() at main.cpp:172 0x87815fb