Bug 400409 - Segmentation fault when trying to add some WMS maps.
Summary: Segmentation fault when trying to add some WMS maps.
Status: REPORTED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-28 11:13 UTC by felics-kde
Modified: 2023-09-22 11:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
terminal output of the run of 'strace marble' (xz-compressed). (167.43 KB, application/x-xz)
2018-10-28 11:13 UTC, felics-kde
Details
Terminal output of the run of `marble`. (823 bytes, text/plain)
2018-10-28 11:14 UTC, felics-kde
Details
terminal output of `marble-qt --debug-info` for the sequence "Steps to Reproduce". (44.97 KB, text/plain)
2022-12-24 12:15 UTC, felics-kde
Details
.dgml file created from https://geodienste.sachsen.de/wmts_geosn_webatlas-sn/guest? (3.28 KB, text/html)
2023-09-22 11:31 UTC, felics-kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description felics-kde 2018-10-28 11:13:33 UTC
Created attachment 115939 [details]
terminal output of the run of 'strace marble' (xz-compressed).

SUMMARY

Segmentation fault when using some URLs when creating a new WMS map.


STEPS TO REPRODUCE
1. Start marble
2. Select in the menu: 'File' -> 'Create a New Map' -> 'Web Map Service (WMS)'
3. In the dialog box, choose 'WMS Server:' 'Custom', and in the field 'URL' enter 'https://geoportal.sachsen.de/portal/arcgis_wmts_capabilities/wmts_geosn_dop-rgb.xml'
4. Click 'Next'.
5. A dialog window with an empty selection list appears. Click 'Next'.
6. marble crashes with a segmentation fault.

Attached is the terminal output of
* `LD_PRELOAD='' strace marble > marble.strace.out 2>&1`

The output of the run of `LD_PRELOAD='' marble > marble.out 2>&1` (i.e. without strace) is pasted at the end of this text (I could only attach one file).

OBSERVED RESULT

Crash with 'Segmentation fault'.


EXPECTED RESULT

Some error message if the result is not understandable by marble, or a success in creating a new WMS map.


SOFTWARE VERSIONS
(available in About System)

* Marble Virtual Globe: Version 2.2.20 (2.3 development version), git commit hash 29499fc55
* KDE Plasma Version: ?
* KDE Frameworks Version: 5.51.0
* Qt Version: 5.11.2 (built against 5.11.2)
* (Also shown is 'The xcb windowing system')


ADDITIONAL INFORMATION

On Arch/ Artix Linux, built marble from git (https://aur.archlinux.org/packages/marble-git/). Arch Linux' 'marble'-package from the 'extra'-repository has similar problems.

WMS service seems to be quite unreliable in marble anyway, I would really apreciate up to date WMS support, _as well as documentation_ on how to use it or good examples!

Output of `LD_PRELOAD='' marble > marble.out 2>&1`:

qt5ct: using qt5ct plugin
Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/usr/lib/marble/plugins/libGpsdPositionProviderPlugin.so" 
Reason: "Cannot load library /usr/lib/marble/plugins/libGpsdPositionProviderPlugin.so: (libgps.so.23: cannot open shared object file: No such file or directory)"
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
qt5ct: D-Bus system tray: no
Start: MarblePart::readSettings()
Updating Settings ...
qt5ct: D-Bus global menu: no
Shortcut for action  "" "Hide &All Panels" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = marble path = /usr/bin pid = 3387
KCrash: Arguments: /usr/bin/marble
Comment 1 felics-kde 2018-10-28 11:14:32 UTC
Created attachment 115940 [details]
Terminal output of the run of `marble`.
Comment 2 Justin Zobel 2022-12-02 01:22:57 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-12-17 05:14:06 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 felics-kde 2022-12-24 12:05:05 UTC
> This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

Dear KDE team,

I find it not fair that I am now pressed to react within 30 days, while there was no reaction from you for more than 4 years(!!).

Please, give more time, and accept slow response, if you also take a very long time to react.
Comment 5 felics-kde 2022-12-24 12:14:34 UTC
(In reply to Justin Zobel from comment #2)
> Thank you for reporting this issue in KDE software. As it has been a while
> since this issue was reported, can we please ask you to see if you can
> reproduce the issue with a recent software version?
> 
> If you can reproduce the issue, please change the status to "REPORTED" when
> replying. Thank you!

I just tried with marble release 22.12.0 (accoring to the "About Marble Virtual Globe"-entry in the "Help" menu it is version 2.2.20(!)) (both the qt-only (non-KDE) as well as  the KDE variant), and it still crashes with a segmentation fault when I do the following steps:

> 1. Start marble
> 2. Select in the menu: 'File' -> 'Create a New Map' -> 'Web Map Service (WMS)'
> 3. In the dialog box, choose 'WMS Server:' 'Custom', and in the field 'URL' enter 'https://geoportal.sachsen.de/portal/arcgis_wmts_capabilities/wmts_geosn_dop-rgb.xml'
> 4. Click 'Next'.
> 5. A dialog window with an empty selection list appears. Click 'Next'.
> 6. marble crashes with a segmentation fault.

I use Artix Linux (Arch Linux without systemd), which is rolling release.

I will attach the output of `marble-qt --debug-info` (only modifications: I have censored my username.0
Comment 6 felics-kde 2022-12-24 12:15:22 UTC
Created attachment 154798 [details]
terminal output of `marble-qt --debug-info` for the sequence "Steps to Reproduce".
Comment 7 Torsten Rahn 2023-03-15 21:09:40 UTC
Hello, 

thanks for your report. I have just fixed the crash. However Marble still shows an empty panel.
It looks to me like you are testing with a WMTS server instead of a WMS server. 
At the moment Marble doesn't have support for WMTS however I'm about to add support for it.

Best regards
Torsten
Comment 8 Torsten Rahn 2023-03-26 20:31:06 UTC
I have added initial support to WMTS. With this support added Marble doesn't crash anymore and allows for the selection of the WMTS layers provided. However there are a few things that I still need to add to Marble in order to have this particular WMTS server supported. If you're interested in the details have a look at:

https://mail.kde.org/pipermail/marble-devel/2023-March/009671.html
Comment 9 felics-kde 2023-09-22 11:12:17 UTC
Thank you for adding WMTS support.

I now tried again to import the WMTS noted in my initial report as a WMS map, and marble crashes still with a segmentation fault.

Although a WMTS map is not a WMS map and of course using a WMTS map as a WMS map will not work, giving wrong user input in a dialogue window should _not_ make marble crash with a segmentation fault.

I tried a true WMS map (https://geoportal.sachsen.de/cps/metadaten_seite.html?id=d6d24c6d-94ea-447d-8a0c-40afdedeb5c6 -> https://geodienste.sachsen.de/wms_geosn_dtk-pg-color/guest?), that works.

I tried WMTS map https://geoportal.sachsen.de/cps/metadaten_seite.html?id=f5904fe4-7177-465b-bdfc-c706729fc713 -> https://geodienste.sachsen.de/wmts_geosn_webatlas-sn/guest?, that succeeds in adding the map, but selecting it results in empty display.

`marble-qt --debug-info` prints

```
load tile from disk: "Marble::TileId(0, 12, 2207, 1370)"
Marble::StackedTile* Marble::MergedLayerDecorator::loadTile(const Marble::TileId&) "earth/SN_WebAtlas_SN_WMTS" "Marble::TileId(2692082896, 12, 2207, 1370)" QSize(256, 256) ""
static QImage Marble::TileLoader::scaledLowerLevelTile(const Marble::GeoSceneTextureTileDataset*, const Marble::TileId&) "Marble::TileId(2692082896, 12, 2207, 1370)"
TileLoader::scaledLowerLevelTile trying ""
TileLoader::scaledLowerLevelTile trying ""
[...]
TileLoader::scaledLowerLevelTile trying "/home/<username>/.local/share/marble/maps/earth/SN_WebAtlas_SN_WMTS/0/0/0."
No level zero tile installed in map theme dir. Falling back to a transparent image for now.
QImage::copy: 2207 1370 1 1
QImage::scaled: QSize(256, 256)
adding job  QUrl("")
addJob: new job queue size: 1
Marble::StackedTile* Marble::MergedLayerDecorator::Private::createTile(const QVector<QSharedPointer<Marble::TextureTile> >&) const no blending defined => copying top over bottom image
load tile from disk: "Marble::TileId(0, 12, 2208, 1370)"
Marble::StackedTile* Marble::MergedLayerDecorator::loadTile(const Marble::TileId&) "earth/SN_WebAtlas_SN_WMTS" "Marble::TileId(2692082896, 12, 2208, 1370)" QSize(256, 256) ""
static QImage Marble::TileLoader::scaledLowerLevelTile(const Marble::GeoSceneTextureTileDataset*, const Marble::TileId&) "Marble::TileId(2692082896, 12, 2208, 1370)"
TileLoader::scaledLowerLevelTile trying ""
TileLoader::scaledLowerLevelTile trying ""
[...]

TileLoader::scaledLowerLevelTile trying "/home/<username>/.local/share/marble/maps/earth/SN_WebAtlas_SN_WMTS/0/0/0."
No level zero tile installed in map theme dir. Falling back to a transparent image for now.
QImage::copy: 2211 1374 1 1
QImage::scaled: QSize(256, 256)
adding job  QUrl("")
addJob: new job queue size: 5
Marble::StackedTile* Marble::MergedLayerDecorator::Private::createTile(const QVector<QSharedPointer<Marble::TextureTile> >&) const no blending defined => copying top over bottom image
error "maps/earth/SN_WebAtlas_SN_WMTS/12/2207/1370." QNetworkReply::ProtocolUnknownError
"Download of  to maps/earth/SN_WebAtlas_SN_WMTS/12/2207/1370. failed, but trying again soon"
error "maps/earth/SN_WebAtlas_SN_WMTS/12/2208/1370." QNetworkReply::ProtocolUnknownError
"Download of  to maps/earth/SN_WebAtlas_SN_WMTS/12/2208/1370. failed, but trying again soon"
[...]
```

Marble version: 23.8.1.
Comment 10 felics-kde 2023-09-22 11:31:29 UTC
Created attachment 161803 [details]
.dgml file created from https://geodienste.sachsen.de/wmts_geosn_webatlas-sn/guest?

> I tried WMTS map https://geoportal.sachsen.de/cps/metadaten_seite.html?id=f5904fe4-7177-465b-bdfc-c706729fc713 -> https://geodienste.sachsen.de/wmts_geosn_webatlas-sn/guest?, that succeeds in adding the map, but selecting it results in empty display.

I now have attached the `.dgml` file which marble created for this WMTS map. It shows empty download URL:

```
<downloadUrl protocol="" host="" path="" query=""/>
```