https://bugs.kde.org/show_bug.cgi?id=505955
Bug ID: 505955 Summary: RKWard crashed in RKVariable::setNumericFromR when running lines which replaced a variable set to Numeric to Unknown Classification: Applications Product: rkward Version First unspecified Reported In: Platform: Fedora RPMs OS: Linux Status: REPORTED Keywords: drkonqi Severity: crash Priority: NOR Component: general Assignee: rkward-de...@kde.org Reporter: matt.fagn...@bell.net Target Milestone: --- Application: rkward (0.8.1z+0.8.2+devel1) ApplicationNotResponding [ANR]: false Qt Version: 6.9.1 Frameworks Version: 6.15.0 Operating System: Linux 6.15.3-200.fc42.x86_64 x86_64 Windowing System: Wayland Distribution: "Fedora Linux 42 (KDE Plasma Desktop Edition)" DrKonqi: 6.4.0 [CoredumpBackend] -- Information about the crash: I was running a RKWard 0.8.2 pre-release version rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64 in Plasma 6.4.0 on Wayland in a Fedora 42 KDE installation. I opened a saved workspace with a data set named bp. The data contained a variable Days which was shown as type Unknown in the data set viewer. I changed the type of Days to 1: Numeric in the data set viewer. I opened a R script file which has lines that calculated Days in a way that I think created it as type Unknown again. dates = as.Date(paste(bp$Month,bp$Day,bp$Year,sep="-"),tryFormats="%m-%d-%Y"); bp$Days = dates -dates[1] I ran Run all the first time I saw this problem. RKWard crashed. The first time RKWard ran drkonqi couldn't find the core dump file. A second drkonqi notification was shown, but the full trace couldn't be created. I reproduced the crash running each of the two lines one at a time. RKWard crashed in RKVariable::setNumericFromR after the second line of my program. The crash was a segmentation fault when that function was on row 0 of the data set. The pointers in data->cell_doubles were null, but they might not have been initialized yet. (gdb) frame 5 #5 0x0000562fa47095a8 in RKVariable::setNumericFromR (this=0x562fdb3adde0, to_row=65, numdata=..., from_row=0) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/core/rkvariable.cpp:583 583 data->cell_doubles[row] = numdata[i]; (gdb) p data $1 = (RKVariable::RKVarEditData *) 0x562fdbc64220 (gdb) p data->cell_doubles $2 = {<QListSpecialMethods<double>> = {<QListSpecialMethodsBase<double>> = {<No data fields>}, <No data fields>}, d = { d = 0x0, ptr = 0x0, size = 0}} (gdb) p numdata $3 = (const QVector &) @0x7fffdf7032a0: {<QListSpecialMethods<double>> = {<QListSpecialMethodsBase<double>> = {<No data fields>}, <No data fields>}, d = {d = 0x7f27c41d6e60, ptr = 0x7f27c41d6e70, size = 66}} (gdb) p i $4 = 0 (gdb) l 578 579 if (std::isnan(numdata[i])) { 580 data->cell_states[row] |= RKVarEditData::NA; 581 } else { 582 data->cell_states[row] |= RKVarEditData::Valid; 583 data->cell_doubles[row] = numdata[i]; 584 } 585 ++i; 586 } 587 } (gdb) p row $5 = 0 This crash didn't seem to happen if I didn't change Days to Numeric in the data set viewer before running the script lines. The crash can be reproduced sometimes. -- Backtrace (Reduced): #4 0x000056119e7175a8 in RKVariable::setNumericFromR (this=0x5611b5f45080, to_row=65, numdata=..., from_row=0) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/core/rkvariable.cpp:583 #5 0x000056119e719201 in operator() (__closure=0x5611b6b80fe8, command=<optimized out>) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/core/rkvariable.cpp:240 #6 0x000056119e7264b1 in std::function<void(RCommand*)>::operator() (this=0x5611b6b80fe8, __args#0=<optimized out>) at /usr/include/c++/15/bits/std_function.h:593 #7 RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}::operator()(RCommand*) const (__closure=0x5611b6b80fe0, command=<optimized out>) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/core/robject.cpp:47 #8 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<RCommand*>, void, RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}>::call(RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}&, void**)::{lambda()#1}::operator()() const (__closure=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:116 #9 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<RCommand*>, void, RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}>::call(RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}&, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<RCommand*>, void, RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}>::call(RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}&, void**)::{lambda()#1}&&) (args=<optimized out>, fn=...) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:65 #10 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<RCommand*>, void, RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}>::call(RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}&, void**) (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:115 #11 QtPrivate::FunctorCallable<RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}, RCommand*>::call<QtPrivate::List<RCommand*>, void>(RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}&, void*, void**) (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:337 #12 QtPrivate::QCallableObject<RObjectLifeTimeGuard::addCommandFinishedCallback(RCommand*, std::function<void (RCommand*)>)::{lambda(RCommand*)#1}, QtPrivate::List<RCommand*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=<optimized out>, this_=0x5611b6b80fd0, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:547 #13 0x00007f0d36f657ba in QtPrivate::QSlotObjectBase::call (this=0x5611b6b80fd0, r=0x5611b66f7590, a=0x7ffca321a5f0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461 #14 doActivate<false> (sender=0x5611b66f7590, signal_index=3, argv=argv@entry=0x7ffca321a5f0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4146 [...] #17 RCommandNotifier::commandFinished (this=<optimized out>, _t1=0x5611b72f7c90) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/redhat-linux-build/rkward/rbackend/rbackend_autogen/EWIEGA46WW/moc_rcommand.cpp:138 #18 RCommandNotifier::emitFinished (this=<optimized out>, command=0x5611b72f7c90) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/rbackend/rcommand.h:81 #19 RCommand::finished (this=0x5611b72f7c90) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/rbackend/rcommand.cpp:71 #21 0x000056119e751f08 in RInterface::handleRequest (this=0x5611b49f1780, request=<optimized out>) at /usr/src/debug/rkward-0.8.2~pre^1.gitc45a3696-1.fc42.x86_64/rkward/rbackend/rkrinterface.cpp:355 #22 0x00007f0d36f565b5 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:1461 Reported using DrKonqi -- You are receiving this mail because: You are watching all bug changes.