Closed martin1cerny closed 9 years ago
Hi Amol,
this description is not sufficient. You will need to provide us with more detail. If you don't mind I'll move this issue to the XbimExchange project because it is unrelated to anything in XbimWebUI project.
Martin
I think this is a duplicate issue of https://github.com/xBimTeam/XbimGeometry/issues/6 and is a case of not having the Visual C++ Redistributable Package installed.
https://www.microsoft.com/en-gb/download/details.aspx?id=40784
Thanks LloydPickering and Martin..
Its working ..
Hi LloydPickering ,
Its working on 32-bit os but not working on 64-bit os.
I have same issue on 64 bit in my case it cannot load the xbim,modelgeoemtry.occ.dll or one of its dependents
i have all the updated c++ libraries
There is only one redist package, so now you have a different problem than the one from before. without knowing exactly which dependency is missing, we will struggle to help.
Do you definitely have the Engine 64 unmanaged dll in the correct place? (should follow a similar pattern as the Engine 32 dll, which you must have in place for the 32bit to work)
If it's not that, then you will have to help figure out what exact dependency is missing.
Two tools that might help are https://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.71).aspx and http://dependencywalker.com/
What version of Xbim are you working with @jv112602 , @BIMDevelopement ? Specifically the Xbim.Geometry assembly. There's some extra diagnostics in 3.0.24 (on myget master) that may help diagnose what's going on.
Separately, I've got a little console app that tests a few things in Xbim. I added some code to dump out the DLL versions and platforms
i.e. that's 64bit while this is 32bit
It might be worth running it locally to see what you get https://github.com/andyward/XBimDemo
Andy
HI Lloyd , I followed a similar pattern as the Engine 32 dll. I got error of Could not load file or assembly 'Xbim.Geometry.Engine32.dll' or one of its dependencies. I think , it doesnt take Xbim.Geometry.Engine64.dll ..
Hi Andyward,
I am using version.3.0.0.1 of both Xbim.Geometry.Engine.dll.
Sorry @BIMDevelopement , I meant the version of Xbim.Geometry.Engine.Interop.dll (I think the AssemblyVersion of Xbim.Geometry.Engine.dll has been locked as 3.0.0.1 for a while)
As Lloyd has said, I suspect you're missing the 64 bit C++ runtime. See Issue #3 for some more advice
Okay. i am using version 1.0.0.0 of Xbim.Geometry.engine.interop.dll.
Ack! That doesn't help either as it seems we aren't using the common AssemblyVersion file properly across the projects
I'm really just trying to establish what version of the xbim components you have. Make sure it's the very latest (from develop branch source or Myget develop feed. The latest versions give you some diagnostics that may help you solve your problem (in particular, if it can't find the geometry pre-requisites it will raise an exception saying why, and hopefully how to correct)
Sorry but I am still not able to resolve it .i share bin folder of application.Can you please check out once. https://www.dropbox.com/s/3di7brz3m68usku/bin.rar?dl=0
So it's hard to make a lot of sense of a web site's bin folder without anything else around it...
I used your binaries as the references for a console app and could load XBim Geometry in a 64bit process.
Please try the same locally. Here's the console app with your binaries. You should see the same as the above when you run TestApp.exe https://www.dropbox.com/s/876dq5bnr4cob5b/x64.zip?dl=0
If you get an error it's the missing C++ runtime. If it works then it's some other (likely non-xbim) issue with your web project.
Note your dependencies are out of date. They look about 4-6 months old judging by the version numbers.
Hi @andyward ,
I also get same output of your testapp on 64bit machine . As per that project , i update my bin folder structure.But still it is not working. Did you get my problem ? My Problem is my application is working fine with machine (32bit and 64bit),when Visual studio 2013 is installed. But the machine where Visual studio 2013 is not installed and 64 bit OS , On that machine, the conversion is not happening. I get a following error:
Exception in Conversion action System.IO.FileNotFoundException: Could not load file or assembly 'Xbim.Geometry.Engine32.dll' or one of its dependencies. The specified module could not be found. File name: 'Xbim.Geometry.Engine32.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at Xbim.Geometry.Engine.Interop.XbimGeometryEngine..ctor() at Xbim.ModelGeometry.Scene.Xbim3DModelContext..ctor(XbimModel model, String contextType, String contextIdentifier)
It's because you HAVEN'T got the C++ runtime installed!
Sorry for the shouting but we've said this several times in this thread.
The C/C++ runtime is installed with Visual Studio, but won't always be on a clean server, so you need to deploy it manually. Install it from https://www.microsoft.com/en-gb/download/details.aspx?id=40784
PS. If you get the latest Xbim dependencies it will actually check for these pre-requisites and tell you what to do.
HI andyward. This was my first step to install c/c++ runtime. But still I got this error .
Anyways thanx for giving your time.
Make sure you get the 64-bit version of the C++ runtime if you're sure it's a 64 bit OS. You should be able to install bot 64 & 32 bit side by side.
You can check if the runtime has been installed in regedit.exe
Assuming you're on a 64bit machine you'll have a key at:
HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\12.0
and to check if the 32bit runtime is installed (in 64bit regedit) there will be a key at
HKLM\SOFTWARE\Microsoft\Wow6432Node\DevDiv\VC\Servicing\12.0
(Note the Wow6432Node)
Andy
What does HKLM\SOFTWARE\Microsoft\Wow6432Node\DevDiv\VC\Servicing\12.0
look like?
The stack trace you gave above shows it's actually looking for the 32 bit version of Xbim.Geometry.Engine
Exception in Conversion action System.IO.FileNotFoundException: Could not load file or assembly 'Xbim.Geometry.Engine32.dll' or one of its dependencies. The specified module could not be found. File name: 'Xbim.Geometry.Engine32.dll'
.
this is my control panel screen .I have installed both 2012 and 2013 c++ runtime . And why its looking for Xbim.Geometry.Engine32.dll instead of 64bit dll. I also try to find this solution.So that i sent you my bin folder previously.
Sorry, But I couldn't find this .HKLM\SOFTWARE\Microsoft\Wow6432Node\DevDiv\VC\Servicing\12.0 in registery window.
I'm at a bit of a loss then. It's sounds like something with your web site deployment. Based on what you sent me yesterday, I'd delete these selected folders in the web/bin/ (Note I'm assuming your web app is actually 32 bit)
After that, my recommendation is to Clean the solution and get the latest xbim dependencies from Nuget as this bit of code (to load the Geometry Engine) has been re-written recently to be more robust and with some logging.
@BIMDevelopement If you're still struggling with this it might be worth downloading a repo I made yesterday. https://github.com/andyward/XbimWebDemo
It would be a good sanity check of your environment - it's an MVC5 app to view IFC files - parsing and generating geometry under a web server. I started with a diagnostics page to show what DLLs are loaded.
And just to prove it all works, it lets you view models and federated models in the XbimWeb UI.
The xbim and wexbim files are generated on demand when a model is requested. This is not how I'd recommend doing it in practice, but demonstrates the principle.
Just to demonstrate why I think this is not actually a great thing to do under a web server - as implemented, these are the stats for processing the above 'Clinic_MEP' model:
From 15-34 seconds is the parsing (of a 120MB model): 25% CPU usage (one core) and 0.9GB or RAM. From 34-45 seconds is the geometry generation: near 100% CPU usage (across all cores) and 1GB+ of RAM consumed.
That's not going to be a great experience for a multi-user system :smile:
Thanx @andyward for your reponse ,
Your last replied is working on 64bit os ,but I still get problem on one 64bit os machine.So , I did not replied you. Yes, I aware about this CPU usage. Its a really not good experience. :D
I will check your demo and update you.
To @BIMDevelopement : Just as a side note: XbimGeometry is intentionally optimized to consume maximum resources at the time to process the geometry in the shortest time possible. And yes, it is much better idea to isolate geometry processing.
Thanx @andyward and @martin1cerny .
The issue is solved due to get the latest xbim dependencies from Nuget . You can close this issues.
Thank you.
From @BIMDevelopement on July 20, 2015 5:58
Hi ,
I am trying to deploy my application on another PC where visual studio 2013 is not installed .I have installed 4.5.1 & 4.5.2 both framework. But still conversion of ifc to wexbim is not done .
Copied from original issue: xBimTeam/XbimWebUI#25