Modify

Opened 16 years ago

Closed 16 years ago

#1295 closed Bug (Fixed)

Crashed with fileread and filewrite on windows 7 X64

Reported by: thesnoW Owned by: Jon
Milestone: 3.3.1.6 Component: AutoIt
Version: 3.3.1.5 Severity: None
Keywords: Cc:

Description

Crashed with fileread and filewrite on windows 7 X64
And,if file is english,it's work.

See attach

file is some english text
file is some chinse text

autoit3.exe worked(english and chinse)
AutoIt3_x64.exe Crashed(english is work)

os:windows 7 x64

Attachments (1)

test.rar (273 bytes ) - added by anonymous 16 years ago.

Download all attachments as: .zip

Change History (20)

by anonymous, 16 years ago

Attachment: test.rar added

comment:1 by thesnoW, 16 years ago

sorry,the autoit version is 3.3.1.4 or 3.3.1.5.

comment:2 by thesnoW, 16 years ago

i tested on windows 7 x86,Crashed



AutoIt


Error allocating memory.


确定


comment:3 by Valik, 16 years ago

Version: 3.2.13.143.3.1.5

comment:4 by anonymous, 16 years ago

file is unicode or UTF-8,Crash too.

comment:5 by Valik, 16 years ago

Severity: NoneBlocking

comment:6 by Jon, 16 years ago

I tried x86 and x64 on Windows 7 x64 and both worked ok for me.

Maybe an Anti Virus related problem?

comment:7 by Jon, 16 years ago

Which part of the script is crashing for you? Can you make it smaller? What about just this:

$f=FileOpen("ReadMe.txt",0)
$text = FileRead($f)

comment:8 by Jon, 16 years ago

Did it also happen in the release version 3.3.0.0? Or is it just the beta?

comment:9 by Jon, 16 years ago

Owner: set to Jon
Status: newaccepted

comment:10 by Jon, 16 years ago

Severity: BlockingNone

comment:11 by anonymous, 16 years ago

I have turn off all antivirus software.
3.3.0.0 is worked.
3.3.1.5 is Crashed.
3.3.1.3 is worked.

comment:12 by anonymous, 16 years ago

$f=FileOpen("ReadMe.txt",0)
$text = FileRead($f)

it's work!

FileWrite("x.txt","鬼子")	;it's work
FileWrite("x.txt","中国人说中文")	;it's not work

comment:13 by systeminfo, 16 years ago

System info:

Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>chcp
活动代码页: 936

C:\Users\Administrator>ver

Microsoft Windows [版本 6.1.7600]

C:\Users\Administrator>echo %PROCESSOR_ARCHITECTURE%
x86

C:\Users\Administrator>chcp 437
Active code page: 437

C:\Users\ADMINI~1>systeminfo

Host Name:                 THESNOW
OS Name:                   Microsoft Windows 7 Ultimate
OS Version:                6.1.7600 N/A Build 7600
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          thesnoW
Registered Organization:   thesnoW
Product ID:                00426-OEM-8992662-00400
Original Install Date:     2009/10/14, 10:42:12
System Boot Time:          2009/11/17, 16:42:58
System Manufacturer:       Unknow
System Model:              Unknow
System Type:               X86-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: x64 Family 15 Model 67 Stepping 3 AuthenticAMD
~2009 Mhz
BIOS Version:              Phoenix Technologies, LTD 6.00 PG, 2007/11/16
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             zh-cn;Chinese (China)
Input Locale:              zh-cn;Chinese (China)
Time Zone:                 (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi

comment:14 by Jon, 16 years ago

Can you try this please:

$handle = FileOpen("x.txt", 128+2)
FileWrite($handle, "中国人说中文")

Without that flag the write is written in ANSI using the codepage. I'm wondering if there's something wrong in the chinese unicode -> ansi conversion code. But need to rule out some things first.

comment:15 by Jon, 16 years ago

I'm not sure it's related but I fixed a typo in some conversion code. Can you test this version please: http://www.autoitscript.com/autoit3/files/beta/autoit/AutoIt3_x64-thesnow.exe

comment:16 by thesnoW, 16 years ago

$handle = FileOpen("x.txt", 128+2)
FileWrite($handle, "中国人说中文")
;worked in 3.3.1.5

AutoIt3_x64-thesnow.exe it's worked too.

comment:17 by Valik, 16 years ago

Lucky guess, Jon, though obvious. UNICODE length < ANSI length = boom. o.o

comment:18 by Jon, 16 years ago

This ticket is referenced in revision: [5391]

comment:19 by Jon, 16 years ago

Milestone: 3.3.1.6
Resolution: Fixed
Status: acceptedclosed

Fixed by revision [5392] in version: 3.3.1.6

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.