Modify

Opened 10 years ago

Closed 10 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 10 years ago.

Download all attachments as: .zip

Change History (20)

Changed 10 years ago by anonymous

comment:1 Changed 10 years ago by thesnoW

sorry,the autoit version is 3.3.1.4 or 3.3.1.5.

comment:2 Changed 10 years ago by thesnoW

i tested on windows 7 x86,Crashed



AutoIt


Error allocating memory.


确定


comment:3 Changed 10 years ago by Valik

  • Version changed from 3.2.13.14 to 3.3.1.5

comment:4 Changed 10 years ago by anonymous

file is unicode or UTF-8,Crash too.

comment:5 Changed 10 years ago by Valik

  • Severity changed from None to Blocking

comment:6 Changed 10 years ago by Jon

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

Maybe an Anti Virus related problem?

comment:7 Changed 10 years ago by Jon

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 Changed 10 years ago by Jon

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

comment:9 Changed 10 years ago by Jon

  • Owner set to Jon
  • Status changed from new to accepted

comment:10 Changed 10 years ago by Jon

  • Severity changed from Blocking to None

comment:11 Changed 10 years ago by anonymous

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 Changed 10 years ago by anonymous

$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 Changed 10 years ago by systeminfo

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 Changed 10 years ago by Jon

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 Changed 10 years ago by Jon

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 Changed 10 years ago by thesnoW

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

AutoIt3_x64-thesnow.exe it's worked too.

comment:17 Changed 10 years ago by Valik

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

comment:18 Changed 10 years ago by Jon

This ticket is referenced in revision: [5391]

comment:19 Changed 10 years ago by Jon

  • Milestone set to 3.3.1.6
  • Resolution set to Fixed
  • Status changed from accepted to closed

Fixed by revision [5392] in version: 3.3.1.6

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.