Menu

Rkward does not open previous session

Help
2011-03-24
2013-01-15
  • Agustin Lobo

    Agustin Lobo - 2011-03-24

    Hi!

    I've found that since some releases ago (I'm using the daily builds for ubuntu 10.04)  when I start Rkward and select
    the saved .RData, the scripts and help windows I had open in the previous session are not automatically opened.
    Is there any new option I should click somewhere?

    > sessionInfo()
    R version 2.12.2 (2011-02-25)
    Platform: x86_64-pc-linux-gnu (64-bit)

    locale:
      LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                
      LC_TIME=en_US.UTF-8           LC_COLLATE=en_US.UTF-8      
      LC_MONETARY=en_US.UTF-8       LC_MESSAGES=en_US.UTF-8     
      LC_PAPER=en_US.UTF-8          LC_NAME=en_US.UTF-8         
      LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8    
    LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8

    attached base packages:
    grid      stats     graphics  grDevices utils     datasets  methods 
    base    

    other attached packages:
    reshape_0.8.4 plyr_1.4      proto_0.3-8   rkward_0.5.5

    loaded via a namespace (and not attached):
    ggplot2_0.8.9   lattice_0.19-17 tools_2.12.2  
    >
    alobo@delia:~$ uname -a
    Linux delia 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:46 UTC 2011 x86_64 GNU/Linux

    Agus
    Agus

     
  • Thomas Friedrichsmeier

    Hi!

    Works for me. Check the "workspace layout" option at Settings->Configure RKWard->General. This should be set to "Save/restore with R workspace, when saving/loading R workspace" (the default).

    If that does not change anything: Could you try whether
      rk.save.workplace()
    then close your windows, then
      rk.restore.workplace()
    has any effect? Does a file a text-file called "whatever_you_saved_your_workspace_as.RData.rkworkplace" exist?

    Regards
    Thomas

     
  • Agustin Lobo

    Agustin Lobo - 2011-03-25

    I do have the settings as you say, but the windows are not automatically opened.
    I do have a file named .RData.rkworkplace in the same directory as my .RData. The file is just:
    base::::file:///media/Iomega_HDD/JLFdzT/FLAVIA

    I do as you say:

    open some scripts
    > rk.save.workplace()
    close scripts
    > rk.restore.workplace()
    NULL

    Some scripts are reopened sometimes, nut not all of them and not always. The same script is opened some times and not
    other times, very weird.

    > sessionInfo()
    R version 2.12.2 (2011-02-25)
    Platform: x86_64-pc-linux-gnu (64-bit)

    locale:
      LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                
      LC_TIME=en_US.UTF-8           LC_COLLATE=en_US.UTF-8      
      LC_MONETARY=en_US.UTF-8       LC_MESSAGES=en_US.UTF-8     
      LC_PAPER=en_US.UTF-8          LC_NAME=en_US.UTF-8         
      LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8    
    LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8

    attached base packages:
    grid      stats     graphics  grDevices utils     datasets  methods 
    base    

    other attached packages:
    reshape_0.8.4 plyr_1.4      proto_0.3-8   rkward_0.5.5

    loaded via a namespace (and not attached):
    ggplot2_0.8.9   lattice_0.19-17 tools_2.12.2  
    >

     
  • Thomas Friedrichsmeier

    I do have a file named .RData.rkworkplace in the same directory as my .RData. The file is just: base::::file:///media/Iomega_HDD/JLFdzT/FLAVIA

    Well, that means the list of windows associated with this .RData-file is empty. So, in fact, when you load this .RData file, the expected behavior is that any open windows will be closed, and no new windows will be opened. Probably, at some point you saved the workspace (or called rk.save.workplace()), while no windows were open.
    Use
     

    rk.save.workplace()

    or use Workspace->Save Workspace, while the associated scripts/windows are opened.

    Some scripts are reopened sometimes, nut not all of them and not always. The same script is opened some times and not other times, very weird.

    Please give this another try with the upcoming daily build. I fixed one related problem in SVN. With a bit of luck that was the cause of the strange behavior you're seeing.

    Regards
    Thomas

     
  • Agustin Lobo

    Agustin Lobo - 2011-03-28

    No, it does not work. Actually, I realize that the usual welcome page is not opened either.
    Now scripts are never opened.
    I've tried used Save Workspace before actually quiting.

    > sessionInfo()
    R version 2.12.2 (2011-02-25)
    Platform: x86_64-pc-linux-gnu (64-bit)

    locale:
      LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                
      LC_TIME=en_US.UTF-8           LC_COLLATE=en_US.UTF-8      
      LC_MONETARY=en_US.UTF-8       LC_MESSAGES=en_US.UTF-8     
      LC_PAPER=en_US.UTF-8          LC_NAME=en_US.UTF-8         
      LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8    
    LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8

    attached base packages:
    stats     graphics  grDevices utils     datasets  methods   base    

    other attached packages:
    rkward_0.5.5

    loaded via a namespace (and not attached):
    tools_2.12.2
    >

     
  • Agustin Lobo

    Agustin Lobo - 2011-03-28

    The welcome page actually opens briefly (while the workspace is being read, red symbol at the bottom left corner) and then
    closes and that windows is just the grey background.
    Agus

     
  • Thomas Friedrichsmeier

    Hi!

    The problem could either occur while saving the workplace representation or while restoring it. Let's see, which is the case:

    Could you check the .rkworkplace file again? Does it contain anything besides the "base::::…"-line? Try "rk.save.workplace()" again, after opening a few windows. Now, check the .rkworkplace file again (without closing RKWard). Does it appear to contain appropriate lines for each window? Now check again, after saving / closing RKWard.

    Do you see any error messages in the "Command log" window?

    Visit Settings->Configure RKWard->Debug. At the bottom, you should see a line "Debug output is written to SOMEWHERE". Could you send me that file (after loading the .RData-file)?

    I don't think this is related (both cases work for me), but is your workspace saved as ".RData", or as "SOMETHING.RData"? If the former, is RKWard configured to load the .RData file automatically, on start-up, or are you loading the workspace, manually? If it is being loaded automatically: Does it make any difference, if you load the workspace using Workspace->Open Workspace…, instead?

    Thanks!
    Thomas

     
  • Agustin Lobo

    Agustin Lobo - 2011-03-28

    1. I check the file .RData.rkworkplace : it is just
    base::::file:///media/Iomega_HDD/JLFdzT/FLAVIA
    2. I start rkward and select the .RData in the working directory of the project (/media/Iomega_HDD/JLFdzT/FLAVIA)
    and check the name of the debug file, which is /tmp/kde-alobo/rkwardTi4763.tmp
    3. I open 2 scripts
    4.
    > setwd ("/media/Iomega_HDD/JLFdzT/FLAVIA")
    > rk.save.workplace()
    5. I check .RData.rkworkplace again. It is now:
    base::::file:///media/Iomega_HDD/JLFdzT/FLAVIA
    script::::file:///media/Iomega_HDD/JLFdzT/FLAVIA/flavia_log.txt
    script::::file:///media/Iomega_HDD/JLFdzT/FLAVIA/prcompLog_log.txt
    6. I quit saving the workspace (with the menu). .RData.rkworkplace is now back to
    .RData.rkworkplace

    7. I start rkward again but now load the .RData with Workspace->Open Workspace: same behavior
    8, alobo@delia:/tmp/kde-alobo$ more rkwardTi4763.tmp
    rkward(4763)/kio (KDirWatch) KDirWatchPrivate::removeEntry: doesn't know ""
    rkward(4763)/kparts KParts::PartManager::addPart: Part ' "" ' has a widget  "khtml_part_widget"  with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well.

    QLayout: Attempting to add QLayout "" to QGroupBox "", which already has a layout
    QLayout: Attempting to add QLayout "" to QGroupBox "", which already has a layout
    Object::connect: No such signal QGroupBox::toggled ()
    QLayout: Attempting to add QLayout "" to QGroupBox "", which already has a layout
    QLayout: Attempting to add QLayout "" to QGroupBox "", which already has a layout
    rkward(4763)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"
    rkward(4763)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/home/alobo/.local/share/mime/magic"

    Hope this helps!
    Agus

     
  • Thomas Friedrichsmeier

    Hi!

    Ok, so the problem comes up while saving. More specifically, when saving the workplace while exiting the session, the workplace would often be saved as empty. The problem should now be fixed in SVN / the next daily build.

    Regards
    Thomas

     
  • Agustin Lobo

    Agustin Lobo - 2011-03-29

    It works now, with two notes:
    1. The script windows are "trembling" for a while, in particular the upper bar of the window with the path and file name.
    2. The welcome window closes automatically when the others are opened. Not sure if this is intentional.

    Question: why the command window is not setwd()d to the directory of the .RData file?
    This is always the first line of my scripts since I use rkward.
    (i.e. setwd ("/media/Iomega_HDD/JLFdzT/FLAVIA") )
    Thanks

    Agus

     
  • Thomas Friedrichsmeier

    The script windows are "trembling" for a while, in particular the upper bar of the window with the path and file name.

    Can probably be improved a bit. I'll try to remember to look into it.

    The welcome window closes automatically when the others are opened. Not sure if this is intentional.

    Basically it is treated just like any other window, when it comes to restoring the workplace. That is intentional, if perhaps debatable.

    Question: why the command window is not setwd()d to the directory of the .RData file?

    Well, I simply did not get around to implement your corresponding feature request, so far.

    However, are you aware of "Run->CD to script directory"? (Available for any script window. This is not quite what you're asking for, but it's close).

    Regards
    Thomas