2
Vote

"ProtoBuf.ProtoException: Invalid wire-type; ..." thrown when reading "OsmSharp.iOS.UI.Sample.kempen-big.osm.pbf.routing"

description

First of all, thanks for the project. It looks really promising.

I tried to run the iOS sample ("OsmSharp.iOS.UI.Sample") but following exception is thrown:
ProtoBuf.ProtoException: Invalid wire-type; this usually means you have over-written a file without truncating or setting the length; see http://stackoverflow.com/q/2152978/23354
  at ProtoBuf.ProtoReader.SkipField () [0x00000] in <filename unknown>:0
  at ProtoBuf.Serializers.TypeSerializer.Read (System.Object value, ProtoBuf.ProtoReader source) [0x00000] in <filename unknown>:0
  at ProtoBuf.Meta.RuntimeTypeModel.Deserialize (Int32 key, System.Object value, ProtoBuf.ProtoReader source) [0x00000] in <filename unknown>:0
  at ProtoBuf.Meta.TypeModel.DeserializeCore (ProtoBuf.ProtoReader reader, System.Type type, System.Object value, Boolean noAutoCreate) [0x00000] in <filename unknown>:0
  at ProtoBuf.Meta.TypeModel.Deserialize (System.IO.Stream source, System.Object value, System.Type type, ProtoBuf.SerializationContext context) [0x00000] in <filename unknown>:0
  at ProtoBuf.Meta.TypeModel.Deserialize (System.IO.Stream source, System.Object value, System.Type type) [0x00000] in <filename unknown>:0
  at OsmSharp.Routing.Graph.Serialization.RoutingDataSourceSerializer`1[OsmSharp.Routing.CH.PreProcessing.CHEdgeData].ReadVehicleProfiles (System.IO.Stream stream) [0x0004c] in /Users/ivanzhu/Documents/Projects/OsmSharp/OsmSharp.Routing/Graph/Serialization/RoutingDataSourceSerializer.cs:171
  at OsmSharp.Routing.Graph.Serialization.RoutingDataSourceSerializer`1[OsmSharp.Routing.CH.PreProcessing.CHEdgeData].Deserialize (System.IO.Stream stream, OsmSharp.Collections.Tags.TagsCollectionBase& metaTags, Boolean lazy) [0x00033] in /Users/ivanzhu/Documents/Projects/OsmSharp/OsmSharp.Routing/Graph/Serialization/RoutingDataSourceSerializer.cs:278
  at OsmSharp.iOS.UI.Sample1.MyViewController.LoadView () [0x000bc] in /Users/ivanzhu/Documents/Projects/OsmSharp/OsmSharp.iOS.UI.Sample/MyViewController.cs:80
  at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
  at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIWindow.g.cs:129
  at OsmSharp.iOS.UI.Sample1.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00038] in /Users/ivanzhu/Documents/Projects/OsmSharp/OsmSharp.iOS.UI.Sample/AppDelegate.cs:23
  at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at OsmSharp.iOS.UI.Sample1.Application.Main (System.String[] args) [0x00008] in /Users/ivanzhu/Documents/Projects/OsmSharp/OsmSharp.iOS.UI.Sample/Main.cs:17
I downloaded the source code from: https://github.com/xivk/OsmSharp
And the test data from: https://github.com/xivk/OsmSharpTestFiles

Xamarin version info:
Version 4.2 (build 7)
Runtime:
    Mono 3.2.4 ((no/294f999)
    GTK+ 2.24.20 theme: Raleigh
    GTK# (2.12.0.0)
    Package version: 302040000
Xcode 5.0.2 (3335.32)
Build 5A3005
Version: 7.0.4.193 (Business Edition)
Any idea? Thanks in advance.

comments