Crash if file contains reference line
Labplot crashes when opening certain files that include reference lines. Crashes also happened during the work when a reference line was duplicated with a new project that was saved but not yet-reopened in new session. The same file then crashed labplot instantly when trying to open again.
I managed to recover by unpacking the project file and removing all reference lines from the XML. Later I found that changing the "defaultCoordinateSystem" property from 1 to 0 in the XML also recovers the file.
Requirements
-
I searched through the issues if the issue already exists
Steps to reproduce
I do not know what triggers the behaviour from the application but I provide three files (unpacked) to reproduce and recover the crash:
crashes_not_defaultCoordinateSystem.lml
crashes_not_removedReferenceLines.lml
Expected
Labplot should not crash when opening files
Observed
Labplot crashes when opening crashes.lml
Labplot Version
Release build
Jul 12 2023, 01:21:06
System: macOS 10.16
Locale: C,Default (Decimal point '.', Group separator ','
Number settings: Decimal point '.', Group separator ',', Exponential 'e', Zero digit '0', Percent '%', Positive/Negative sign '+'/'-' (Updated on restart)
Architecture: x86_64-little_endian-lp64
Kernel: darwin 22.6.0
C++ Compiler: Clang 12.0.0.12000032
C++ Compiler Flags: -fno-operator-names -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -D_GNU_SOURCE -Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector -fexceptions -std=c++11 -O2 -Wcast-align -Wswitch-enum -fvisibility=default -pedantic -Wzero-as-null-pointer-constant
also yesterday's AppImage:
Release build 72ad7c4
Mar 10 2024, 08:53:01
System: Ubuntu 22.04.4 LTS
Locale: C,Default (Decimal point '.', Group separator ','
Number settings: Decimal point '.', Group separator ',', Exponential 'e', Zero digit '0', Percent '%', Positive/Negative sign '+'/'-' (Updated on restart)
Architecture: x86_64-little_endian-lp64
Kernel: linux 5.15.0-1051-kvm
C++ Compiler: GNU 12.3.0
C++ Compiler Flags: -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector -fexceptions -std=c++17 -O2 -Wcast-align -Wswitch-enum -fvisibility=default -pedantic -Wzero-as-null-pointer-constant
(I just saw you prefer bug reports on bugs.kde.org, but it wouldn't let me upload the files)