Print Thread
Page 1 of 2 1 2
PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
#53400 04/06/16 07:26 PM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
This was mentioned in another topic here, but that question was focused on a different cause for the issue.

PL/SQL Developer suddenly stopped restoring previously opened files at startup - as if it had lost the recovery files in the PLS-Recovery directory. When I investigated, I found that the files were there, but were under sub-folders named for monitor configurations - e.g. PLS-Recovery\Monitors-2560-1920 and PLS-Recovery\Monitors-1680-1920-1680 (matching my home and work environments, respectively). There were also restore files in the root PLS-Recovery directory, last modified 3/24/2016 (which matches a first, odd startup, where only one of my instance's recovery files were available).

When did these "monitor" subfolders start appearing? I haven't run any updates in some time (current version is 11.0.5.1775). Why are they there in the first place? I can't think of any reason why I would want different session recoveries betweeen home and work... The work I'm doing is the same, regardless of what my current monitor configurations are (if I take my laptop to a conference room and have no monitor, will I have no recovery session because I now only have one monitor??).

Why is this happening? And how do I stop it?



Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
James B #53403 04/07/16 04:16 AM
Joined: Feb 2013
Posts: 251
UTC+10
I
Member
Offline
Member
I
Joined: Feb 2013
Posts: 251
UTC+10
You can copy recovery files to the appropriate Monitor configuration folder and continue work, but this is awkward.

I support this - "monitor folder" is bad implementation!

Last edited by IvanZ; 04/07/16 04:21 AM.
Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
IvanZ #53406 04/07/16 07:01 PM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
There's a set of config files in each of the folders (including the root PL/SQL Developer temp directory) called desktop.<number>... they are completely different in each folder, so I can't just merge the folders frown

Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
James B #53705 07/18/16 03:43 PM
Joined: Jul 2016
Posts: 20
J
Member
Offline
Member
J
Joined: Jul 2016
Posts: 20
I'd like to bump this topic, as I am also very frustrated by this new recovery file implementation. I'm puzzled by the design choice and can't see the intended benefit of storing recovery files specific to monitor resolution.

The downside (failure to restore) feels like a pretty serious bug. I am usually running multiple PL/SQL Developer instances on my main development desktop, but I frequently use a combination of Citrix and Remote Desktop to log into it from elsewhere. I remote into that desktop from a variety of computers, from home and from work, and the monitor resolutions are constantly changing. I haven't crashed too many times since I upgraded to v11, but already it seems like every time I launch a new instance from a new configuration, I am presented with a different set of recovery files to choose from.

So crash recovery has effectively stopped working for me with version 11, at least not without some manual manipulation of the location of those files.

I haven't seen Marco weigh in; I'm very curious about what benefits this design might be providing that I'm not seeing, and specifically I'd like to know whether Allround officially considers this a bug and plans a fix.

Thanks!

Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
Jeff Kandt #53829 08/04/16 02:06 PM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
So I just noticed today that there's a checkbox to disable this in Preferences -> User Interface -> Options: "Save Layout Per Multi Monitor Setup". Testing that now to see if it behaves as expected.

If that's the case, it would've been nice if someone at AA would've pointed it out by now frown

Last edited by James B; 08/04/16 02:08 PM.
Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
James B #53831 08/04/16 04:46 PM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
Nah, never mind - seems to completely ignore this setting mad

Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
James B #53976 09/07/16 05:21 PM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
So here's how I got around this   mad

1.  Download Hermann Schinagl's Link Shell Extension: http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#download
2.  Follow the installation instructions, including the VC redistributables (mind whether installing 64- or 32-bit)
3.  Close all instances of PL/SQL Developer
4.  Go to your Roaming PLS-Recovery directory: C:\Users\<username>\AppData\Roaming\PLSQL Developer\PLS-Recovery
5.  Create a folder called Monitors-All (name not important)
6.  For each Monitor-nnnn-nnnn folder you have, move all the files in that folder to your new Monitors-All folder.
    IMPORTANT: If prompted to overwrite files, DO NOT overwrite them... follow the steps below before moving them
7.  Copy the name of the folder for each monitor - e.g. Monitors-2560-1920
8.  Delete that folder
9.  Right-drag the Monitors-All folder and "drop" it in the same folder
10. In the popup menu, choose Drop Here -> Junction
11. Rename the new junction folder to the name of the monitors folder you deleted (e.g. Monitors-2560-1920)
12. Repeat for each Monitors sub-folder


A junction is basically a pointer to a folder... this essentially causes all monitor sub-folders to point to the same location for storing crash recovery files.

IF YOU ARE WARNED TO OVERWRITE FILES IN STEP 6:

1.  Open a windows command prompt to the folder you're copying from
2.  Rename all files using the following command:
      ren *.* 123456.*
    where 123456 is whatever name you choose (PL/SQL Developer uses all-number titles by default)
3.  Open the .cfg file in that directory for edit
4.  Find all instances of the original name and replace with the new name. For example, in my files, the lines:
      RecoveryFile=C:\Users\<me>\AppData\Roaming\PLSQL Developer\PLS-Recovery\Monitors-1680-1920-1680\desktop.001
      RecoveryFile=C:\Users\<me>\AppData\Roaming\PLSQL Developer\PLS-Recovery\Monitors-1680-1920-1680\desktop.002

    became
      RecoveryFile=C:\Users\<me>\AppData\Roaming\PLSQL Developer\PLS-Recovery\Monitors-1680-1920-1680\123456.001
      RecoveryFile=C:\Users\<me>\AppData\Roaming\PLSQL Developer\PLS-Recovery\Monitors-1680-1920-1680\123456.002

5.  Return to step 6, above, and retry the file move


Now restart PL/SQL Developer... you should see all of your crashed sessions. And you should continue to see all of them regardless of which monitor configuration you're working on. Let me know if that's not the case for anyone.

Sheesh.   mad
 
 

Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
James B #53988 09/08/16 07:40 PM
Joined: Jul 2016
Posts: 20
J
Member
Offline
Member
J
Joined: Jul 2016
Posts: 20
Wow, that's one of the uglier end-user workarounds I've seen, and it's crazy that it's necessary, but I admire your effort and appreciate you documenting it.

However, I'm looking at my own system and, in addition to recovery files in a "Monitors-1280-1280" subfolder (I have only one), I also have recovery files in the root of PLS-Recovery. Both locations have files which are currently being used -- their mod dates show they are being touched every couple minutes.

I don't see how your process accounts for recovery files which are not in a Monitors subfolder. Is my setup unusual? Apparently there is some condition under which the root is still used -- if only we knew how to force this to happen in all cases!

Incidentally, the only conflicting .cfg between the two locations is the one in your example: "desktop". Any idea of the significance of this name, versus all the others which are numbered? Is that just the first?

FYI I'm running version 11.0.6.1796 64-bit, my main desktop configuration is dual 1280x1024 monitors (which I assume maps to the "Monitors-1280-1280" folder?), but I also Remote into this machine several times a day from a laptop which has a single 1600x900 display, and also on occasion from home using a couple of other resolutions.

So unfortunately it looks like your fix won't work for me. I would need to spend some time launching and killing sessions and logging in at various monitor configurations in order to divine which folders are used when, but even if I understood it, I can't imagine it works to create a junction between a folder and its' parent -- wouldn't that set up a dangerous loop condition?

Ugh...

Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
Jeff Kandt #54096 10/04/16 02:28 AM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
I had configurations in the root folder, as well... trying to remember what I did with those. It may have just worked because I moved everything to the Monitors-All subfolder. It may have also had something perversely to do with the fact that I set "save layout per multi monitor setup" to "false" (in Preferences->User Interface->Options)... those are the only things I've done beyond what's listed below.

I did a search in all of my preference files and the registry to see if I set something to point to that folder explicitly, but I can't find anything. But I absolutely did have files in the root by default. If I had to guess, I'd say they're related to you logging in remotely and only having one monitor being displayed.

Take a look at the following registry keys... in each of them, the Instance.Monitors:nnnn:nnnn subfolder is an entry for my monitor configurations. See if there's anything promising in the parent/root.

Most likely candidate: HKEY_CURRENT_USER\Software\Allround Automations\PL/SQL Developer\Desktop\Instance.Monitors:2560:1920... look under the root Desktop key, as well

Second Runner Up: HKEY_CURRENT_USER\Software\Allround Automations\PL/SQL Developer\Position\Instance.Monitors:2560:1920

Let me know if you find anything - sorry for the slow response.

PS: The junction wouldn't have to be under the root folder - I just did that for convenience. But you could put the junction under, say, C:\Users\<user>\AppData\Roaming\PLSQL Developer\AADrivesMeNuts and drop both the monitor subfolders and their parent into THAT folder as junctions wink Make sense?

And yes, this is definitely one of the ugliest workarounds I've seen, as well frown

.

Re: PLS-Recovery Directory has "Monitor" subfolders - no files recovered at startup
James B #54097 10/04/16 03:24 AM
Joined: Jun 2010
Posts: 35
J
James B Offline OP
Member
OP Offline
Member
J
Joined: Jun 2010
Posts: 35
Damn. You got me... I unplugged my second monitor and opened up PLSD, and the session wrote to the root directory cry And you're right, junctioning subdirectories like that puts the entire universe in danger frown This will still work, but we're now officially into HPIMA territory crazy

So the link shell extension has a limitation - you can't junction in a way that creates a recursive folder structure. It's an artificial limitation though - doing so is perfectly legit from the filesystem's perspective (albeit a really, really bad idea). I had to pull out Mark Russinovich's junction tool. It's really just a front-end for fsutil, but I've long forgotten the commands to create junctions.

https://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

So. Here's what you have to do:
1. Back up everything in the PLS-Recovery folder
2. Rename PLS-Recovery to Monitors-All
3. Create a junction: PLSQL Developer\PLS-Recovery should point to PLSQL Developer\Monitors-All
      junction.exe "PLS-Recovery" "C:\Users\<user>\AppData\Roaming\PLSQL Developer\Monitors-All"
4. cd PLS-Recovery
5. Create a junction in the PLS-Recovery, pointing again to Monitors-All. Name it for your monitor configuration
      junction.exe "Monitors-2560-1920" "C:\Users\<user>\AppData\Roaming\PLSQL Developer\Monitors-All"
6. Repeat for every monitor configuration folder you have.


Now you should be able to expand the PLS_Recovery file and see not only the recovery files, but also a subdirectory for your monitor config with the recovery files.

Do be warned: This isn't harmful per se, but you'll notice you can keep drilling down into monitor folders until windows explorer has a thermal runaway incident in a positive feedback loop. But other than that, everything will be fine laugh

I tested, and PLSD shows and writes to the same set of recovery files whether I'm on one monitor or two.

Sheesh.

.

Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.031s Queries: 15 (0.010s) Memory: 2.5837 MB (Peak: 3.0460 MB) Data Comp: Off Server Time: 2024-05-17 12:29:28 UTC
Valid HTML 5 and Valid CSS