chenxuuu / llcom

🛠功能强大的串口工具。支持Lua自动化处理、串口调试、WinUSB、串口曲线、TCP测试、MQTT测试、编码转换、乱码恢复等功能
https://llcom.papapoi.com/
Apache License 2.0
858 stars 208 forks source link

虚拟串口发送数据失败 #164

Closed SmartElec closed 6 months ago

SmartElec commented 6 months ago

描述一下这个bug / Describe the bug

串口是使用vspd创建的虚拟串口,打开串口没有报错,发送数据的时候报错,报错信息如图

复现步骤 / To Reproduce

首先打开串口,发送框是默认的数据uart data 然后点击发送 弹出提示框

串口数据发送失败!请检查连接!
System.NullReferenceException:未将对象引I用设置到对象的实例。
在 llcom.Model.Uart.SendData(Bytel] data)
在llcom.MainWindow.sendUartData(Bytel] data,Nullable1is_hex)

预期的行为 / Expected behavior

预期的行为是不会出现发送失败

截图 / Screenshots

image

日志 / Logs

No response

系统 / System

Win10 22H2

软件版本 / Version

1.1.3.3

验证

LuaRobot commented 6 months ago

⚠ 你的Issue可能缺少了一些信息,请自觉补全,以证明issue内容的真实性:

⚠ Your issue may be missing some information, please complete it to prove the authenticity of the content of the issue:

SmartElec commented 6 months ago

上面说错了,是所有串口都是一样的效果.

chenxuuu commented 6 months ago

信息太少了,提供一下下面的信息吧:

  1. 软件报错时完整的截图
  2. 整个文件夹打包发上来
SmartElec commented 6 months ago

信息太少了,提供一下下面的信息吧:

  1. 软件报错时完整的截图
  2. 整个文件夹打包发上来

image llcom.zip

日志

2024-05-14 14:05:42.359 +08:00 [INF] [SRART]Logs by LLCOM. https://github.com/chenxuuu/llcom
2024-05-14 14:05:42.397 +08:00 [DBG] [OpenClosePortButton]now:False
2024-05-14 14:05:42.398 +08:00 [DBG] [openPort]False,USB Serial Port (COM18)
2024-05-14 14:05:42.398 +08:00 [DBG] [openPort]GetPortNames
2024-05-14 14:05:42.399 +08:00 [DBG] [openPort]GetPortNames4
2024-05-14 14:05:42.399 +08:00 [DBG] [openPort]PortName:COM18,isOpeningPort:False
2024-05-14 14:05:42.399 +08:00 [DBG] [openPort]SetName
2024-05-14 14:05:42.400 +08:00 [DBG] [openPort]open
2024-05-14 14:05:42.400 +08:00 [DBG] [UartOpen]refreshSerialDevice
2024-05-14 14:05:42.401 +08:00 [DBG] [refreshSerialDevice]start
2024-05-14 14:05:42.401 +08:00 [DBG] [refreshSerialDevice]lastPortBaseStream.Dispose
2024-05-14 14:05:42.401 +08:00 [DBG] [refreshSerialDevice]BaseStream.Dispose
2024-05-14 14:05:42.401 +08:00 [DBG] [refreshSerialDevice]Dispose
2024-05-14 14:05:42.401 +08:00 [DBG] [refreshSerialDevice]new
2024-05-14 14:05:42.401 +08:00 [DBG] [refreshSerialDevice]done
2024-05-14 14:05:42.401 +08:00 [DBG] [UartOpen]open
2024-05-14 14:05:42.405 +08:00 [DBG] [UartOpen]done
2024-05-14 14:05:42.405 +08:00 [DBG] [openPort]change show
2024-05-14 14:05:42.406 +08:00 [DBG] [openPort]check to send
2024-05-14 14:05:42.406 +08:00 [DBG] [openPort]done
2024-05-14 14:05:42.406 +08:00 [DBG] [openPort]all done
2024-05-14 14:07:46.963 +08:00 [DBG] [OpenClosePortButton]now:True
2024-05-14 14:07:46.963 +08:00 [DBG] [OpenClosePortButton]close
2024-05-14 14:07:46.963 +08:00 [DBG] [UartClose]refreshSerialDevice
2024-05-14 14:07:46.963 +08:00 [DBG] [refreshSerialDevice]start
2024-05-14 14:07:46.963 +08:00 [DBG] [refreshSerialDevice]lastPortBaseStream.Dispose
2024-05-14 14:07:46.963 +08:00 [DBG] [refreshSerialDevice]BaseStream.Dispose
2024-05-14 14:07:46.963 +08:00 [DBG] [refreshSerialDevice]Dispose
2024-05-14 14:07:46.963 +08:00 [DBG] [refreshSerialDevice]new
2024-05-14 14:07:46.963 +08:00 [DBG] [refreshSerialDevice]done
2024-05-14 14:07:46.963 +08:00 [DBG] [UartClose]Close
2024-05-14 14:07:46.963 +08:00 [DBG] [UartClose]done
2024-05-14 14:07:46.963 +08:00 [DBG] [OpenClosePortButton]close done
2024-05-14 14:07:46.963 +08:00 [DBG] [OpenClosePortButton]change show
2024-05-14 14:07:46.964 +08:00 [DBG] [OpenClosePortButton]change show done
2024-05-14 14:07:48.247 +08:00 [DBG] [OpenClosePortButton]now:False
2024-05-14 14:07:48.247 +08:00 [DBG] [openPort]False,USB Serial Port (COM18)
2024-05-14 14:07:48.247 +08:00 [DBG] [openPort]GetPortNames
2024-05-14 14:07:48.247 +08:00 [DBG] [openPort]GetPortNames4
2024-05-14 14:07:48.247 +08:00 [DBG] [openPort]PortName:COM18,isOpeningPort:False
2024-05-14 14:07:48.247 +08:00 [DBG] [openPort]SetName
2024-05-14 14:07:48.247 +08:00 [DBG] [openPort]open
2024-05-14 14:07:48.247 +08:00 [DBG] [UartOpen]refreshSerialDevice
2024-05-14 14:07:48.247 +08:00 [DBG] [refreshSerialDevice]start
2024-05-14 14:07:48.247 +08:00 [DBG] [refreshSerialDevice]lastPortBaseStream.Dispose
2024-05-14 14:07:48.247 +08:00 [DBG] [refreshSerialDevice]BaseStream.Dispose
2024-05-14 14:07:48.247 +08:00 [DBG] [refreshSerialDevice]Dispose
2024-05-14 14:07:48.247 +08:00 [DBG] [refreshSerialDevice]new
2024-05-14 14:07:48.248 +08:00 [DBG] [refreshSerialDevice]done
2024-05-14 14:07:48.248 +08:00 [DBG] [UartOpen]open
2024-05-14 14:07:48.251 +08:00 [DBG] [UartOpen]done
2024-05-14 14:07:48.251 +08:00 [DBG] [openPort]change show
2024-05-14 14:07:48.252 +08:00 [DBG] [openPort]check to send
2024-05-14 14:07:48.252 +08:00 [DBG] [openPort]done
2024-05-14 14:07:48.252 +08:00 [DBG] [openPort]all done
SmartElec commented 6 months ago

信息太少了,提供一下下面的信息吧:

  1. 软件报错时完整的截图
  2. 整个文件夹打包发上来

发现是因为从gitee旧版本1.0.1.1,点击升级到1.1.3.3,才出现的问题,直接下载1.1.3.3没有出现此问题.

chenxuuu commented 6 months ago

你的发送脚本怎么是空的,默认是return uartData