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

Xbim3DModelContext hangs on Application Exit #526

Open
ramsampath opened this issue Jan 16, 2025 · 3 comments
Open

Xbim3DModelContext hangs on Application Exit #526

ramsampath opened this issue Jan 16, 2025 · 3 comments

Comments

@ramsampath
Copy link

Hello,

It would be great if someone could help me on the following issue. When i use CreateContext in the following example, the application hangs on exit.

                IfcStore _model;
		Xbim3DModelContext _context;

		using (_model = IfcStore.Open(filePath))
		{
			// Create 3D model context to extract geometry
			_context = new Xbim3DModelContext(_model);

			_context.CreateContext();

			// Start hierarchy traversal from the project level
			var project = _model.Instances.FirstOrDefault<IIfcProject>();
			if (project == null)
			{
				Console.WriteLine("No project found in the IFC file.");
				return;
			}

			Console.WriteLine($"Project: {project.Name}");
			
		}

If I comment the _context.CreateContext() the application exits properly but yes as expected the geometry is not fetched properly.

Kindly point me in the right direction if i am not doing something correctly.

Thank you
Ram.

@andyward
Copy link
Member

Would be useful to have the version of Geometry you're using. It sounds potentially related to #438 (which has a workaround)

@ramsampath
Copy link
Author

Thank you @andyward - The version I am using is the one from NuGet which is version 5.1.796 for Xbim.Geometry and version 6.0.489 for Xbim.Essentials. Should I be compiling the latest master branch from git and using that instead ?

@andyward
Copy link
Member

Did you try the workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants