WRL model coming from Blender cause PCBNew to crash!

Bug #804778 reported by Manveru
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Unassigned

Bug Description

I used attached file as 3d model for my design and a try to display 3d view caused pcbnew to crash silently.

The same model exported to Waveform format. then by Wings3d allows pcbnew to display something in 3d view, howver the whole model of the component is black.

This is KiCad bzr-3033 from PPA on Ubuntu Lucid 10.4.

Revision history for this message
Manveru (manveru) wrote :
Revision history for this message
Lorenzo Marcantonio (l-marcantonio) wrote : Re: [Bug 804778] [NEW] WRL model coming from Blender cause PCBNew to crash!

On Sat, 2 Jul 2011, Manveru wrote:

> Public bug reported:
>
> I used attached file as 3d model for my design and a try to display 3d
> view caused pcbnew to crash silently.
>
> The same model exported to Waveform format. then by Wings3d allows
> pcbnew to display something in 3d view, howver the whole model of the
> component is black.
>
> This is KiCad bzr-3033 from PPA on Ubuntu Lucid 10.4.

This is a know issue... kicad doesn't contain a full WRML parser, instead it is tailored to read wings3d wrml generated files only...

--
Lorenzo Marcantonio
Logos Srl

Revision history for this message
Manveru (manveru) wrote : Re: [Bug 804778] [NEW] WRL model coming from Blender cause PCBNew to crash!

However, even in this case program should not crash! I expect some
error message or something. I do not have time now to sit and debug
that. Unfortunatelly.

I found what should be corrected to display colors in KiCad -
ambientIntensity has to be set to 1.0 in .wrl file. I dit it manually,
because Wings3d seems to be much less intuitive for me than Blender.

Martin Errenst (imp-d)
tags: added: 3d-viewer
removed: pcbnew
Revision history for this message
Martin Errenst (imp-d) wrote :

Still happens in r4713.

Program received signal SIGSEGV, Segmentation fault.
0x00000000007c1db8 in VRML_MODEL_PARSER::readGeometry(_IO_FILE*, int*) ()
(gdb) bt
#0 0x00000000007c1db8 in VRML_MODEL_PARSER::readGeometry(_IO_FILE*, int*) ()
#1 0x00000000007c3243 in VRML_MODEL_PARSER::readShape(_IO_FILE*, int*) ()
#2 0x00000000007c32fd in VRML_MODEL_PARSER::readChildren(_IO_FILE*, int*) ()
#3 0x00000000007c346e in VRML_MODEL_PARSER::Load(wxString) ()
#4 0x00000000007b7abe in S3D_MASTER::ReadData() ()
#5 0x00000000007c9852 in MODULE::ReadAndInsert3DComponentShape(EDA_3D_CANVAS*) ()
#6 0x00000000007cb027 in EDA_3D_CANVAS::BuildBoard3DView() ()
#7 0x00000000007cb7d3 in EDA_3D_CANVAS::CreateDrawGL_List() ()
#8 0x00000000007cb99d in EDA_3D_CANVAS::Redraw(bool) ()
#9 0x00000000007c3f49 in EDA_3D_CANVAS::OnPaint(wxPaintEvent&) ()

Steps to reproduce:
0. download given wrl file,
1. take random board,
2. edit footprint, set the wrl file as 3d model,
3. start 3d-viewer
=> crash.

Apply the patch and it'll not crash any longer :). The patch also contains the fix for https://bugs.launchpad.net/kicad/+bug/673603 .
Instead of the pinheader firefox shows upon opening the wrl file, one sees the output in the attached screenshot - but still better then a crash.

Revision history for this message
Martin Errenst (imp-d) wrote :
Changed in kicad:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Hey imp, is this you patch? I want to make sure I have the correct author before I commit it.

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
m (easyw) wrote :

Hi Lorenzo and Wayne,

please consider to add also this patch that enables the rendering of wrl files generated with Meshlab sw in 3d-viewer ...
(diff generated with 4830 revision)

Maurice

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Thanks for your patch.

However, may I ask you to read the Documentation/coding_style_policy.pdf file, and modify your patch to use this style.
We are thinking only one coding style instead of many styles if good.

Mainly, have a look to tabs and blank lines before and after blocks.

Revision history for this message
m (easyw) wrote :

hoping this is fine... :)

Revision history for this message
jean-pierre charras (jp-charras) wrote :

It is fine. Committed. Thanks

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.