Summary: | RKWard crashed in RKVariable::setNumericFromR when running lines which replaced a variable set to Numeric to Unknown | ||
---|---|---|---|
Product: | [Applications] rkward | Reporter: | Matt Fagnani <matt.fagnani> |
Component: | general | Assignee: | RKWard Team <rkward-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | thomas.friedrichsmeier |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | dfac743c6e8894ea8383ee5be939d9e87283d8e5 | |
Sentry Crash Report: | https://crash-reports.kde.org/organizations/kde/issues/203552/events/7d1931a275e143aa9f6697dd479dc311/ | ||
Attachments: | New crash information added by DrKonqi |
Description
Matt Fagnani
2025-06-22 05:22:32 UTC
Created attachment 182504 [details]
New crash information added by DrKonqi
DrKonqi auto-attaching complete backtrace.
Thanks for reporting. RKWard is not currently able to handle dates in the built-in data editor/viewer, and that is certainly one of the more embarrassing omissions, in the first place. But of course, even then it should not crash. I'll look into this ASAP. (In reply to Thomas Friedrichsmeier from comment #2) > Thanks for reporting. RKWard is not currently able to handle dates in the > built-in data editor/viewer, and that is certainly one of the more > embarrassing omissions, in the first place. But of course, even then it > should not crash. I'll look into this ASAP. OK, I see. Thanks. When I ran bp$Days = as.numeric(dates -dates[1]) , the problem didn't happen. The problem seemed to be due to assigning a Date object to a numeric variable. I reproduced the problem in a simpler way by creating a new workspace and data set my.data, creating a new row with var=1 as Numeric, then running my.data$var = as.Date("1-1-2025",tryFormats="%m-%d-%Y") The first time I tried this, the crash had the same sort of trace, but the second time, the trace was different. KXMLGUIFactory::container had this=0x0, which might've resulted in a null pointer dereference in std::__uniq_ptr_impl<KXMLGUIFactoryPrivate, std::default_delete<KXMLGUIFactoryPrivate> >::_M_ptr. The trace referred to a context menu such as in TwinTable::contextMenu, and I did use a context menu to copy the line from a script file to the R console before changing it. I'm not sure if this is the same problem. (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007fc1d687c1e3 in __pthread_kill_internal (threadid=<optimized out>, signo=11) at pthread_kill.c:89 #2 0x00007fc1d6822afe in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26 #3 0x00007fc1e4f9e533 in KCrash::defaultCrashHandler(int) () at /lib64/libKF6Crash.so.6 #4 0x00007fc1d6822c30 in <signal handler called> () at /lib64/libc.so.6 #5 0x00007fc1d898f1be in std::__uniq_ptr_impl<KXMLGUIFactoryPrivate, std::default_delete<KXMLGUIFactoryPrivate> >::_M_ptr (this=<optimized out>) at /usr/include/c++/15/bits/unique_ptr.h:193 #6 std::unique_ptr<KXMLGUIFactoryPrivate, std::default_delete<KXMLGUIFactoryPrivate> >::get (this=<optimized out>) at /usr/include/c++/15/bits/unique_ptr.h:473 #7 std::unique_ptr<KXMLGUIFactoryPrivate, std::default_delete<KXMLGUIFactoryPrivate> >::operator-> (this=<optimized out>) at /usr/include/c++/15/bits/unique_ptr.h:466 #8 KXMLGUIFactory::container (this=0x0, containerName=..., client=client@entry=0x55620da95180, useTagName=useTagName@entry=false) at /usr/src/debug/kf6-kxmlgui-6.15.0-1.fc42.x86_64/src/kxmlguifactory.cpp:450 #9 0x00005561e42d0c90 in TwinTable::contextMenu (this=0x55620da95080, row=<optimized out>, col=<optimized out>, pos=...) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/dataeditor/twintable.cpp:325 #10 0x00007fc1d57657ba in QtPrivate::QSlotObjectBase::call (this=0x55620daa6c50, r=0x55620da95080, a=0x7ffe187352f0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461 #11 doActivate<false> (sender=0x7fc1b000b0b0, signal_index=15, argv=argv@entry=0x7ffe187352f0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4146 #12 0x00007fc1d575c089 in QMetaObject::activate (sender=sender@entry=0x7fc1b000b0b0, m=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffe187352f0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4206 #13 0x00005561e42d8fa6 in QMetaObject::activate<void, int, int, QPoint> (sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>) --Type <RET> for more, q to quit, c to continue without paging--c at /usr/include/qt6/QtCore/qobjectdefs.h:306 #14 TwinTableMember::contextMenuRequest (this=<optimized out>, _t1=<optimized out>, _t2=<optimized out>, _t3=<optimized out>) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/redhat-linux-build/rkward/dataeditor/dataeditor_autogen/EWIEGA46WW/moc_twintablemember.cpp:162 #15 TwinTableMember::handleContextMenuRequest (this=0x7fc1b000b0b0, pos=...) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/dataeditor/twintablemember.cpp:160 #16 0x00007fc1d57657ba in QtPrivate::QSlotObjectBase::call (this=0x55620da86c60, r=0x7fc1b000b0b0, a=0x7ffe18735430) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461 #17 doActivate<false> (sender=0x7fc1b000b0b0, signal_index=6, argv=argv@entry=0x7ffe18735430) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4146 #18 0x00007fc1d575c089 in QMetaObject::activate (sender=sender@entry=0x7fc1b000b0b0, m=m@entry=0x7fc1d83a31c0, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffe18735430) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4206 #19 0x00007fc1d7c83632 in QMetaObject::activate<void, QPoint> (sender=0x7fc1b000b0b0, mo=0x7fc1d83a31c0, local_signal_index=3, ret=0x0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs.h:306 #20 QWidget::customContextMenuRequested (this=this@entry=0x7fc1b000b0b0, _t1=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/redhat-linux-build/src/widgets/Widgets_autogen/include/moc_qwidget.cpp:603 #21 0x00007fc1d7ca79c2 in QWidget::event (this=this@entry=0x7fc1b000b0b0, event=event@entry=0x7ffe187358c0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qwidget.cpp:9174 #22 0x00007fc1d7d010f6 in QFrame::event (this=0x7fc1b000b0b0, e=0x7ffe187358c0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/widgets/qframe.cpp:521 #23 0x00007fc1d56f9caa in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x55620da6fde0, event=event@entry=0x7ffe187358c0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1243 #24 0x00007fc1d7c3d96f in QApplicationPrivate::notify_helper (this=this@entry=0x55620b5264b0, receiver=receiver@entry=0x55620da6fde0, e=e@entry=0x7ffe187358c0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3297 #25 0x00007fc1d7c494cb in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffe187358c0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:2921 #26 0x00007fc1d56f9f38 in QCoreApplication::notifyInternal2 (receiver=0x55620da6fde0, event=0x7ffe187358c0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #27 0x00007fc1d56f9f6a in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121 #28 0x00007fc1d7cbebed in QWidgetWindow::handleContextMenuEvent (this=<optimized out>, e=0x7ffe18735b00) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qwidgetwindow.cpp:1221 #29 0x00007fc1d7cbeff0 in QWidgetWindow::event (this=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qwidgetwindow.cpp:369 #30 0x00007fc1d7c3d97f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55620ba0de50, e=0x7ffe18735b00) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3303 #31 0x00007fc1d56f9f38 in QCoreApplication::notifyInternal2 (receiver=0x55620ba0de50, event=0x7ffe18735b00) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #32 0x00007fc1d56f9f6a in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121 #33 0x00007fc1d5f588a4 in QWindowPrivate::maybeSynthesizeContextMenuEvent (this=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qwindow_p.h:35 #34 QWindowPrivate::maybeSynthesizeContextMenuEvent (this=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qwindow.cpp:2802 #35 0x00007fc1d7cbc402 in QWidgetWindow::handleMouseEvent (this=0x55620ba0de50, event=0x7ffe18735ed0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qwidgetwindow.cpp:683 #36 0x00007fc1d7cbeeb3 in QWidgetWindow::event (this=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qwidgetwindow.cpp:292 #37 0x00007fc1d7c3d97f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55620ba0de50, e=0x7ffe18735ed0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3303 #38 0x00007fc1d56f9f38 in QCoreApplication::notifyInternal2 (receiver=0x55620ba0de50, event=0x7ffe18735ed0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #39 0x00007fc1d56fa1ad in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1560 #40 0x00007fc1d5ef22a9 in QGuiApplicationPrivate::processMouseEvent (e=0x7fc1a4008780) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qguiapplication.cpp:2476 #41 0x00007fc1d5f5c76c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1113 #42 0x00007fc1d5f5c988 in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1082 #43 0x00007fc1d575662c in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:1431 #44 0x00007fc1d7c3d97f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55620b5727c0, e=0x7fc1ac003bc0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3303 #45 0x00007fc1d56f9f38 in QCoreApplication::notifyInternal2 (receiver=0x55620b5727c0, event=0x7fc1ac003bc0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #46 0x00007fc1d56fa19d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546 #47 0x00007fc1d56fdd26 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55620b557e00) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1879 #48 0x00007fc1d5a1016f in postEventSourceDispatch (s=0x55620b56dfc0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #49 0x00007fc1d40e9880 in g_main_dispatch (context=0x7fc1b0000f00) at ../glib/gmain.c:3398 #50 g_main_context_dispatch_unlocked (context=0x7fc1b0000f00) at ../glib/gmain.c:4249 #51 0x00007fc1d40f27a8 in g_main_context_iterate_unlocked (context=context@entry=0x7fc1b0000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4314 #52 0x00007fc1d40f2953 in g_main_context_iteration (context=0x7fc1b0000f00, may_block=1) at ../glib/gmain.c:4379 #53 0x00007fc1d5a0f9ad in QEventDispatcherGlib::processEvents (this=0x55620b505800, flags=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #54 0x00007fc1d5707b03 in QEventLoop::exec (this=this@entry=0x7ffe18736550, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/global/qflags.h:77 #55 0x00007fc1d5703419 in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1449 #56 0x00007fc1d5eddbad in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qguiapplication.cpp:1986 #57 0x00007fc1d7c3d8e9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:2570 #58 0x00005561e413ddce in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/main.cpp:294 Ok, the cause of the first backtrace is fixed in https://invent.kde.org/education/rkward/-/commit/dfac743c6e8894ea8383ee5be939d9e87283d8e5 . BTW, easiest way to reproduce: > x <- data.frame(1, 2) > x$c <- 1 > rk.edit(x) > x$c <- as.POSIXct.Date(2) The second backtrace looks very different, though, and appears to involve invoking a context menu. This does not immediately make sense to me in this context. Either it's something all different, or the initial out-of-bounds write triggered a weird crash at a later point of time. Could you test again, whether you can still provoke a crash in your setup? Thanks. I tested with rkward-master-1891-linux-gcc-x86_64.AppImage, and I didn't see any crashes. I tried the original way I saw the crash. I also created a new data set my.data with by clicking Enter new data, then ran my.data$var = as.Date("1-1-2025",tryFormats="%m-%d-%Y") (the data frame didn't need a row to be created for the crash to happen with the Fedora build.) The date variables showed as type String in the data editor. I tried your steps as well. I copied and pasted and/or directly ran the commands with context menus also to see if the second type of trace would happen, but there wasn't a problem. |