Assimp wpfImporter error
#1
Hi guys,

i wrote an application in vb.net using assimpwpfimporter and works well.
I need to switch my application working only with x64 CPU and when i use assimpwpfimporter i have this error:

Attempt to read or write protected memory. Often this condition indicates that other parts of the memory are corrupted.

if i switch on x86 or any cpu the error disappears.

Somebody had the same problem?
#2
Not sure if this will work but do you have assimp64.dll in the same folder as your executable ? like i said i am not sure if you have to reference it in you app, i also use vb.net and only have assimpnet.dll
Kevan Hampson
#3
(12-07-2021, 04:59 PM)GraPhiX Wrote: Not sure if this will work but do you have assimp64.dll in the same folder as your executable ? like i said i am not sure if you have to reference it in you app, i also use vb.net and only have assimpnet.dll

yes I have the 32 and 64 bit assimp dll in my bin directory. and I have also assimpnet.dll
#4
As mentioned by GraPhiX, this error is usually caused when using Assimp64.dll in 32 bit process, or Assimp32.dll in 64 bit process. So to prevent this please check the Modules window (under Windows - Debug) when the error happens and check that there is actually Assimp64.dll loaded. If you will be using only 64 bit version of your application, then you can even remove the Assimp32.dll.

If this is correct, then check if you have the latest versions of the native assimp DLLs, AssimpNet.dll and Ab3d.PowerToys.Assimp.dll. They were distributed by the latest version and can be also downloaded from https://github.com/ab4d/Ab3d.PowerToys.W...master/lib.


If this will still not work, then maybe the error is in the native assimp importer. Try to load any model file from the Ab3d.PowerToys or Ab3d.DXEngine samples project and check if that works. If this works but your file causes the error, then you can send me the file by email so I can check it, but probably I will not be able to do much - most probably you will need to wait for the improved assimp importer (in this case you may also report an issue on its GitHub page).
Andrej Benedik
#5
Ok solved deleting 32 bit version of assimp from bin folder and update assimp to latest version.
Noew there is another problem.
With the old version of assimp i can read with assimpwpfimporter and get a geometrymodel like:
Code:
Dim readmodel3d As GeometryModel3D = AssimpWpfImporter.ReadModel3D(mfile)

With the last version the code gives me an error (cannot cast objects  'System.Windows.Media.Media3D.Model3DGroup' on  'System.Windows.Media.Media3D.GeometryModel3D)

Why?
how i can read geometry from 3dmodelgroup?
#6
No ideas?
#7
Somebody can help me??
Please Andrej can you?
#8
hey guys
nobody can help me?
  


Forum Jump:


Users browsing this thread:
1 Guest(s)