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

Setting very high cache size crashes QGIS at startup #57380

Closed
2 tasks done
lhilarides opened this issue May 8, 2024 · 2 comments · Fixed by #57403
Closed
2 tasks done

Setting very high cache size crashes QGIS at startup #57380

lhilarides opened this issue May 8, 2024 · 2 comments · Fixed by #57403
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Configs and Options Crash/Data Corruption

Comments

@lhilarides
Copy link

What is the bug or the crash?

Using QGIS 3.34.5 on Windows 11, I changed my cache size (settings --> options --> network) from 2GB to 12GB ( value of 12048000 KiB). I have plenty of free diskspace (>400 GB). After changing that setting I was no longer able to start QGIS, it wouldn't even show the loading screen. After removing the [cache] section entirely from the qgis.ini file in my QGIS profile, things were back to normal again.

Steps to reproduce the issue

  1. Change network cache size to 12GB or more
  2. Close QGIS
  3. Start QGIS (it won't start)
  4. Clear [cache] section from qgis.ini in the profile
  5. Start QGIS (it will start now)

Versions

3.34.5 and also reproducible on 3.36.2

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@lhilarides lhilarides added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 8, 2024
@kentstanton
Copy link

Also occurs for me. Running 3.34.4-Prizren or 3.26.2 on Windows 11.

Setting the network cache value to anything larger than 2090000 causes QGIS to crash on startup as described above.

In QGIS3.ini the cache values:
works when the value is set to 2000000 in the UI
[cache]
size=@variant(\0\0\0\x81\0\0\0\0z\x12\0\0)

Fails when the value is set to 2100000 in the UI
[cache]
size="@variant(\0\0\0\x81\xff\xff\xff\xff\x80,\x80\0)"

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented May 12, 2024

On Windows (OSGeeo4W), setting the value 2100000, the following debug message printed:
[28444] qgsnetworkaccessmanager.cpp(759) : (QgsNetworkAccessManager::setupDefaultProxyAndCache) [305ms] maximumCacheSize: -2144567296

QgsSettings().value('cache/size',None) returns -2144567296.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Configs and Options Crash/Data Corruption
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants