|
2020-12-10
| ||
| 13:44 | • Closed ticket [ed5be77734]: win: "comx:" not recognized as serial port... artifact: 0f0e945078 user: oehhar | |
| 13:40 | • Pending ticket [ed5be77734]. artifact: b201b205ba user: oehhar | |
| 13:39 | • Closed ticket [ed5be77734]. artifact: e09ddcc1d6 user: jan.nijtmans | |
| 13:26 | Fix [ed5be77734]: win: "comx:" not recognized as serial port check-in: 19f30ac371 user: jan.nijtmans tags: core-8-6-branch | |
| 13:10 | • Pending ticket [ed5be77734]: win: "comx:" not recognized as serial por... artifact: c663762f55 user: oehhar | |
| 12:26 | • Ticket [ed5be77734]: 4 changes artifact: 28614bfac1 user: jan.nijtmans | |
| 12:17 | Potential fix for [ed5be77734]: win: "comx:" not recognized as serial port. (concluded from code ins... check-in: cba5e7728d user: jan.nijtmans tags: bug-ed5be77734 | |
|
2020-12-09
| ||
| 16:52 | • Ticket [ed5be77734] win: "comx:" not recognized as serial port sta... artifact: 55dc8d3f71 user: oehhar | |
|
2020-11-17
| ||
| 16:25 | • Ticket [ed5be77734]: 4 changes artifact: 2de55a85f7 user: oehhar | |
|
2018-10-27
| ||
| 09:11 | • Ticket [ed5be77734]: 3 changes artifact: 6712ea336e user: tomkiti | |
|
2015-06-24
| ||
| 07:11 | • Ticket [ed5be77734]: 4 changes artifact: 2eb520b735 user: oehhar | |
|
2015-05-06
| ||
| 14:57 | • Ticket [ed5be77734]: 4 changes artifact: 58ba327960 user: oehhar | |
|
2015-05-01
| ||
| 14:38 | • Ticket [ed5be77734]: 3 changes artifact: ee6da80d45 user: dgp | |
|
2014-12-05
| ||
| 15:49 | • Ticket [ed5be77734]: 3 changes artifact: 1859890a6e user: jan.nijtmans | |
| 15:48 | • Ticket [ed5be77734]: 3 changes artifact: 1d74e1bc5a user: jan.nijtmans | |
| 15:47 | • Ticket [ed5be77734]: 5 changes artifact: 8afa44ec21 user: jan.nijtmans | |
|
2014-12-04
| ||
| 14:18 | • Ticket [ed5be77734]: 3 changes artifact: 867b6d20c9 user: jan.nijtmans | |
| 13:39 | • Ticket [ed5be77734]: 4 changes artifact: 903645fd81 user: oehhar | |
| 13:15 | • Ticket [ed5be77734]: 4 changes artifact: 083eb208e0 user: oehhar | |
| 12:43 | • New ticket [ed5be77734]. artifact: 66eedf3bea user: oehhar | |
win: "comx:" not recognized as serial port
E.g.
% open com1: r+ couldn't open "com1:": no such file or directory % open com1 r+ file2672fb0
This was present in 8.6.2 and was normally fixed in TCL 8.6.3. Something went wrong, fix not included, whatever.
Harald
19f30ac371Fix [ed5be77734]: win: "comx:" not recognized as serial port check-in2020-12-10 13:26:43cba5e7728dPotential fix for [ed5be77734]: win: "comx:" not recognized as serial port. (concluded from code inspection, not tested yet) check-in2020-12-10 12:17:50
I have made some additional tests sheding more light ;-)
From release 8.6.3:
- tcl86t.exe: does not show the issue
- wish86t.exe: has the issue
The same is verified with the bugfix checkin was [f27ce7a1a5] and Tk8.6.3.
So, the issue only arises for wish and not for tclsh.
dburns on the chat: 8.6.2 windows " open com1: w" creates a file with name "com1[]" where [] is a dingbat
The file may not be listed using "glob com1*".
Win XP with a physical com port
This is 8.6.2, so between the revevant patches...
Starting with [80d513f9cb4b2e03], unsafe characters (like ':') in filenames are replaced with Unicode character\uf0?? in the native form. This makes those files work transparantly, no matter if they are accessed using win32 tclsh or cygwin tclsh. For more information, see: https://cygwin.com/cygwin-ug-net/using-specialnames.html. This fully explains the appearance of the "dingbat". However, when the filename references a serial port, this conversion should not be done, that's what fixed in 8.6.3.
Why this still doesn't work in wish is a big question for me.
I'm able to reproduce it now (even though I don't have com-ports ...). Somehow the function Tcl_FSGetNativePath() returns a path with ends with the unicode-character 0xf03a in stead of ':'. i.e. the final ':' is not stripped off. I will investigate this further, finding out which code path is followed to reach this state.
I'm able to reproduce it now (even though I don't have com-ports ...). Somehow the function Tcl_FSGetNativePath() returns a path with ends with the unicode-character 0xf03a in stead of ':'. i.e. the final ':' is not stripped off. I will investigate this further, finding out which code path is followed to reach this state.
I'm able to reproduce it now (even though I don't have com-ports ...). Somehow the function Tcl_FSGetNativePath() returns a path with ends with the unicode-character 0xf03a in stead of ':'. i.e. the final ':' is not stripped off. I will investigate this further, finding out which code path is followed to reach this state.
status?
I have reverified with tcl8.6.4:
wish 8.6.4:
% set h [open com1: r+] couldn't open "com1:": no such file or directory % set h [open com1 r+] file677a6e8
and with tclsh8.6.4:
% set h [open com1: r+] file63c988 % close $h % set h [open com1 r+] file63d388
So the bug is still present when wish is used and not in tclsh. Harald
Discussion with Jan Nijtmans on ETCL:
- It appears only in the wish console, not when the script is started like 'wish.exe -f script.tcl'
- Jan supposes, tat the reason lies in the stdin/stdout magic of the wish console which, by accident, does something with "comx:".
Any progress on this? It's still not working in 8.6.8. This breaks our code when upgrading from 8.5 to 8.6.
Issue still present in TCL 8.6.10
A sister ticket is opened in Tk, as this only shows up in WISH:
New assumption: In tclWinFile.c, line 3087, a comment sais: "For a reserved device, strip a possible postfix ':'". But in reality, the path given to MultiByteToWideChar() is not null-terminated in this case. That looks, wrong, and might be the cause for this problem.
I'm not on a Windows machine now, I will test this soon, when I can.
If this assumption is true, the fix is here: [cba5e7728d8a6b45]
Great! For me, that fixes the issue.
I have build against tk8.6.10 release with MS-VC6 on Windows 32 bit.
The issue you found looks like a more general issue in the native path machinery.
Thank you, great, Harald
Thanks for testing! Yes, it was a general issue in the native path machinery. A situation in which a WCHR string was not NULL-terminated, that's what made this so difficult to track down.
Anyway, it will be finally (after 6 years!) fixed in Tcl 8.6.11. Yeah!
We have two corrections:
1)
3102 3102 MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nativePathPtr,
- - len + 1);
- + len + 2);
2)
- + nativePathPtr[len] = 0;
I first tested correction (2) which did the job.
Correction 2) feels also ok. The buffer has len+6 size.
Thank you, Harald