Opened 16 years ago

Closed 13 years ago

#1308 closed patch (fixed)

dxf plugin crashes QGIS

Reported by: pcav Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.7.0
Component: C++ Plugins Version: Trunk
Keywords: Cc: scala@…
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

Description

When opening a dxf, I get: Warning: Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::out_of_range'

what(): basic_string::substr

Abortito

Self compiled on Debian from current trunk

Attachments (1)

dxf2shp.diff (536 bytes ) - added by aghisla 13 years ago.
patch for dxf2shp exception if no output layer is given

Download all attachments as: .zip

Change History (9)

comment:1 by telwertowski, 16 years ago

Unable to reproduce on a Mac. I tried adding various things to a valid dxf but the reader seems very good at ignoring unexpected input and still doing something reasonable.

Added application-wide exception handler for uncaught events in r9319. It will display an alert rather than crashing and may allow you to continue working if the unsuccessful load doesn't create an unstable layer.

comment:2 by pcav, 16 years ago

Priority: critical: causes crash or data corruptionminor: annoyance or enhancement

The problem derives by the lack of an output layer. If I insert it, everything works. However, the error message: basic_string::substr is not very helpful - could you please change it with something like "Please select a name for the output layer". With this modification, the bug can be closed.

comment:3 by pcav, 15 years ago

Cc: scala@… added

comment:4 by lutra, 15 years ago

Milestone: Version 1.0.3Version 1.2.0

I confirm that if you forget to select an output file, the message given is

basic_string::substr

that as a matter of fact should be changed with something different. Should be a pretty easy bug to fix.

comment:5 by lutra, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

by aghisla, 13 years ago

Attachment: dxf2shp.diff added

patch for dxf2shp exception if no output layer is given

comment:6 by aghisla, 13 years ago

Let me attach a patch, excusing my poor C++. Hope this helps!

comment:7 by lutra, 13 years ago

Type: bugpatch

comment:8 by jef, 13 years ago

Resolution: fixed
Status: newclosed

fixed in r15380.

Note: See TracTickets for help on using tickets.