Closed mjchow closed 1 year ago
Can you try it with an older library version, like 2.9.x?
Can you try it with an older library version, like 2.9.x?
Is it the reason why I am using a higher version?
Is it the reason why I am using a higher version?
I don't know :)
You can try an earlier version (like 2.9.3) if you don't use any new APIs introduced in the 2.10.x versions. I recommend it because there was lots of changes in the 2.10.x versions, and it usually helps to figure out what the problem may be if an older version works. But it is just an idea :)
Is it the reason why I am using a higher version?
I don't know :)
You can try an earlier version (like 2.9.3) if you don't use any new APIs introduced in the 2.10.x versions. I recommend it because there was lots of changes in the 2.10.x versions, and it usually helps to figure out what the problem may be if an older version works. But it is just an idea :)
This problem is difficult to reproduce. I will try to reproduce this issue using version 2.9.x.
Also, the error code and location you posted indicate that you are trying to open a port that was previously opened in your own code and never properly closed. Are you certain that all of your code paths properly call closePort() before trying to open the port again?
Also, the error code and location you posted indicate that you are trying to open a port that was previously opened in your own code and never properly closed. Are you certain that all of your code paths properly call closePort() before trying to open the port again?
Thank you for your reply, I will double-check my code.
Hello, I am using version 2.10.2 of JSerialComm. Sometimes, when I call openPort(), it fails. The value of getLastErrorCode is 2 and getLastErrorLocation is 710. However, if I restart my program, openPort() succeeds and I receive the correct data. But if I don't restart my program and try openPort() multiple times, it always fails. My platform is Windows 10. Thank you for your response.