Discussion:
[Audacity-devel] Commit 07090e691b4e (James) makes compiler warning on Mac
Paul Licameli
2016-08-12 16:07:50 UTC
Permalink
The line is

defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),

tmpDirLoc.c_str());


The warning is


Unknown escape sequence '\ '


I am not sure whether the correct thing requires removing the \ or adding
another \ .


PRL
James Crook
2016-08-12 16:46:54 UTC
Permalink
I think it is just a typo and there should not be a '\' at all. Space
is a valid character.
--James.
Post by Paul Licameli
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale Andrews
2016-08-12 21:53:40 UTC
Permalink
It's not a typo. The backslash was necessary for the Mac to
create the correct temp dir:
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10

i.e. enclosing in double quotes does not work.

Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.

If we change it, that would reopen the P1 until retested, of
course.


Gale
I think it is just a typo and there should not be a '\' at all. Space is a
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Cliff Scott
2016-08-12 22:32:44 UTC
Permalink
Gale,

What version of OSx are you running? I ask, because I had an issue lately where I needed to enclose a path in single quotes to handle spaces. Maybe that was a special case as it was being passed to a script. I don’t know enough about it to be sure if that made a difference or not. I’m running 10.11.6 now.

Cliff
Post by Gale Andrews
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
I think it is just a typo and there should not be a '\' at all. Space is a
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Cliff Scott
2016-08-12 22:34:10 UTC
Permalink
Gale,

Sorry, that was double quotes I used, not single.

Cliff
Post by Gale Andrews
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
I think it is just a typo and there should not be a '\' at all. Space is a
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale Andrews
2016-08-13 00:02:37 UTC
Permalink
Cliff,

I'm on OS X 10.11.6 like you. Unless I was doing something
wrong. I needed to escape the space with backslash to make
the path work in a bash script - I know double quotes won't
work but I could not make single quotes work either.


Gale
Post by Cliff Scott
Gale,
Sorry, that was double quotes I used, not single.
Cliff
Post by Gale Andrews
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
I think it is just a typo and there should not be a '\' at all. Space is a
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Paul Licameli
2016-08-13 00:56:21 UTC
Permalink
If the backslash is necessary, it might be correct to double the backslash
character inside the quoted string in C++ source code, to get the correct
effect, and remove the compilation warning about something questionable.

PRL
Post by Gale Andrews
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
Post by James Crook
I think it is just a typo and there should not be a '\' at all. Space
is a
Post by James Crook
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------
------------------
Post by James Crook
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
Post by James Crook
patterns at an interface-level. Reveals which users, apps, and protocols
are
Post by James Crook
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Post by James Crook
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
Post by James Crook
patterns at an interface-level. Reveals which users, apps, and protocols
are
Post by James Crook
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Cliff Scott
2016-08-13 01:36:28 UTC
Permalink
FWIW, when I compiled the other evening, Xcode gave a whole bunch of “issues” that didn’t stop the compile and apparently the code works, but there were 163 “issues”.

portsmf - 45
libnyquist - 18
libsndfile - 6
portmixer - 15
portaudio - 49
libid3tag - 11
Audacity - 15
twosome - 2
libscorealign - 1
libmad - 1

I know that most of these modules are not written by anyone associated with Audacity, but even Audacity itself had 15.

My question is - how do you determine which ones have to be “fixed” and which ones let go?

Cliff
If the backslash is necessary, it might be correct to double the backslash character inside the quoted string in C++ source code, to get the correct effect, and remove the compilation warning about something questionable.
PRL
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10 <http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10>
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
I think it is just a typo and there should not be a '\' at all. Space is a
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev <http://sdm.link/zohodev2dev>
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel <https://lists.sourceforge.net/lists/listinfo/audacity-devel>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev <http://sdm.link/zohodev2dev>
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel <https://lists.sourceforge.net/lists/listinfo/audacity-devel>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev <http://sdm.link/zohodev2dev>
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel <https://lists.sourceforge.net/lists/listinfo/audacity-devel>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
James Crook
2016-08-13 09:16:56 UTC
Permalink
I haven't looked at this further, but I would have expected that '\ ',
is treated as ' ' in a string in source code, and so that after the
printf the state of variables is exactly the same whether we use:

defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());

or

defaultTempDir.Printf(wxT("%s/Library/Application
Support/audacity/SessionData"),
tmpDirLoc.c_str());


Once we are using that string in wxFile / wxDir functions, we should not
need to escape spaces. These functions should use the string they are
given verbatim. We should only need some kind of escaping if passing
the string to a command line of some kind, where space is used to
separate arguments - e.g. when we are calling FFMpeg or LAME. In such
cases we should do any escaping at the time we pass the strings to that
command line and for that specific use. Theoretically the string we
pass could have other spaces in it too or other characters that need
escaping.

We shouldn't need to escape a string to add it to our config either.
wxWidgets should do that escaping, if it is needed, with our config read
and writes.

--James.
Post by Paul Licameli
If the backslash is necessary, it might be correct to double the backslash
character inside the quoted string in C++ source code, to get the correct
effect, and remove the compilation warning about something questionable.
PRL
Post by Gale Andrews
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
Post by James Crook
I think it is just a typo and there should not be a '\' at all. Space
is a
Post by James Crook
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
Gale Andrews
2016-08-13 17:21:52 UTC
Permalink
Short version. On my machine, the doubled backslash makes Audacity
not find anyqwhere to store temp files, in the absence of audacity.cfg.

With no backslashes, the same problem mostly but not always happens,
so I am seeing some moonphase behaviour.

With AudacityApp.cpp as it is now in HEAD (one backslash) I don't seem
to have a problem.
Post by Paul Licameli
If the backslash is necessary, it might be correct to double the backslash
character inside the quoted string in C++ source code, to get the correct
effect, and remove the compilation warning about something questionable.
If I double the backslash, the warning is removed but with no audacity.cfg
present, Audacity reliably says on launch that it can't find anywhere to
store temporary files.

If I just have a space between "Application" and "Support" and launch
Audacity built with Xcode IDE from the DerivedData folder, no audacity.cfg
present, there seems no problem. I tried four times.

If instead I build with xcodebuild so as to package and install Audacity,
still with the space between "Application" and "Support", then launch
Audacity with no audacity.cfg present from the tmp directory where the
install goes, then (almost always) Audacity says it cannot find
anywhere to store temp files. This was why I thought the escape was
necessary but I only tried it twice when I originally made that assumption.

Audacity did launch on try 9 out of 10 with the correct directory listed
in Directories Preferences.

I also tried replacing Audacity.app in tmp with the Audacity.app
from DerivedData. Audacity launched two times in five.

If instead I delete the entire
"/Users/gale/Library/Application Support/audacity" folder, then
(mostly) Audacity launches, but not always.

When I delete that entire folder and Audacity says it cannot find
anywhere for temp files, sometimes it actually creates
/Users/gale/Library/Application Support/audacity/SessionData
with a lockfile.

All I can say for sure is that with the escaped version, I have
not yet had a launch problem.

I suggest someone else tries it, building release configuration.
Perhaps unescaped space does work but some other Widgets
bug is being provoked by it?

Are there other easily testable cases where wxMac is already
asked to handle a space in a path?



Gale
Post by Paul Licameli
PRL
Post by Gale Andrews
It's not a typo. The backslash was necessary for the Mac to
http://bugzilla.audacityteam.org/show_bug.cgi?id=1220#c10
i.e. enclosing in double quotes does not work.
Single quotes - another method on Mac of quoting a name
with spaces - does not work in bash scripts on my Mac, but
I haven't tried single quotes inside double quotes or your
suggested double backslash for what we want to do.
If we change it, that would reopen the P1 until retested, of
course.
Gale
I think it is just a typo and there should not be a '\' at all. Space is a
valid character.
--James.
The line is
defaultTempDir.Printf(wxT("%s/Library/Application\
Support/audacity/SessionData"),
tmpDirLoc.c_str());
The warning is
Unknown escape sequence '\ '
I am not sure whether the correct thing requires removing the \ or adding
another \ .
PRL
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Loading...