moohaad / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Crash when doing "find in files" with a japanese directory #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Activate Japanese locale support in your Windows installation (Control
Panel, Internationl settings). This will install fonts required to see
japanese characters.
2. Create a directory with a japanese name by running this:
python -c "import os; os.makedirs(u'\u30c7\u30b9\u30af\u30c8\u30c3\u30d7')
3. Verify that a japanese directory has been created
4. Run a "Find in files" search which includes that directory.

What is the expected output? What do you see instead?
I see this crash:

Exception class: EOSError
Exception message: System Error.  Code: 123.
The filename, directory name, or volume label syntax is incorrect.
Exception address: 00412319
------------------------------------------------------------------------------
PyScripter version : 1.9.9.1
Python DLL : python24.dll
Python Engine : peRemote
------------------------------------------------------------------------------
Stack list, generated 28/01/2008 17.24.16
(00011314){PyScripter.exe} [00412314] SysUtils.RaiseLastOSError + $70
(0001129D){PyScripter.exe} [0041229D] SysUtils.RaiseLastOSError + $5
(0034F72E){PyScripter.exe} [0075072E]
JvSearchFiles.TJvSearchFiles.HandleError (Line 602, "JvSearchFiles.pas" +
18) + $0
(0034F7F0){PyScripter.exe} [007507F0]
JvSearchFiles.TJvSearchFiles.InternalSearch (Line 636, "JvSearchFiles.pas"
+ 5) + $18
(000046B3){PyScripter.exe} [004056B3] System.@LStrCat + $2F
(0034F87A){PyScripter.exe} [0075087A]
JvSearchFiles.TJvSearchFiles.InternalSearch (Line 650, "JvSearchFiles.pas"
+ 19) + $38
(0034F98E){PyScripter.exe} [0075098E] JvSearchFiles.TJvSearchFiles.Search
(Line 696, "JvSearchFiles.pas" + 32) + $11
(003581EB){PyScripter.exe} [007591EB]
cFindInFiles.TGrepSearchRunner.GrepDirectory (Line 464, "cFindInFiles.pas"
+ 18) + $3
(00358092){PyScripter.exe} [00759092]
cFindInFiles.TGrepSearchRunner.GrepDirectories (Line 433,
"cFindInFiles.pas" + 9) + $15
(0035843A){PyScripter.exe} [0075943A]
cFindInFiles.TGrepSearchRunner.Execute (Line 512, "cFindInFiles.pas" + 34)
+ $1A
(0034C796){PyScripter.exe} [0074D796]
frmFindResults.TFindResultsWindow.Execute (Line 679, "frmFindResults.pas" +
22) + $9
(0034C7EE){PyScripter.exe} [0074D7EE]
frmFindResults.TFindResultsWindow.Execute (Line 685, "frmFindResults.pas" +
28) + $1A
(0002DAC6){PyScripter.exe} [0042EAC6] Contnrs.TComponentList.GetItems + $A
(001493D3){PyScripter.exe} [0054A3D3] AppEvnts.TMultiCaster.GetAppEvents + $B
(00148CCE){PyScripter.exe} [00549CCE] AppEvnts.TMultiCaster.DoActionExecute
+ $66
(003ACEFF){PyScripter.exe} [007ADEFF]
dmCommands.TCommandsDataModule.actFindInFilesExecute (Line 1168,
"dmCommands.pas" + 1) + $9
(0002C67F){PyScripter.exe} [0042D67F] Classes.TBasicAction.Execute + $F
(0007E1D1){PyScripter.exe} [0047F1D1] ActnList.TContainedAction.Execute + $31
(0007EE98){PyScripter.exe} [0047FE98] ActnList.TCustomAction.Execute + $50
(0007EF31){PyScripter.exe} [0047FF31] ActnList.TCustomAction.HandleShortCut
+ $5
(0007E557){PyScripter.exe} [0047F557] ActnList.TCustomActionList.IsShortCut
+ $8B
(003A385A){PyScripter.exe} [007A485A]
frmPyIDEMain.TPyIDEMainForm.FormShortCut (Line 2747, "frmPyIDEMain.pas" +
1) + $C
(00089164){PyScripter.exe} [0048A164] Forms.TCustomForm.IsShortCut + $28
(000907DE){PyScripter.exe} [004917DE] RtlVclOptimize.GetDynaMethod + $22
(002920BB){PyScripter.exe} [006930BB] TntLXForms.TTntFormLX.IsShortCut
(Line 383, "TntLXForms.pas" + 1) + $2
(00075078){PyScripter.exe} [00476078] Controls.TWinControl.IsMenuKey + $68
(000750C5){PyScripter.exe} [004760C5] Controls.TWinControl.CNKeyDown + $1D
(0006F2AF){PyScripter.exe} [004702AF] Controls.TControl.WndProc + $2BB
(001732D4){PyScripter.exe} [005742D4] SynEdit.GetMsgProc (Line 11096,
"SynEdit.pas" + 27) + $F
(0007314D){PyScripter.exe} [0047414D] Controls.TWinControl.WndProc + $499
(00169C8E){PyScripter.exe} [0056AC8E] SynEdit.TCustomSynEdit.WndProc (Line
6196, "SynEdit.pas" + 22) + $4
(000728D8){PyScripter.exe} [004738D8] Controls.TWinControl.MainWndProc + $2C
(0002D340){PyScripter.exe} [0042E340] Classes.StdWndProc + $14
(0008C37C){PyScripter.exe} [0048D37C] Forms.TApplication.IsKeyMsg + $84
(0008C406){PyScripter.exe} [0048D406] Forms.TApplication.IsHintMsg + $1A
(0008C5F9){PyScripter.exe} [0048D5F9] Forms.TApplication.ProcessMessage + $D1
(0008C65E){PyScripter.exe} [0048D65E] Forms.TApplication.HandleMessage + $A
(0008C87E){PyScripter.exe} [0048D87E] Forms.TApplication.Run + $96
(003BF328){PyScripter.exe} [007C0328] PyScripter.PyScripter (Line 120, "" +
6) + $7
------------------------------------------------------------------------------
System   : Windows 2000 Professional, Version: 5.0, Build: 893, "Service
Pack 4"
Processor: AMD, AMD Sempron(tm)   2800+, 2000 MHz MMXex SSE1 3DNow!ex
Memory: 1535; free 772
Display  : 1920x1200 pixels, 32 bpp
------------------------------------------------------------------------------
List of loaded modules:
[00400000] C:\Program Files\PyScripter\PyScripter.exe
           1.9.9.1 - 1.9.9.1
