You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dean Veros <dv...@cmacommunities.com> on 2015/06/10 02:26:04 UTC
Assertion Failure dialogs appear when attempting to open repository
with bad URL
Windows 7 - 64-bit Tortoise SVN 1.7.11.23600
Multiple assertion message dialogs are displayed when the repository URL is incorrectly formatted. Last attempt generated 8 dialogs (appearing after "OK" is clicked)
Badly formatted URL: "file:///c:Software/SourceCodeRepository"
---------------------------
Subversion Exception!
---------------------------
Subversion encountered a serious problem.
Please take the time to report this on the Subversion mailing list
with as much information as possible about what
you were trying to do.
But please first search the mailing list archives for the error message
to avoid reporting the same problem repeatedly.
You can find the mailing list archives at
http://subversion.apache.org/mailing-lists.html
Subversion reported the following
(you can copy the content of this dialog
to the clipboard using Ctrl-C):
In file
'D:\Development\SVN\Releases\TortoiseSVN-1.7.11\ext\subversion\subversion\libsvn_subr\dirent_uri.c'
line 2313: assertion failed (svn_uri_is_canonical(url, pool))
---------------------------
OK
---------------------------
Re: Assertion Failure dialogs appear when attempting to open repository with bad URL
Posted by Bert Huijben <be...@qqmail.nl>.
What do you expect the api to canonicalize things like “h” or "” to?
We can’t make everything a valid url… That is simply impossible. You need to pass something that at least looks like a url. The canonicalize api just forcesany urls that point to the same location to use the same canonical format. It can’t fix all user errors.
If a user passes junk to an api, it can expect junk.
In all these cases the api user can see that we will error on it by calling the is canonical api itself. Catching these problems belongs in a different layer than the canonicalize function that can’t even return an error message.
Note that in general changes to the url and dirent canonicalize rules require a working copy format bump, so there is not that much that can change there, unless we are certain all existing values remain valid… And this specific value is valid on platforms where ‘:’ is valid in local paths.
Bert
Sent from Surface
From: 'Stefan Kueng'
Sent: Wednesday, June 10, 2015 10:22 PM
To: Bert Huijben, dev@subversion.apache.org
On 10.06.2015 21:04, Bert Huijben wrote:
> I don’t think we can really fix that url in the api by canonicalizing it
> to something completely different/unrelated, but the assertion makes it
> obvious that the caller can just see/check that the url is not going to
> work… just like values such as the empty string or strings with no
> scheme, that can't be canonicalized to a url either.
Such a behavior might be ok for a command line client.
But as you can see from the original report, other clients either need
proper error messages or a canonicalize API that does what its name says
it does.
As it is now, the svn_uri_is_canonical() and the
svn_dirent_canonicalize()/svn_uri_canonicalize() don't really match.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net
Re: Assertion Failure dialogs appear when attempting to open repository
with bad URL
Posted by Stefan Kueng <to...@gmail.com>.
On 10.06.2015 21:04, Bert Huijben wrote:
> I don’t think we can really fix that url in the api by canonicalizing it
> to something completely different/unrelated, but the assertion makes it
> obvious that the caller can just see/check that the url is not going to
> work… just like values such as the empty string or strings with no
> scheme, that can't be canonicalized to a url either.
Such a behavior might be ok for a command line client.
But as you can see from the original report, other clients either need
proper error messages or a canonicalize API that does what its name says
it does.
As it is now, the svn_uri_is_canonical() and the
svn_dirent_canonicalize()/svn_uri_canonicalize() don't really match.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net
Re: Assertion Failure dialogs appear when attempting to open repository with bad URL
Posted by Bert Huijben <be...@qqmail.nl>.
I don’t think we can really fix that url in the api by canonicalizing it to something completely different/unrelated, but the assertion makes it obvious that the caller can just see/check that the url is not going to work… just like values such as the empty string or strings with no scheme, that can't be canonicalized to a url either.
Bert
From: 'Stefan Kueng'
Sent: Wednesday, June 10, 2015 7:34 PM
To: dev@subversion.apache.org
On 10.06.2015 19:06, Bert Huijben wrote:
> Hi Dean,
>
> There is not much we can do about this. The Subversion apis require that
> you pass canonical urls, while the client (TortoiseSVN) that you use
> doesn’t canonicalize the url before passing it to this api.
And that's what the svn_dirent_canonicalize() and svn_uri_canonicalize()
APIs are for.
Problem is: in that case they don't work:
$ svn list file:///c:Software/SourceCodeRepository
try that with an svn build from the 1.9.x branch and you'll get an
exception.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net
Re: Assertion Failure dialogs appear when attempting to open repository
with bad URL
Posted by Branko Čibej <br...@wandisco.com>.
On 11.06.2015 12:56, Daniel Shahaf wrote:
> Branko Čibej wrote on Thu, Jun 11, 2015 at 09:01:01 +0200:
>> On 10.06.2015 19:34, Stefan Kueng wrote:
>>>
>>> On 10.06.2015 19:06, Bert Huijben wrote:
>>>> Hi Dean,
>>>>
>>>> There is not much we can do about this. The Subversion apis require that
>>>> you pass canonical urls, while the client (TortoiseSVN) that you use
>>>> doesn’t canonicalize the url before passing it to this api.
>>> And that's what the svn_dirent_canonicalize() and
>>> svn_uri_canonicalize() APIs are for.
>>> Problem is: in that case they don't work:
>>>
>>> $ svn list file:///c:Software/SourceCodeRepository
>>>
>>> try that with an svn build from the 1.9.x branch and you'll get an
>>> exception.
>> I think we can all agree that crashing in a function like that is a bad
>> idea, but there's not much we can do here. API users should check their
>> input for validity.
> So every call to svn_uri_canonicalize() should be followed by an "if
> svn_uri_is_canonical()" test?
>
> At the very least, that should be documented.
>
> I'd consider having the function promise that the return value either
> passes _is_canonical() or is equal to NULL.
I was thinking about that but I believe we can't begin returning NULL
from that function. We'd have to revise the API.
-- Brane
Re: Assertion Failure dialogs appear when attempting to open
repository with bad URL
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Branko Čibej wrote on Thu, Jun 11, 2015 at 09:01:01 +0200:
> On 10.06.2015 19:34, Stefan Kueng wrote:
> >
> >
> > On 10.06.2015 19:06, Bert Huijben wrote:
> >> Hi Dean,
> >>
> >> There is not much we can do about this. The Subversion apis require that
> >> you pass canonical urls, while the client (TortoiseSVN) that you use
> >> doesn’t canonicalize the url before passing it to this api.
> >
> > And that's what the svn_dirent_canonicalize() and
> > svn_uri_canonicalize() APIs are for.
> > Problem is: in that case they don't work:
> >
> > $ svn list file:///c:Software/SourceCodeRepository
> >
> > try that with an svn build from the 1.9.x branch and you'll get an
> > exception.
>
> I think we can all agree that crashing in a function like that is a bad
> idea, but there's not much we can do here. API users should check their
> input for validity.
So every call to svn_uri_canonicalize() should be followed by an "if
svn_uri_is_canonical()" test?
At the very least, that should be documented.
I'd consider having the function promise that the return value either
passes _is_canonical() or is equal to NULL.
Re: Assertion Failure dialogs appear when attempting to open repository
with bad URL
Posted by Branko Čibej <br...@wandisco.com>.
On 10.06.2015 19:34, Stefan Kueng wrote:
>
>
> On 10.06.2015 19:06, Bert Huijben wrote:
>> Hi Dean,
>>
>> There is not much we can do about this. The Subversion apis require that
>> you pass canonical urls, while the client (TortoiseSVN) that you use
>> doesn’t canonicalize the url before passing it to this api.
>
> And that's what the svn_dirent_canonicalize() and
> svn_uri_canonicalize() APIs are for.
> Problem is: in that case they don't work:
>
> $ svn list file:///c:Software/SourceCodeRepository
>
> try that with an svn build from the 1.9.x branch and you'll get an
> exception.
I think we can all agree that crashing in a function like that is a bad
idea, but there's not much we can do here. API users should check their
input for validity.
But there's a deeper philosophical problem here:
c:Software/SourceCodeRepository
is actually a valid path on Windows; however it's neither an absolute
nor a relative path but that hybrid mutant called a "device-relative
path". In other words, it might or might not work, depending on context.
Technically we /can/ construct an absolute path but the result will
change depending on OS context that we have no control over.
-- Brane
Re: Assertion Failure dialogs appear when attempting to open repository
with bad URL
Posted by Stefan Kueng <to...@gmail.com>.
On 10.06.2015 19:06, Bert Huijben wrote:
> Hi Dean,
>
> There is not much we can do about this. The Subversion apis require that
> you pass canonical urls, while the client (TortoiseSVN) that you use
> doesn’t canonicalize the url before passing it to this api.
And that's what the svn_dirent_canonicalize() and svn_uri_canonicalize()
APIs are for.
Problem is: in that case they don't work:
$ svn list file:///c:Software/SourceCodeRepository
try that with an svn build from the 1.9.x branch and you'll get an
exception.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net
RE: Assertion Failure dialogs appear when attempting to open repository with bad URL
Posted by Bert Huijben <be...@qqmail.nl>.
Hi Dean,
There is not much we can do about this. The Subversion apis require that you pass canonical urls, while the client (TortoiseSVN) that you use doesn’t canonicalize the url before passing it to this api.
As the TortoiseSVN client is built by a different opensource project than Subversion, we can’t really help you… you should really contact the TortoiseSVN team if you want a solution… They should filter the url and provide a proper error instead of passing it to the api.
You already know that the url is bad, so we can’t help you there. file:/// <file:///\\> urls require an absolute or at least rooted local path, which in this case isn’t provided.
Bert
From: Dean Veros [mailto:dveros@cmacommunities.com]
Sent: woensdag 10 juni 2015 18:19
To: dev@subversion.apache.org
Cc: Andreas Stieger
Subject: RE: Assertion Failure dialogs appear when attempting to open repository with bad URL
Upgraded & tested with same bad URL ... same result - although assertion error now occurs on a different line.
Badly formatted URL: "file:///c:Software/SourceCodeRepository <file:///c:Software\SourceCodeRepository> "
---------------------------
Subversion Exception!
---------------------------
Subversion encountered a serious problem.
Please take the time to report this on the Subversion mailing list
with as much information as possible about what
you were trying to do.
But please first search the mailing list archives for the error message
to avoid reporting the same problem repeatedly.
You can find the mailing list archives at
http://subversion.apache.org/mailing-lists.html
Subversion reported the following
(you can copy the content of this dialog
to the clipboard using Ctrl-C):
In file
'D:\Development\SVN\Releases\TortoiseSVN-1.8.10\ext\subversion\subversion\libsvn_subr\dirent_uri.c'
line 2307: assertion failed (svn_uri_is_canonical(url, pool))
---------------------------
OK
---------------------------
From: Andreas Stieger [mailto:Andreas.Stieger@gmx.de]
Sent: Wednesday, June 10, 2015 3:13 AM
To: Dean Veros
Cc: dev@subversion.apache.org <ma...@subversion.apache.org>
Subject: Aw: Assertion Failure dialogs appear when attempting to open repository with bad URL
Please upgrade to the compatible ToroiseSVN 1.7.15 (containing 1.7.18) and try again.
https://sourceforge.net/projects/tortoisesvn/files/1.7.15/
Gesendet: Mittwoch, 10. Juni 2015 um 02:26 Uhr
Von: "Dean Veros" <dveros@cmacommunities.com <ma...@cmacommunities.com> >
An: "dev@subversion.apache.org <ma...@subversion.apache.org> " <dev@subversion.apache.org <ma...@subversion.apache.org> >
Betreff: Assertion Failure dialogs appear when attempting to open repository with bad URL
Windows 7 - 64-bit Tortoise SVN 1.7.11.23600
Multiple assertion message dialogs are displayed when the repository URL is incorrectly formatted. Last attempt generated 8 dialogs (appearing after "OK" is clicked)
Badly formatted URL: "file:///c:Software/SourceCodeRepository <file:///c:Software\SourceCodeRepository> "
---------------------------
Subversion Exception!
---------------------------
Subversion encountered a serious problem.
Please take the time to report this on the Subversion mailing list
with as much information as possible about what
you were trying to do.
But please first search the mailing list archives for the error message
to avoid reporting the same problem repeatedly.
You can find the mailing list archives at
http://subversion.apache.org/mailing-lists.html
Subversion reported the following
(you can copy the content of this dialog
to the clipboard using Ctrl-C):
In file
'D:\Development\SVN\Releases\TortoiseSVN-1.7.11\ext\subversion\subversion\libsvn_subr\dirent_uri.c'
line 2313: assertion failed (svn_uri_is_canonical(url, pool))
---------------------------
OK
---------------------------
RE: Assertion Failure dialogs appear when attempting to open
repository with bad URL
Posted by Dean Veros <dv...@cmacommunities.com>.
Upgraded & tested with same bad URL ... same result - although assertion error now occurs on a different line.
Badly formatted URL: "file:///c:Software/SourceCodeRepository<file:///c:Software\SourceCodeRepository>"
---------------------------
Subversion Exception!
---------------------------
Subversion encountered a serious problem.
Please take the time to report this on the Subversion mailing list
with as much information as possible about what
you were trying to do.
But please first search the mailing list archives for the error message
to avoid reporting the same problem repeatedly.
You can find the mailing list archives at
http://subversion.apache.org/mailing-lists.html
Subversion reported the following
(you can copy the content of this dialog
to the clipboard using Ctrl-C):
In file
'D:\Development\SVN\Releases\TortoiseSVN-1.8.10\ext\subversion\subversion\libsvn_subr\dirent_uri.c'
line 2307: assertion failed (svn_uri_is_canonical(url, pool))
---------------------------
OK
---------------------------
From: Andreas Stieger [mailto:Andreas.Stieger@gmx.de]
Sent: Wednesday, June 10, 2015 3:13 AM
To: Dean Veros
Cc: dev@subversion.apache.org
Subject: Aw: Assertion Failure dialogs appear when attempting to open repository with bad URL
Please upgrade to the compatible ToroiseSVN 1.7.15 (containing 1.7.18) and try again.
https://sourceforge.net/projects/tortoisesvn/files/1.7.15/
Gesendet: Mittwoch, 10. Juni 2015 um 02:26 Uhr
Von: "Dean Veros" <dv...@cmacommunities.com>>
An: "dev@subversion.apache.org<ma...@subversion.apache.org>" <de...@subversion.apache.org>>
Betreff: Assertion Failure dialogs appear when attempting to open repository with bad URL
Windows 7 - 64-bit Tortoise SVN 1.7.11.23600
Multiple assertion message dialogs are displayed when the repository URL is incorrectly formatted. Last attempt generated 8 dialogs (appearing after "OK" is clicked)
Badly formatted URL: "file:///c:Software/SourceCodeRepository<file:///c:Software\SourceCodeRepository>"
---------------------------
Subversion Exception!
---------------------------
Subversion encountered a serious problem.
Please take the time to report this on the Subversion mailing list
with as much information as possible about what
you were trying to do.
But please first search the mailing list archives for the error message
to avoid reporting the same problem repeatedly.
You can find the mailing list archives at
http://subversion.apache.org/mailing-lists.html
Subversion reported the following
(you can copy the content of this dialog
to the clipboard using Ctrl-C):
In file
'D:\Development\SVN\Releases\TortoiseSVN-1.7.11\ext\subversion\subversion\libsvn_subr\dirent_uri.c'
line 2313: assertion failed (svn_uri_is_canonical(url, pool))
---------------------------
OK
---------------------------