Crash in InfoElement with datetime data range
Requirements
-
I searched through the issues if the issue already exists
Steps to reproduce
- open the project Datetime.lml
- Datetime is set as x Range
- add a new xy-curve to the plot (without any data)
- add a new InfoElement
- for the position of the info element, try to select a different day either by changing the text of selecting a different day from the datatime picker.
Expected
The selected day is accepted and the position of the info element is properly updated.
Observed
The application is crashing with
#0 0x0000000000ab1525 in InfoElement::currentIndex (this=this@entry=0x7fffd400bb80, x=x@entry=86400000, found_x=found_x@entry=0x7fffffffc620) at /home/alex/Projekte/labplot/src/backend/worksheet/InfoElement.cpp:668
#1 0x0000000000ab2dae in InfoElement::setPositionLogical (this=0x7fffd400bb80, pos=pos@entry=86400000) at /home/alex/Projekte/labplot/src/backend/worksheet/InfoElement.cpp:774
#2 0x00000000006e869d in InfoElementDock::positionDateTimeChanged (this=0x2704bf0, value=<optimized out>) at /home/alex/Projekte/labplot/src/kdefrontend/dockwidgets/InfoElementDock.cpp:179
#3 0x00007ffff337a2cb in ?? () from /usr/lib64/libQt5Core.so.5
#4 0x0000000000625eee in UTCDateTimeEdit::mSecsSinceEpochUTCChanged (this=<optimized out>, _t1=<optimized out>) at /home/alex/Projekte/labplot/build-devel/src/labplot2lib_autogen/LKYE7S7URI/moc_UTCDateTimeEdit.cpp:140
#5 0x00007ffff337a2cb in ?? () from /usr/lib64/libQt5Core.so.5
#6 0x00007ffff3fef5e2 in QDateTimeEdit::dateTimeChanged(QDateTime const&) () from /usr/lib64/libQt5Widgets.so.5
#7 0x00007ffff3ff53a2 in ?? () from /usr/lib64/libQt5Widgets.so.5
#8 0x00007ffff407f37a in ?? () from /usr/lib64/libQt5Widgets.so.5
#9 0x00007ffff407f4db in ?? () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff4081405 in ?? () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff337a045 in ?? () from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff401ed12 in QLineEdit::textChanged(QString const&) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff40259d9 in ?? () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007ffff337a045 in ?? () from /usr/lib64/libQt5Core.so.5
#15 0x00007ffff4026615 in QWidgetLineControl::textChanged(QString const&) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007ffff4029921 in QWidgetLineControl::finishChange(int, bool, bool) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007ffff402cc45 in QWidgetLineControl::processKeyEvent(QKeyEvent*) () from /usr/lib64/libQt5Widgets.so.5
#18 0x00007ffff401ee0a in QLineEdit::keyPressEvent(QKeyEvent*) () from /usr/lib64/libQt5Widgets.so.5
#19 0x00007ffff3f1e8a7 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#20 0x00007ffff402524a in QLineEdit::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#21 0x00007ffff407e358 in QAbstractSpinBox::keyPressEvent(QKeyEvent*) () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007ffff3ff73b5 in QDateTimeEdit::keyPressEvent(QKeyEvent*) () from /usr/lib64/libQt5Widgets.so.5
LabPlot Version
Debug build 2.10.0-2233-gc5d80f6a8
Mar 28 2024, 08:45:47
System: openSUSE Leap 15.5
Locale: English,United States (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.14.21-150500.55.52-default
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 -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
Edited by Martin Marmsoler