After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 170862 - beagle fails my filenaming stress test
beagle fails my filenaming stress test
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2005-03-19 01:34 UTC by Daniel Drake
Modified: 2005-03-19 04:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nametest.pl (157 bytes, text/plain)
2005-03-19 01:35 UTC, Daniel Drake
  Details
Solution (2.06 KB, patch)
2005-03-19 03:22 UTC, Daniel Drake
none Details | Review
Update (3.53 KB, patch)
2005-03-19 04:01 UTC, Daniel Drake
none Details | Review
Update (3.55 KB, patch)
2005-03-19 04:12 UTC, Daniel Drake
none Details | Review

Description Daniel Drake 2005-03-19 01:34:58 UTC
I hacked together a quick perl script to create files with a variety of
characters included. Unfortunately, beagle fails.
Comment 1 Daniel Drake 2005-03-19 01:35:21 UTC
Created attachment 38929 [details]
nametest.pl
Comment 2 Daniel Drake 2005-03-19 01:36:56 UTC
First failure is this one:

DEBUG: Starting task file:///home/dsd/beagle-index/nametest/ab
DEBUG: Requesting new proxy 'FileSystemIndex'
DEBUG: Waiting for proxy 'FileSystemIndex'
DEBUG: Waiting code=0

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Xml.XmlException:
Referenced character was not allowed in XML. Normalization is True,
checkCharacters = True  Line 2, position 269.
in [0x0019f] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1614)
System.Xml.XmlTextReader:ReadCharacterReference ()
in [0x001bd] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1805)
System.Xml.XmlTextReader:ReadAttributeValueTokens (int)
in [0x00095] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1667)
System.Xml.XmlTextReader:ReadAttributes (bool)
in [0x0008d] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1252)
System.Xml.XmlTextReader:ReadStartTag ()
in [0x00134] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1180)
System.Xml.XmlTextReader:ReadContent ()
in [0x000ef] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlTextReader.cs:560)
System.Xml.XmlTextReader:Read ()
in [0x0002c] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml/XmlReader.cs:503)
System.Xml.XmlReader:MoveToContent ()
in [0x00006] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs:83)
System.Xml.Serialization.XmlSerializationReaderInterpreter:ReadRoot ()
in [0x00022] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs:322)
System.Xml.Serialization.XmlSerializer:Deserialize
(System.Xml.Serialization.XmlSerializationReader)
in [0x0002e] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs:311)
System.Xml.Serialization.XmlSerializer:Deserialize (System.Xml.XmlReader)
in [0x00010] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs:299)
System.Xml.Serialization.XmlSerializer:Deserialize (System.IO.TextReader)
in [0x00067] (at
/home/dsd/projects/ximian/beagle/beagled/FilteredIndexable.cs:86)
Beagle.Daemon.FilteredIndexable:NewFromEitherXml (string)
in [0x0000c] (at
/home/dsd/projects/ximian/beagle/beagled/IndexHelper/RemoteIndexerImpl.cs:340)
Beagle.IndexHelper.RemoteIndexerImpl:Add (string)
in (unmanaged) 0x80b4e2f
in <0x00004> (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])
in [0x00033] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/corlib/System.Reflection/MonoMethod.cs:121)
System.Reflection.MonoMethod:Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
--- End of inner exception stack trace ---

in [0x00052] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/corlib/System.Reflection/MonoMethod.cs:125)
System.Reflection.MonoMethod:Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
in [0x00006] (at
/var/tmp/portage/mono-1.1.4/work/mono-1.1.4/mcs/class/corlib/System.Reflection/MethodBase.cs:80)
System.Reflection.MethodBase:Invoke (object,object[])
in [0x0005f] (at
/var/tmp/portage/dbus-0.23.2-r1/work/dbus-0.23.2/mono/Handler.cs:187)
DBus.Handler:HandleMethod (DBus.MethodCall)
in [0x0003d] (at
/var/tmp/portage/dbus-0.23.2-r1/work/dbus-0.23.2/mono/Handler.cs:166)
DBus.Handler:Message_Called (intptr,intptr,intptr)
in <0x0003d> (wrapper native-to-managed) DBus.Handler:Message_Called
(intptr,intptr,intptr)
in (unmanaged) 0x45317c15
in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main ()
in <0x00007> Gtk.Application:Run ()
in [0x00139] (at
/home/dsd/projects/ximian/beagle/beagled/IndexHelper/IndexHelper.cs:106)
Beagle.IndexHelper.IndexHelperTool:Main (string[])

This causes beagled to crash soon after.

Joe filed this upstream but it is a WONTFIX case
http://bugzilla.ximian.com/show_bug.cgi?id=72739
So ideally we want to work around it inside beagle.
Comment 3 Daniel Drake 2005-03-19 03:22:52 UTC
Created attachment 38930 [details] [review]
Solution

Encode all 'odd' characters in the normal uri-escape type way for
serialization, and convert them back after.
Comment 4 Daniel Drake 2005-03-19 04:01:40 UTC
Created attachment 38931 [details] [review]
Update

Uri.HexUnescape is buggy, doesn't work with most unicode characters. Ripped the
fixed version from Mono SVN.
Comment 5 Daniel Drake 2005-03-19 04:12:48 UTC
Created attachment 38932 [details] [review]
Update

Can't escape characters >255
Comment 6 Daniel Drake 2005-03-19 04:38:02 UTC
In CVS