Jump to content

Search the Community

Showing results for tags 'error allocating memory'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. It took a month of cutting down a big program to find it and here's the code to illustrate "Error allocating memory". The first while using the filename in the fileopen, etc. shows the error. The second while example does not have the problem (so I switched to using it). ;shows "Error allocating memory" ;Autoit v3.3.14.5 #AutoIt3Wrapper_run_debug_mode=Y ; use this to debug in console window <--- LOOK #include <FileConstants.au3> ;--- shows error allocating memory - is it Autoit or SciTE ? Try compiling <-- makes no difference so probably not SciTE. Normally error at index 50K-100K $fnINDEX = @ScriptDir & "\__index.txt" $i = 0 ;#cs While 1 $i = $i + 1 FileOpen($fnINDEX, $FO_OVERWRITE) ;overwrite as we just need last one processed FileWriteLine($fnINDEX, $i) FileClose($fnINDEX) If $i/1000 = Int($i/1000) Then MsgBox(0, "count", "$i = " & $i, 1) ;give indication of count, hangs when memory allocation error imminent WEnd ;#ce ;comment out the above loop and this works without an allocation error - looks like the above code leaking memory? While 1 $i = $i + 1 $fh = FileOpen($fnINDEX, $FO_OVERWRITE) ;overwrite as we just need last one processed FileWriteLine($fh, $i) FileClose($fh) If $i/1000 = Int($i/1000) Then MsgBox(0, "count", "$i = " & $i, 1) ;give indication of count WEnd Exit ;program
  2. Hello! I am having problem with using file read... Here is my code: #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> Local Const $CHUNK = 1024 Local $hFile = FileOpen(@ScriptDir & '\test.bin', $FO_APPEND) Local $iCurrentPos = 0 Do $iCurrentPos += $CHUNK $bFileSetPos = FileSetPos($hFile, $iCurrentPos, $FILE_END) $vData = FileRead($hFile) $vData = BinaryToString($vData) MsgBox(0, 0, $vData) $iStringPos = StringInStr($vData, "Test", $STR_NOCASESENSEBASIC) Until Not ($iStringPos = 0) Or $bFileSetPos = False FileClose($hFile) MsgBox($MB_OK, "Success", $iStringPos) Here is the 6 MB file: <Attachment Deleted> Thanks in Advance! TD
×
×
  • Create New...