Bug 425885 - repeatedly redrawn figure when making scatterplot with gui, leads to crash
Summary: repeatedly redrawn figure when making scatterplot with gui, leads to crash
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR critical
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-27 22:02 UTC by Eric
Modified: 2020-09-03 19:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
data file needed to observe the behavior (349 bytes, text/csv)
2020-08-27 22:02 UTC, Eric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric 2020-08-27 22:02:26 UTC
Created attachment 131224 [details]
data file needed to observe the behavior

SUMMARY

Selecting scatterplot from the menu and doing the following below gives hard crash.

STEPS TO REPRODUCE
1. Open R script
2. Run the script
3. Select Plots-->Scatterplot
4. scroll down to data frame ch_wide_2
5. input FISCAL_YEAR three times into "'X' variables"
6. input FS, SP, SS into the 'Y' variables
7. select the 'use wizard' button
8. keep selecting 'next' to get to the preview.


OBSERVED RESULT

The preview window repeatedly redraws the figure and it flashes, and other things happen.


EXPECTED RESULT

It just makes the plot preview.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 5.18.5
kernel 5.7-17-200.fc32.x86_64
KDE Frameworks 5.70.0
Qt 5.14.2 (built against 5.14.2)
The xcb windowing system

ADDITIONAL INFORMATION

I can get it to crash doing this if I keep trying to add things to the plot like different colors for the different Y variables, etc.

The script file is: (I have been playing with other plotting packages)

library(reshape2)
library(tidyverse)
library(skimr)
library(ggplot2)
library(ggraptR)
library(shiny)
library(ggplotgui)
library(GrapheR)

ch = read.csv("/home/me/Credit_Hour_Counts_data_fixed.csv") # read csv file 

#ch[is.na(ch)] <- 0
ch_wide_1 <- dcast(ch, Term ~ FISCAL_YEAR)
ch_wide_1[is.na(ch_wide_1)] <- 0
ch_wide_2 <- dcast(ch, FISCAL_YEAR ~ Term)
ch_wide_2[is.na(ch_wide_2)] <- 0
Comment 1 Eric 2020-08-27 22:06:08 UTC
...

9. click 'submit' so the figure is placed in the workspace.
10. Click "Run Again" ---> hard crash
Comment 2 Thomas Friedrichsmeier 2020-09-03 16:44:23 UTC
Git commit 2926054d53a4aea125015baea7fff715a59fbc14 by Thomas Friedrichsmeier.
Committed on 03/09/2020 at 15:32.
Pushed by tfry into branch 'master'.

Fix potential crash when using previews in wizard interface.

M  +3    -3    rkward/plugin/rkpreviewbox.cpp

https://invent.kde.org/education/rkward/commit/2926054d53a4aea125015baea7fff715a59fbc14
Comment 3 Thomas Friedrichsmeier 2020-09-03 19:17:47 UTC
Git commit 925e635e4ff18692633668d9fd29b5bf5d14c20a by Thomas Friedrichsmeier.
Committed on 03/09/2020 at 19:16.
Pushed by tfry into branch 'master'.

Fix layout fluctuation when using plot preview in a wizard-type plugin.

M  +1    -0    ChangeLog
M  +6    -0    rkward/plugin/rkstandardcomponentgui.cpp

https://invent.kde.org/education/rkward/commit/925e635e4ff18692633668d9fd29b5bf5d14c20a
Comment 4 Thomas Friedrichsmeier 2020-09-03 19:22:32 UTC
Thanks for reporting! Should be fixed in the development version.

BTW, it really helps, if you can try to provide a *minimal* example. E.g. in this case, test if you can reproduce the bug using only one of the example data sets shipped with R (package datasets), and no further R packages, if possible. That helps narrowing down the search space for the developers.
Comment 5 Eric 2020-09-03 19:26:20 UTC
Will do! Thank you for the very quick fix. -E