I've got a problem with vb6.
Using an HMI vb6 developed interface in a automated machine, it sometimes crashes with out of memory error.
initially it happens using a particular form, so i tried set it up well, now happens less time but in random form.
These forms are in a dll file and in HMI exe file.
I cannot debug that because it's quite difficult reproduce that error.
Thanks
Problem solved,
there was a couple of line that handles other modal forms despite the main current form was a modal too. so systems continue ping focus between different windows, after tot minutes, it crashes.
Related
So, I have an MS Access front-end that I'm compiling to an ACCDE, which I want to distribute. When running it from an ACCDB file, everything works fine. I have a welcome form with links to a bunch of different forms. Some I call with DoCmd.OpenForm, with others I create an instance of the form with Set frm = New Form_Name, and then show it with frm.SetFocus and frm.Visible. While testing and developing a number of different things, opening forms hasn't been a problem for what feels like an eternity.
But then I compiled the ACCDE, and for some reason, opening forms has stopped working. While the welcome form miraculously works just fine, opening any other forms from that welcome form generates an error 3000 with a description which is something along the lines of "reserved error (-3034); there is no message for this error" (might not be 100% accurate since I'm translating from German). This is regardless of if I call it with DoCmd.OpenForm or create a new instance.
Here's the weird part: this only ever happens once for every form after compiling. That means, if I launch the form again after the error, even after closing the front-end entirely, then it works. I've checked over and over again and there are no variables being used, so there isn't the chance of some variable being uninitialized. Now, I could just execute every form on the ACCDE file after compiling it, but that seems like a ridiculous workaround. Plus, it doesn't make any sense, either, since I'm not storing any data in the front-end.
And oddly enough, this happens with all forms except the welcome form. The welcome form is launched by a macro, but I've ruled that out, since some of the forms that I launch from the welcome form used to be launched with macros, and I had the same problem there. The biggest difference between the welcome form and the other forms is that the welcome form is an unbound form.
Oddly enough, Google has not led me to any people with the same problem. Has anyone else ever had this problem or know what could be causing it? This isn't only happening on my computer, in fact, I was alerted to the problem after I had distributed an alpha version of the front-end. I'm using Access on office 365, version 1908, in case it makes a difference.
So here's a head scratcher. Recently I finished a program in VB that have several GroupBox to place my buttons in. And during testing in my PC everything worked out fine.
But when I want to test it on user PC, the program immediately pop up a "The program is not responding" message and stops process immediately without even showing the form. The user PC does not have Visual Basic 2010 installed.
After experimenting further I found out that the GroupBox were the cause, when I removed them the program can run in user PC fine.
So yeah... Till now I don't know why GroupBox doesn't want to play well like this. Is this a common problem in general?
P.S. I don't know if this is the right place to ask this. If not please let me know and I'll remove this question. Thanks.
Okay, I have had the most aggravating problem with OpenFileDialog1. I have a program that I've been using for some 8 months, and in the past month, the program has begun to hang randomly when utilizing the OpenFileDialog1.ShowDialog() function. I have already read through all of the other posts about multi-threaded vs single threaded application. This did not fix it. Enabling the "Show Help" button did not fix it. I am mostly at a loss. here is a thorough walkthrough of the bug:
Run the application. I can always use the Open File button a few times with no problems. It freezes randomly after the program has been running for awhile.
The freeze happens after I push the ShowDialog button, and never displays the Open File Dialog window. The entire program locks up and hangs. If I pause it, Visual Studio doesn't show an error. It underlines the OpenFileDialog1.ShowDialog() in green, which is very odd.
I have found a way to break the freeze. Simply run a second instance of the program and use the OpenFileDialog function. As soon as it loads the file in the second instance, the first instance unfreezes. However, this is not a fix.
The only thing I can think of that may be causing this is the program also uses a WebBrowser1 control. It only seems to happen AFTER the WebBrowser control, which is on a seperate form, not the main form, has been initiated and utilized. Does this make any sense at all?
Thank you for anyone who can help me. I am about to tear my hair out.
Debug your program with dnspy, And when the software freezes, you will be able to see within the dnspy the actual code even if it is in a third party DLL.
I have solved this problem. It was quite unsolveable based on my description above, but hopefully I will help someone with this solution. The error is related to using the IE11 Emulation Control (11000) in the WebBrowser1 control. For some reason this interferes with OpenFileDialog and causes it to hang. I have no idea why. I changed my WebBrowser1 to use IE9 Emulation Control (9999) and the error has gone away. Thank you to those who looked into this. This is a registry entry in HKEY_CURRENT_USER.
I have some code in Form Load event. It is doing fine. But when it reaches to pick data from database, no commands are executing after that. There is no error at all but it just goes silent.
I tested it as follows:
MsgBox("1")
vrStudentName = DsGetPprStatusfromEnrSummary.tblPaperEnrSummary.Rows(0).Item("StudentName")
MsgBox("2")
Please advise.
Thanks
Furqan
Message Box one is showing data but not the message box two. In fact, the second message box statement is not showing any response at all.
This is a nasty problem on 64-bit operating systems. Any exception raised in code that's run from a form's Load event is swallowed without a diagnostic. This is an old problem that is not getting solved because the DevDiv and the Windows groups at Microsoft are pointing fingers at each other. My finger is pointing at the Windows group but that doesn't help either.
Two basic ways to solve this problem:
Project + Properties, Compile tab, scroll down, Advanced Compile Options, change the Target CPU option from x86 to AnyCPU. This disables the Wow64 emulation layer that swallows the exception.
Debug + Exceptions, tick the Thrown box for "Common Language Runtime Exceptions". The debugger stops as soon as the exception is thrown.
Also keep in mind that it is very rarely necessary to use the OnLoad method or Load event. Only code that requires the Size or Location or Handle of the form to be accurate needs it. Anything else belongs in the constructor of the form. That Load is used so often is a VB6 anachronism, carried over in the designer design which made the Load event the default event for a Form. Add a constructor by typing "Sub New".
Well, it seems pretty obvious that the call to DsGetPprStatusfromEnrSummary.tblPaperEnrSummary is never returning; which means the problem is IN THERE somewhere.
So what on eath is it? I'm guessing it's a DataSet, yes?
But you've referenced it staticly, which is YuckyPooPoo(TM) IMHO, because it's a complex artifact, and you've rendered EVERYTHING which references it unisolatable, and therefore fundamentally untestable!
Received answer on Codeproject
In the dialog that comes up, put a tick in every checkbox under both "Thrown" and "Unhandled". Press OK.
Now, when you run your app though the debugger, it will break for any exception, even if you have an active handler. This should help you track down the problem.
Issue RESOLVED
I'm developing a website with ASP MVC 3 and Razor in VS2010 SP1.
When I'm running the site from VS, if the view was open in the IDE, I can edit a view in runtime, and press F5 to show the changes, but if I open the view after run the site, then the view is locked (no message, simply I can write in the VS Editor)
When I stop debuggin the solution, the views that are locked remains locked, and I have to close the file and open id again in order to modify the code.
This behaviour is uncomfortable. Can anyone tell me why sometimes I can write in the VS2010 editor and other times I can't?
Other Notes:
The TFS is not the problem.
It happens in all the VS 2012 SP1 of my office.
It only happens in vb.net projects, not in C# proyects.
It didn't happens in VS2012.
I've disabled all the extensions.
Thanks.
I have experienced this as well.
I've found that just reopening the file, while in debug, works most of the time. The nearest thing I can figure is that you're not actually editing the file but actually viewing a debug version of the file.
This normally happens, for instance, a javascript method causes an exception within the source of that page. It then loads the active version of that page instead of the one you're editing. Though I've had it happen without any errors generated so I'm fairly certain that's not the whole issue. It might be worth posting an issue on http://aspnet.codeplex.com/workitem/list/basic It hasn't happened often enough for me to narrow it down but it sounds like it happens for you more often.
After more than a year suffering this problem, a solution was found.
This MS HotFix for VS2010SP1 solved the issue.
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=40811