Modify

Opened 15 years ago

Closed 15 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.

Change History (7)

Changed 15 years ago by Jpm

comment:1 Changed 15 years ago by Jpm

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

comment:2 Changed 15 years ago by MrCreatoR <mscreator@…>

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 Changed 15 years ago by Jpm

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

comment:4 Changed 15 years ago by Jpm

Any more info as It cannot be reproduced ;)

comment:5 Changed 15 years ago by Valik

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

comment:6 Changed 15 years ago by Jon

  • Milestone set to 3.3.3.2
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5559] in version: 3.3.3.2

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

Author


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

 
Note: See TracTickets for help on using tickets.