Warning message in terminal on closing document
Steps to reproduce:
- open Inkscape
- close document
What happened?
Warning in terminal
** (org.inkscape.Inkscape:682695): CRITICAL **: 22:17:56.088: void Inkscape::LayerManager::setCurrentLayer(SPObject*, bool): assertion 'currentRoot() == object || (currentRoot() && currentRoot()->isAncestorOf(object))' failed
What should have happened?
No warning.
Note, if it is expected to return in this case (instead of being a bug), we should not be using g_return_if_fail, just a if (...) return;, as that is meant to check programming bugs per glib docs (at least from my notes from the video Thomas did on asserts used in Inkscape). I'm not sure how to find that in the new docs, but its still visible in some older docs lying around, and in the src code https://gitlab.gnome.org/GNOME/glib/-/blob/f0dd96c28751f15d0703b384bfc7c314af01caa8/glib/gmessages.h#L565
Version info
commit aaea6a43d79ac562d1701fc4ca9096830bd95cfe
Author: Martin Owens <doctormo@gmail.com>
Date: Fri Jun 3 18:24:18 2022 -0400
Implement the page resizing functionality template extensions
Using the size of pages from the new Template Extensions and deprecating the paper.h list.
* Shows a shorter default list of sizes.
* Allows searching into a much wider list of sizes.
* Stores the selected format, for future reference.
* Fixes problems with resizing and units
* Fixes format_number problems in margin and page size and allows arbitrary precision
* Improves prefs handling in template extensions
* Adds better template visibility options
* Can match anonymous canvas size (no pages) to a template's preset
* New TempFilename util makes creating temp files easier