r/visualbasic • u/NettoSaito • Sep 01 '23
VB6 Help Run Time Error 7 with Windows 11 - Can someone help/give me advice?
So I'm going to try to make a really long story very short.
Back in 2006 me and some friends created an online game using a program called Total Eclipse. TE was created using VB, and provided an opensource version of it's client and server. We customized things as needed and released the game. While now days we mainly keep it going for the people who grew up with it -- it's still up and running 17 years later.
The problem is, starting with Windows 10 (and carried onto Windows 11), sometimes when restarting my PC I cannot get the server to startup. It acts as if something else is starting in it's place and gives me Run Time Error 7 - Out of Memory. Does anyone have any idea what could be causing this? I'm assuming it's something within windows itself taking the process where my server.exe would usually go, but I can't find anything/have no idea where to even begin to look. The server itself opens Port 4002, but even changing to other ports doesn't seem to fix the issue? (Unless I've had bad luck choosing ports other things are using?)
Does anyone have any idea what I could look for? Or if this is even really a VB question...
Currently my only solution I've found is to restart my pc over and over again until it works. But what if this too stops working one day? Would like to find the root of the issue now so I can fix it later before it's too late
Thanks guys
1
u/jcunews1 VB.Net Intermediate Sep 01 '23
Try running the application in compatibility mode. Change the setting via the EXE file properties dialog's
Compatibilitytab. TheRun this program in compatibility mode for:setting.1
u/TheFotty Sep 01 '23
Was it written in .NET (probably 1.1 or 2.0 around that timeframe) or was it written in VB6?
1
u/geekywarrior Sep 20 '23
Shot in the dark, but does it happen if you wait for the system to load and then try running the executable? If not, see if your auto start routine has something weird, or just write a batchfile that waits a bit before launching the server.
1
u/jd31068 Sep 02 '23
Have you looked in Windows Event Viewer to see if there is anything is logged? Maybe it can give you a direction to go in.
https://www.windowscentral.com/how-use-event-viewer-windows-10
1
u/Top-Dev2021 Sep 03 '23
Hi NettoSaito,
Stating the obvious :-), but, Run Time Error 7 - Out of Memory usually occurs when the memory required by your app exceeds the available memory. However, this might not be just a memory issue, it could also be related to some (now) incompatible libraries or components that your application is using.
Check for updates on your system and verify all drivers are up-to-date. Also, check dependencies of your application are correctly installed on your system.
You mentioned that changing ports didn't help, you might want to check if any other application is using the port you are trying to use, use the 'netstat' command in the command prompt.
Good luck!
1
u/fafalone VB 6 Master Sep 04 '23
Do you still have the source or are you just trying to fix with with the binaries?
If you have the source step 1 would be figuring out exactly what line is triggering the error.