VB 2008 Application Hangs?

Mar 6, 2011

I am writing my first application in Visual Basic Express 2008 and the program conistently hangs (Not responding in the Task Manager) midway through execution. The operating system is Windows XP Professional SP3 running on a 1.20 GHz Intel Core Duo CPU with 2 GB of RAM.

The application has very deep layers of subroutines and functions, all of which are using lots of math routines. There are no recursive routines anywhere in the program. The program creates and destroys quite a few class elements, and I have written dispose methods for all of them using IDisposable, setting all the properties to Nothing. I also use GC.Collect() to force garbide collection, and GC.WaitForPendingFinalizers(). As a result, I don't think there are any memory leaks.

I think the depth of sub and function calls are causing a stack overflow, but I'm not certain. I have tried without success to increase the stack allocation to 2 Mb using Editbin.exe after reading some forums, but nothing changed. I then searched my machine and did not find EDITBIN.EXE.When the program hangs up, the background of the forms on the screen turn to solid white and the controls are no longer visible.It looks like a window pops up but it disappears too quickly to read anything. If I view the task manager while the application is running it hangs immediately. I have not published it, I am still developing and running it out of the VB environment.The more complexity (sub and function calls) I add, the earlier the program hangs.

View 6 Replies


ADVERTISEMENT

.NET Application Hangs When Calling DLL

Dec 28, 2010

Its been running in production for over a year and this is the first time I saw this behaviour. The application is a VB.NET Console Application which is triggered by MQ server. This application uses a class library which is part of the same project(Say 'abc.dll'). In production around 40+ instances of this exe are running and all of them use the some of the functions from 'abc.dll'.

Last week, we noticed that all the 40 instances were shown to be running in the task manager but they were not doing any activity. There was no exception thrown or error logged in Application logs or System logs. To frantically debug the problem, I tried isolating the problem.

With all these 40+ exes hung up, I wrote a small aplication which would use a reference to this 'a.dll', create an object of one of the classes in that dll and execute a method in there. I was printing console.writelines in between to see to which point it gets to before erroring out.

To my surprise, I found that at the point where I was creating an object of a class in 'a.dll' this sample test application would also hang just like the others. No exceptions thrown. So I killed all those applications as a last resort and then when I restarted all of them, everything worked fine.

I couldn't find any explanation for this behaviour. Since it was a critical error affecting a production system(blanking out the application for 3+ hours), I have to give a very good explanation as to why this would occur. how it can be prevented in future.

