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

Rocky runs but cannot see any earth. #58

Open
trinhtuanlong opened this issue Oct 9, 2024 · 12 comments
Open

Rocky runs but cannot see any earth. #58

trinhtuanlong opened this issue Oct 9, 2024 · 12 comments

Comments

@trinhtuanlong
Copy link

So I just built rocky on my Ubuntu 22.04 using vcpkg. I tried running rocky_demo but only the menu window appears but nothing else. The terminal prints out these line:
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: whitespace only string
[vsg info] texel_margin = 12
[vsg info] quad_margin = 6
[vsg info] [Vulkan] vkCreateDevice layer callstack setup to:
[vsg info] [Vulkan]
[vsg info] [Vulkan] ||
[vsg info] [Vulkan]
[vsg info] [Vulkan] ||
[vsg info] [Vulkan]
[vsg info] [Vulkan] Using "NVIDIA T1000" with driver: "libGLX_nvidia.so.0"
ASSERTION FAILURE (getAllKeysAtLOD @ Profile.cpp:241) profile.valid() ...
[rocky info] Removing window...
[rocky info] All windows closed... shutting down.

What could be the problem?

@gwaldron
Copy link
Member

gwaldron commented Oct 9, 2024

Great question :)
Please run rocky_demo --version-all and post the output.

Also, I would like to see your Version.h file that was created and installed in the rocky include folder.

You can also try a map with local data, in case there's a networking problem:
rocky_demo --map data/geotiff.map.json

@trinhtuanlong
Copy link
Author

trinhtuanlong commented Oct 10, 2024

So rocky_demo --version-all gives the output:

