Graphics API version mismatch

Bug #2011617 reported by DeathByDenim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rkward (Ubuntu)
New
Undecided
Unassigned

Bug Description

Trying to plot in RKWard results in:
Error in (function (width = getOption("rk.screendevice.width"), height = getOption("rk.screendevice.height"), :
  Graphics API version mismatch
Error in RK() : Graphics API version mismatch
Error in RK() : Graphics API version mismatch

Outside of RKWard and using plain R this error does not appear and the plot is shown.

I have used R packages from the stock Ubuntu repositories only. I have not installed anything with install.packages().

To reproduce:

Install Tidyverse:
sudo apt install r-cran-tidyverse

Run the following R code in the R Console in RKWard:
library('tidyverse')
ggplot(data=mpg)+ geom_point(mapping = aes(x = displ, y = hwy))

The same code runs fine from just running R from the terminal.

From what I can gather, the solution is to rebuild against the current version of R. Although it's not entirely clear what needs to be rebuild.

System info:
$ lsb_release -rd
Description: Ubuntu 22.04.2 LTS
Release: 22.04
$ apt-cache policy rkward
rkward:
  Installed: 0.7.2-1
  Candidate: 0.7.2-1
  Version table:
 *** 0.7.2-1 500
        500 http://ca.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
$ apt-cache policy r-base
r-base:
  Installed: (none)
  Candidate: 4.1.2-1ubuntu2
  Version table:
     4.1.2-1ubuntu2 500
        500 http://ca.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://ca.archive.ubuntu.com/ubuntu jammy/universe i386 Packages
$ apt-cache policy r-cran-tidyverse
r-cran-tidyverse:
  Installed: 1.3.1-1
  Candidate: 1.3.1-1
  Version table:
 *** 1.3.1-1 500
        500 http://ca.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://ca.archive.ubuntu.com/ubuntu jammy/universe i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
m.eik michalke (m.eik) wrote :

FFIW, i can't replicate the issue with (k)buntu 22.04.2 LTS and RKWard 0.7.5 from the official PPA. i would assume the underlying problem was already addressed in RKWard > 0.7.2.

you might like to try the PPA that fits your setup (ubuntu or CRAN R, backports or not, stable release or bleeding edge daily snapshots...): https://launchpad.net/~rkward-devel

Revision history for this message
DeathByDenim (jarno-y) wrote :

Ah yeah, that will likely work. I hadn't gotten around to that yet. I figured I would open the bug report for the current version in the default repos before diving deeper into this.

It's maybe this issue: https://invent.kde.org/education/rkward/-/issues/7

Not very clear what was fixed there though.

Revision history for this message
DeathByDenim (jarno-y) wrote :

Minor update. I tried to do a build from source for RKWard without making any modifications to the source. Just to rebuild it.

$ apt source rkward
$ sudo apt build-dep rkward
$ cd rkward-0.7.2
$ dpkg-buildpackage -rfakeroot -b -uc -us
$ cd ..
$ sudo dpkg -i rkward_0.7.2-1_amd64.deb
$ sudo dpkg -i rkward-data_0.7.2-1_all.deb

Now when I try:
> library('tidyverse')
> ggplot(data=mpg)+ geom_point(mapping = aes(x = displ, y = hwy))

I get an error saying:
Connection closed unexpectedly. Last error was: Unknown error
The R backend will be shut down immediately.

In the R Console in RKWard, it shows:
Error: C stack usage 46079528768812 is too close to the limit
Error:

Weird!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.