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

Crash when chcking the "Show bounding boxes" option in 3D view settings #40766

Open
spillner opened this issue Dec 27, 2020 · 13 comments
Open

Crash when chcking the "Show bounding boxes" option in 3D view settings #40766

spillner opened this issue Dec 27, 2020 · 13 comments
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Regression Something which used to work, but doesn't anymore

Comments

@spillner
Copy link

spillner commented Dec 27, 2020

I'm running QGis 3.16.2 from the qgis.org/debian repository, on a standard Ubuntu Focal (x86_64) installation. OpenGL is provided by version 455.38 of the NVidia proprietary driver , and I don't have any issues with 3D in other applications.

The 2D features in QGis seem to work just fine, but when I open the 3D preview pane I see nothing but a white canvas (even though can successfully build and manipulate world maps from vector and/or raster data sets in the 2D pane). PNG export likewise produces a white image, and selecting arbitrary points in the blank preview pane with the Identify tool never populates any data in the results tree.

While trying to debug this by toggling options under the 3D Configuration dialog, I get the following:

(1) When I enable the "Show Skybox" checkbox and Apply, I get the following on stderr:

no terrain - not setting near/far plane
Warning: Unknown uniform type or value: QVariant(Invalid) Please check your QParameters
Warning: [Qt3DRender::GLTexture] No QTextureData generated from Texture Generator yet. Texture will be invalid for this frame

Unchecking "Show Skybox" and clicking Apply again does not generate any new messages.

(2) When I enable "Show camera's view center" in the Advanced pane, I get just the message

no terrain - not setting near/far plane

(3) Most seriously, when I check "Show Bounding Boxes" in the Advanced pane, I always get the message

Warning: Unknown uniform type or value: QVariant(Invalid) Please check your QParameters

About 70% of the time, I also get an immediate application exit (either SEGV or SIGABRT) with the messages

QGIS died on signal 11Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 256
Aborted (core dumped)

Steps to reproduce:

  1. Open QGis
  2. Create a new Project
  3. Import GMTED2010 elevation data with the "Add Raster Layer" tool
  4. Change project CRS to EPSG:6933
  5. Open a new 3D Map View
  6. Click on the Configure... button in the 3D viewing pane
  7. Select the "Advanced" tab
  8. Toggle the "Show bounding boxes" option and click "Apply"
  9. Observe application crash (5 of 7 times in my testing so far)

QGis and OS versions:

QGIS version 3.16.2-Hannover QGIS code revision f1660f9
Compiled against Qt 5.12.8 Running against Qt 5.12.8
Compiled against GDAL/OGR 3.0.4 Running against GDAL/OGR 3.0.4
Compiled against GEOS 3.8.0-CAPI-1.13.1 Running against GEOS 3.8.0-CAPI-1.13.1
Compiled against SQLite 3.31.1 Running against SQLite 3.31.1
PostgreSQL Client Version 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1) SpatiaLite Version 4.3.0a
QWT Version 6.1.4 QScintilla2 Version 2.11.2
Compiled against PROJ 6.3.1 Running against PROJ Rel. 6.3.1, February 10th, 2020
OS Version Ubuntu 20.04.1 LTS
Active python plugins MetaSearch; db_manager; processing

