[Bug 475811] Re: F-spot crashes when i start It.

2009-11-25 Thread knarf
I notice there is a colon in that filename. Unix has no problems with
that but Windows does. Maybe mono does as well? That would be a bug by
the way...

-- 
F-spot crashes when i start It.
https://bugs.launchpad.net/bugs/475811
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 475811] Re: F-spot crashes when i start It.

2009-11-25 Thread knarf
It does seem to be the colon in the filename which causes the crash. I
ran a photos.db through an instrumentd f-spot with the following result:

...
...
AppendValues ( Gtk.TreeIter, 2003%20Kitchen%20Before) 
AppendValues ( Gtk.TreeIter, Michigan) 
AppendValues ( Gtk.TreeIter, Volume%202) 
AppendValues ( Gtk.TreeIter, Volume%203) 
AppendValues ( Gtk.TreeIter, 2005-02-12--14:13:46) 
[Warn  00:53:34.914] Caught an exception - URI scheme must start with a letter 
and must consist of one of alphabet, digits, '+', '-' or '.' character. (in 
`System')

Notice that as soon as a name with a colon in it shows up f-spot børks.
A look at mcs/class/System/System/Uri.cs (part of Mono) shows what
happens: as soon as there is a colon in a string and that colon is not
at position 0 (which is always an error) or position 1 (which is
interpreted as following an MS-DOS/Windows drive letter) the part of the
string before the colon is interpreted as an URI scheme (eg http, file,
ftp, etc.). This will naturally lead to an error as (in the above
example) ' 2005-02-12--14' is not a valid scheme.

The solution is for f-spot to %-encode colons in the string before it
gets handled by any of Mono's URI-handling functions. It does this for
spaces (-%20) but not for colons (-%3A). This should be changed...


This are the salient bits from Uri.cs:

pos = uriString.IndexOf (':');
if (pos == 0) {
return Invalid URI: The format of the URI 
could not be determined.;
} else if (pos  0) {
// It must be Unix file path or Windows UNC
if (uriString [0] == '/'  
Path.DirectorySeparatorChar == '/'){
ParseAsUnixAbsoluteFilePath (uriString);
if (kind == UriKind.Relative)
isAbsoluteUri = false;

} else if (uriString.Length = 2  uriString 
[0] == '\\'  uriString [1] == '\\')
ParseAsWindowsUNC (uriString);
else {
/* Relative path */
isAbsoluteUri = false;
path = uriString;
}
return null;
} else if (pos == 1) {
if (!IsAlpha (uriString [0]))
return URI scheme must start with a 
letter.;
// This means 'a:' == windows full path.
string msg = ParseAsWindowsAbsoluteFilePath 
(uriString);
if (msg != null)
return msg;
return null;
}

// scheme
scheme = uriString.Substring (0, pos).ToLower 
(CultureInfo.InvariantCulture);

// Check scheme name characters as specified in RFC2396.
// Note: different checks in 1.x and 2.0
if (!CheckSchemeName (scheme))
return Locale.GetText (URI scheme must start 
with a letter and must consist of one of alphabet, digits, '+', '-' or '.' 
character.);

-- 
F-spot crashes when i start It.
https://bugs.launchpad.net/bugs/475811
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 475811] Re: F-spot crashes when i start It.

2009-11-05 Thread dlaszlo

** Attachment added: F-Spot.png
   http://launchpadlibrarian.net/35191148/F-Spot.png

-- 
F-spot crashes when i start It.
https://bugs.launchpad.net/bugs/475811
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 475811] Re: F-spot crashes when i start It.

2009-11-05 Thread dlaszlo
I put System.Console.WriteLine to PhotoStore.GetAllVersions method to
check parameters of Uri constructor, and I get this:

.
.
base_uri = file:///home/zita/Képek/2009/07/31/
filename = 
DSCF8355%20(M%C3%B3dos%C3%ADtva%20ekkor:%20gThumb%20k%C3%A9pmegjelen%C3%ADt%C5%91).JPG
[Warn  21:55:14.014] Caught an exception - URI scheme must start with a letter 
and must consist of one of alphabet, digits, '+', '-' or '.' character. (in 
`System')
.
.

-- 
F-spot crashes when i start It.
https://bugs.launchpad.net/bugs/475811
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs