#27 Crash on invalid .gpx file

open
nobody
GPX Import (4)
5
2012-10-15
2011-06-06
Philipp Hahn
No

I had a broken .gpx file in the import directory (one opening tag too much), on which OCM crashed:

Marshaling activate signal
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Xml.XmlException: 'wpt' is expected Line 391, position 4.
at Mono.Xml2.XmlTextReader.Expect (System.String expected) [0x00000] in <filename unknown="">:0
at Mono.Xml2.XmlTextReader.ReadEndTag () [0x00000] in <filename unknown="">:0
at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown="">:0
at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown="">:0
at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown="">:0
at ocmengine.GPXParser.parseTotal (System.IO.FileStream fs) [0x00000] in <filename unknown="">:0
at ocmgtk.ProgressDialog.BuildFileList (System.String dirPath, System.Collections.Generic.List`1 fileList) [0x00000] in <filename unknown="">:0
at ocmgtk.ProgressDialog.StartMulti (System.String directoryPath, ocmengine.CacheStore store, Boolean deleteOnCompletion) [0x00000] in <filename unknown="">:0
at ocmgtk.UIMonitor.ImportDirectory (System.String path, Boolean delete, Boolean autoClose) [0x00000] in <filename unknown="">:0
at ocmgtk.UIMonitor.ImportDirectory () [0x00000] in <filename unknown="">:0
at MainWindow.OnImportDirClicked (System.Object o, System.EventArgs args) [0x00000] in <filename unknown="">:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown="">:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown="">:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown="">:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown="">:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown="">:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown="">:0
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown="">:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown="">:0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown="">:0
at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at ocmgtk.MainClass.Main(System.String[] args)

Open Cache Manager 0.23.14

xmllint --noout *.gpx
GC1DRM5.gpx:391: parser error : Opening and ending tag mismatch: wpt line 12 and gpx
</gpx>
^
GC1DRM5.gpx:392: parser error : Premature end of data in tag gpx line 2

^

Discussion

  • kmcamp_ott
    kmcamp_ott
    2011-06-07

    I'll definitely fix the crash in the 1.0 builds so that you'll get a proper error message.

     
  • UZKS2i ltbynrouipaz, [url=http://vriudbgxzznp.com/]vriudbgxzznp[/url], [link=http://ehwxnwuyycdn.com/]ehwxnwuyycdn[/link], http://xugljwdfeayh.com/

     


Anonymous


Cancel   Add attachments