[01CE0000] C:\WINNT\system32\MSVCR71.dll
<7D000000> 8.0.21213.0 - 8.00.21213.00
           Microsoft® C Runtime Library
[03870000] C:\WINNT\system32\jsproxy.dll
<01000000> 6.0.2800.1603 - 6.00.2800.1603
           JScript Proxy Auto-Configuration
[03880000] C:\WINNT\system32\jscript.dll
<76F90000> 5.6.0.8831 - 5.6.0.8831
           Microsoft (r) JScript
[03D20000] C:\WINNT\system32\SHDOCVW.dll
<71700000> 6.0.2800.1915 - 6.00.2800.1915 (xpsp2.071011-1003)
           Shell Doc Object and Control Library
[04DE0000] C:\Program Files\Common Files\Adobe\Acrobat\ActiveX\PDFShell.dll
<10000000> 8.1.0.0 - 8.1.0.0
           PDF Shell Extension
[10000000] C:\Python24\DLLs\_ssl.pyd
           (no version info)
[16080000] C:\Program Files\Bonjour\mdnsNSP.dll
           1.0.2.9 - 1,0,2,9
           Bonjour Namespace Provider
[1A400000] C:\WINNT\system32\urlmon.dll
           6.0.2800.1603 - 6.00.2800.1603
           OLE32 Extensions for Win32
[1D110000] C:\Python24\DLLs\select.pyd
           (no version info)
[1D120000] C:\Python24\DLLs\unicodedata.pyd
           (no version info)
[1E000000] C:\WINNT\system32\python24.dll
           2.4.2150.1012 - 2.4.2
           Python Core
[1E1D0000] C:\Python24\DLLs\_socket.pyd
           (no version info)
[573E0000] C:\WINNT\system32\HHCtrl.ocx
           5.2.3790.620 - 5.2.3790.620 (srv03_gdr.061210-2346)
           Microsoft® HTML Help Control
[60400000] C:\Program Files\OpenOffice.org 2.3\program\uwinapi.dll
           2.0.500.0 - 2.03
[61E70000] C:\Program Files\OpenOffice.org 2.3\program\stlport_vc7145.dll
           4.5.2003.120 - 4.5.2003.0120
           STLport
[62350000] C:\Program Files\OpenOffice.org 2.3\program\shlxthdl.dll
           2.0.500.0 - 2.03
[63000000] C:\WINNT\system32\wininet.dll
           6.0.2800.1603 - 6.00.2800.1603
           Internet Extensions for Win32
[66650000] C:\WINNT\system32\USP10.dll
           1.325.2195.6692 - 1.0325.2195.6692
           Uniscribe Unicode script processor
[690A0000] C:\WINNT\system32\PSAPI.dll
           5.0.2134.1 - 5.00.2134.1
           Process Status Helper
[695E0000] C:\WINNT\system32\olepro32.dll
           5.0.4522.0 - 5.0.4522
[69640000] C:\WINNT\system32\oleacc.dll
           4.2.3100.0 - 4.2.3100.0
           Active Accessibility Core Component
[6A8F0000] C:\WINNT\System32\MSVFW32.DLL
           5.0.2195.6612 - 5.00.2195.6612
           Microsoft Video for Windows DLL
[6B2C0000] C:\WINNT\system32\msimg32.dll
           5.0.2180.1 - 5.00.2180.1
           GDIEXT Client DLL
[6CA60000] C:\WINNT\system32\LPK.DLL
           5.0.2195.6692 - 5.00.2195.6692
           Language Pack
[6E420000] C:\WINNT\system32\INDICDLL.dll
           5.0.2920.0 - 5.00.2920.0000
           Keyboard Language Indicator Shell Hook Extension
[70020000] C:\WINNT\system32\faxshell.dll
           5.0.2134.1 - 5.00.2134.1
           Fax Tiff Data Column Provider
[70A70000] C:\WINNT\system32\SHLWAPI.dll
           6.0.2800.1915 - 6.00.2800.1915 (xpsp2.071011-1003)
           Shell Light-weight Utility Library
[70D00000] C:\Program Files\OpenOffice.org 2.3\program\gdiplus.dll
           5.1.3102.1360 - 5.1.3102.1360 (xpsp2.040109-1800)
           Microsoft GDI+
[71500000] C:\WINNT\System32\browseui.dll
           6.0.2800.1915 - 6.00.2800.1915 (xpsp2.071011-1003)
           Shell Browser UI Library
[71710000] C:\WINNT\system32\comctl32.dll
           5.81.4968.2500 - 5.81
           Common Controls Library
[718C0000] C:\WINNT\system32\shdoclc.dll
           6.0.2800.1106 - 6.00.2800.1106
           Shell Doc Object and Control Library
[71F00000] C:\WINNT\System32\docprop2.dll
           5.0.2178.1 - 5.00.2178.1
           DocProp2
[74870000] C:\WINNT\System32\AVIFIL32.DLL
           5.0.2195.6612 - 5.00.2195.6612
           Microsoft AVI File support library
[74FD0000] C:\WINNT\system32\msafd.dll
           5.0.2195.6602 - 5.00.2195.6602
           Microsoft Windows Sockets 2.0 Service Provider
[75010000] C:\WINNT\System32\wshtcpip.dll
           5.0.2195.6601 - 5.00.2195.6601
           Windows Sockets Helper DLL
[75020000] C:\WINNT\System32\WS2HELP.DLL
           5.0.2134.1 - 5.00.2134.1
           Windows Socket 2.0 Helper for Windows NT
[75030000] C:\WINNT\System32\WS2_32.DLL
           5.0.2195.6601 - 5.00.2195.6601
           Windows Socket 2.0 32-Bit DLL
[75050000] C:\WINNT\System32\WSOCK32.dll
           5.0.2195.6603 - 5.00.2195.6603
           Windows Socket 32-Bit DLL
[75150000] C:\WINNT\System32\SAMLIB.dll
           5.0.2195.6944 - 5.00.2195.6944
           SAM Library DLL
[75160000] C:\WINNT\System32\ntlanman.dll
           5.0.2195.6824 - 5.00.2195.6824
           Microsoft® Lan Manager
[751C0000] C:\WINNT\System32\NETRAP.dll
           5.0.2134.1 - 5.00.2134.1
           Net Remote Admin Protocol DLL
[751D0000] C:\WINNT\System32\NETUI1.dll
           5.0.2134.1 - 5.00.2134.1
           NT LM UI Common Code - Networking classes
[75210000] C:\WINNT\System32\NETUI0.dll
           5.0.2195.6601 - 5.00.2195.6601
           NT LM UI Common Code - GUI Classes
[752F0000] C:\WINNT\system32\oledlg.dll
           5.0.2195.7114 - 1.0
           Microsoft Windows(TM) OLE 2.0 User Interface Support
[759B0000] C:\WINNT\system32\LZ32.DLL
           5.0.2195.6611 - 5.00.2195.6611
           LZ Expand/Compress API DLL
[75AB0000] C:\WINNT\system32\sensapi.dll
           5.0.2195.6627 - 5.00.2195.6627
           SENS Connectivity API DLL