[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: whitespace only string
[vsg info] texel_margin = 12
[vsg info] quad_margin = 6
cpp_httplib 0.18.0
entt 3.13.2
gdal 3.9.2
glm 1.0.1.0
imgui 1.91.0
nlohmann_json 3.11
openssl 3.3.2
proj 9.4
rocky 0.3.6
spdlog 1.14.1
sqlite 3.46.1
vsgxchange 1.0.5
vulkanscenegraph 1.1.8
weejobs 1.0.1
zlib 1.3.1```
The Version.h file is:
```/**
 * rocky c++
 * Copyright 2023 Pelican Mapping
 * MIT License
 */
#pragma once

// Do not edit me!
// CMake generated this file from "Version.h.in" - edit that instead.

#define ROCKY_PROJECT_NAME "rocky"
#define ROCKY_PROJECT_DESCRIPTION "Rocky by Pelican Mapping"

#define ROCKY_VERSION_MAJOR 0
#define ROCKY_VERSION_MINOR 3
#define ROCKY_VERSION_REV 6
#define ROCKY_VERSION_ABI 109
#define ROCKY_SOVERSION 109
#define ROCKY_STR_NX(s) #s
#define ROCKY_STR(s) ROCKY_STR_NX(s)
#define ROCKY_COMPUTE_VERSION(major, minor, rev) ((major) * 10000 + (minor) * 100 + (rev))
#define ROCKY_VERSION_NUMBER ROCKY_COMPUTE_VERSION(ROCKY_VERSION_MAJOR, ROCKY_VERSION_MINOR, ROCKY_VERSION_REV)
#define ROCKY_VERSION_STRING ROCKY_STR(ROCKY_VERSION_MAJOR) "." ROCKY_STR(ROCKY_VERSION_MINOR) "." ROCKY_STR(ROCKY_VERSION_REV)

#define ROCKY_VERSION_BEFORE(major, minor, rev) ROCKY_VERSION_NUMBER < ROCKY_COMPUTE_VERSION(major, minor, rev)
#define ROCKY_VERSION_AT_LEAST(major, minor, rev) ROCKY_VERSION_NUMBER >= ROCKY_COMPUTE_VERSION(major, minor, rev))

// Dependency defines

#define ROCKY_HAS_GLM
#define ROCKY_HAS_PROJ
#define ROCKY_HAS_SPDLOG
#define ROCKY_HAS_JSON
#define ROCKY_HAS_HTTPLIB
#define ROCKY_HAS_OPENSSL
#define ROCKY_HAS_GDAL
#define ROCKY_HAS_SQLITE
#define ROCKY_HAS_ZLIB
#define ROCKY_HAS_TMS
#define ROCKY_HAS_MBTILES
#define ROCKY_HAS_AZURE
#define ROCKY_HAS_BING
#define ROCKY_HAS_GEOCODER

#define ROCKY_HAS_VSG
#define ROCKY_HAS_VSGXCHANGE
#define ROCKY_HAS_ENTT
/* #undef ROCKY_HAS_GLSLANG */

rocky_demo --map data/geotiff.map.json gives the same problem.

@gwaldron
Copy link
Member

gwaldron commented Oct 10, 2024

Maybe you need to set your PROJ_DATA environment var to point at the PROJ share dir. If you installed from vcpkg it should be in you vcpkg installed folder, under share/proj

@trinhtuanlong
Copy link
Author

I already did.
echo $PROJ_DATA
/home/longtt/.VSG/rocky/build/vcpkg_installed/x64-linux/share/proj
I also already downloaded the PROJ-data repo on github to this folder.

@gwaldron
Copy link
Member

Try pulling the latest rocky, and run it with the log level argument. Maybe this will reveal why PROJ is failing.

rocky_demo --log-level debug

@trinhtuanlong
Copy link
Author

trinhtuanlong commented Oct 14, 2024

So I have rebuilt and run like you said and the messages are:

[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: missing [
[rocky info] PROJ says: proj_create_from_wkt: whitespace only string
[vsg info] texel_margin = 12
[vsg info] quad_margin = 6
[vsg info] [Vulkan] vkCreateDevice layer callstack setup to:
[vsg info] [Vulkan]    <Application>
[vsg info] [Vulkan]      ||
[vsg info] [Vulkan]    <Loader>
[vsg info] [Vulkan]      ||
[vsg info] [Vulkan]    <Device>
[vsg info] [Vulkan]        Using "NVIDIA T1000" with driver: "libGLX_nvidia.so.0"
[rocky debug] Layer "" profile set to {"extent":{"srs":"EPSG:4326+5773","xmax":180.0,"xmin":-180.0,"ymax":90.0,"ymin":-90.0},"tx":2,"ty":1}
[rocky debug] Layer "ReadyMap 15m Base Imagery" status = OK
[rocky debug] Layer "" profile set to {"extent":{"srs":"EPSG:4326+5773","xmax":180.0,"xmin":-180.0,"ymax":90.0,"ymin":-90.0},"tx":2,"ty":1}
[rocky debug] Layer "ReadyMap 90m Elevation" status = OK
ASSERTION FAILURE (getAllKeysAtLOD @ Profile.cpp:241) profile.valid() ...
[rocky info] Removing window...
[rocky info] All windows closed... shutting down.```

@gwaldron
Copy link
Member

I'm not able to reproduce this on either Windows or WSL2 Ubuntu. The only course of action I can think of is to set a debugger breakpoint or examine the code and figure out why PROJ is getting an empty string. The function in question is here:
https://github.com/pelicanmapping/rocky/blob/main/src/rocky/SRS.cpp#L129

@gwaldron
Copy link
Member

Any luck with this?

@trinhtuanlong
Copy link
Author

trinhtuanlong commented Oct 31, 2024

So I found that I have another version of proj on my computer, so I deleted it and tried to rebuild. Currently with latest rocky pull I have several error while building which may be related to the version of gcc I am using:

/home/longtt/.VSG/rocky/src/rocky/AzureImageLayer.cpp:111:27: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘const rocky::optional<unsigned int>’)
  111 |     query << "&tileSize=" << tileSize();
      |     ~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~
      |           |                          |
      |           std::basic_ostream<char>   const rocky::optional<unsigned int>

and

/home/longtt/.VSG/rocky/src/rocky/vsg/ECS.h: In constructor ‘rocky::ECS::SystemNode<T>::SystemNode(entt::registry&)’:
/home/longtt/.VSG/rocky/src/rocky/vsg/ECS.h:307:9: error: class ‘rocky::ECS::SystemNode<T>’ does not have any field named ‘Inherit’
  307 |         Inherit(), System(in_registry)
      |         ^~~~~~~
/home/longtt/.VSG/rocky/src/rocky/vsg/ECS.h: In instantiation of ‘rocky::ECS::SystemNode<T>::~SystemNode() [with T = rocky::Line]’:
/home/longtt/.VSG/release/include/vsg/core/Inherit.h:27:11:   required from here
/home/longtt/.VSG/rocky/src/rocky/vsg/ECS.h:316:46: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘void (rocky::ECS::SystemNode<rocky::Line>::*)(entt::registry&, entt::entity)’ {aka ‘void (rocky::ECS::SystemNode<rocky::Line>::*)(entt::basic_registry<>&, entt::entity)’} to binary ‘operator<’
  316 |         registry.on_construct<T>().disconnect<&SystemNode<T>::onConstruct>(*this);

May I ask which version of gcc and g++ are you using for rocky on Ubuntu?

@gwaldron
Copy link
Member

Thanks.
We develop on Windows with VS 2022, so sometimes the gcc compiler errors lag behind.
On Linux we use Ubuntu 22.04.
I just pushed an update that will hopefully fix your issues.

@trinhtuanlong
Copy link
Author

Ok so I managed to build rocky, but rocky_demo debug throws these errors which seems unrelated to the previous issues

[vsg info] texel_margin = 12
[vsg info] quad_margin = 6
[vsg info] [Vulkan] Inserted device layer "VK_LAYER_KHRONOS_validation" (libVkLayer_khronos_validation.so)
[vsg info] [Vulkan] Failed to find vkGetDeviceProcAddr in layer "libVkLayer_MESA_device_select.so"
[vsg info] [Vulkan] vkCreateDevice layer callstack setup to:
[vsg info] [Vulkan]    <Application>
[vsg info] [Vulkan]      ||
[vsg info] [Vulkan]    <Loader>
[vsg info] [Vulkan]      ||
[vsg info] [Vulkan]    VK_LAYER_KHRONOS_validation
[vsg info] [Vulkan]            Type: Explicit
[vsg info] [Vulkan]            Manifest: /usr/share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json
[vsg info] [Vulkan]            Library:  libVkLayer_khronos_validation.so
[vsg info] [Vulkan]      ||
[vsg info] [Vulkan]    <Device>
[vsg info] [Vulkan]        Using "NVIDIA T1000" with driver: "libGLX_nvidia.so.0"
[vsg error] [Vulkan] Validation Error: [ VUID-RuntimeSpirv-NonWritable-06341 ] Object 0: handle = 0x85798b0000000067, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x116350f | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 1, Binding 1, variable "vsg_viewports"] (type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) which is not marked with NonWritable, but vertexPipelineStoresAndAtomics was not enabled.
The Vulkan spec states: If vertexPipelineStoresAndAtomics is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-NonWritable-06341)
[rocky error] Validation Error: [ VUID-RuntimeSpirv-NonWritable-06341 ] Object 0: handle = 0x85798b0000000067, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x116350f | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 1, Binding 1, variable "vsg_viewports"] (type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) which is not marked with NonWritable, but vertexPipelineStoresAndAtomics was not enabled.
The Vulkan spec states: If vertexPipelineStoresAndAtomics is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-NonWritable-06341)
[vsg error] [Vulkan] Validation Error: [ VUID-RuntimeSpirv-NonWritable-06341 ] Object 0: handle = 0x85798b0000000067, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x116350f | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 1, Binding 1, variable "vsg_viewports"] (type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) which is not marked with NonWritable, but vertexPipelineStoresAndAtomics was not enabled.
The Vulkan spec states: If vertexPipelineStoresAndAtomics is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-NonWritable-06341)
[rocky error] Validation Error: [ VUID-RuntimeSpirv-NonWritable-06341 ] Object 0: handle = 0x85798b0000000067, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x116350f | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 1, Binding 1, variable "vsg_viewports"] (type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) which is not marked with NonWritable, but vertexPipelineStoresAndAtomics was not enabled.
The Vulkan spec states: If vertexPipelineStoresAndAtomics is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-NonWritable-06341)
[vsg error] [Vulkan] Validation Error: [ VUID-RuntimeSpirv-NonWritable-06341 ] Object 0: handle = 0x2d93ac000000006f, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x116350f | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 1, Binding 1, variable "vsg_viewports"] (type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) which is not marked with NonWritable, but vertexPipelineStoresAndAtomics was not enabled.
The Vulkan spec states: If vertexPipelineStoresAndAtomics is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-NonWritable-06341)
[rocky error] Validation Error: [ VUID-RuntimeSpirv-NonWritable-06341 ] Object 0: handle = 0x2d93ac000000006f, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x116350f | vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 1, Binding 1, variable "vsg_viewports"] (type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) which is not marked with NonWritable, but vertexPipelineStoresAndAtomics was not enabled.
The Vulkan spec states: If vertexPipelineStoresAndAtomics is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration (https://vulkan.lunarg.com/doc/view/1.3.296.0/linux/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-NonWritable-06341)
Segmentation fault (core dumped)

@gwaldron
Copy link
Member

gwaldron commented Nov 5, 2024

Can you please post a gdb stack trace?

gdb rocky_demo
(gdb) run
(gdb) bt

By the way, have you tried building and running the apps in vsgExamples ? It would be nice to know if you can run basic VSG stuff before trying to debug Rocky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants