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

Update sample 5 for QGIS 3.x #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ThomasG77
Copy link

@ThomasG77 ThomasG77 commented Apr 9, 2021

Remaining bug is when I click on button show or hide, I got a segmentation fault. Using GDB, I get the following trace.

Thread 1 "timtut5" received signal SIGSEGV, Segmentation fault.
QgsRubberBand::reset (this=0x7400780074, geometryType=QgsWkbTypes::PolygonGeometry) at ../../src/gui/qgsrubberband.cpp:104
104	../../src/gui/qgsrubberband.cpp: No such file or directory.

I do not have any qgsrubberband.cpp file installed with QGIS packages. I do not understand why it's looking for a cpp file as there is already the function within the libqgis_gui.so as I've confirmed that nm -gDC /usr/lib/libqgis_gui.so |grep "QgsRubberBand::reset" returns 0000000000bb64a0 T QgsRubberBand::reset(QgsWkbTypes::GeometryType)

I've compiled against current QGIS libs e.g my log from cmake

cmake -DCMAKE_BUILD_TYPE=Debug ..
-- Found QGIS Core: /usr/lib/libqgis_core.so
-- Found QGIS Gui: /usr/lib/libqgis_gui.so
-- Found QGIS Plugins Dir: QGIS_PLUGIN_DIR-NOTFOUND
-- Found GDAL: /usr/lib/libgdal.so
-- Found GEOS: /usr/lib/x86_64-linux-gnu/libgeos_c.so (3.7.1)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/thomasg/git/QGIS-Code-Examples/5_using_rubber_band_with_canvas/build

@pblottiere
Copy link
Member

@ThomasG77 the segmentation fault should be resolved 🤞

@ThomasG77
Copy link
Author

Thanks. Was completely stuck...

@ThomasG77 ThomasG77 changed the title [WIP]Update sample 5 for QGIS 3.x Update sample 5 for QGIS 3.x Apr 9, 2021
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

Successfully merging this pull request may close these issues.

2 participants