Skip to content

Open Example, Close, Open again - appears to open copy in %temp% directory #1089

Closed
@KurtE

Description

@KurtE

Describe the problem

With the new nightly builds, it looks, like the code that remembers what sketch window that was last closed and tries to reopen it when you restart, it then looks like it reopens the example sketch, which is good.

However what it appears to remember is the directory within your temp directory

Now suppose in between the time you closed the Arduino IDE and reopened the IDE, your folder within temp is no longer there.
Could be you run a disk cleanup, or maybe your rebooted and your temp is on a Ram drive or ...

Now your Arduino IDE comes up in a strange state, something like:
image

Note: it does not show the example sketch. Also in this case I had open the Sketchbook pane and it showed empty, but Files->Sketchbook does not show empty.

To reproduce

Open an example Sketch. In this case I opened MTP_Teensy->SD_MTP_debug but I don't think that maters.

Close the sketch: Ignore the error message (say no) about Save/Don't Save #1026

Clear out some of the folders within %temp% - like .arduinoIDE-unsaved*

Reopen the Arduino IDE

Expected behavior

I would expect that it would reopen the example sketch. Not the copy within the temp directory.

And/Or - would detect that the folder was not found and maybe inform the user of it and recover. Could either again go to the Example Sketch, Could bring up empty sketch or ???

Again would be easier for user to recover from this if the hiccup if like IDE 1.x you update the Recent sketch list, to
include the examples: #935

Arduino IDE version

Daily build: 20220621

Operating system

Windows

Operating system version

Windows 10

Additional context

Note: This is sort of a follow on and extension of my recent comments in #39

In particular, have the example open, go away for a couple of hours with the sketch open.
Have something like Norton running in background, which cleans up files. Now it clears out the files within the
.arduino... file in temp as the folder is in use so it can not delete it...

You then come back to an empty IDE (no file shown) and cryptic message
image
Full image of window in 39...

You then close the window and reopen and end up with similar to window I show in this issue, except it knows that it could not open the sketch...
image

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions