Opened on Dec 18, 2009 at 8:34:49 PM
Closed on Jan 7, 2010 at 9:52:26 PM
#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 , on Dec 19, 2009 at 9:31:55 AM
| Attachment: | #1352 XP.JPG added |
|---|
comment:2 by , 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 , 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:5 by , 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 , on Jan 7, 2010 at 9:52:26 PM
| 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