Fix of crashes, when disabling or deleting Plots

Issue #546 new
Karl-Heinz K created an issue

Hello,

thank you very much for your great work with Flatcam 8.955! I use Debian Bullseye and could no longer use my old version 8.5.

I am no programmer, therefore I neither know, how to report bugs nor bug fixes.

I had the problem, that Flatcam 8.955 repeatedly crashed when I enabled/disabled and/or deleted plots during my workflow. I did not write down the error messages. But I used the error messeges to “google” for possible fixes. Much to my surprise the two problems could be solved with the suggested solutions. I implemented them without really knowing what I did. But It worked! And I am sure you can see what is necessary to fix the crashes if you look at my solution.

The problems originated from the file appObjectsFlatCAMExcellon.py.

I had to change two lines in this part of the code: on_plot_cb_click_table(self)

Line 1181: tool_item = int(float(self.ui.tools_table.item(row, 0).text())) # I had to add another cast to float

Line 1186: self.shapes.update_visibility(state, indexes=self.shape_indexes_dict[tool_key].copy()) # I had to add “.copy()”

As I said, I did this based on internet results. I have no idea why it worked. But it worked.

I am sorry that I am not more professional. However I thought this report is better than no report!

All the best and keep the good work!

Karl-Heinz

Comments (4)

  1. Marius Stanciu

    Hello Karl,

    Thank you for the info, but can you please let me know what is the actual software version are you referring to? As far as I remember I did not made a release 8.955 and the 8.995 is not a release yet, I only have something like that in my work copy which is not finished yet.
    So it will help if you can point to the link from where have you downloaded the sources for the FlatCAM that you are reporting of.
    Thanks,
    Marius

  2. Karl-Heinz K reporter

    Hello Marius,

    I am sorry that I wrote the wrong version. I use Flatcam 8.995, which I copied from here:

    https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_8.995

    And yes, I know it's still a work in progress. I thought if I dare to use the latest Kicad version 6, I can also use the latest Flatcam version. It's a hobby. Since I've been using Linux for 30 years, I'm not afraid of some bugs or issues.

    I finished my first project with it and I like it already.

    If I can help you as a user, I will be happy to do it!

    All the best

    Sincerely

    Karl-Heinz

  3. Marius Stanciu

    Hello Karl,
    I don’t see why both changes should be needed. I’ve added them in case there are some quirks in the Linux packages but both should not be needed.
    1. The ‘float' cast is redundant since the ‘int’ cast should take care of the issue completely.
    2. Adding the .copy() method does nothing since the update_visibility() method return nothing. The only thing that I may think of is that it does add some weak references but without the actual errors I have no way to know what is going on…

  4. Log in to comment