Commit Graph
21 Commits
Author SHA1 Message Date
Alexey Esaulenko 2082845d03 SocketCANd: fix memory leak: string can be accessed after object destruction 2024-01-19 15:00:39 +04:00
maciek16c 190d51ae90 LAWICEL CAN-FD support, CAN-FD data rate selection 2023-11-22 14:39:36 +01:00
Collin Kidder 780e2fb1a2 Several changes suggested in draft pull requests from llange. Fix some
ambiguous places, fix warnings, fix errors when trying to compile with
QT6
2023-04-11 21:15:34 -04:00
diekleinekuh d51c048460 fix rare crash on exit 2023-02-21 14:50:31 +01:00
Andy Huska 01d793f21f Merge branch 'master' into fix_customsendcrash 2022-11-02 16:52:20 -05:00
Andy Huska 1b41decd20 Custom sender is no longer crashing
There are a TON of explorations I did here, many may be unnecessary, but this is a stake in the ground.

The main issue was the strange queue logic in canconmanager::sendFrame which puts the tx data in the rx
queue so it will show up in the displayed data.  It caused SIGABRT and SIGSEG to show up everywhere.
It is NOT fixed yet, but TX works over the wire you just can't see it in the tableview.

I thought at first it was only when overwrite data was active, so I put in a a pile of changes to keep
frames and filtered frames as two seperate copies of data where frames was always complete and filtered
was only what was seen in the mainwindow.  It made it so the graphing window would work with overwrite
data active which is an improvement.  I wouldn't roll these changes back.  Because of these changes I
had to update the frame sorting code adjust the refresh function in canframemode.cpp

I also thought it was related to UI updates, but its not, that's been confirmed.

I put a mutex around the custom sender tick timer so that the 1ms timer wouldn't re-enter its callback.
This didn't fix the crash, but it sure seems to make a lot of sense, and the way I did it no elasped
time is lost for tracking purposes, and in reality theres no way 1ms was consistent anyway.

I put a mutex around the shrinking of frames and filteredframes to make sure we weren't deleting at
the same time as accessing, but honestly we acccess those lists in many places without semaphores so
that probably did nothing.

Fixed a bug in FrameSenderWindow:DoModifiers that was improperly parsing and sometimes crashing when
looking for the ~ operator before a symbol.

Also added some minor work to keep row expansion functioning when changing filters or sorting.  Need
to make some tweaks so it stops trying so hard when overwrite is not active

Theres also code in main.c taht makes debugging output super verbose.

Committing now to start cleanup
2022-11-01 15:01:07 -05:00
Collin Kidder db3056818f Merge pull request #534 from qurrent-llc/add_reformatdecodeddatafile
Add mainmenu option to export decoded data as csv
2022-10-19 19:07:40 -04:00
Andy Huska 0220554e6b Merge branch 'fix_socketcandpartialframedrop' of github.com:qurrent-llc/SavvyCAN into fix_socketcandpartialframedrop 2022-10-17 10:45:58 -05:00
Andy Huska cb0746f3d0 Fixed socketcand dropping valid messaages with 0 data bytes 2022-10-17 10:39:51 -05:00
Andy Huska ef762e5ae5 Added menu items to export csv decoded data, still need wiring 2022-10-17 10:33:13 -05:00
Andy Huska 6e4aac467b Merge pull request #5 from collin80/master
Getting latest from upstream
2022-10-09 08:48:21 -07:00
Andy Huska e86cfb277a Cleaned up all the UI elements and error checking for rebase and duplicate 2022-10-09 10:45:30 -05:00
Collin Kidder 7678a498db Merge branch 'master' of github.com:collin80/SavvyCAN 2022-10-04 19:59:46 -04:00
Collin Kidder 9ebbaca668 Add a new connection type - Lawicel. It works for some devices, not
all. More development needed but this is a start. Also added ability
to set serial speed and bus speed in the device setup which may be
useful for other connection devices too.
2022-10-04 19:48:11 -04:00
Andy Huska 3c07785040 Buffer for partially received and/or leftover frame fragments
now working with multiple active busses.

Removed commented out test code and put a fix in for for
the filters list not having its capacity properly reserved
in recalcOverwrite so multiple entries of the same message
show up in the filtered view
2022-10-03 17:02:13 -05:00
Andy Huska e52a74ac7a Found a bug where complete frames being removed from the buffer were being shorted by 1 character
Committing now with debug comments for future reference
2022-10-03 16:36:30 -05:00
Andy Huska 08953a4004 Improved socketcand input buffer handling to reduce lost data.
No longer tossing partial frames, saving the data to concat with future data.
On startup there can be some data loss, but after it gets rolling there is none.
Added rough provision to ensure the buffer doesn't get filled with bad data, but
the decodeFrames recursive calls do a pretty good job of getting rid of it so I
haven't seen the buffer grow after millions of frames coming over a UDP-based VPN.
2022-10-03 11:26:28 -05:00
Andy Huska 60520b5939 Added handing of ok message from RAW mode switch coming in out of order with other messages...
For now I made it its own else statement so it can be detected
2022-09-17 12:52:03 -05:00
Andy Huska 47d07b8bf2 Fixed bug where switching to RAW mode would fail due to the "ok" response being received in the same message as the first data frame
Sometimes when opening socketcand 1 or more busses won't start right and there's a ton of debug data saying "received datagramm: ...."
It seems to happen because the switch to RAW mode is in progress and we receive the OK with a frame in the same datagramm and we don't parse the OK out of the string
but rather expect the whole string to just be OK.  Offending code is in socketcand.cpp SocketCANd::procRXData line 386

Fixed by looking to see if the < ok > message was at index 0 of the incoming message...could also look for it elsewhere (as in index != -1), but not sure if necessary
2022-09-17 12:48:48 -05:00
Andy Huska 7b966fe4a6 Fixed incorrect handling of partial frame tagged onto the end of a complete frame.
Not sure if my method drops the partial or just sends the buffer back to continue filling.
2022-09-16 15:38:54 -05:00
Bertrand c49783a55b adding socketcand support 2021-02-23 09:38:19 +01:00