Program crash during Geometry editor on Fedora 35

Issue #590 new
max xam created an issue

Hi Marius see report of the crash:

Comments (26)

  1. Marius Stanciu

    Hi Max,
    Unfortunately that does not tell me anything… What does FlatCAM beta (Evo) reports?

    If you open the Error Log file what is it’s content? Menu → View → Error Log

  2. Marius Stanciu

    Close the program and open it again. The entry shown above is a link that will open an actual file where the error should be saved.

  3. max xam reporter

    2022-05-17 09:47:11.423574
    Traceback (most recent call last):
    File "/home/max/flatcam95/appMain.py", line 9475, in my_loop
    self.listener = Listener(*address)
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 453, in init
    self._listener = SocketListener(address, family, backlog)
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 596, in init
    self._socket.bind(address)
    OSError: [Errno 98] Address already in use

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/max/flatcam95/appMain.py", line 9481, in my_loop
    conn = Client(*address)
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 507, in Client
    c = SocketClient(address)
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 635, in SocketClient
    s.connect(address)
    ConnectionRefusedError: [Errno 111] Connection refused

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/max/flatcam95/appMain.py", line 9516, in run
    self.my_loop(self.address)
    File "/home/max/flatcam95/appMain.py", line 9499, in my_loop
    self.serve(conn)
    File "/home/max/flatcam95/appMain.py", line 9506, in serve
    msg = conn.recv()
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 255, in recv
    buf = self._recv_bytes()
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 419, in _recv_bytes
    buf = self._recv(4)
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 388, in _recv
    raise EOFError
    EOFError

  4. Marius Stanciu

    It looks like you were trying to open a second instance of the software and for whatever reasons the socket crashed. I think that in Linux it is a special file that is written somewhere that shows that the socket is open. Perhaps it was left over after a crash so maybe it needs to be deleted. Unfortunately I don’t know the insides of Linux….
    In the software is declared like this:

    address = ('/tmp/testipc', 'AF_UNIX')
    

    so look for a file in a tmp/testipc folder….

  5. max xam reporter

    Hi Marius,

    I believe that the problem is with the mouse selection of the parts using a window to collect them. If I select one by one with the mouse clicking on them,there are no any problem.

  6. Marius Stanciu

    Nope, there is no way to be related. The error above tells me that it is a multiprocessing error.
    I use this line:

    self.listener = Listener(*address)
    

    to start a listener such that say when you double-click on an associated file (currently works only in Windows) it will not open a new instance of the software but it will open that file in the same instance of the FlatCAM Evo software that is already open.

  7. max xam reporter

    I delete it, after I run FlatCAM and after frozen again it will create again the same file with zero lenght.

    See Error Log:

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/max/flatcam95/appMain.py", line 9516, in run
    self.my_loop(self.address)
    File "/home/max/flatcam95/appMain.py", line 9499, in my_loop
    self.serve(conn)
    File "/home/max/flatcam95/appMain.py", line 9506, in serve
    msg = conn.recv()
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 255, in recv
    buf = self._recv_bytes()
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 419, in _recv_bytes
    buf = self._recv(4)
    File "/usr/lib64/python3.10/multiprocessing/connection.py", line 388, in _recv
    raise EOFError
    EOFError

  8. Marius Stanciu

    All right, I removed the usage of this class for Linux too (previously was removed only for MacOs) and now this works only for Windows.
    You should try the latest commit.
    How are you with the Italian translation? 🙂

  9. max xam reporter

    Hi Marius,

    now it’s not more frozen, but when I process the milling procedure it cannot produce any cnc job, I deleted the cnc job and it was frozen again.

    See error log before frozen:

  10. Marius Stanciu

    But there is only one place where I instantiate that class and that should happen only for Windows…
    Like this:

            if sys.platform == 'win32':
                # make sure the thread is stored by using a self. otherwise it's garbage collected
                self.listen_th = QtCore.QThread()
                self.listen_th.start(priority=QtCore.QThread.Priority.LowestPriority)
    
                self.new_launch = ArgsThread()
                self.new_launch.open_signal[list].connect(self.on_startup_args)
                self.new_launch.moveToThread(self.listen_th)
                self.new_launch.start.emit()
    

    Since you are running Linux, this could not launch.

  11. max xam reporter

    Hi Marius,

    I hope you find a solution for Fedora…

    I forgot to reply you about italian translation, actually I am using in English, do you suggest to use italian language to check the translations?

  12. Marius Stanciu

    Hi Max,

    I just run FlatCAM Evo in Fedora 35 image inside VmWare and there are no crashes. So it has to be something on your side.
    BTW: I hate what they’ve done with the Gnome…

  13. Marius Stanciu

    Hi Max,
    I use a pre-made Fedora 35 image from here: https://www.linuxvmimages.com/images/fedora-35/
    I installed the xfce4 desktop environment and there is no crash.
    I am sorry but I can’t really cover every Linux compilation from out-there….

    All I can say for sure is that FlatCAM Evo (beta) works in Windows. If it works also in Linux, MacOS it’s a bonus but sorry… not really my focus.
    Yet, I’ve run the app with success in Linux so I guess now it is a matter to configure your Linux environment such that the application will run as expected.

    LE: looks like the a crash can be seen when creating the selection rectangles on canvas (after installing the mate desktop and the compiz package) and that has to do with the mesa-libGLU Linux package.
    Again, it’s a Linux thing and has nothing to do with FlatCAM Evo. Sorry but I can’t help with this, I don’t have the time to focus/debug on Unix-like system’s.

    LLE: yet, the reason for the crash with selection, in my case, may be because I am running inside a virtual machine.
    One other thing I can suggest is to install all the requirements for FlatCAM Evo in aPython virtual environment and run the app from there.

    And one final suggestion. The crashes are related to the 3D graphic engine so you could switch to the 2D graphic engine - low performance, in the Preferences of the app.

  14. Marius Stanciu

    Oh well … I just had an idea for a sort-of-fix
    I’ve added a new setting in the Preferences in the General → GUI Preferences named: Selection Outline.

    Download the latest changes from my repo and make sure you check the above named checkbox.
    This way the selection around selected objects will only be an outline.
    Also the dragging selection box (blue/green) will also no longer be a filled with transparent color box but only an outline.

    This will allow your system not call the mesa-libGLU functions and therefore not crash.

  15. max xam reporter

    I download the last version and I flag Selection Outline, I import the dxf, I edit

    the Geometry , I generate Cutout but after on CncJob it became frozen and in the right bottom corner it show icon Plotting… but nothing can be visible about the cncjob

  16. Marius Stanciu

    Like I said Max, it’s a Linux distribution thing.
    Look how it works in UbuntuMate, out of the box, no issues. There is no need for hacks like plotting only the outline.

    Something is broken in your distribution: either is in Fedora or in what you installed after.

    From my point of view this issue is for the developers in the Linux community. It looks like the issue is in the mesa-libGLU Linux package, FlatCAM (both in the VisPy 3D view and Matplotlib supported 2D view) can't draw surfaces with transparency.

    It works at least in UbuntuMate 22.04 so this should be a starting point.

  17. max xam reporter

    Hi Marius,

    you are right, I installed ubuntu-mate-22.04-desktop-amd64 and it’s working now.

  18. Log in to comment