Jump to content
Sign in to follow this  
frank10

memory leak from Scite and 32bit

Recommended Posts

frank10

I want to launch a script in 32bit. If I launch a script from Scite with:

#AutoIt3Wrapper_UseX64=n

#RequireAdmin

I get an AutoitWrapper32 that occupies almost 60MB in TaskManager.

After a lot of hours it grows a lot, 200MB up to 400MB.

If I launch outside Scite with Run script (x86) it works well remaining at 37MB all the time.

Another similar problem is when I launch a program from this script from Scite with:

Run("E:\Prog_W7_Base\Zoiper\Zoiper.exe", "E:\Prog_W7_Base\Zoiper")

the zoiper.exe grows a lot from the initial 13MB up to 1GB in hours!

The same Run line in the script launched with Run script (x86), works fine with no mem leak.

Why this?

Share this post


Link to post
Share on other sites
Jos

Does your script generate console output while running which could explain the memory usage of AutoIt3Wrapper.

I have no idea why a shelled program would start using more memory when ran from your script than ran from the Explorer.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
frank10

Yes there are Consolewrite... so that explains the wrapper thing.

It remains the external program problem. Only with that program, indeed. It's a voip prog.

I launch it with Admin compatibility mode in the properties, too.

Edited by frank10

Share this post


Link to post
Share on other sites
frank10

I found what it causes the leak, but I don't know why:

it is the Autoit3Wrapper line in scite:

#AutoIt3Wrapper_UseX64=n
Run("E:Prog_W7_BaseZoiperZoiper.exe", "E:Prog_W7_BaseZoiper")

Without that line it works well as from Run (x86).

With the wrapper line it grows enourmosly.

Autoit 3.3.6.1, AutoIt3Wrapper v.2.1.0.8 , W7 64bit

Edited by frank10

Share this post


Link to post
Share on other sites
frank10

So a script without the autoitWrapper line, executing the run code at 64bit, works well. Also from Scite.

I thought to run this external script from the script executing at 32bit from Scite, but it doesn't work.

In this way it leaks...

Why?

Share this post


Link to post
Share on other sites
frank10

To call the external script I wrote:

Run('C:Program Files (x86)Autoit3AutoIt3.exe' & ' E:DomoticaRun_zoiper.au3', 'E:Domotica' )

and this doesn't work, instead I put:

Run('C:Program Files (x86)Autoit3AutoIt3_x64.exe' & ' E:DomoticaRun_zoiper.au3', 'E:Domotica' )

And this time it works.

It's the autoit3.exe at 32bit that has some problem when launched from Scite with this program.

Share this post


Link to post
Share on other sites
Jos

You have been very vague as to your problems and see you mix up SciTE and your x86/x64 issues.

When a program has a memory leak when shelled from a x86 session and not x64, you still need to check the application.

I have no idea why this doesn't work: ( and please avoid these string concatenations that makes everything only unclear)

Run('C:Program Files (x86)Autoit3AutoIt3.exe  E:DomoticaRun_zoiper.au3', 'E:Domotica' )

and this does work:

Run('C:Program Files (x86)Autoit3AutoIt3_64.exe  E:DomoticaRun_zoiper.au3', 'E:Domotica' )

Maybe it would help when you define what isn't working and what you have done as to debugging.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
frank10

I don't mix the Scite and the x86/x64 problem: that is an unique problem:

The original script causing the leak was:

#AutoIt3Wrapper_UseX64=n
Run("E:Prog_W7_BaseZoiperZoiper.exe", "E:Prog_W7_BaseZoiper")

In this case, the zoiper.exe in Task manager grows extremely fast every second and in hours can reach 1GB.

I discovered that the problem was caused by the

#AutoIt3Wrapper_UseX64=n

Deleting that line, launching it from Scite gives no problem. But I need to run that script in 32 bit, so I need that line.

I thought to call an external script that launches the zoiper prog without the AutoitWrapper line, so I made the main script:

#AutoIt3Wrapper_UseX64=n
Run('C:Program Files (x86)Autoit3AutoIt3.exe  E:DomoticaRun_zoiper.au3', 'E:Domotica' )

and the external script Run_zoiper.au3 that is one simple Run line:

Run("E:Prog_W7_BaseZoiperZoiper.exe", "E:Prog_W7_BaseZoiper")

Unfortunately also this approach causes the leak.

I discovered the problem is running this script from Scite in 32bit, because If I launch the external script in 64bit from Scite it works well:

#AutoIt3Wrapper_UseX64=n
Run('C:Program Files (x86)Autoit3AutoIt3_64.exe  E:DomoticaRun_zoiper.au3', 'E:Domotica' )

But if I run the run_zoiper.au3 from the shell both in 32bit or 64bit there's no leak.

So the problem is caused only by Scite running the autoit3.exe at 32bit with only this zoiper program.

Share this post


Link to post
Share on other sites
Jos

Have you tried to take SciTE out of the equation and run the script manually with the x86 and x64 versions of AutoIt3 by doing a right-mouse-click and selecting them?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
frank10

Yes, i tried and all goes well, both 32 and 64bit.

It's something with Scite...

Edited by frank10

Share this post


Link to post
Share on other sites
Melba23

frank10,

Please post the code of this peculiarly acting script and then we can try and reproduce the problem - otherwise we are just guessing. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
frank10

Well, I tried with exact the scripts I posted:

2 lines the main script, 1 line the external one, like in the above post.

I made it simplest possible just for testing.

Share this post


Link to post
Share on other sites
Melba23

frank10,

My apologies - I saw "zoiper.exe" and "zoiper.au3" and thought that it was a compiled script that was giving you the problem. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Jos

Yes, i tried and all goes well, both 32 and 64bit.

It's something with Scite...

In that case I would say not to use SciTE to start the application for that long, just for testing.

The only thing AutoIt3Wrapper does during script execution is to record and STDOUT and STDERR information which is not a memory leak but obviously consumes memory.

I find it strange that the memory usage of the shelled program changes when ran this way.


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×