testpushpleaseignore / acquisition

GNU General Public License v3.0
25 stars 5 forks source link

Access violations running the test suites when using network accessibility with QT 5.15 LTS #44

Closed gerwaric closed 11 months ago

gerwaric commented 1 year ago

The test suites use setNetworkAccessibility() to prevent network access, but this method is obsolete in QT 5.15 LTS: https://doc.qt.io/qt-5/qnetworkaccessmanager-obsolete.html

This issue should not impact users.

Developers may run into problems if they are working on the networking code. I ran into it while working on dynamic rate limiting. I figured it might be work documenting for future contributors.

The current approach seems fine as long as setNetworkAccessible() or networkAccessible() are not called anywhere else. Doing so can cause read access violations. In my testing, these errors occur on the destruction of a network access manager, but only when there were multiple access managers running in different threads. (This is the case in Acquisition 0.9.7 because each items manager worker runs in a separate thread with its own network access manager).

gerwaric commented 11 months ago

This is not a big issue with v0.9.7, and it's a non-issue with v0.9.10 and later because Acquisition has been ported to Qt 6.