Modify

#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 Jpm on Dec 19, 2009 at 9:31:55 AM.

Download all attachments as: .zip

Change History (7)

comment:1 by Jpm, on Dec 19, 2009 at 9:33:27 AM

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

comment:2 by MrCreatoR <mscreator@…>, on Dec 19, 2009 at 11:58:21 AM

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 Jpm, on Dec 20, 2009 at 9:57:13 PM

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

comment:4 by Jpm, on Jan 6, 2010 at 4:28:02 PM

Any more info as It cannot be reproduced ;)

comment:5 by Valik, on Jan 7, 2010 at 12:50:36 AM

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

comment:6 by Jon, on Jan 7, 2010 at 9:52:26 PM

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.