Jump to content

Error\Bug with DllStructCreate


Recommended Posts

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' )
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...