NCC Tool Crash
Hi All,
I have an issue where FlatCAM 8.96 (both 32 and 64bit) crashes, the program just closes with no other notifications… when ‘Generate Geometry’ button pressed from within Non-Copper Clearing (NCC Tool tab)
When the app crashes, two windows event logs are created (attached) Event ID: 1000 and 1001
I can send you my Gerber if required.
Many Thanks
Comments (30)
-
-
reporter Wow quick reply, Thanks.
Reproducible, yep about 100 times, two computers just trying to get the NCC
The Process
- Open FlatCAM
- File > Open > Open Gerber
- Select File 'MainBoard.GTL'
- From the Project tab click Gerber > MainBoard.GTL
- click Selected tab
- Plot Options: 1 0 1
- Name: MainBoard.GTL
- Apertures: 0
- Tool Dia: 0.17
-
Passes: 1
- Pass overlap: 0.09
- Milling Type: Climb
- Combine Passes: 0
- Follow: 0
- Click the NCC Tool button
- The NCC Tool Tab Opens
- Obj Type: Gerber
- Object: MainBoard.GTL
- Tools Table: 0.17
- Tool order: No
- Tool dia 1.0
- Overlap Rate: 0.09
- Margin 0.05
- Method Straight Lines
- Connect: 1
- Contour: 1
- Rest M: 0
- Offset: 0
- Reference: Itself
- Click the Generate Geometry button... Program crash
I have exported the FlatConfig file and have my GTL but cannot workout see how to upload them?
Thanks
-
reporter - attached MainBoard.GTL
-
reporter -
Can you please go to:
Edit → Preferences → Tools → NCC Tool Options → Parameters → Tool dia:
and instead of having only one tool: 0.17 add another one so in the field you will have: 0.17, 0.1
Then, when you are in the NCC Tool just delete the supplementary tool (0.1) and proceed as you normally would.Would it still crash?
-
This is the result if I am doing it (but using a tool of 0.1mm diameter and the Seed method).
-
reporter Hi Marius,
Thanks for your time.
if I add a 0.1 tool (0.17, 0.1) it still crashes
- 0.17 tool only selected(both tools still in the table)
- 0.1 tool only selected (both tools still in the table)
- 0.1 tool deleted, 0.17 selected
- 0.17 tool deleted, 0.1 tool selected
I have also tried combinations of ‘Method’ as suggested, but all crash the program when the Generate Geometry button is clicked
It also crashes at the same point on my laptop with the above variations!
Many Thanks, Brian.
-
Hi Brian,
The extra tool that I was talking about has to be added in Preferences and the Preferences should be saved. Then you need to load again the Gerber file and do the steps.
-
reporter Hi Marius,
yes “Edit → Preferences → Tools → NCC Tool Options → Parameters → Tool dia:” changed from “0.17” to “0.17, 0.1”
I am sure I closed and relaunched the program after making the changes… anyway is a crash and try again not the same thing?
…have now rebooted, and still the same.
I have also just installed downloaded FlatCAM again (FlatCAM_beta_8.96_x64_installer.exe) and installed onto a 3rd computer, imported my config, added “0.17, 0.1” to “…NCC Tool Options → Parameters → Tool dia:””, rebooted and exactly the same happens.
- 0.17 tool only selected(both tools still in the table)and Method: Seed-based
- 0.1 tool only selected (both tools still in the table)and Method: Seed-based
- 0.1 tool deleted (entry No2 in the Tools Table), 0.17 selected and Method: Seed-based
- 0.17 tool deleted (entry No1 in the Tools Table), 0.1 tool selected and Method: Seed-based
All three computers are different hardware all with Windows 10 x64 fully updated
Thanks
-
-
assigned issue to
- attached configuration.FlatConfig
-
assigned issue to
-
Hi Brian,
I’ve added a configuration file that I use. Please try it.
-
reporter Same crash.
- Open FlatCAM
- Exported current config
- closed FlatCAM
- Open FlatCAM
- Imported config
- closed FlatCAM
- Open FlatCAM
- Open File 'MainBoard.GTL'
- Click the NCC Tool button
- Selected Tools Table: 0.10 (left 0.20 there)
- Click the Generate Geometry button... Program crash
I have also done the same with AntiVrius software disabled, but same result
Thanks
-
Brian,
Are you familiar with running FlatCAM from sources?It may help to see what is the exact error that makes FlatCAM close but for that you need to install the Python toolchain and run FlatCAM from command line.
Thanks,
Marius -
reporter Ok, is there a step by step guide?
-
reporter I am following this
-
reporter Hi Marius,
Following this https://bitbucket.org/jpcgt/flatcam/wiki/Windows%20Install
Downloaded “Winpython32-3.7.4.0.exe”, extracted and run “WinPython Powershell Prompt.exe”
python -m pip install --upgrade pip
Works OKpip install svg.path
Works OK
But these do not work, see below.
PS C:\Temp\Winpython32-3.7.4.0\scripts> pip install Rtree-0.8.2-cp27-cp27m-win32.whl
WARNING: Requirement 'Rtree-0.8.2-cp27-cp27m-win32.whl' looks like a filename, but the file does not exist
ERROR: Rtree-0.8.2-cp27-cp27m-win32.whl is not a supported wheel on this platform.
PS C:\Temp\Winpython32-3.7.4.0\scripts> pip install Shapely-1.5.16-cp27-cp27m-win32.whl
WARNING: Requirement 'Shapely-1.5.16-cp27-cp27m-win32.whl' looks like a filename, but the file does not exist
ERROR: Shapely-1.5.16-cp27-cp27m-win32.whl is not a supported wheel on this platform.
Thanks, Brian.
-
Hi,
You need to go here: [https://www.lfd.uci.edu/~gohlke/pythonlibs/](https://www.lfd.uci.edu/~gohlke/pythonlibs/)
and download all the necessary .whl files for Pyton 3.7 and for 32bit since you chose to download the 32bit version of WinPython.
The necessary .whl files are in the requirements.txt file found in the FlatCAM 8.96 ZIP source files bundle downloaded from here: https://bitbucket.org/jpcgt/flatcam/downloads/FlatCAM_beta_8.96_sources.zip
BTW, I will have to make some mods in that file too but it will work for our purpose since you are not going to do the pip install requirements.txt but download the files from the Gohlke’s site.Then you need to CD to the folder where you downloaded all the wheel files and install them with:
pip install wheel_nameIt’s enough just to write the start of the name then autocomplete with TAB key.
For PyQt5 you will need to run:
pip install pyqt5==5.12.0
because you will not find it on the Gohlke’s site.
-
reporter Thanks for the info
Rtree = Done
Shapely = Done
pip install pyqt5==5.12.0 I get this below but says it was installed correctly!
PS C:\Temp\Winpython32-3.7.4.0\
_Download> pip install pyqt5==5.12.0
Collecting pyqt5==5.12.0
Downloading https://files.pythonhosted.org/packages/49/1d/6eabcd8bb11598818c2cc98caae37af6ab48067c92bd7893fa48c676f1c5/PyQt5-5.12-5.12.1_a-cp35.cp36.cp37.cp38-none-win32.whl (41.2MB)
|██████████| 41.2MB 6.8MB/s
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in c:\temp\winpython32-3.7.4.0\python-3.7.4\lib\site-packages (from pyqt5==5.12.0) (4.19.18)
ERROR: spyder 3.3.5 has requirement pyqtwebengine<5.13; python_version >= "3", but you'll have pyqtwebengine 5.13.0 which is incompatible.
ERROR: pyqtwebengine 5.13.0 has requirement PyQt5>=5.13, but you'll have pyqt5 5.12 which is incompatible.
Installing collected packages: pyqt5
Found existing installation: PyQt5 5.13.0
Uninstalling PyQt5-5.13.0:
Successfully uninstalled PyQt5-5.13.0
Successfully installed pyqt5-5.12
now, if I change dir and run FlatCAM I get this
PS C:\Temp\FlatCAM_beta_8.96_sources> python .\FlatCAM.py
Traceback (most recent call last):
File ".\FlatCAM.py", line 6, in <module>
from FlatCAMApp import App
File "C:\Temp\FlatCAM_beta_8.96_sources\FlatCAMApp.py", line 33, in <module>
from ObjectCollection import *
File "C:\Temp\FlatCAM_beta_8.96_sources\ObjectCollection.py", line 14, in <module>
from FlatCAMObj import *
File "C:\Temp\FlatCAM_beta_8.96_sources\FlatCAMObj.py", line 15, in <module>
from camlib import *
File "C:\Temp\FlatCAM_beta_8.96_sources\camlib.py", line 42, in <module>
import rasterio
File "C:\Temp\Winpython32-3.7.4.0\python-3.7.4\lib\site-packages\rasterio\__init__.py", line 29, in <module>
from rasterio._base import gdal_version
ImportError: DLL load failed: The specified module could not be found.
Thanks for you help.
-
You need to install GDAL package also. From here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal select the right version for you. Python 3.7 and 32bit.
-
reporter GDAL = Done
PS C:\Temp\FlatCAM_beta_8.96_sources> python .\FlatCAM.py
Traceback (most recent call last):
File ".\FlatCAM.py", line 6, in <module>
from FlatCAMApp import App
File "C:\Temp\FlatCAM_beta_8.96_sources\FlatCAMApp.py", line 33, in <module>
from ObjectCollection import *
File "C:\Temp\FlatCAM_beta_8.96_sources\ObjectCollection.py", line 14, in <module>
from FlatCAMObj import *
File "C:\Temp\FlatCAM_beta_8.96_sources\FlatCAMObj.py", line 15, in <module>
from camlib import *
File "C:\Temp\FlatCAM_beta_8.96_sources\camlib.py", line 44, in <module>
import ezdxf
ModuleNotFoundError: No module named 'ezdxf'
-
Please have a look in the requirements.txt file and install all the packages there. Including the EZDXF. If you can’t find them in Gohlke’s site then install them from Pypi online repository by doing:
pip install module_name
e.g:
pip install ezdxf -
reporter Ok all done…
PS C:\Temp\FlatCAM_beta_8.96_sources> python .\FlatCAM.py
Opens FlatCAM program (32bit)
If I open the file and follow the process as before…
...
[WARNING] Joining 1282 polygons.
[DEBUG] Union by buffer...
[WARNING] Union(buffer) done.
[DEBUG][Dummy-4] 3.545789 seconds executing initialize().
[DEBUG] FlatCAMObj.FlatCAMGerber.convert_units()
[DEBUG] camlib.Geometry.convert_units()
[DEBUG] camlib.Gerber.scale()
[DEBUG][Dummy-4] 0.183488 seconds converting units.
[DEBUG] camlib.Gerber.bounds()
[DEBUG][Dummy-4] Moving new object back to main thread.
[DEBUG][MainThread] on_object_created()
[DEBUG][MainThread] on_object_created --> OC.append()
[DEBUG][MainThread] FlatCAMGerber.set_ui()
[DEBUG][MainThread] set_ui --> FlatCAMObj.to_form()
[DEBUG][MainThread] build_ui--> FlatCAMObj.build_ui()
[DEBUG][MainThread] set_inactive--> OC.get_by_name()
[DEBUG][MainThread] register_recent()
[DEBUG][Dummy-5] worker_task --> FlatCAMGerber.plot()
[DEBUG][MainThread] gerber
[DEBUG][Dummy-5] plot --> FlatCAMObj.plot()
[DEBUG][MainThread] L:/123/456/MainBoard.GTL
[DEBUG][Dummy-5] 1.335278 seconds adding object and plotting.
[DEBUG][MainThread] build_ui--> FlatCAMObj.build_ui()
WARNING: Traceback (most recent call last):
File "C:\Temp\FlatCAM_beta_8.96_sources\flatcamTools\ToolNonCopperClear.py", line 831, in on_ncc_click
self.bound_obj_name = self.object_combo.currentText()
AttributeError: 'NonCopperClear' object has no attribute 'object_combo'
Hope this helps!
-
Hi Brian,
Ok, I’ve seen the issue. The '
object_combo
' object was declared as obj_combo and therefore it crashed the app. Fortunately it was already solved in my working version, that is the reason that it worked for me, but I don’t know how this escaped in a build.
Although not the original purpose, you also helped me find another bug which was more hidden, meaning the one that appeared when only one tool was added in the NCC Tool preferences.
In any case, I hope you learned something
Thank you for all your help,
Marius -
reporter Glad I helped!!
and the response from you was outstanding, Thank you
when will an update be available?
-
I don’t know how much time it will take to ready the next build but in the mean time you can use the Beta branch in the way you’ve just learned. I’ve updated it a few days ago so it should work, at least for this issue.
You can download it from here: https://bitbucket.org/jpcgt/flatcam/get/Beta.zip
-
reporter Hi Marius,
I am now having trouble generating the G-Code!
I left it running all night and was still thinking about it this morning (the ‘8 ball’ icon going around in the bottom right of the window)
There is nothing in the Winpython window?
Many Thanks, Brian
-
Hi,
I think that it’s a thread race/inversion. I am trying to add a new feature but it seems that it is malfunctioning or not cooperating.
Lately everything is not cooperating -
reporter Hi,
flatcam-Beta-8becb4b50624 = race condition
8.96 Installer = Same race condition
Thanks for the info. is there an earlier ‘sources’ version that I can use that doesn't have this issue?
Many Thanks
-
Hi Brian,
NCC tool was never something I was particularly interested in, depending on the PCB sometime there may be issues that has to do with the geometries. Those issues then hit the Gcode generation.
You may try other .ZIP files in the Download list.
[https://bitbucket.org/jpcgt/flatcam/downloads/](https://bitbucket.org/jpcgt/flatcam/downloads/)
All the best,
Marius -
- changed status to resolved
The reported issue was fixed (it was a typo in the name of a combobox) and it will be available in the next build, 8.97.
- Log in to comment
Hi Brian,
The problem is reproducible? You need to write here a full report of what you were doing, settings and the steps to reproduce the issue.
Adding the Gerber file will help but the most important is to write the steps to reproduce the issue.