Additional context:
I have all of the standard qgis dependency packages installed, and imported the GMTED2010 whole earth dataset at a 30-arcsecond resolution (BE / breakpoint emphasis version). The crashes happen with no layers loaded, with only the GMTED2010 raster data, with ArcGIS vector sets (e.g. https://hub.arcgis.com/datasets/UIA::uia-latitude-longitude-graticules-and-world-countries-boundaries) either by themselves or in combination with the elevation data, etc. It may be the case that I'm just picking bad data sets, but (1) that's not very obvious from the UI or online documentation, (2) it should be easier to acquire the necessary data to support 3D (e.g. a qgis-3d-elevation-data package; in the absence of that, I was following the instructions at https://www.qgistutorials.com/en/docs/working_with_terrain.html), (3) if enabling a 3D view before the necessary data is loaded, rendering on a smooth ellipsoid is a sensible default, and (4) in any event, segmentation fault is not a graceful way to handle user error.

@spillner spillner added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Dec 27, 2020
@gioman gioman added the 3D Relates to QGIS' 3D engine or rendering label Dec 27, 2020
@roya0045
Copy link
Contributor

Did you try with another version other than 3.16.2? I noticed some issues on 3.16.1 but 3.10(ltr) worked fine.

@gioman
Copy link
Contributor

gioman commented Dec 27, 2020

Crash confirmed (same QGIS version and OS) also with a much smaller dataset, like the one attached (and happens also when choosing other CRS for the project other than the described one).

clip1.zip

@gioman
Copy link
Contributor

gioman commented Dec 27, 2020

but 3.10(ltr) worked fine.

@roya0045 is a regression then.

@gioman gioman added Crash/Data Corruption Regression Something which used to work, but doesn't anymore labels Dec 27, 2020
@roya0045
Copy link
Contributor

but 3.10(ltr) worked fine.

@roya0045 is a regression then.

I was referencing the black screen on windows VMs, I wanted to validate if it was indeed a regression. Did you try it out ?

@gioman
Copy link
Contributor

gioman commented Dec 27, 2020

I was referencing the black screen on windows VMs, I wanted to validate if it was indeed a regression. Did you try it out ?

@roya0045 there is no black screen here, if fact is... white.I think that hoping to ha the 3d view to handle (quickly at least) a dataset that as the whole world extension, and that is being reprojected on the fly is a little bit too optimistic. Clipping that layer to a more reasonable geographic extension works just fine.

@spillner
Copy link
Author

Did you try with another version other than 3.16.2? I noticed some issues on 3.16.1 but 3.10(ltr) worked fine.

I actually started with 3.10 from the main Ubuntu repository, had nothing but white in the 3D pane, and upgraded to 3.16 hoping the 3D support was better. I will try some more versions tonight to try to bisect the crash behavior.

I'm not sure it's "unreasonable" to render the whole world dataset in 3D--- 30 arc-second resolution * 180 degrees in each axis = at most 466.56M grid points in view (one hemisphere)... that's a lot, but it fits easily in main memory, and even primitive LOD helps a lot. Google Earth manages something like this! I will try clipping and/or seeking out a lower-resolution data set to see whether that makes a difference. The irony is that I don't even care about the heightmap; I really just want to render my surface polygons from a high-altitude perspective. Note also that the crash happens regardless of whether the raster layer is loaded; I installed the GMTED data to try to suppress the "no terrain" error messages and because all of the 3D tutorials seem to start there.

@gioman gioman changed the title Crash bugs when adjusting 3D view settings Crash when chcking the "Show bounding boxes" option in 3D view settings Dec 28, 2020
@gioman
Copy link
Contributor

gioman commented Dec 28, 2020

The irony is that I don't even care about the heightmap; I really just want to render my surface polygons from a high-altitude perspective

@spillner then why are you enabling the 3D view in the first place?
that DEM raster works perfectly in 2D view, you can hillshade (or whatever other operation you need) it and use it as a base for your other layers.

Screenshot_20201228_084452

Note also that the crash happens regardless of whether the raster layer is loaded;

yes, this is the real issue here (reported in this ticket).

About the blank 3d view: it seems there is a maximum scale/bounding box that can be rendered. Not sure if this is by design or not. You should ask in the developers mailing list.

Peek 2020-12-28 08-59

@spillner
Copy link
Author

Thanks, that technique plus the Tilted Perspective projections give me what I need for now. I recommend leaving the bug open until there's at least a warning message for too much data in view, instead of the crash, and ideally until there's a filtering algorithm in place to sample the data at reduced resolution when wide areas are selected. I should have some time to attack that in a couple of weeks; appreciate your help for now.

@gioman
Copy link
Contributor

gioman commented Dec 30, 2020

I recommend leaving the bug open until there's at least a warning message for too much data in view, instead of the crash

it is not the extent of the data that makes QGIS crash, is the option "Show bounding boxes" that does, regardless of the data. The fact that the 3D view shows nothing if the data has a very large extent could be another issue, or could by design @PeterPetrik any idea?

@PeterPetrik
Copy link
Contributor

no idea

@PeterPetrik PeterPetrik self-assigned this Jun 15, 2021
@PeterPetrik
Copy link
Contributor

I can reproduce this on macOS consistently with nightly build now

@PeterPetrik
Copy link
Contributor

still present in 3.21.0

@ptitjano
Copy link
Contributor

ptitjano commented Apr 4, 2023

It looks like the recent change to limit the 3D scene extent made it easier to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants