Bug 404431 - RKWard crashes when changing the class of an opened object
Summary: RKWard crashes when changing the class of an opened object
Status: CONFIRMED
Alias: None
Product: rkward
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-16 09:53 UTC by Matthias
Modified: 2022-09-21 12:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2019-02-16 09:53:23 UTC
SUMMARY
When changing the class of an object that's currently opened in RKWards object viewer, RKWARD crashes. I have attached a script that forces the crash.

STEPS TO REPRODUCE
1. Run:

library(likert)
library(dplyr)

df <- data.frame(x = c("A lot", "Some", "Not at all"))
df <- mutate(mydata, x_recoded = recode(x, "A lot" = 1, "Some" = 2, "Not at all" = 3))

2. Open df in RKWards viewer

3. Run "df <- likert(df)

OBSERVED RESULT
RKWard crashes

EXPECTED RESULT
RKWards either closes the viewer or reloads the object




---Session Info---
-- Frontend --
RKWard version: 0.7.0b
KDE Frameworks version (runtime): 5.50.0
KDE Frameworks version (compile time): 5.46.0
Qt version (runtime): 5.11.1
Local config directory: /home/user/.config
RKWard storage directory: /home/user/.rkward/
Backend version (as known to the frontend): 3.5.1




R version (compile time): 3.5.0  (2018-04-23 r74626)
R runtime session info:
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.10

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0

locale:
 [1] LC_CTYPE=de_DE.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=de_DE.UTF-8           LC_COLLATE=de_DE.UTF-8       
 [5] LC_MONETARY=de_DE.UTF-8       LC_MESSAGES=de_DE.UTF-8      
 [7] LC_PAPER=de_DE.UTF-8          LC_NAME=de_DE.UTF-8          
 [9] LC_ADDRESS=de_DE.UTF-8        LC_TELEPHONE=de_DE.UTF-8     
[11] LC_MEASUREMENT=de_DE.UTF-8    LC_IDENTIFICATION=de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rkward_0.7.0

loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1
Comment 1 Justin Zobel 2022-09-21 03:13:54 UTC
Thank you for reporting this crash in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the crash with a recent software version?

If you can reproduce the issue, please change the status when you reply to "CONFIRMED" when replying. Thank you!
Comment 2 Matthias 2022-09-21 10:04:15 UTC
The bug persists with the following versions:

R version (compile time): 4.0.2  (2020-06-22 r78730)
R runtime session info:
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=de_DE.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=de_DE.UTF-8           LC_COLLATE=de_DE.UTF-8       
 [5] LC_MONETARY=de_DE.UTF-8       LC_MESSAGES=de_DE.UTF-8      
 [7] LC_PAPER=de_DE.UTF-8          LC_NAME=de_DE.UTF-8          
 [9] LC_ADDRESS=de_DE.UTF-8        LC_TELEPHONE=de_DE.UTF-8     
[11] LC_MEASUREMENT=de_DE.UTF-8    LC_IDENTIFICATION=de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rkward_0.7.2

loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2
Comment 3 m.eik michalke 2022-09-21 11:44:55 UTC
(In reply to Matthias from comment #0)
> STEPS TO REPRODUCE
> 1. Run:
> 
> library(likert)
> library(dplyr)
> 
> df <- data.frame(x = c("A lot", "Some", "Not at all"))
> df <- mutate(mydata, x_recoded = recode(x, "A lot" = 1, "Some" = 2, "Not at
> all" = 3))
> 
> 2. Open df in RKWards viewer
> 
> 3. Run "df <- likert(df)

using RKWard 0.7.4z+0.7.5+devel3 with R 4.2, i can't run this code. assuming, that "mydata" is to be replaced with "df", the call to  likert() results in:

  Error in likert(df) :
    All items (columns) must have the same number of levels
Comment 4 Matthias 2022-09-21 12:02:50 UTC
Sorry, my bad. The bug can be triggered with this script:

#Preparation
library(likert)
set.seed(1)
n <- 100

# Create dataframe df
df <- data.frame(
    id=sample(1:5,n, replace=T), 
    rating=factor(sample(1:5,n, replace=T), labels=c("Good","Neither","Poor","Very Good","Very Poor"))
)

#Now open df in Rkward's viewer, then run:
df <- likert(items=df[,2, drop = FALSE], nlevels = 5)
Comment 5 m.eik michalke 2022-09-21 12:10:40 UTC
(In reply to Matthias from comment #4)
> Sorry, my bad. The bug can be triggered with this script:

yes, thanks. i can replicate the issue with this code.