Modify

Opened 16 years ago

Closed 16 years ago

#1352 closed Bug (Fixed)

StringSplit hard crash on binary data

Reported by: MrCreatoR <mscreator@…> Owned by: Jon
Milestone: 3.3.3.2 Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

Theese examples will show that script is crashing when using StringSplit on binary data:

Crashing:

$sFile = @Systemdir & "\oobe\images\hand1.gif"

$hFile = FileOpen($sFile, 16)
$aRead = StringSplit(FileRead($hFile), @CRLF)
FileClose($hFile)

MsgBox(64, 'Title', 'Crash!') ;Not Shown

Not crashing: (FileRead is stored in variable)

$sFile = @Systemdir & "\oobe\images\hand1.gif"

$hFile = FileOpen($sFile, 16)
$sRead = FileRead($hFile)

$aRead = StringSplit($sRead, @CRLF)

FileClose($hFile)

MsgBox(64, 'Title', 'No Crash!') ;Not Shown

And crashing again:

$sFile = @Systemdir & "\oobe\images\hand1.gif"

$hFile = FileOpen($sFile, 16)
$sRead = FileRead($hFile)
FileClose($hFile)

$aRead = StringSplit($sRead, @CRLF)

MsgBox(64, 'Title', 'No Crash!') ;Not Shown

In the last example we can see that FileClose is called before StringSplit, for some reason that itself causing a hard crash.

Attachments (1)

#1352 XP.JPG (12.3 KB ) - added by J-Paul Mesnage 16 years ago.

Download all attachments as: .zip

Change History (7)

by J-Paul Mesnage, 16 years ago

Attachment: #1352 XP.JPG added

comment:1 by J-Paul Mesnage, 16 years ago

I cannot reproduce your pb under XP/SP2 see attach file

comment:2 by MrCreatoR <mscreator@…>, 16 years ago

I cannot reproduce your pb under XP/SP2 see attach file

Hm, strange... do you have the image file? or/and can you please test it on other image?

P.S
I tested each example in seperate process, for some reason when i put all three examples in one script i get other results (sometimes crashes, sometimes not, strange...).

comment:3 by J-Paul Mesnage, 16 years ago

I test under XP/Sp2 with the file you reference in your script.
I test with one script by process.

comment:4 by J-Paul Mesnage, 16 years ago

Any more info as It cannot be reproduced ;)

comment:5 by Valik, 16 years ago

I can reproduce the issue. Your script crashes for me so just ignore JP, I'll take care of it.

comment:6 by Jon, 16 years ago

Milestone: 3.3.3.2
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [5559] in version: 3.3.3.2

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.