Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRS transform exception bricks map canvas #40683

Closed
uclaros opened this issue Dec 20, 2020 · 5 comments · Fixed by #40687
Closed

CRS transform exception bricks map canvas #40683

uclaros opened this issue Dec 20, 2020 · 5 comments · Fixed by #40687
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@uclaros
Copy link
Contributor

uclaros commented Dec 20, 2020

Describe the bug
If a crs transform exception is thrown, QGIS can be stuck in an strange state where the map canvas can be panned or zoomed but the layers panel has no effect on layers visibility any more!

How to Reproduce

  1. Open the attached project tmp_project.zip
  2. Right click on layer dem_tfw > Layer CRS > Set to EPSG:4326 (wrong on purpose)
  3. Uncheck any layer to turn off its visibility
  4. An exception messagebox informs that Could not transform bounding box to target CRS
  5. The map canvas is now at a stuck state. You can zoom / pan but layers panel does nothing.
  6. Close QGIS (discard project)
  7. Same exception messagebox, we cannot quit!
  8. Remove the layer or correctly set CRS to EPSG:2100
  9. Map canvas is still stuck, at least we can exit!

QGIS and OS versions
677ccf5 on debian testing

@uclaros uclaros added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Dec 20, 2020
@nyalldawson
Copy link
Collaborator

You should see the full stacketrace dumped to console when this happens -- are you able to copy and paste that?

@nyalldawson nyalldawson added the Feedback Waiting on the submitter for answers label Dec 20, 2020
@uclaros
Copy link
Contributor Author

uclaros commented Dec 20, 2020

This is all I get with QGIS_DEBUG=9

../src/core/qgscoordinatetransform.cpp:545 : (transformBoundingBox) [0ms] Entering transformBoundingBox...
Critical: Caught unhandled QgsException:  "Could not transform bounding box to target CRS"
Stacktrace (piped through c++filt):
./output/bin/qgis(+0xcfc8)[0x55701fd80fc8]
./output/bin/qgis(+0xd513)[0x55701fd81513]
/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xc47c8)[0x7f1dc69c87c8]
/lib/x86_64-linux-gnu/libQt5Core.so.5(qt_message_output(QtMsgType, QMessageLogContext const&, QString const&)+0xd)[0x7f1dc69c9d4d]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QDebug::~QDebug()+0x68)[0x7f1dc6ac93a8]
/home/uclaros/dev/QGIS/build-master-Debug/output/lib/libqgis_core.so.3.17.0(QgsApplication::notify(QObject*, QEvent*)+0x180)[0x7f1dc512b4da]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal2(QObject*, QEvent*)+0x12a)[0x7f1dc6bb1f2a]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+0x171)[0x7f1dc6bb4961]
/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x305df3)[0x7f1dc6c09df3]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x25b)[0x7f1dbc7afbdb]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x51e88)[0x7f1dbc7afe88]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2f)[0x7f1dbc7aff3f]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x5f)[0x7f1dc6c0947f]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0x12b)[0x7f1dc6bb08eb]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::exec()+0x90)[0x7f1dc6bb8b60]
./output/bin/qgis(+0x14ade)[0x55701fd88ade]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea)[0x7f1dc414bd0a]
./output/bin/qgis(+0xb06a)[0x55701fd7f06a]

@nyalldawson
Copy link
Collaborator

Are you running a debug build?

@uclaros
Copy link
Contributor Author

uclaros commented Dec 20, 2020

Yup

@nyalldawson nyalldawson self-assigned this Dec 20, 2020
@nyalldawson nyalldawson removed the Feedback Waiting on the submitter for answers label Dec 20, 2020
@nyalldawson
Copy link
Collaborator

Ok, got it. It's master only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants