nav111 / heekscnc

Automatically exported from code.google.com/p/heekscnc
Other
0 stars 0 forks source link

Segmentation Fault in CContour::CanAdd( HeeksObj *object ) #217

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
1. Import a DXF file. Make sketch... etc, etc.
2. Select the sketch and the operations treeview.
3. right-click and select New Contour operation.

What is the expected output? What do you see instead?
- A new contour operation should be added, but the aplication crashes.

What version of the product are you using? On what operating system?
OS: Opensuse 11.2, but is also happens in windows.
HeeksCAD/HeeksCNC Version: lastest from the svn.

Please provide any additional information below.
- From what I read in the code, and from what has been done in the
Profile.cpp, I think you should test if the HeeksObj is null before
actually trying to access it. I'm going to fix this in the svn version I
have in my laptop, if it works I'll send the fix.

Original issue reported on code.google.com by pinheiro...@gmail.com on 4 Jun 2010 at 10:47

GoogleCodeExporter commented 8 years ago
Do you have the very latest svn compiled? I just checked out both HeeksCAD and
HeeksCNC fresh from svn minutes ago and can't duplicate the problem.

1. I created a rectangle with fillets in Qcad
2. imported it
3. highlighted it in the Objects panel
4. held down 'ctrl' key so that I could highlight a tool too
5. selected 'Contour' operation from machining menu icons(not sure how to right 
click
to get to it)
6. selected 'Go' button from machining icons
7. it worked

I tried using the Profile operation this way too (and ran into another problem, 
which
I'll look at in a minute :), but it didn't crash the system either.

I just wonder if there are alternative ways to create a contour that I don't 
know
about that could be causing the app to crash.

Original comment by ddfalck2...@yahoo.com on 4 Jun 2010 at 3:19

GoogleCodeExporter commented 8 years ago
The windows version I have installed is the HeeksCNC 0.13.1. The linux version 
is
from the SVN, I'll update it tonight and give it a test.

I've attached a couple of screenshots.

Cheers
David

Original comment by pinheiro...@gmail.com on 7 Jun 2010 at 4:48

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for uploading the picture. I wasn't using the 'right click on 
operations' method and now that I tried it- I do get a seg fault.
I was using the menus to set up the operations.

Thanks,
Dan

Original comment by ddfalck2...@yahoo.com on 9 Jun 2010 at 4:40

GoogleCodeExporter commented 8 years ago
I believe I have fixed this.  As David suggested initially, it was due to a 
NULL pointer being used.  The flaw was not in the CanAdd() method in all cases. 
 It was where the GetIDObject() call's return value was not always being 
checked.

I believe I have added all the checks necessary.

Original comment by David.Ni...@gmail.com on 11 Jun 2010 at 4:32