Discussion:
[Audacity-devel] Yet more in branch bug1567-simple
Paul Licameli
2017-02-01 13:00:26 UTC
Permalink
Two more commits, one just comments, the other and later is 1469045.

I don't insist on getting these into master for 2.1.3 if the benefits are
not compelling enough. I leave Gale and James to test it and review it and
decide.

This commit removes empty subfolders from any project as soon as it closes,
rather than waiting for the last one to close.

This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.

But the likelihood of that special use case may be too little to justify
taking any further risks with changes now. It may be a tolerable amount of
lingering bug 1567 symptoms.

PRL
Gale Andrews
2017-02-01 13:26:39 UTC
Permalink
Thanks, Paul. That sounds as if it would do the trick, but I won't be testing it
unless James says he wants it to be in 2.1.3.

I don't know that I would call it a special use case to have two projects open.
File > Open or File > Open Recent twice would create the same issue on a
susceptible machine.


Gale
Post by Paul Licameli
Two more commits, one just comments, the other and later is 1469045.
I don't insist on getting these into master for 2.1.3 if the benefits are
not compelling enough. I leave Gale and James to test it and review it and
decide.
This commit removes empty subfolders from any project as soon as it closes,
rather than waiting for the last one to close.
This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.
But the likelihood of that special use case may be too little to justify
taking any further risks with changes now. It may be a tolerable amount of
lingering bug 1567 symptoms.
PRL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
James Crook
2017-02-01 14:55:02 UTC
Permalink
Thanks Paul.

I got most of the way into committing and reviewing this, but found I
could not convince myself that this might not end up 'spring cleaning'
the top level directory (recursively), and so deleting every non .au and
non .auf file on disk. This was from looking in to the mytemp path
being set via auto recovery.

If this did happen, I think our users would be a little upset.

I am of course pretty confident that the code really is OK in practice,
and it would take a corrupt (or malicious) autorecovery file to make the
problem happen. What I'm looking for is code that is easier to check.

--James.
Post by Paul Licameli
Two more commits, one just comments, the other and later is 1469045.
I don't insist on getting these into master for 2.1.3 if the benefits are
not compelling enough. I leave Gale and James to test it and review it and
decide.
This commit removes empty subfolders from any project as soon as it closes,
rather than waiting for the last one to close.
This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.
But the likelihood of that special use case may be too little to justify
taking any further risks with changes now. It may be a tolerable amount of
lingering bug 1567 symptoms.
PRL
Paul Licameli
2017-02-01 17:22:00 UTC
Permalink
James, I feel certain doubts about this commit too. But it is here for
experiment as possibly removing the last symptoms of bug1567, whatever else
it does. So we can say we have researched the problem as best we can even
if not fixing every case.

I found that in practice the mytemp member variable of DirManager is in
practice set to ~/Library/Application
Support/audacity/SessionData/projectnnnnnnnnnn for some digits n. Are you
referring to that? I did not examine all the ways that member is set.

PRL
Post by James Crook
Thanks Paul.
I got most of the way into committing and reviewing this, but found I
could not convince myself that this might not end up 'spring cleaning'
the top level directory (recursively), and so deleting every non .au and
non .auf file on disk. This was from looking in to the mytemp path
being set via auto recovery.
If this did happen, I think our users would be a little upset.
I am of course pretty confident that the code really is OK in practice,
and it would take a corrupt (or malicious) autorecovery file to make the
problem happen. What I'm looking for is code that is easier to check.
--James.
Post by Paul Licameli
Two more commits, one just comments, the other and later is 1469045.
I don't insist on getting these into master for 2.1.3 if the benefits are
not compelling enough. I leave Gale and James to test it and review it
and
Post by Paul Licameli
decide.
This commit removes empty subfolders from any project as soon as it
closes,
Post by Paul Licameli
rather than waiting for the last one to close.
This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.
But the likelihood of that special use case may be too little to justify
taking any further risks with changes now. It may be a tolerable amount
of
Post by Paul Licameli
lingering bug 1567 symptoms.
PRL
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
James Crook
2017-02-01 17:38:04 UTC
Permalink
My concern is that mytemp could get set to ~/ or / or just blank.
The value of mytemp can come from an autorecovery file.

