ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
peterl94
Posts: 662
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Tue Mar 28, 2017 1:16 am

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)
DeepSOIC
Posts: 4670
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Postby DeepSOIC » Tue Mar 28, 2017 1:26 am

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 :(
looo
Posts: 764
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Tue Mar 28, 2017 9:19 am

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
Posts: 662
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Tue Mar 28, 2017 10:25 am

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.
DeepSOIC
Posts: 4670
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Postby DeepSOIC » Tue Mar 28, 2017 7:34 pm

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 :|
looo
Posts: 764
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Tue Mar 28, 2017 8:04 pm

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
Posts: 3042
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Mar 28, 2017 8:16 pm

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.
peterl94
Posts: 662
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Tue Mar 28, 2017 9:59 pm

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
Posts: 3042
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Mar 28, 2017 10:25 pm

peterl94 wrote:Handle_Geom_TrimmedCurve::DownCast(handle())

I think we still have trouble handling Handle on Win.
looo
Posts: 764
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 29, 2017 7:14 am

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?