Jump to content

Recommended Posts

Posted

If you run the below script as is...it works fine, but if you uncomment ether "GUISetState" or "MsgBox" it will toss a memory error...anyone got any bright idea's? ^_^

#include <WinAPI.au3>

GUICreate("My GUI")
;GUISetState( )
GUIDelete ( )

;MsgBox(0, "Test:", 'test' )

$String = '1185760800'
$tBuffer = DllStructCreate("char[" & Number ( $String ) & "]")
$tBuffer = 0

MsgBox(0, "Finished:", 'Done' )
Posted

I cannot reproduce. However you do realize you're trying to allocate 1.2 GB of memory? It's possible you're running out of system memory or something.

Broken link? PM me and I'll send you the file!

Posted

Yeah realize how much I'm buffering...but I have 3gigs of memory 2 of which is free...and not seeing why I'm getting the error when displaying a messagebox...or having a gui display then being destroyed.

Works fine other wise.

Posted (edited)

Well it does if is going to split a large binary file.

Really how big the buffer is...is not the issue I'm concerned with...but more why it fails (for me) when a messagebox is displayed, where if it not displayed it works fine.

Edited by Nologic
Posted

Well it does if is going to split a large binary file.

Ehm no?

Really how big the buffer is...is not the issue I'm concerned with...but more why it fails (for me) when a messagebox is displayed, where if it not displayed it works fine.

You're right, so since I cannot reproduce more info is needed. For starters, is the error coming from autoit or windows?

Broken link? PM me and I'll send you the file!

Posted (edited)

Heh okay your right it doesn't need to be that large...I'm trying to be lazy. ^_^

The error is from AutoIt version 3.3.0.0

Now if I set:

$String = '1000000000'

everything works fine, but at the original value things go wrong.

I'll see if I can find where the breaking point is.

Edited by Nologic
Posted (edited)

Exact values for my system prior to error:

$String = '1112735712' ; With both GUISetState & MsgBox Enabled

$String = '1255538656' ; With both disabled

So a difference of about 136MB...thats rather large.

Edited by Nologic
Posted (edited)

Well I'm not sure if fragmentation is the issue...as after rerunning the script several times I'm seeing that any GUI stuff displayed strips 136mb of my available resources...that seems really heavy. ^_^

Anyways I can and will work around this...just seemed odd that I'd lose 136mb and not have it reclaimed after the destruction of the GUI object.

Edited by Nologic
Posted

I've tried that before but it doesn't seem to take on my system for some reason.

Well its not required to make one that large by any means in the present day...I was mostly looking to see if anyone had a work around for this curiosity I bumped into.

That and a blank GUI eating up that much resources has to be a bug of some sort.

All that said, thanks guys for your input and time.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...