[There is also the possibility of user error in setting the temporary
directory in preferences.
IF that leads to mytemp being ~/projectnnnnnnnn then that's OK, but if
it could be ~/ then I am concerned].
Post by Paul Licameli
James, I feel certain doubts about this commit too. But it is here for
experiment as possibly removing the last symptoms of bug1567, whatever else
it does. So we can say we have researched the problem as best we can even
if not fixing every case.
I found that in practice the mytemp member variable of DirManager is in
practice set to ~/Library/Application
Support/audacity/SessionData/projectnnnnnnnnnn for some digits n. Are you
referring to that? I did not examine all the ways that member is set.
PRL
Post by James Crook
Thanks Paul.
I got most of the way into committing and reviewing this, but found I
could not convince myself that this might not end up 'spring cleaning'
the top level directory (recursively), and so deleting every non .au and
non .auf file on disk. This was from looking in to the mytemp path
being set via auto recovery.
If this did happen, I think our users would be a little upset.
I am of course pretty confident that the code really is OK in practice,
and it would take a corrupt (or malicious) autorecovery file to make the
problem happen. What I'm looking for is code that is easier to check.
--James.
Post by Paul Licameli
Two more commits, one just comments, the other and later is 1469045.
I don't insist on getting these into master for 2.1.3 if the benefits are
not compelling enough. I leave Gale and James to test it and review it
and
Post by Paul Licameli
decide.
This commit removes empty subfolders from any project as soon as it
closes,
Post by Paul Licameli
rather than waiting for the last one to close.
This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.
But the likelihood of that special use case may be too little to justify
taking any further risks with changes now. It may be a tolerable amount
of
Post by Paul Licameli
lingering bug 1567 symptoms.
PRL
Paul Licameli
2017-02-01 17:47:30 UTC
Permalink
Then the safer fix ought perhaps to seek only files named .DS_Store and
only on macOS. I wrote something too general.
PRL
Post by James Crook
My concern is that mytemp could get set to ~/ or / or just blank.
The value of mytemp can come from an autorecovery file.
[There is also the possibility of user error in setting the temporary
directory in preferences.
IF that leads to mytemp being ~/projectnnnnnnnn then that's OK, but if
it could be ~/ then I am concerned].
Post by Paul Licameli
James, I feel certain doubts about this commit too. But it is here for
experiment as possibly removing the last symptoms of bug1567, whatever
else
Post by Paul Licameli
it does. So we can say we have researched the problem as best we can
even
Post by Paul Licameli
if not fixing every case.
I found that in practice the mytemp member variable of DirManager is in
practice set to ~/Library/Application
Support/audacity/SessionData/projectnnnnnnnnnn for some digits n. Are
you
Post by Paul Licameli
referring to that? I did not examine all the ways that member is set.
PRL
Post by James Crook
Thanks Paul.
I got most of the way into committing and reviewing this, but found I
could not convince myself that this might not end up 'spring cleaning'
the top level directory (recursively), and so deleting every non .au and
non .auf file on disk. This was from looking in to the mytemp path
being set via auto recovery.
If this did happen, I think our users would be a little upset.
I am of course pretty confident that the code really is OK in practice,
and it would take a corrupt (or malicious) autorecovery file to make the
problem happen. What I'm looking for is code that is easier to check.
--James.
Post by Paul Licameli
Two more commits, one just comments, the other and later is 1469045.
I don't insist on getting these into master for 2.1.3 if the benefits
are
Post by Paul Licameli
Post by James Crook
Post by Paul Licameli
not compelling enough. I leave Gale and James to test it and review it
and
Post by Paul Licameli
decide.
This commit removes empty subfolders from any project as soon as it
closes,
Post by Paul Licameli
rather than waiting for the last one to close.
This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.
But the likelihood of that special use case may be too little to
justify
Post by Paul Licameli
Post by James Crook
Post by Paul Licameli
taking any further risks with changes now. It may be a tolerable
amount
Post by Paul Licameli
Post by James Crook
of
Post by Paul Licameli
lingering bug 1567 symptoms.
PRL
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale Andrews
2017-02-01 19:19:24 UTC
Permalink
Then the safer fix ought perhaps to seek only files named .DS_Store and only
on macOS. I wrote something too general.
Do we delete the AUTOSAVE file before emptying the project* folder
or after it? If the AUTOSAVE file is deleted first then wouldn't that
reason for an unwanted recurse should be removed.

On the face of it the fix is correct for the symptoms, even if the fix
cannot be constrained to only do want we want. The folders left
behind are redundant on Windows and Linux too but we know of
no bad effects there.
From what I see we delete the .DS_Store file successfully, but if
a new .DS_Store file is added "soon enough" (perhaps while
Gatekeeper thinks the Audacity-invoked file operations are still
ongoing? ) then 1567 can occur. If the .DS_Store file gets added
a few seconds later, 1567 doesn't seem to happen.


Gale
Post by James Crook
My concern is that mytemp could get set to ~/ or / or just blank.
The value of mytemp can come from an autorecovery file.
[There is also the possibility of user error in setting the temporary
directory in preferences.
IF that leads to mytemp being ~/projectnnnnnnnn then that's OK, but if
it could be ~/ then I am concerned].
Post by Paul Licameli
James, I feel certain doubts about this commit too. But it is here for
experiment as possibly removing the last symptoms of bug1567, whatever else
it does. So we can say we have researched the problem as best we can even
if not fixing every case.
I found that in practice the mytemp member variable of DirManager is in
practice set to ~/Library/Application
Support/audacity/SessionData/projectnnnnnnnnnn for some digits n. Are you
referring to that? I did not examine all the ways that member is set.
PRL
Post by James Crook
Thanks Paul.
I got most of the way into committing and reviewing this, but found I
could not convince myself that this might not end up 'spring cleaning'
the top level directory (recursively), and so deleting every non .au and
non .auf file on disk. This was from looking in to the mytemp path
being set via auto recovery.
If this did happen, I think our users would be a little upset.
I am of course pretty confident that the code really is OK in practice,
and it would take a corrupt (or malicious) autorecovery file to make the
problem happen. What I'm looking for is code that is easier to check.
--James.
Post by Paul Licameli
Two more commits, one just comments, the other and later is 1469045.
I don't insist on getting these into master for 2.1.3 if the benefits are
not compelling enough. I leave Gale and James to test it and review it
and
Post by Paul Licameli
decide.
This commit removes empty subfolders from any project as soon as it
closes,
Post by Paul Licameli
rather than waiting for the last one to close.
This may be the fix for the remaining symptoms of bug 1567, those that
happen in case you record or generate sound in two untitled Audacity
projects, and then close one of them.
But the likelihood of that special use case may be too little to justify
taking any further risks with changes now. It may be a tolerable amount
of
Post by Paul Licameli
lingering bug 1567 symptoms.
PRL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Loading...