Bug 505465

Summary: The output windows does not show the result of a procedure because the rk.header command gives and error.
Product: [Applications] rkward Reporter: Alfredo Sánchez <asalber>
Component: generalAssignee: RKWard Team <rkward-devel>
Status: RESOLVED FIXED    
Severity: grave CC: thomas.friedrichsmeier
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Sys.time() eror
attachment-1140739-0.html

Description Alfredo Sánchez 2025-06-11 09:37:21 UTC
Created attachment 182181 [details]
Sys.time() eror

SUMMARY

The output windows does not show the result of a procedure because the rk.header command gives and error. 
I think the error is due to the Sys.time() command included in the rk.header command. 
When I try to execute the Sys.time() command in the console I get the error:
Error in format.POSIXlt(as.POSIXlt(x, tz), format, usetz, ...)

STEPS TO REPRODUCE

1. Start any procedure that sends a result to the output window.

OBSERVED RESULT

The output window shows just the "Run again" link.

EXPECTED RESULT

The result of the procedure must be printed in the output window. 

SOFTWARE/OS VERSIONS
Arch linux 

-- Frontend --
RKWard version: 0.8.1
KDE Frameworks version (runtime): 6.14.0
KDE Frameworks version (compile time): 6.13.0
Qt version (runtime): 6.9.1
Qt version (compile time): 6.9.0
Using QWebEngine for HTML rendering
Running on: Arch Linux
Local config directory: /home/alf/.config
RKWard storage directory: /home/alf/.rkward/
Backend version (as known to the frontend): 4.5.0

Debug message file (this may contain relevant diagnostic output in case of trouble):
/tmp/rkward.frontend

-- Backend --
Debug message file (this may contain relevant diagnostic output in case of trouble):
/tmp/rkward.rbackend

R version (compile time): 4.5.0  (2025-04-11 r88135)

R runtime session info:
R version 4.5.0 (2025-04-11)
Platform: x86_64-pc-linux-gnu
Running under: Arch Linux

Matrix products: default
BLAS:   /usr/lib/libblas.so.3.12.0 
LAPACK: /home/alf/miniforge3/envs/myenv/lib/libmkl_rt.so.2;  LAPACK version 3.11.0

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

time zone: Europe/Madrid
tzcode source: system (glibc)

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

other attached packages:
 [1] kableExtra_1.4.0 knitr_1.50       lubridate_1.9.4  forcats_1.0.0   
 [5] stringr_1.5.1    dplyr_1.1.4      purrr_1.0.4      readr_2.1.5     
 [9] tidyr_1.3.1      tibble_3.3.0     ggplot2_3.5.2    tidyverse_2.0.0 
[13] rkward_0.8.1    

loaded via a namespace (and not attached):
 [1] gtable_0.3.6       compiler_4.4.2     tidyselect_1.2.1   xml2_1.3.8        
 [5] textshaping_1.0.1  systemfonts_1.2.3  scales_1.4.0       fastmap_1.2.0     
 [9] lattice_0.22-6     R6_2.6.1           generics_0.1.4     svglite_2.2.1     
[13] pillar_1.10.2      RColorBrewer_1.1-3 tzdb_0.5.0         rlang_1.1.6       
[17] stringi_1.8.7      xfun_0.52          viridisLite_0.4.2  timechange_0.3.0  
[21] cli_3.6.5          withr_3.0.2        magrittr_2.0.3     digest_0.6.37     
[25] grid_4.4.2         rstudioapi_0.17.1  hms_1.1.3          lifecycle_1.0.4   
[29] vctrs_0.6.5        evaluate_1.0.3     glue_1.8.0         farver_2.1.2      
[33] rmarkdown_2.29     htmltools_0.5.8.1  tools_4.4.2        pkgconfig_2.0.3
Comment 1 Thomas Friedrichsmeier 2025-06-12 14:44:29 UTC
I cannot immediately reproduce this. I suspect the problem is related to one of the loaded packages (although, of course it would be better, if rkward was immune against that). Perhaps try:
  Sys.time
and
  format.POSIXlt
(without parentheses), to check whether those got masked by something else.
Comment 2 Thomas Friedrichsmeier 2025-06-12 16:04:43 UTC
Ok, looking closer, one definite oddity is that packages "compiler" and "tools" are loaded in version 4.4.2, while R itself is 4.5.0. I have no idea, what might be causing this situation, but it's very likely the root cause.

