Opened 16 years ago
Closed 16 years ago
#1352 closed Bug (Fixed)
StringSplit hard crash on binary data
| Reported by: | 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)
Change History (7)
by , 16 years ago
| Attachment: | #1352 XP.JPG added |
|---|
comment:1 by , 16 years ago
comment:2 by , 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 , 16 years ago
I test under XP/Sp2 with the file you reference in your script.
I test with one script by process.
comment:5 by , 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 , 16 years ago
| Milestone: | → 3.3.3.2 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [5559] in version: 3.3.3.2

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