bitmap with comment renders template unloadable
Description
Adding a comment to a bitmap in a drawing sheet template and saving it will result in an "unexpected comment" error upon (re)loading, followed by an "unable to load" error. Note: removing just the indicated line from the template with a text editor makes the template loadable again.
One would expect that either the comment is rejected at entry, or that the template with comment loads normally.
Steps to reproduce
- Add a bitmap image to a template
- Under 'Item Properties' enter some text in the comment field
- Click 'Apply'
- Save the template
- Reload the template
KiCad Version
Application: KiCad Drawing Sheet Editor
Version: 6.0.1-79c1e3a40b~116~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-94-generic x86_64, 64 bit, Little endian, wxGTK, cinnamon, x11
Build Info:
Date: Jan 15 2022 20:26:22
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.81.0
ngspice: 31
Compiler: GCC 9.3.0 with C++ ABI 1013
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON```