Pcbnew cannot open files with rotated text boxes
Description
When a text box in pcbnew is rotated any number of degrees that is not a multiple of 90°, the save file is corrupted and cannot be opened again after pcbnew has been closed. This still happens even when there is no text in the text box.
The expected behaviour is that the save file isn't corrupted by rotating a text box by for example 45°.
The following error message is thrown when I try to open a layout that only has a text box in silkscreen which is rotated by 45°.
I was able to reproduce the bug on both Linux and Windows using KiCad 8.0.2.
I was not able to reproduce the bug on KiCad 8.0.1.
Steps to reproduce
- Add a text box element on any layer in pcbnew
- Rotate it any number of degrees that is not a multiple of 90°
- Save and close pcbnew
- Try to open the save again
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 8.0.2+dfsg-1, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.13.2
HarfBuzz 8.3.0
FontConfig 2.15.0
libcurl/8.7.1 OpenSSL/3.2.2 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 libssh2/1.11.0 nghttp2/1.61.0 librtmp/2.3 OpenLDAP/2.5.17
Platform: Debian GNU/Linux trixie/sid, 64 bit, Little endian, wxGTK, X11, gnome, wayland
Build Info:
Date: May 1 2024 09:47:38
wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.83.0
OCC: 7.6.3
Curl: 8.7.1
ngspice: 42
Compiler: GCC 13.2.0 with C++ ABI 1018
Build settings: