ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

DeepSOIC wrote:Could you try replacing all dynamic_cast with static_cast within sketcher?
Interesting. After doing that I now get the following when creating a sketch.

Code: Select all

exception thrown (ACCESS VIOLATION at address 0x0000000000000000 during 'READ' operation)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

So the rtti crash might have been just due to null pointer? I'm afraid we can't move any further on this without debugger :(
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

on linux I can setup kdevelop with FreeCAD quite simple:
first build with conda: (the path to the source has to be specified, see the corresponding build.sh )

Code: Select all

cd FreeCAD_Conda/.FreeCAD_debug
conda build .
abort when the cmake-configuration is done

Code: Select all

source activate <path_to_build_environment>
kdevelop
In kdevelop open the build directory (path_to_build_environment/work). And start building.

Maybe there is a similar option with visual studio?
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

I was able to get it set up for the visual studio debugger. At least with sketcher dynamic_casts changed to static_casts, the exception is thrown because in GeomLineSegment::setPoints in Mod/Part/App/Geometry.cpp (line 3178), Handle_Geom_TrimmedCurve::DownCast(handle()) returns null. More on this later. Got to go now.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

Since this is outside of sketcher, can we now be sure that RTTI has not been created by the compiler?
Also considering this:
http://stackoverflow.com/questions/5155 ... namic-cast
which tells me it's actual lack of RTTI data, not a false-positive caused by a null pointer. Although there remains a subtle chance that it is due to an invalid pointer...

Anyway, I'm afraid I can't help much from here :|
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

sgrogan wrote:
looo wrote:creating a sketch gives this message:
I get the exact same error with the existing libpack and VS2013 only updating with OCCT7.1 using your patch. So I guess it's more Win specific problems with upgrading to OCCT7.1
So occt is the root of the problem? or are there any other changes you have made? (building with netgen?)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

looo wrote:So occt is the root of the problem? or are there any other changes you have made? (building with netgen?)
I applied your patch and disabled reverse engineering WB and linked against OCCT7.1
Everything else is the same as the working daily builds linked to OCCT7.0
The OCCT7.1 is self-compiled, linked against the exact libraries I used for OCCT7.0.
Netgen is disabled in both cases.
I get many test failures when running the self-tests from the test framework wb for the OCCT7.1 build.
Is the OCCT7.0 conda package still available. Maybe you could try to link against that.
"fight the good fight"
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

I can confirm it is a problem with occt 7.1. I tried building with occt 7.0 and the error doesn't happen.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

peterl94 wrote:Handle_Geom_TrimmedCurve::DownCast(handle())
I think we still have trouble handling Handle on Win.
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

This is from some posts above: https://forum.freecadweb.org/viewtopic. ... 50#p167271

Code: Select all

 C:\Users\fc-builder\Miniconda3\conda-bld\freecad_1490502689427\work\src\3rdParty\salomesmesh\src\StdMeshers\StdMeshers_QuadToTriaAdaptor.cpp(767): error C2664: "int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement *,Handle_TColgp_HArray1OfPnt &,Handle_TColgp_HArray1OfVec &,std::vector<const SMDS_MeshNode *,std::allocator<_Ty>> &,gp_Pnt &,gp_Vec &,const SMDS_MeshElement **)" : Konvertierung von Argument 2 von "opencascade::handle<TColgp_HArray1OfPnt>" in "Handle_TColgp_HArray1OfPnt &" nicht möglich
I think this is also related to missing rtti-data?
Post Reply