Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IfcStore can't open .ifcxml in .ifczip #258

Closed
nemarkovic opened this issue Apr 24, 2019 · 3 comments
Closed

IfcStore can't open .ifcxml in .ifczip #258

nemarkovic opened this issue Apr 24, 2019 · 3 comments
Assignees
Labels
bug Confirmed bug
Milestone

Comments

@nemarkovic
Copy link

Short summary describing the issue. (3-5 sentences)
When I try to open a .ifczip that has a .ifcxml in it I get an NotSupportedException.

Assemblies and versions affected:

Which assemblies/packages and their versions are known to be affected. E.g. Xbim.Essentials 4.0.29

Steps (or code) to reproduce the issue:

  1. zip a .ifcxml
  2. try to open it

IModel model = IfcStore.Open(ifcFilename, null, -1, progressDelegate, XbimDBAccess.Read);

A simple set of steps to reproduce the issue. Provide a small sample file is required and/or
a small sample of the failing code (or reference a commit / gist)

Minimal file to reproduce the issue:

IFC files need to be zipped to be uploaded. Then just drag & drop here
Samples.zip

Expected behavior:

Opening the .ifcxml within the .ifczip file

What would you expect to happen

Actual behavior or exception details:.

System.Exception: 'Error reading XML, Line=19, Position=251, Tag='''
Inner Exception: NotSupportedException: This operation is not supported.
https://github.com/xBimTeam/XbimEssentials/blob/master/Xbim.IO.MemoryModel/Xml/XbimXmlReader3.cs
It breaks at line 896 then it continues to fall through.
What actually is happening

Additional Details

Optional, details of the root cause if known.
Delete this section if you have no additional details to add.

@andyward
Copy link
Member

Have you tried this with the latest v5 Xbim.Essentials? There was a lot of refactoring around the IfcStore in the last release.

@nemarkovic
Copy link
Author

I'm currently using v5 (5.0.225)

@andyward andyward self-assigned this May 7, 2019
@andyward andyward added the bug Confirmed bug label May 7, 2019
andyward added a commit that referenced this issue May 9, 2019
DeflateStream does not support seeking / Position so we can't provide %age progress
@andyward
Copy link
Member

andyward commented May 9, 2019

This should be fixed in develop. I've pushed through to XBimXplorer so you can test.

Took a while to reproduce the issue: it only occurs when using a Progress delegate is provided on file open for zipped IfcXml streams. Root cause is that the DeflateStream is not seekable, so progress reporting was failing.

@andyward andyward closed this as completed May 9, 2019
@andyward andyward added this to the 5.1.0 milestone Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants