asammdf icon indicating copy to clipboard operation
asammdf copied to clipboard

The GUI crashes on ubuntu 20.04

Open BenWhetton opened this issue 3 years ago • 14 comments

Python version

I have tried this with the Ubuntu 20.04 system python: version 3.8.10 I have also tried with the latest patch version of each of 3.8, 3.9 and 3.10 built from source: 3.8.12, 3.9.9, 3.10.0

Code

MDF version

7.0.7

Code snippet

N/A

Traceback

N/A

Description

When I run the GUI and load a mf4 file, it works fine. When I try to create a plot, it crashes with this error:

munmap_chunk(): invalid pointer
Aborted (core dumped)

Looks like an issue in the c extension to me. Any idea why this might be crashing on Ubuntu 20.04? Is the GUI tested on Ubuntu systems? I don't have a more recent Ubuntu machine to test this on (I tried to get it working in a docker container but bumped into some issues).

BenWhetton avatar Apr 28 '22 15:04 BenWhetton

Hello Ben, can you try the development branch code?

danielhrisca avatar Apr 28 '22 16:04 danielhrisca

Hi Daniel. Thanks for the super quick response! The development branch doesn't seem to have this issue. Great :)

It does seem to have strange behaviour when dragging or zooming the plot. The data disappears while it is being moved and/or zoomed. You might already know about this but I thought I might as well upload a gif to show you: Peek 2022-04-28 18-00

BenWhetton avatar Apr 28 '22 17:04 BenWhetton

I'll have a look. There have been many changes related to handling huge channel count (for example 2000 active curves) so maybe panning was affected

danielhrisca avatar Apr 28 '22 17:04 danielhrisca

How many samples does your plotted channel have?

danielhrisca avatar Apr 28 '22 17:04 danielhrisca

@BenWhetton I've made some improvements and now the plots look fluid again. Let me know how it works on your PC

danielhrisca avatar Apr 28 '22 19:04 danielhrisca

Nice! It does seem to have fixed that issue. It does seems to regularly crash when I zoom in and out for 10-20 seconds though ("Segmentation fault (core dumped)" or "munmap_chunk(): invalid pointer"). I see you're actively working on it though so I assume you'll find this issue while debugging.

BenWhetton avatar May 04 '22 16:05 BenWhetton

@BenWhetton please check version 7.1.0

danielhrisca avatar Jun 24 '22 11:06 danielhrisca

@danielhrisca there doesn't seem to be a 7.1.0 tag so I've tested the latest development branch commit. Creating a plot works fine but it still crashes with a segmentation fault if I zoom in and out. Try zooming in and out with the right mouse button held for 10-20 seconds and you will hopefully reproduce the crash. For me this crashes with the data file I sent you for #704

BenWhetton avatar Jun 24 '22 12:06 BenWhetton

what about the exe from here https://github.com/danielhrisca/asammdf/releases/tag/7.1.0 ?

danielhrisca avatar Jun 24 '22 13:06 danielhrisca

Does this crash not occur on your system?

The tag is on the repo now. I pip installed 7.1.0 and get the same crash.

If I try the exe, it fails to launch and I get a glibc related error: [45162] Error loading Python lib '/tmp/_MEININUJK/libpython3.10.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /tmp/_MEININUJK/libpython3.10.so.1.0) My system has 2.31 and I can't upgrade it.

I forced pip to build the extension by passing the --no-binary flag and I still get the same crash. Here's the cutils build part of the logs in case it's useful: cutils-build.log

I'm not super familiar with C extensions so I'm not sure what the problem could be. Happy to help debug.

BenWhetton avatar Jun 24 '22 16:06 BenWhetton

I've run version 7.1.0 on Ubuntu 20.04.3 and I see no crash when zooming around. Did you do a clean install ? pip install -I asammdf[gui]

danielhrisca avatar Jun 24 '22 16:06 danielhrisca

Yep, I've done a clean install. Have you tried the exe? I am running Ubuntu 20.04.4.

I've run version 7.1.0 on Ubuntu 20.04.3 and I see no crash when zooming around. That's strange. Have you tried the exe? I am running Ubuntu 20.04.4.

Did you do a clean install ? pip install -I asammdf[gui] Yep, I've done a clean install into a dedicated virtualenv (using pipx and raw virtualenv)

BenWhetton avatar Jun 24 '22 16:06 BenWhetton

The exe is not working on my end either

danielhrisca avatar Jun 24 '22 17:06 danielhrisca

I've tried now on a native install of Manjaro and it works correctly. You have to make sure that the C extension is compiled and that you have it in the asammdf/blocks folder

# inside the asammdf folder
python setup.py build
# then copy the `cutils.so` file from `asammdf\build\lib...` to `asammdf\blocks`

danielhrisca avatar Jun 25 '22 09:06 danielhrisca