← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: fix segfault in python scripting caused by new 3D code

 

Committed in rev 6665. Thank you.

On Wed, Apr 06, 2016 at 09:10:23AM +1000, Cirilo Bernardo wrote:
> The attached patch ensures the S3D_MASTER class does not cause
> a segfault in pcbnew when used from Python scripting.
> 
> The issue is due to an "extern KIWAY* TheKiway" which was exposed
> to allow S3D_MASTER to use the new resolver to handle 3D filenames.
> Unfortunately TheKiway cannot be assigned a value until a window is
> created which implements Kiway. The change introduced by this
> patch should not alter the behavior of S3D_MASTER compared to
> the behavior before the 3D merge.
> 
> The extern variable is only there to support S3D_MASTER which in
> turn is there to support the current 3DViewer. In the planned software
> structure the rather complex S3D_MASTER class is replaced with
> a simple struct which only holds the model name and position/
> orientation/scale data as stored in the PCB file; since the replacement
> does not perform filename resolution there is no need to expose the
> Kiway. For example in Mario's branch we removed the extern and
> S3D_MASTER class many months ago.
> 
> - Cirilo



References