1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Recent files keep disappearing - solved - files on a USB/Network that may not be plugged in

Discussion in 'General Discussion' started by jcdammeyer, Mar 18, 2021.

  1. jcdammeyer

    jcdammeyer Senior Member

    I just rebooted my WIN-10 system after shutting down Alibre and other applications. Windows then did an update. Once it was running again I restarted Alibre and my recent files are all gone. How can that happen? How can I prevent this from happening? It's not the first time but usually I don't have a recollection of what I did and when. This time it was simple.
     
  2. simonb65

    simonb65 Alibre Super User

    Do you mean a 'recent part/assembly file' or do you mean the 'recent file list'.

    An update to windows doesn't remove 'files' unless they are stored in a protected windows area! If this is the meaning, then where are you storing the files? If it's the 'recent file list' then that's another issue.
     
  3. jcdammeyer

    jcdammeyer Senior Member

    It's the recent file list. My files are in a shared network folder on the P: drive. And now that I mention it I think I know why it may be failing. When the system reboots as usual it takes a minute or so to sign onto the network. Unlike all my other programs it appears that if Alibre cannot access the path it removes it. Other programs like Altium, Microchip IDE, Embarcadero RAD Studio, just mark the file as not found.

    Let me try something...
    So if for some reason the path isn't available when Alibre is started I'm going to guess they trash it from the list rather than perhaps list the path with an ICON of a question mark over top of it. That would be the clean way of doing it. Then if the file does suddenly show up the next time Alibre runs they don't have to have it as an empty item.

    The reason of course that they trash it is because just like a lot of editors if you go to the recently used list and try open an non-existent file you will get a dialog saying file can't be found. At that point it's also removed from the recently used list. You can test this with a USB drive. Plug it in and edit a file from it. Use a text editor or Alibre. Then close the application. Remove the USB stick and restart the application. For software development platforms the file is still in the recently used list because nothing has tried to open it. Alibre tries to open the file in order to present an icon of the drawing. Since it can't find the file it trashes it from the list.

    With software IDEs it's not until you try and open it. So if you start say MPLAB for microchip development and then plug in the USB drive and open a file from recently used it opens. Because the drive is there. Some of the IDEs even show the file and path but greyed rather than black text. And you can't click on it because it's not there. As you add files it moves down the list and falls off.

    With Alibre if the network after booting isn't there yet, then tough bananas. It's poor behavior on the part of Alibre. It should report a file not found ICON and only if I click on it or open lots of others should it migrate down the recently used and fall off the end.

    We live in a world now of cloud and network drives. Sometimes for short periods of time those network drives aren't available. Alibre needs to stop removing files from the recently used list automatically.
     
    simonb65 likes this.
  4. simonb65

    simonb65 Alibre Super User

    I've had similar issues with files on my NAS drives. When they sleep, it takes a while for them to wake, spin up and become available. Not noticed issues with Alibre, but I get 'Mapped drive not available' once in a while. Alibre should handle it by timing out waiting for file access, but retry a few times at timed intervals. As an application, you can also ask windows to notify you of a resource availability (file/directory/drive watcher) so you can just carry on and update things when they are ready (rather than having to poll them).

    Removing a file from the recent list should only be because of a positive 'file not found', not a 'file/directory/drive isn't accessible at the moment' !

    As you say, most applications (if not all?) only inform you the recent file isn't valid if you try and open it, i.e. Word, Excel, Visio, Visual Studio, etc. The issue on not being 'ready' should only apply to applications that open the last used file when started, which Alibre isn't.
     
  5. jcdammeyer

    jcdammeyer Senior Member

    Here's an example from RAD Studio (Embarcadero Delphi and C++). Delphi has been around a long time, I believe Atlium PC board designer still uses it. Until Microsoft bought Skype it was also Delphi so it's not a small player by any stretch. In the example below I removed the USB drive. Clicking on OK did not remove the project. I then plugged in the USB drive again and this time the project opened.

    upload_2021-3-18_17-40-22.png
     
  6. Max

    Max Administrator Staff Member

    First and foremost, can you confirm you didn't accidentally disable the MRU with the eye icon:

    upload_2021-3-18_21-44-3.png

    If not, you can see the MRU here using RegEdit.

    I do not recommend you change anything here manually as it can cause problems. Do not delete things; it will cause problems. Look but do not touch, or it will cause problems.

    OK, moving on - what you see here can be informative on what happened. What do you see when you open this? (How-to below)

    upload_2021-3-18_21-40-25.png

    Start Menu > type "Regedit" - it finds it - press enter

    Click HKEY_Current_USER > Software > Alibre Inc...as you see above down to MRUList

    is it blank? It is exceedingly unlikely that a Windows Update has caused an issue here. I believe it is more probable that the MRU list has been accidentally disabled, though I may be wrong. Test this by clicking the eye icon multiple times to cycle through its states.
     
  7. jcdammeyer

    jcdammeyer Senior Member

    This is file1 which is a USB drive (G) to which I saved file2:
    Holder - Part*<Repository Guid="83F8FA12-F41D-4DA3-B22F-99CD5EAB28AF" Name="G" V3Name="" Type="File"/>:/Holder|CB7B1EB9-E4D6-4924-8761-2A21DE1B90DD||1
    Here's file2 which is on the P drive and I'm sure you know how to read the path to the file:
    Holder - Part*<Repository Guid="83F8FA12-F41D-4DA3-B22F-99CD5EAB28AF" Name="P" V3Name="" Type="File"/>:/LightSabre/Drawings/Holder|2EB7F88C-1B4C-47A0-B9E9-5713D3DD7B14||1

    These were captured from Regedit while Alibre was not running. At this point I've now also 'ejected' the USB drive.
    Next. Let's run Alibre.
    Of the 12 ICONs on the screen only the first is the 'Holder' The rest other other parts.
    Next, let's see what's in the Registry. First of course an F5 to refresh the registry.
    file1 has moved up to show:
    Holder - Part*<Repository Guid="83F8FA12-F41D-4DA3-B22F-99CD5EAB28AF" Name="P" V3Name="" Type="File"/>:/LightSabre/Drawings/Holder|2EB7F88C-1B4C-47A0-B9E9-5713D3DD7B14||1
    Which was file2.
    The original file1 that was on the G: USB drive is of course missing.
    And I suspect that's because Alibre couldn't find the file, since at this point with the USB drive ejected and removed, there is not G: or as your registry calls it Name="G"
    So Alibre resorts the list to no longer have this file. And of course if all the files were on the network P drive and the drive was momentarily not available when starting Alibre it will trash them all from the list.

    I disagree with that approach. The history should show my history. If you can't open the file then don't show an icon. Show the file name and mark the box as file not found. At this point there are two options. One like some of the editors if I click on it and it can't be found then you could resort the list and dispose of it. Or do like RAD Studio and just throw up a dialog box that says file name "..." not found on Drive G: That's the clue to a user that his USB drive needs to be plugged in again.

    Just for fun I moved the two Holder parts off the visible list by opening a bunch more parts, drawings and assemblies.
    Holder - Part*<Repository Guid="9DAE8632-D701-4836-9009-0D9E1D5F5DFA" Name="G" V3Name="" Type="File"/>:/Holder|CB7B1EB9-E4D6-4924-8761-2A21DE1B90DD||1
    Its now file14.

    Pulling out the USB drive and clicking the Registry refresh doesn't change the file14.
    Stopping and restarting Alibre of course doesn't show the missing file because there's only 12 on the screen. But interestingly file14 with Drive G is still there even after refreshing the registry. Since there was no need to parse past 12 files I guess there was no need to sort and remove it. Interesting. I suspect if there were several missing files in the 12 the parser would go further and also discard any files which weren't available.

    Hopefully that's enough information for you to show you where the problem lies.
    John
     
  8. Max

    Max Administrator Staff Member

    This behavior is easy to reproduce.

    Create a part - save it to your desktop. It is now in the MRU.

    Move that part (or delete it) from its location. Restart.

    It is gone.

    There is clearly a check happening regarding whether the file exists at its known location.

    It is debatable whether or not this is the correct approach.

    I do believe the right approach is not what we are currently doing - we should make a "broken link" icon happen and let it fall of the list naturally. Though if we do that, people will ask to be able to "relink it", which is reasonable but these are the kinds of things that feature creep and take time away from core stuff.

    I'll raise an enhancement request. Not sure as of this time when it would get done, but I suspect this is easy and may be fast. I'm not saying we will decide to change the behavior after further investigation, but I am saying we will look at it an make a decision after careful consideration and with the new perspective about removable media.

    Thanks for raising this issue!

    For your reference, this is AD-2543. Telling this to anyone on our team will mean something.
     
    Last edited: Mar 18, 2021
  9. jcdammeyer

    jcdammeyer Senior Member

    Well now I know that if I reboot the laptop or it crashes that I must not start Alibre until I'm sure the drives I was using are still connected. The USB example is less likely but was an easy way to physically remove drives. Your way of deleting it from a location works too.

    I'd have to power up an old WIN-XP PC running Alibre 2011 to see if the problem exists in the history files list. It probably does I suspect.

    In either case, I vote for a missing file ICON or grey'd file name or best of all the RAD Studio method that just leaves it as is. Push it down the list since that's the whole point of a recently used list. Although I don't know how the graphical icon of the file is being stored. My guess is it's stored elsewhere with one of those keys since it appears to be created only when the file is saved.

    ie. Rotate the part in Alibre so perhaps you are looking at the bottom. When you close the file the icon is still in the old orientation. So that suggests the registry and the icon are updated during a file save. Since just rotating the image of the part doesn't change it the disk save icon isn't enabled and you can't do a save. So the sequence is likely:
    if file changed then save file first, then create an icon from the current screen display and save that, then update the recently used list so that file1 now becomes this file, then save the recently used list to the registry.

    That's the way I'd do it. But I haven't done anything as fancy as saving icons. Mostly just what bit rate was a client using and what port and what other parameters depending on the application. I'd have to check. I'm not even sure if I've given my clients a list of last used files for logging or firmware updating. I think I save only the last one they reprogrammed.
     
  10. jcdammeyer

    jcdammeyer Senior Member

    Couldn't leave it alone. heh heh.
    OK. Alibre 2011 has just the standard list of 4 in last used files. Do the USB thing saving a part to the USB drive and now the list shows the original and the USB copy. Shut down Alibre, pull the drive, start up Alibre and the file is still there. This is just like Nodepad++ or MPLab from Microchip. And just like those if you then click on the file that we know is missing we get the missing file with path to it dialog. And then tragically, and incorrectly IMHO, the file is removed from the list which still has 4 items because the invisible fifth one has been moved up to take the place of the missing one. I didn't bother looking in the registry to see how long the history actually was. But at least this tells us which file is missing which could conceivably raise huge alarm bells. Hence the need to not delete from the list.
    upload_2021-3-18_21-40-41.png
     
  11. Max

    Max Administrator Staff Member

    Slap.
     
  12. jcdammeyer

    jcdammeyer Senior Member

    What can I say... I've been a long term user of Alibre. And I write software for a living. There are 750 LED light assemblies with 36 LEDs each in those Olympic Rings. Hardware and software design for it was done by me. The PC Light show software was done by the late Ian MacKay who expandedmy test code to read show sequences as XML files. Lots of times the boxes or frames for the electronics are modeled with Alibre. Those rings are 10m in diameter and 5 stories high.
     
  13. Max

    Max Administrator Staff Member

    Are you telling me you made in-production Olympic rings with AD?
     
  14. jcdammeyer

    jcdammeyer Senior Member

    That was 2009. Project go-ahead 5th Dec 2008, unveiling of 750 custom lights on the frames 5th March. Was supposed to be 5th February but they changed the venue from Lions Gate Bridge to the Airport and that meant 100 lights per ring to 750. So we had to organize another production run. I modeled the lamp bases in order to be able to fit the PC boards inside the units. Then we did the second dual ring set in Sep. 2009. Probably why this file is dated Sep09.
    upload_2021-3-18_23-10-26.png
    I also modeled the LED PC board because at that time Protel99SE couldn't produce 3D models like Altium can now.

    Another project modeled with Alibre for fitting LED lamp strips was for this:
    upload_2021-3-18_23-12-53.png

    This gives an idea of what we were trying to do at the time. I wasn't very good at working with assemblies yet. But the drawing was enough for the Mech Eng guys to design the hardware we finally went with. Ultimately we had 6 strips and a different holder. They've been running without failure for almost 12 years.

    upload_2021-3-18_23-14-29.png

    The ABS plastic holders were prototypes. You can probably see why losing the embedded AlibreCAM is a huge blow to productivity. (Just had to get that in here <WINK>)
     

    Attached Files:

    Last edited: Mar 19, 2021
    NateLiqGrav likes this.
  15. Max

    Max Administrator Staff Member

    Super cool!
     
  16. NateLiqGrav

    NateLiqGrav Alibre Super User

    I can confirm a way that a remote file isn't accessible when Alibre Design is started then it is removed from display and registry. It happens to me when I open Alibre Design without being connected to the Vault yet.
     
  17. HaroldL

    HaroldL Alibre Super User

    So why is this story not on the Customer Stories page of Alibre dot com? Sounds like there is more to be told.
     
  18. simonb65

    simonb65 Alibre Super User

    Another way with files on a remote drive (i.e. NAS, Cloud, etc) is to turn off Wifi and disconnect the LAN cable then start Alibre! See if it temporarily 'parks' the recent file or 'deletes' it. If the latter, then it will be sensitive to slow networks and drives that need time to spin up from sleep modes.
     

Share This Page