[75E60000] C:\WINNT\system32\imm32.dll
           5.0.2195.6655 - 5.00.2195.6655
           Windows 2000 IMM32 API Client DLL
[76620000] C:\WINNT\system32\mpr.dll
           5.0.2195.7134 - 5.00.2195.7134
           Multiple Provider Router DLL
[76B20000] C:\WINNT\system32\RICHED32.DLL
           5.0.2134.1 - 5.00.2134.1
           Wrapper Dll for Richedit 1.0
[76B30000] C:\WINNT\system32\comdlg32.dll
           5.0.3700.6693 - 5.00.3700.6693
           Common Dialogs DLL
[76FA0000] C:\WINNT\system32\ntshrui.dll
           5.0.2134.1 - 5.00.2134.1
           Shell extensions for sharing
[770C0000] C:\WINNT\system32\CSCDLL.DLL
           5.0.2195.6713 - 5.00.2195.6713
           Offline Network Agent
[772B0000] C:\WINNT\system32\RICHED20.DLL
           5.30.23.1227 - 5.30.23.1227
           Rich Text Edit Control, v3.0
[77320000] C:\WINNT\system32\MPRAPI.dll
           5.0.2181.1 - 5.00.2181.1
           Windows NT MP Router Administration DLL
[77340000] C:\WINNT\system32\iphlpapi.dll
           5.0.2195.7097 - 5.00.2195.7097
           IP Helper API
[77360000] C:\WINNT\system32\DHCPCSVC.DLL
           5.0.2195.7085 - 5.00.2195.7085
           DHCP Client Service
[77380000] C:\WINNT\system32\ADSLDPC.DLL
           5.0.2195.6993 - 5.00.2195.6993
           ADs LDAP Provider C DLL
[773B0000] C:\WINNT\system32\ACTIVEDS.DLL
           5.0.2195.6601 - 5.00.2195.6601
           ADs Router Layer DLL
[773E0000] C:\WINNT\system32\ATL.DLL
           3.0.9435.0 - 3.00.9435
           ATL Module for Windows NT (Unicode)
[77410000] C:\WINNT\System32\MSACM32.dll
           5.0.2134.1 - 5.00.2134.1
           Microsoft ACM Audio Filter
[77430000] C:\WINNT\system32\MSASN1.dll
           5.0.2195.6905 - 5.00.2195.6905
           ASN.1 Runtime APIs
[774C0000] C:\WINNT\system32\rasman.dll
           5.0.2195.6824 - 5.00.2195.6824
           Remote Access Connection Manager
[774E0000] C:\WINNT\system32\RASAPI32.dll
           5.0.2195.6920 - 5.00.2195.6920
           Remote Access API
[77520000] C:\WINNT\system32\ICMP.dll
           5.0.2134.1 - 5.00.2134.1
           ICMP DLL
[77530000] C:\WINNT\system32\TAPI32.dll
           5.0.2195.6664 - 5.00.2195.6664
           Microsoft® Windows(TM) Telephony API Client DLL
[77570000] C:\WINNT\system32\winmm.dll
           5.0.2161.1 - 5.00.2161.1
           MCI API DLL
[777E0000] C:\WINNT\System32\winrnr.dll
           5.0.2160.1 - 5.00.2160.1
           LDAP RnR Provider DLL
[777F0000] C:\WINNT\system32\rasadhlp.dll
           5.0.2195.7098 - 5.00.2195.7098
           Remote Access AutoDial Helper
[77800000] C:\WINNT\system32\winspool.drv
           5.0.2195.6659 - 5.00.2195.6659
           Windows Spooler Driver
[77820000] C:\WINNT\system32\version.dll
           5.0.2195.6623 - 5.00.2195.6623
           Version Checking and File Installation Libraries
[77830000] C:\WINNT\system32\RTUTILS.DLL
           5.0.2168.1 - 5.00.2168.1
           Routing Utilities
[77840000] C:\WINNT\system32\cscui.dll
           5.0.2195.6705 - 5.00.2195.6705
           Client Side Caching UI
[77880000] C:\WINNT\system32\SETUPAPI.DLL
           5.0.2195.6622 - 5.00.2195.6622
           Windows Setup API
[77950000] C:\WINNT\system32\WLDAP32.DLL
           5.0.2195.7017 - 5.00.2195.7017
           Win32 LDAP API DLL
[77980000] C:\WINNT\System32\DNSAPI.DLL
           5.0.2195.7100 - 5.00.2195.7100
           DNS Client API DLL