Things to check / questions:
- How did you install rkward, and R?
- Does it help to select a different R installation from Settings->Check installation?
- Output of .libPaths() ?
- Output of .libPaths() / sessionInfo() in a plain R session (outside of RKWard)
Comment 3 Alfredo Sánchez 2025-06-16 21:29:05 UTC
Created attachment 182313 [details]
attachment-1140739-0.html

Hi again!
I use conda to install R in my system, but RKWard was not able to recognize this installation, and finally I decided to install it in the typical way with pacman.
The problem was that pacman install the last version of R 4.4.5 and conda still install the version 4.4.2. Probably this provoked the mess, however the output of .libPaths() is
[1] "/home/alf/R/x86_64-pc-linux-gnu-library/4.5"
[2] "/usr/lib/R/library"
[3] "/home/alf/.rkward/.rkward_packages/405"
that does not contain the library path of the conda installation.
So, I decided to remove the conda installation and now everything works as expected.
Thank you for your help!


________________________________
Alfredo Sánchez Alberca
Departamento de Matemáticas y Ciencia de Datos
Director del Grado de Ingeniería Matemática
Escuela Politécnica Superior
Universidad San Pablo CEU
Urbanización Montepríncipe, s/n
28668 Boadilla del Monte
Tel. +34 913724710
Web: https://aprendeconalf.es
________________________________
De: rkward-devel <rkward-devel-bounces@kde.org> en nombre de Thomas Friedrichsmeier <bugzilla_noreply@kde.org>
Enviado: jueves, 12 de junio de 2025 18:04
Para: rkward-devel@kde.org <rkward-devel@kde.org>
Asunto: [rkward] [Bug 505465] The output windows does not show the result of a procedure because the rk.header command gives and error.

ATENCIÓN: Correo externo - No haga clic en enlaces o archivos adjuntos
a menos que esté seguro de la procedencia del mensaje

https://urldefense.com/v3/__https://bugs.kde.org/show_bug.cgi?id=505465__;!!D9dNQwwGXtA!U6KFmruS2hAMKQwwhHFu1-oO-iG7R7j2iyO5v_eZcLrFwxIbFpvCi0LztIojL7XWQZuCcdVMbVkZMuAFD_c2SjQ$

--- Comment #2 from Thomas Friedrichsmeier <thomas.friedrichsmeier@kdemail.net> ---
Ok, looking closer, one definite oddity is that packages "compiler" and "tools"
are loaded in version 4.4.2, while R itself is 4.5.0. I have no idea, what
might be causing this situation, but it's very likely the root cause.

Things to check / questions:
- How did you install rkward, and R?
- Does it help to select a different R installation from Settings->Check
installation?
- Output of .libPaths() ?
- Output of .libPaths() / sessionInfo() in a plain R session (outside of
RKWard)

--
You are receiving this mail because:
You are the assignee for the bug.



Este mensaje y sus archivos adjuntos, enviados desde FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU, pueden contener información confidencial y está destinado a ser leído sólo por la persona a la que va dirigido, por lo que queda prohibida la difusión, copia o utilización de dicha información por terceros. Si usted lo recibiera por error, por favor, notifíquelo al remitente y destruya el mensaje y cualquier documento adjunto que pudiera contener. Cualquier información, opinión, conclusión, recomendación, etc. contenida en el presente mensaje no relacionada con la actividad de FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU, y/o emitida por persona no autorizada para ello, deberá considerarse como no proporcionada ni aprobada por FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU, que pone los medios a su alcance para garantizar la seguridad y ausencia de errores en la correspondencia electrónica, pero no puede asegurar la inexistencia de virus o la no alteración de los documentos transmitidos electrónicamente, por lo que declina cualquier responsabilidad a este respecto.

This message and its attachments, sent from FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU, may contain confidential information and is intended to be read only by the person it is directed. Therefore any disclosure, copying or use by third parties of this information is prohibited. If you receive this in error, please notify the sender and destroy the message and any attachments may contain. Any information, opinion, conclusion, recommendation,... contained in this message and which is unrelated to the business activity of FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU and/or issued by unauthorized personnel, shall be considered unapproved by FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU. FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU implements control measures to ensure, as far as possible, the security and reliability of all its electronic correspondence. However, FUNDACIÓN UNIVERSITARIA SAN PABLO-CEU does not guarantee that emails are virus-free or that documents have not be altered, and does not take responsibility in this respect.
Comment 4 Thomas Friedrichsmeier 2025-06-22 15:57:32 UTC
Thanks! Closing this, then.

A certain doubt remains as to why exactly this happened, and if RKWard may have played a role in the messup, but for now I'm inclined to believe this was simply an installation problem, then.