picsimlab icon indicating copy to clipboard operation
picsimlab copied to clipboard

[bug] picsimlab freeze when closing

Open atesin opened this issue 2 years ago • 11 comments

when i click the "X" at title bar it freezes and mouse pointer turns a wheel... after some more attempts it shows this dialog

image

environment:

  • windows 8.1 pro x64 spanish (i hate w10)
  • picsimlab v0.8.9_210925
  • intel xeon 3.5ghz, 12gb ram, nvidia gtx1650 4gb

atesin avatar Oct 05 '21 14:10 atesin

Can you repeat the problem multiple times? Could you submit the .pzw file and code or a minimal example that causes the problem? I need to reproduce the problem in order to detect the cause.

lcgamboa avatar Oct 05 '21 16:10 lcgamboa

  • it seems it hangs when reading from serial (uart virtual module) and you close picsimlab
  • later, if i close my serial port on the other side, picsimlab stills hung
  • if i open picsimlab and my other serial port device, i close my serial device FIRST then picsimlab, it hangs either
  • if i open picsimlab (with a sketch that uses SofwareSerial + uart virt mod), NEVER open my other serial device and close picsimlab at once, it closes normally

atesin avatar Oct 07 '21 01:10 atesin

this problem is recurrent and linked to the use of com0com. It only happens sporadically to me (I don't use windows normally) and I can't reproduce the problem to try to detect the error. If you can save the workspace and upload the .pzw file it would be a start to try to reproduce the problem.

lcgamboa avatar Oct 07 '21 01:10 lcgamboa

This is reproducible on Windows 10. I tried using this example https://lcgamboa.github.io/picsimlab_examples/pzw/board_McLab2/PIC16F777/test_b3.pzw Kindly check.

mubeen-jukaku avatar Nov 23 '21 09:11 mubeen-jukaku

Hi @mubeen-jukaku, I tested this example here with the latest stable (0.8.9) and development version of PICSimLab in Windows 10 and I couldn't reproduce the error. There may be some different configuration in Windows that causes the problem on some computers and not others. Are you using the buffer overrun option in com0com as shown in the documentation?

lcgamboa avatar Nov 23 '21 18:11 lcgamboa

Thanks for your suggestion. I tried to reinstall and reconfigure com0com driver. The ports are not getting detected. In device manager it shows an error saying the driver is not signed. Is there a solution for this. I am searching for free alternatives as well.

mubeen-jukaku avatar Nov 24 '21 03:11 mubeen-jukaku

in my case, i remember i disabled buffer overrrun protection, because com0com always transfers data ok no matter the baud rates i set in each endpoint, and sometines in my app i need to see the "garbage" to know when bauds+flags are wrong.... and i thought this setting could be related

(i don't have my pc right now because am in another city temporarily)

atesin avatar Nov 24 '21 07:11 atesin

Thanks for your suggestion. I tried to reinstall and reconfigure com0com driver. The ports are not getting detected. In device manager it shows an error saying the driver is not signed. Is there a solution for this. I am searching for free alternatives as well.

When the latest version of com0com doesn't work, the previous version usually resolves the issue of certificates. Try to install it https://sourceforge.net/projects/com0com/files/com0com/2.2.2.0/com0com-2.2.2.0-x64-fre-signed.zip/download

lcgamboa avatar Nov 24 '21 13:11 lcgamboa

in my case, i remember i disabled buffer overrrun protection, because com0com always transfers data ok no matter the baud rates i set in each endpoint, and sometines in my app i need to see the "garbage" to know when bauds+flags are wrong.... and i thought this setting could be related

The "buffer overrun" option is usually useful to discard data that is received without the two ports being connected (common behavior in a real device). With this option turned off when the port is opened it receives all the buffer contents that were written by the other peer when it was closed.

(i don't have my pc right now because am in another city temporarily) Any test or information that helps to identify the source of the problem is welcome.

lcgamboa avatar Nov 24 '21 13:11 lcgamboa

When the latest version of com0com doesn't work, the previous version usually resolves the issue of certificates. Try to install it https://sourceforge.net/projects/com0com/files/com0com/2.2.2.0/com0com-2.2.2.0-x64-fre-signed.zip/download

I was able to install the older version. But picsimlab is picking up COM5 port by default. This port is a Serial Over Lan (SOL) port. Is there a way to specify the port to pick in picsimlab?

mubeen-jukaku avatar Nov 24 '21 14:11 mubeen-jukaku

Is there a way to specify the port to pick in picsimlab?

Yes. In menu File->Configure.

lcgamboa avatar Nov 24 '21 16:11 lcgamboa

Hi, It still freezes for me on windows 10, when I change a board from the menu.

NOTE: I'm also using com0com.

sulemankm avatar Nov 11 '23 13:11 sulemankm

Hi @sulemankm , this problem normally occurs when com0com's buffer overrrun option is not enabled. Could you tell us which exact version you are using (0.9.0?) and which board change causes the problem to happen? I need as much information as possible to try to reproduce the problem. After crashing when opening PICSimLab, does any information appear in the Log window?

lcgamboa avatar Nov 11 '23 15:11 lcgamboa

lcgamboa

Screenshot (158) Screenshot (159) I completed the project Ranjaniot / IOT-based-Home-Automation-Solution-in-PicsimLab Uploading Screenshot (158).png…

Ranjaniot avatar Jan 28 '24 07:01 Ranjaniot