[779B0000] C:\WINNT\system32\oleaut32.dll
           2.40.4531.0 - 2.40.4531
[77BF0000] C:\WINNT\System32\NTDSAPI.dll
           5.0.2195.6666 - 5.00.2195.6666
           NT5DS
[77D30000] C:\WINNT\system32\RPCRT4.dll
           5.0.2195.7090 - 5.00.2195.7090
           Remote Procedure Call Runtime
[77E10000] C:\WINNT\system32\USER32.dll
           5.0.2195.7133 - 5.00.2195.7133
           Windows 2000 USER API Client DLL
[77F40000] C:\WINNT\system32\GDI32.dll
           5.0.2195.7138 - 5.00.2195.7138
           GDI Client DLL
[77F80000] C:\WINNT\system32\ntdll.dll
           5.0.2195.7006 - 5.00.2195.7006
           NT Layer DLL
[78000000] C:\WINNT\system32\msvcrt.dll
           6.1.9844.0 - 6.10.9844.0
           Microsoft (R) C Runtime Library
[78130000] C:\WINNT\system32\MSVCR80.dll
           8.0.50727.762 - 8.00.50727.762
           Microsoft® C Runtime Library
[782C0000] C:\WINNT\System32\rnr20.dll
           5.0.2195.6603 - 5.00.2195.6603
           Windows Socket2 NameSpace DLL
[7C0F0000] C:\WINNT\system32\USERENV.DLL
           5.0.2195.7002 - 5.00.2195.7002
           Userenv
[7C2D0000] C:\WINNT\system32\ADVAPI32.DLL
           5.0.2195.7038 - 5.00.2195.7038
           Advanced Windows 32 Base API
[7C340000] C:\WINNT\system32\Secur32.dll
           5.0.2195.6695 - 5.00.2195.6695
           Security Support Provider Interface
[7C3A0000] C:\Program Files\OpenOffice.org 2.3\program\MSVCP71.dll
           7.10.3077.0 - 7.10.3077.0
           Microsoft® C++ Runtime Library
[7C570000] C:\WINNT\system32\KERNEL32.dll
           5.0.2195.7135 - 5.00.2195.7135
           Windows NT BASE API Client DLL
[7C740000] C:\WINNT\system32\CRYPT32.dll
           5.131.2195.6926 - 5.131.2195.6926
           Crypto API32
[7C950000] C:\WINNT\system32\CLBCATQ.DLL
           2000.2.3529.0 - 2000.2.3529.0
[7CDC0000] C:\WINNT\System32\NETAPI32.dll
           5.0.2195.7108 - 5.00.2195.7108
           Net Win32 API DLL
[7CE20000] C:\WINNT\system32\ole32.dll
           5.0.2195.7059 - 5.00.2195.7059
           Microsoft OLE for Windows
[7CF30000] C:\WINNT\system32\shell32.dll
           5.0.3900.7105 - 5.00.3900.7105
           Windows Shell Common Dll
------------------------------------------------------------------------------
Active Controls hierarchy:
TListBox "lbResults"
TPanel "pnlMain"
TPanel "FGPanel"
TFindResultsWindow "FindResultsWindow"
TJvDockVSNETPanelTBX "RightDockPanel"
TPyIDEMainForm "PyIDEMainForm"
------------------------------------------------------------------------------

What version of the product are you using? On what operating system?
PyScripter 1.9.9.1 on Windows 2000 (Western version).

Please provide any additional information below.
There are other issues with using directories with names which are not
convertible to the current Windows codepage (eg: if you load a python file
from there, the directory name in the title bar is corrupted). I will
report these later.

Original issue reported on code.google.com by giovanni...@gmail.com on 28 Jan 2008 at 4:26

GoogleCodeExporter commented 9 years ago
Was you system locale changed to Japanese?  Does the error occur with other 
locales?

Here my system locale is Greek and I can search directories containing Greek
characters without problems.

Original comment by pyscripter on 29 Jan 2008 at 9:19

GoogleCodeExporter commented 9 years ago
No, the problem is that I'm searching in a Japanese directory with a 
non-japanese
locale. In other words: you shouldn't use the ANSI functions to do I/O, but the
Unicode functions.

Original comment by giovanni...@gmail.com on 29 Jan 2008 at 11:12

GoogleCodeExporter commented 9 years ago
Fixed in version control.

However the rest of PyScripter does not fully support Unicode file names.  
Someday
that one will change as well.

Original comment by pyscripter on 4 Mar 2008 at 4:21

GoogleCodeExporter commented 9 years ago

Original comment by pyscripter on 4 Mar 2008 at 4:21