OsmSharp / ui

The UI components.
http://osmsharp.com/
GNU General Public License v2.0
138 stars 91 forks source link

Winform UI error with pbf file with commit eb15a806f2 version #205

Closed neoxeo closed 9 years ago

neoxeo commented 9 years ago

Hi Ben,

I have this error "Object reference not set to an instance of an object." on this line of my code :

var dataSource = MemoryDataSource.CreateFromPBFStream(new FileInfo(@"G:\CCP\FrenchRoads.pbf").OpenRead());

StackTrace : Error Form2 OnLoad : at OsmSharp.Osm.PBF.Streams.PBFOsmStreamSource.Reset() at OsmSharp.Osm.Data.Memory.MemoryDataSource.CreateFrom(OsmStreamSource sourceStream) at OsmSharp.Osm.Data.Memory.MemoryDataSource.CreateFromPBFStream(Stream stream) at CCP.Form2.OnLoad(EventArgs e) in G:\CCP\Form2.cs:line 82

My code works with an old version of OSMSharp

Thank for your work and your help.

NeoXeo

xivk commented 9 years ago

Hint: check _cachedPrimitives.Clear(); in PBFOsmStreamSource