asammdf icon indicating copy to clipboard operation
asammdf copied to clipboard

v8.0.0 build crashes upon DBC decoding data

Open MatinF opened this issue 1 year ago • 11 comments

I tried v8.0.0 just now to DBC decode an OBD2 file (attached) - it results in an unending loop of the decoded file being created, forcing a manual shutdown of asammdf. You can try to see if it's repeated on your end with the attached

test.zip

MatinF avatar Sep 26 '24 10:09 MatinF

@MatinF please try https://github.com/danielhrisca/asammdf/actions/runs/11126188977

danielhrisca avatar Oct 01 '24 13:10 danielhrisca

Hi Daniel, this build seems to fail when I open the GUI:

image

2024-10-04, 19:11:00
--------------------------------------------------------------------------------
<class 'AttributeError'>	 
partially initialized module 'fsspec' has no attribute 'utils' (most likely due to a circular import)
--------------------------------------------------------------------------------
  File "asammdf\gui\asammdfgui.py", line 52, in <module>
  File "asammdf\gui\asammdfgui.py", line 45, in main
  File "asammdf\gui\widgets\main.py", line 47, in __init__
  File "asammdf\gui\widgets\batch.py", line 122, in __init__
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
  File "fastparquet\__init__.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
  File "fastparquet\writer.py", line 12, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
  File "fastparquet\util.py", line 16, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
  File "fsspec\__init__.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
  File "fsspec\compression.py", line 68, in <module>
  File "fsspec\compression.py", line 46, in register_compression

MatinF avatar Oct 04 '24 17:10 MatinF

Hi Daniel, just wanted to check if you've had the chance to review this further?

MatinF avatar Oct 16 '24 05:10 MatinF

Just FYI I tried also the latest dev build 8.0.2, but here I get below issue when trying to open it on Windows 10:

2024-11-15, 13:00:13
--------------------------------------------------------------------------------
<class 'AttributeError'>	 
partially initialized module 'fsspec' has no attribute 'utils' (most likely due to a circular import)
--------------------------------------------------------------------------------
  File "asammdf\gui\asammdfgui.py", line 52, in <module>
  File "asammdf\gui\asammdfgui.py", line 45, in main
  File "asammdf\gui\widgets\main.py", line 47, in __init__
  File "asammdf\gui\widgets\batch.py", line 115, in __init__
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "fastparquet\__init__.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "fastparquet\writer.py", line 12, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "fastparquet\util.py", line 16, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "fsspec\__init__.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "fsspec\compression.py", line 68, in <module>
  File "fsspec\compression.py", line 46, in register_compression

MatinF avatar Nov 15 '24 12:11 MatinF

please try this versionhttps://github.com/danielhrisca/asammdf/actions/runs/11889185054

danielhrisca avatar Nov 18 '24 12:11 danielhrisca

Hi Daniel, this seems to resolve the crashing and allows for DBC decoding data again - so that's much better!

Minor observations:

  1. It seems visually that there is an issue with the margins on various elements - as if the margin width has been set to 0. While not critical, I think this might be a bug as it's not how it looks in prior releases:

image

  1. From what I can tell, LIN bus decoding with DBC files does not work currently. When I try to decode below samples, it fails. I think this has been a problem since back in 7.5.0 and maybe earlier releases as well. lin-test.zip

  2. In the raw CAN bus trace, enabling 'Time as date' seems to have no effect image

MatinF avatar Nov 18 '24 13:11 MatinF

Hello Martin, have a try with this build https://github.com/danielhrisca/asammdf/actions/runs/11893707166

All the layouts have been setup with 1px margins to reduce wasted screen space

danielhrisca avatar Nov 18 '24 13:11 danielhrisca

Thanks Daniel, this is great - solved the previous issues!

One other issue we've had reports on from users is inconsistency in terms of the localized PC time across the 'Raw CAN bus trace' and the 'decoded' physical values plots. See below example:

image

As evident, the raw CAN bus trace starts at 09:43 (+02:00)

image

The decoded physical plot seems to start at 08:43 (+01:00), while the left-side timestamp shows 07:43 (+00:00).

I realize that the times are in principle all correct because of the explicit time zone factor at the end of them. But I guess the intuitive solution from my view would be to have all of them show the same localized time, with the correct one being the +02:00 in this particular log file example case, i.e. what the raw CAN bus trace displays. But let me know if there is a reason for the differences that I am missing?

MatinF avatar Nov 19 '24 10:11 MatinF

Hi Daniel, wanted to check if you've had the chance to implement a solution for the time zone issue I mentioned? We'd love to get out asammdf GUI hosted version updated with some of these fixes.

MatinF avatar Dec 10 '24 11:12 MatinF

Hello Martin, please try the development branch code

danielhrisca avatar Dec 10 '24 13:12 danielhrisca

Latest build seems to give an error when opening:

Traceback (most recent call last):
  File "asammdfgui.py", line 52, in <module>
    main()
  File "asammdfgui.py", line 29, in main
    from asammdf.gui.utils import excepthook, set_app_user_model_id
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "asammdf\__init__.py", line 14, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "asammdf\blocks\source_utils.py", line 12, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 384, in exec_module
  File "asammdf\blocks\v4_blocks.py", line 45, in <module>
ModuleNotFoundError: No module named 'asammdf.blocks.cutils'

MatinF avatar Dec 10 '24 14:12 MatinF