Packaged EXE Leaving Open File Handle

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Wed Jul 18, 2012 1:55 am

Good morning.

I have an odd problem that i'm not quite sure how to resolve. I have been writing a multiple form application that works exactly as I want it to. It cleans up after itself, etc...

I have the .EXE file "Temp.exe" located on a couple of our Windows 2008 File servers (not sure if 2008 has anything to do with it). When I launch the Application from my PC, using the UNC path to the executable and then eventually quit the app, if i look at 'Open Files' via Computer Management on those file servers, I see an open file for 'Temp.exe' even though my PC no longer has any process running, etc...

I even created a brand new Forms Project, and immediately exported it to .exe without creating any buttons or writing any code. Its just a blank form that you quit by hitting the X in the upper right. It does the exact same thing. This leads me to believe that there's nothing in my own code in my project thats holding onto anything, and I wouldn't expect there to be as i'm cleaning up all variables/etc... on exit).

Has anyone ran into this? Can someone see if its happening to them as well?

1. New Form Project. (Name it whatever you like)
2. Immediately "Package Project (SHIFT+F6)" and save it out as an .EXE file. Use Defaults
3. Copy the .EXE to a file server, doesn't matter where.
4. Using the UNC path to that .EXE file launch it, wait a few seconds, and then quit the App.
5. Using Computer Management, view 'Open Files' on the file server and see if you see your .EXE file listed in the local path on the file server.

Please tell me its not just me and that its either a bug, or something else I can do to get this to not happen?

Thanks in Advance...

Brian

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Wed Jul 18, 2012 2:08 am

I just tried running the TEMP.exe file from a 2003 File Server via UNC path, and it cleans up after itself just fine. The Open File disappears. So maybe running a packaged EXE file from a 2008 File Server has something 'different' happen when launching? i've tried this from several 2008 servers and they all do the same thing.

My Desktop is also running Microsoft Windows Server 2008 R2 SP2 and is my 'client', if that matters.

Brian / ChevyNovaLN

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Wed Jul 18, 2012 2:15 am

Sheesh. This just keeps getting better. If i use a 2003 Server as the client that RUNS the .exe file from a 2008 Server UNC path, it also cleans up just fine. So, based on my findings so far the following is true:

2008 Client / 2008 File server = Open File listed once closed

Win7 Client / 2008 File Server = Open File listed once closed
2008 Client / 2003 File Server = No Problem
2003 Client / 2008 File Server = No Problem
2003 Client / 2003 File Server = No Problem

All servers/workstations are running Symantec Enterprise Protection and all servers have the exact same group policy options applied to them. All Built to the same standard.

Brian
(Stumped)ChevyNovaLn2012-07-18 09:18:04

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Packaged EXE Leaving Open File Handle

Post by davidc » Wed Jul 18, 2012 4:14 am

I'm not sure why this is the case either, but does this also happen when you package a non-form script? Ultimately this could be a windows quark. We never had anybody report issues with the packager in this regard.David
David
SAPIEN Technologies, Inc.

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Wed Jul 18, 2012 4:17 am

I've not tried a non-form script. I've honestly never packaged a script prior to using Forms, always just use the PS1 file ;-) Shame too, as i've had PrimalScript 2009 for a while now... and just got Primal Studio 2012.

I'm heading out, but i'll report back in a few hours after testing a bit.

Thanks David,

Brian

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Wed Jul 18, 2012 7:29 am

It does appear to just be Forms Projects exported to .EXE
I created a new Script and did nothing but this:
write-host "hello"

I then copied the 'test.exe' to our 2008 file server where my other programs are living and ran it from my 2008 workstation. It popped with a messagebox saying "Hello" and then quit. No remaining open files on our 2008 File server.

Do you guys have 2 x 2008 Servers that you can validate this from? i'd like to know if its our environment (AntiVirus, or other software, etc...) or not. I can build two new 2008 VM's from scratch that do not follow our standards at all I guess, but i'd prefer not to just due to time involved.

Thoughts?

Brian

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Packaged EXE Leaving Open File Handle

Post by davidc » Wed Jul 18, 2012 11:22 am



Could also
be the Antivirus reading the executable, but if you have no detrimental
effects, I don't think you need to worry about this. David

David
SAPIEN Technologies, Inc.

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Wed Jul 18, 2012 1:54 pm

Well, it doesn't happen with other executables (other vendors, other vb6 apps, etc..) so I have to feel like its something unique to either the Exported EXE or something to do with the fact that powershell isn't cleaning up after itself, etc... I see about 5-8 entries in the 'Open Files' for the same EXE on the file server briefly after launching it. Thats definately AV. Then 2-3 seconds later its back to only one, which i'd expect. Quit the program, and that one remains all day. I left it for hours until I finally closed the open file handle. I guess i'm just hoping someone else can confirm whether or not it happens on their systems as well Instead of it just being my environment. Brian

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Packaged EXE Leaving Open File Handle

Post by davidc » Thu Jul 19, 2012 4:03 am

We will run some test to see if we can reproduce the issue. These are blank projects correct? Also does this happen with a blank single form (non-project)? That may help us pin point if it is something in the script. Also what packager platform are you using? David
David
SAPIEN Technologies, Inc.

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Packaged EXE Leaving Open File Handle

Post by chevynovaln » Thu Jul 19, 2012 4:04 am

What do you mean by what packager Platform am I using? Anyway, OS/PS Version below:



My OS: Windows Server 2008 Standard R2 SP2PrimalStudio 2012 version 3.0.7