(Side note: the servers running these appilcation do not have a maintenance schedule and are supposed to be up for couple of months together.

View 11 Replies

.Net Application Hangs If Lock System

Jun 21, 2010

I have a weired problem. I developed a multithreaded WinForm application using VB.Net, and SQL Server 2008. The application works perfectly fine if I am using Visual Studio IDE to run the same. But, if I run the exe file created by VS the application hangs in case I lock my system and again relogin. The memory usage is same as it was before locking the system. CPU usage is also 0% or by max 2%. All threads are also exited after finishing there designated tasks.The application also uses threading but all threads are exited after there designated tasks. I confirmed this using various tools.[code]

View 5 Replies

.Net Application Hangs When Added On Startup?

May 5, 2011

I have created a small multithreaded application using VB.NET. There is no problem when the user manually runs this application. A problem exists when I added this application on startup. It hangs after I rebooted the system. The application is still running its thread but I can't see its GUI because its frozen. If I kill it on task manager and started again, the application works fine. What could be the possible reason/s why this application hangs when added on startup?

Imports System.Threading
Public Class USBLock
Public Event Lock()

[Code]....

or just a thought on this subject: the reason why the program hangs on startup is because the application is loaded while the .net framework service has not yet started.

View 1 Replies

Application Form Hangs But It Is Working

Apr 21, 2011

I have win7 pro, on my win form is a traffic light icon(when it starts it is red, when finished it is green), so that I know when job is finished. But when I run application icon isn't changing and form hangs it self, can not do nothing until job is finished. Only in the end, I see that icon is quickly changes to red and then back to green.

View 1 Replies

Application Hangs On Call To Doevents?

Dec 22, 2010

I am re-posing this question because the prior post has gotten really full of side issues so I fear the main problems has been lost.I have a windows forms application written in VB.NET which scrapes information from serveral web pages? I am having problem with one particular site where partway through the page navigation my application hangs. When I press pause (or break) in the debugger, it stops on a call to System.Windows.Forms.Application.DoEvents.

View 7 Replies

Thread.join() Hangs Sometime Windows Application?

May 31, 2012

I am developing windows based video application, in my application I have to make multiple video files with different duration from a single video file. To achieve this I am using thread.join method(), when I run my application it works fine but sometimes it hangs and I have got to close my application using Task manager, I can't understand why my application behave like this?.

This generally happens when number of output files are more than 40. Is there any problem with thread.join() function, when number of threads are increased. I am generating a new thread for each output file because this is the limitation of the third party dll which I am using.

View 4 Replies

Application Hangs When OpenFileDialog = Windows.Forms.DialogResult?

May 19, 2010

Private

Sub Button1_Click(ByVal
sender As
Object,

[code]....

View 9 Replies

Excel Instance Hangs In NET Class Project Application

Aug 7, 2009

I am writing a class project application that is loadable from within AutoCAD. This application generates an Excel workbook with extracted data. I am having a problem with Excel closing when finished. It seems the Excel instance hangs until my application is unloaded. I have found the section of code that seems to be causing to hang, but I'm not sure why its hanging to prevent it.

Below is a copy of my code for the class (top to bottom with exception of the FileExistValidation method... too many characters ). The code section that is commented out seems to be what is causing it to hang. If I uncomment that, Excel hangs, with it commented out, Excel closes out in the background.[code]...

View 10 Replies

FAXCOMEXLib - Sending Fax - Application Hangs When Try To Cancel The Print Dialog Box

Apr 18, 2007

I have a problem when it comes to faxing html. Im currently using FAXCOMEXLib because I'm sending to a remote fax server. Sending html files causes the function ConnectedSubmit to display a print dialog box before sending the fax. The application hangs when you try to cancel the print dialog box, it seems like the ConnectedSubmit function does not return to previous line where it was called.

[Code]...

View 1 Replies

VS 2010 Application Hangs While Moving Data From Text File To Datagridview

Jun 22, 2012

I have a text file which contains large amount (around 44,948 rows/lines & 9 columns) of delimited text data in a text file which I want to populate onto a DataGridView table. I have written the below code, but the application gets hung for the rest of the time & so I have to stop debugging the program.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New IO.StreamReader(fileLocationTxt.Text)

[Cdoe].....

View 5 Replies

VS 2008 Form.Invoke() Hangs Up?

Jun 23, 2011

I'm using the following code to close a form (Inherits System.Windows.Forms.Form) but it sometimes hangs up at the Invoke() ...

Private Delegate Sub closeFormDelegate()
Private Sub closeForm()
If myForm.InvokeRequired Then

[code].....

View 4 Replies

IDE :: VB 2008 Express IDE Hangs On Form Redraw

Jul 8, 2009

The VB2K8 Express IDE is hanging intermittantly when I click on the form's Design tab. The tab's work area goes blank and a wait cursor appears. I can't switch tabs or do anything else within the IDE at this point. I have to go to the Task Manager, end the VB taskk, and restart the IDE. VB is at SP 1 with .NET 3.5. I have no third party add-ins or controls except for the Visual Basic Power Packs which aren't being used. At this point it is annoying and I haven't lost anything yet but it is happening more frequently over time.

View 4 Replies

VS 2008 Form Hangs Under Vista 64 Bits?

Jul 8, 2010

I have detected a problem running my application under Vista 64 bits OS.

My application is developed using VB.NT 2008 and compiled as x86

I have a main form. In this form there is an option to open other form. TThis second form must return a few values to the main form. When the user click on this 2nd form, to return values, this form hangs up (2nd form hangs up)

But for what I could have known, it continues executing the rest of code that exists after to open form. I want to say that the form dialog (2nd form) is not closed (hangs up) but it the code continues being executed, because I have seen that inserts the data in the database.

The application not returns any error and any exception.

frmWaiting (form displayed when call thread)
This forms contains progressbar
main form
Dim ThreadVentas As System.Threading.Thread

[Code].....

View 4 Replies

[2008] DownloadString Hangs Grabbing Html?

Feb 14, 2009

I'm trying to parse the current song off a shoutcast stream admin page put my app just hangs at that line.

VBCODE
Using wc As New Net.WebClient
MessageBox.Show(wc.DownloadString("http://66.90.121.11:10013"))

[code].....

View 7 Replies

IDE :: Add New Item On Project Menu Hangs Visual Basic 2008 Express?

Jan 16, 2009

For some reason, the Add New Item command on the Project Menu is hanging VB on my Vista based machine.but now, it hangs. By that I mean the the little circle cursor spins and spins and spins... This happens even when all I do is start VB, start and new project. and then try to add something, eg. another form, a class, anything except "existing item".

View 1 Replies

IDE :: "Edit Dataset With Designer" Window Hangs In VS 2008?

Sep 29, 2010

Editing a Visual Studio 2008 solution (1 Windows project and 1 installer project) that has been working flawlessly.Recently, attempts to edit the Dataset (add/modify queries) by right-clicking the dataset and selecting "Edit Dataset With Designer" brings up the MyProject_Dataset.xsd window TAB, and initially displays "Please wait while loading..." in the middle of the window -- and then does nothing else.Alt-Tabbing to other apps then leaves "ghost window" stuff displayed where "Please wait while loading" once was... and editing queries, etc., is impossible.Shutting down Visual Studio will enable me to successfully get into the editor once ot twice, but then it locks up again.

View 6 Replies

Sockets - VB9 .Net 3.5 (2008) Code Works On The First Pass.Then Second Pass It Just Hangs On

Jun 19, 2009

This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....

Code:Imports SystemImports System.TextImports System.Collections.GenericImports System.XmlImports System.Xml.LinqImports System.Net.Sockets

[CODE]....

View 2 Replies

.Net BackgroundWorker Hangs Up?

Mar 21, 2011

I have limited experience in VB.net and have become stuck. I have tried to search for answers on other threads without success.I have an application that displays real time data.Queries are made to a MySQL database on another PC over the internet every 10 seconds to gather the most recent data.I have done the query within a BackgroundWorker so that the GUI is still responsive while the query is answered.What I've done works great for several hours or maybe for a couple of days but then the DoWork task appears to hang.

The code I'm using is to run the background worker is:

vb
If Not(backgroundWorker1.IsBusy) Then Me.backgroundWorker1.RunWorkerAsync() End If

The backgroundWorker runs just once and there's very little code in the DoWork routine:

vb
Private Sub backgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles backgroundWorker1.DoWork rs = New

[code].....

Is there anyway I can set up a timeout on the maximum allowed time that the DoWork task can be active for? And if so how would I then go on to stop the backgroundWorker?I understand that CancelAsync isn't going to help as my DoWork task is not repeating as it runs once only, then stops and 10 secs later I run it again.

View 1 Replies

IDE :: Build Hangs In VB

Dec 6, 2011

When i try to build a project, vb hangs and displays this message in the notification area Microsoft Visual Basic Express 2010 is Busy. i have to end up using Task Manager to end the process i have been using VB Express for about a year and have never had this problem. i have tried to re-install VB 2010 express, no joy.

View 1 Replies

OpenFileDialog Hangs Used Once?

May 26, 2012

ApplicationName has stopped workingA problem caused the program to stop working correctly.Windows will close the program and notify you if a solution is available.

Here is my code:
Private Sub OpenFile()
Dim OpenFileDialog As New OpenFileDialog

[code].....

View 10 Replies

Dataset Designer Hangs?

Nov 10, 2010

When using the Dataset Designer in VS 2010 I add a new query.It adds with no issue.Add another,starts to hang. Add another and now it can hang for hours.I use task manager to kill VS 2010 after 30 minutes.Go back into the same table adapter query, modify it, save it.Works in seconds.Add another query, hangs, hangs, hangs.I have seen posts about this going back to VS 2008.I have No Add-Ons loaded, what is causing this issue??

View 2 Replies

FTP Upload Works But Hangs

Jan 12, 2011

I have this code to upload to a ftp server. It works but the problem is it freezes the program and sometimes you can end up waiting for long time and not even know its working.
Code:
Dim clsRequest As System.Net.FtpWebRequest = _
DirectCast(System.Net.WebRequest.Create("ftp://" + txt_ftp_username.Text + ":" + txt_ftp_password.Text + "@" + txt_ftp_server.Text + ":" + txt_ftp_port.Value.ToString + "/" + txt_ftp_dir.Text + "/" + txt_ftp_name.Text), System.Net.FtpWebRequest)
[Code] .....
Can this code be modified so that it will run without freezing the program and then just add a button labelled "STOP" to stop the ftp connection/upload?

View 1 Replies

Hangs When I Switch To Design ?

Aug 21, 2009

I have downloaded SP1 and installed it,I have an applciation with 10 form and numerous classes and dialogs. When I right click a form in the soultion Explorer window and choose view Designer VS hangs for anything upto 10 mins. Is there anything that I can disable/ enable to stop this hapening. The only Language that I will be developing in is vb.net.

View 10 Replies

IDE :: VS 2010 Debugger Hangs (VB)?

Oct 3, 2011

Im developing several applications under Visual Studio, and now have a real nightmare in hands. When i start to debug, VS hangs completely. Windows allows me to start task admin, and close the "devenv" process.I have serious problems here. I need to deliver my projects before the deadline!

Win 7 Pro 32 bits, VS 2010 SP1, running on HP computer based on Intel i5, 4gb ram. everything works as intended, except VS. When debug crashes, the devenv process uses about 25% of CPU and 250~400Mb of ram.

View 12 Replies

Messagebox Hangs Program?

Mar 30, 2009

The messagebox shows properly but will not respond to mouse click and every is halted.. Comment out the messagebox event everything proceeds. No error is generated, things jest stop at themessagebox and willnot proceed. Code as follows:

[code]...

View 2 Replies

My Webbrowser Control Hangs

Jul 31, 2010

Using VB2005 I am trying to display several sites to my user. One of them being[url]... Ive laid down the very basic code just to navigate to the page but every time it tries to reach the site it just hangs. Strange is that Ive downloaded other examples of web browsers with very similar code and Im able to reach the site with no problems. Could the site be banning my specific app from reaching it and if so what mechanism would they use?

View 20 Replies

Program Hangs On Loop

Jul 25, 2011

my program seems to just freeze whenever I press this button. I need to be able to use this because I'm reading values from a joystick as i'm making a human interface device.

Why is this freezing?[CODE...]

View 3 Replies

ReadToEnd Hangs On Redirect?

Jun 7, 2011

I am using VB in VS 2008. I am tring to call an external process and redirect the input, and pars the output back to my code.I started with the useal

Dim myProcess As New Process()
Dim StringFromProcess As String
myProcess.StartInfo.WorkingDirectory = (path & "in")

[code]....

but I will need 4 of them to get to the data and it seem to me its messy coding. Is there a way to get ReadToEnd to work when reading data over TCPIP? Or perhaps a different/better way to read back from my process?

View 3 Replies

WebSite Monitoring App Hangs?

Mar 11, 2010

I am writing a fairly simple web site monitoring app. It uses a timer to call a class that requests a web page and measures the response. Problem is that the third time the class is called the app hangs. looking at the locals box I see that the properties of the httpURL object are 'Property Evaluation Failed' .

Imports System.Net
Imports System.Net.Sockets
Public Class Form1

[Code]......

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved