Skip to content

Fixed silent crash and filter input behaviour for numbers#4457

Merged
Withalion merged 5 commits intodev/filteringfrom
filter-fix-crash
Apr 20, 2026
Merged

Fixed silent crash and filter input behaviour for numbers#4457
Withalion merged 5 commits intodev/filteringfrom
filter-fix-crash

Conversation

@gabriel-bolbotina
Copy link
Copy Markdown
Contributor

@gabriel-bolbotina gabriel-bolbotina commented Apr 17, 2026

  • Fixed silent crashes that occurred when a filter was added to the project without a layer or field in plugin, that would lead to a silent crash in the app. Now we skip these filters and I added logging messages for them. Also, I added some guards for other potential silent crashes.
  • Fixed checked status for filter inputs which was broken when inputting text, numbers or dates.
  • Added support for negative numbers and 0 as inputs for number range filters
  • fixed the false checked status for dropdown filter types

Added logging for these scenarios
Fixed checked status for filter inputs
added guards for other potential silent crashes
added support for negative numbers and 0 as inputs for number range filters
@gabriel-bolbotina gabriel-bolbotina added this to the 2026.2.0 milestone Apr 17, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

Coverage Report for CI Build 24656131403

Warning

No base build found for commit 5222fcf on dev/filtering.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 58.063%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15156
Covered Lines: 8800
Line Coverage: 58.06%
Coverage Strength: 100.5 hits per line

💛 - Coveralls

@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 67091 dmg Expires: 16/07/2026 #6709
linux Build 📬 Mergin Maps 67201 x86_64 Expires: 16/07/2026 #6720
win64 Build 📬 Mergin Maps 59041 win64 Expires: 16/07/2026 #5904
Android Build 📬 Mergin Maps 802151 APK [arm64-v8a] Expires: 16/07/2026 #8021
📬 Mergin Maps 802151 APK [arm64-v8a] Google Play Store #8021
Android Build 📬 Mergin Maps 802111 APK [armeabi-v7a] Expires: 16/07/2026 #8021
📬 Mergin Maps 802111 APK [armeabi-v7a] Google Play Store #8021
iOS Build 📬 Build number: 26.04.896011 #8960

Copy link
Copy Markdown
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I would prefer triggering the logging when the filter tries to get applied and fails instead of when the filter is loaded from QgsProject

Comment thread app/filtercontroller.cpp Outdated
Comment thread app/filtercontroller.cpp Outdated
Comment thread app/filtercontroller.cpp Outdated
@gabriel-bolbotina
Copy link
Copy Markdown
Contributor Author

In general I would prefer triggering the logging when the filter tries to get applied and fails instead of when the filter is loaded from QgsProject

I think we need to choose between the expected behaviour:
current one: the filter that does not have a layer or field gets dropped entirely when loading config and it is logged there
your suggestion: the filter does not get dropped per se, it still appears in the filters drawer, but when applying filters that one is not taken into consideration.

I think that they should not appear in the drawer at all, as they don't have a target layer nor field.

@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 67131 dmg Expires: 19/07/2026 #6713
linux Build 📬 Mergin Maps 67241 x86_64 Expires: 19/07/2026 #6724
win64 Build 📬 Mergin Maps 59081 win64 Expires: 19/07/2026 #5908
Android Build 📬 Mergin Maps 802511 APK [armeabi-v7a] Expires: 19/07/2026 #8025
📬 Mergin Maps 802511 APK [armeabi-v7a] Google Play Store #8025
Android Build 📬 Mergin Maps 802551 APK [arm64-v8a] Expires: 19/07/2026 #8025
📬 Mergin Maps 802551 APK [arm64-v8a] Google Play Store #8025
iOS Build 📬 Build number: 26.04.896411 #8964

@gabriel-bolbotina gabriel-bolbotina added map tools Something is wrong with recording, geometry editing, splitting, stakeout, .. enhancement labels Apr 20, 2026
@gabriel-bolbotina gabriel-bolbotina self-assigned this Apr 20, 2026
Copy link
Copy Markdown
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just last bits to improve resilience and debugging

Comment thread app/filtercontroller.cpp
Comment thread app/filtercontroller.cpp Outdated
@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build Build failed or not found. #6716
linux Build 📬 Mergin Maps 67271 x86_64 Expires: 19/07/2026 #6727
win64 Build 📬 Mergin Maps 59111 win64 Expires: 19/07/2026 #5911
Android Build 📬 Mergin Maps 802811 APK [armeabi-v7a] Expires: 19/07/2026 #8028
📬 Mergin Maps 802811 APK [armeabi-v7a] Google Play Store #8028
Android Build 📬 Mergin Maps 802851 APK [arm64-v8a] Expires: 19/07/2026 #8028
📬 Mergin Maps 802851 APK [arm64-v8a] Google Play Store #8028
iOS Build 📬 Build number: 26.04.896711 #8967

@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build Build failed or not found. #6717
linux Build 📬 Mergin Maps 67281 x86_64 Expires: 19/07/2026 #6728
win64 Build 📬 Mergin Maps 59121 win64 Expires: 19/07/2026 #5912
Android Build 📬 Mergin Maps 802951 APK [arm64-v8a] Expires: 19/07/2026 #8029
📬 Mergin Maps 802951 APK [arm64-v8a] Google Play Store #8029
Android Build 📬 Mergin Maps 802911 APK [armeabi-v7a] Expires: 19/07/2026 #8029
📬 Mergin Maps 802911 APK [armeabi-v7a] Google Play Store #8029
iOS Build 📬 Build number: 26.04.896811 #8968

@Withalion Withalion merged commit 51c1122 into dev/filtering Apr 20, 2026
8 of 9 checks passed
@Withalion Withalion deleted the filter-fix-crash branch April 20, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement map tools Something is wrong with recording, geometry editing, splitting, stakeout, ..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants