Closed letsfindaway closed 1 year ago
To fix this issue, I processed the image in Inkscape, splitting the path into pieces. From that I created the new file Worldmap_wdb_splitted.svg
.
Now the error message is gone and also Australia and the South Pole appear ;)
Here a simple check will help: Only try to change the title if it exists.
This can be solved by using asynchronous requests and waiting for them using await
.
We should not attempt to read a file if it cannot be opened.
For widgets, the URL points to a directory. However the UBBoardController
tries to read the content. This fails and creates the error message. Subsequent processing is however correct.
I just add a test whether the file can be opened and only try to read the content if that is the case.
In UBPersistenceManager::persistDocumentScene
a deep copy of a scene is created to pass it to an asynchronous worker. This also involves creating a new QWebEnginePage
, if the scene contains a widget. Note that the deep copy is deleted in UBPersistenceManager::onScenePersisted
, but not when closing the application. I think this check is wrong, we also have to delete it in this case.
However the second page mentioned above is created, but also correctly destroyed. Further investigations revealed that there is a scene remaining in the UBSceneCache
which is not correctly deleted. We have to clear the cache when it is deleted.
This problem vanished once [6] was fixed.
closed as PR was merged
A very simple OpenBoard session where I just drag the Horologe widget to an empty board yields the following log output. Note that I have removed lines and only left one line before and after an error message. I also added markers to the error messages:
None of the problems affect the user, but having them in the log file may point to possible errors. Let me analyze them:
[1] Invalid path data
This error is logged when loading the
library/pictures/Worldmap_wdb_combined.svg
icon. It happens because the complexity of the path in this file is too big. See https://github.com/qt/qtsvg/blob/8e2e5bae5569c18834129679f6db2f53ad7cbb25/src/svg/qsvghandler.cpp#L1560-L1562: If there are more than 0x7fff (32767) path elements this is considered to be an error. The world map however has about 46000 path elements in a single path.The consequence is also that Australia and the south pole are missing from the image when dragged to the board.
[2] Uncaught TypeError
This happens when loading the "Hints and tips":
The code is the following: https://github.com/letsfindaway/OpenBoard/blob/53f7f58de0cf60303288762146ac7bb71351e525/resources/startupHints/index.html#L61-L64
When further analyzing this I can see that at the point of this error
iframe.contentWindow.document
contains the URLabout:blank
, which of course has no title.[3] Synchronous XMLHttpRequest
This happens due to the way how the Hints and tips count the number of available pages for a language. As there is no direct access to the file system in JS, POST requests are issued to check existence of the files. These requests are issued synchronously: https://github.com/letsfindaway/OpenBoard/blob/53f7f58de0cf60303288762146ac7bb71351e525/resources/startupHints/index.html#L14-L31
See
async: false
.[4] QIODevice::read
Here just the log message should be improved. It only tells that the dropped entity is not a file, but a directory.
[5] ERROR:command_buffer_proxy_impl.cc
Difficult to locate. Probably a consequence of the next?
[6] Release of profile requested
This happens because while closing two more
QWebEnginePage
instances are created. The first here:and the second here: