473,545 Members | 2,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error, how to resolve problem.

Hi,

In visual studio 2003 I made an application that ran without problems on a
number of 50+ machines (all running .Net 1.1). Now I've recompiled the
program using Visual studio 2005, .Net 2.0 has been installed on all
machines, completely updated from windowsupdate.c om. On two mahines however
theres a problem, I get this error:

Cannot Access a disposed object.
Object name: 'Button'.

Details for the exception is attached below. Any good idea of what is going
on on those machines?, I'm only your average debugger Joe, knowing how to
step throuh a program using F5.

Know any good tutorials to learn how to JIT debug?

regards Jesper, DK

ATTACHED DETAILS:!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!
See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.ObjectDi sposedException : Cannot access a disposed object.

Object name: 'Button'.

at System.Windows. Forms.Control.C reateHandle()

at System.Windows. Forms.Control.g et_Handle()

at System.Windows. Forms.Control.P ointToScreen(Po int p)

at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)

at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)

at System.Windows. Forms.Control.W ndProc(Message& m)

at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)

at System.Windows. Forms.Button.Wn dProc(Message& m)

at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)

at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)

at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

mscorlib

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

----------------------------------------

Flexi-Jump

Assembly Version: 1.0.2193.23924

Win32 Version: 1.0.2193.23924

CodeBase:
file:///C:/Documents%20and %20Settings/All%20Users/Start%20Menu/Programs/Startup/Flexi-Jump.exe

----------------------------------------

System.Windows. Forms

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows. Forms/2.0.0.0__b77a5c 561934e089/System.Windows. Forms.dll

----------------------------------------

System

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c 561934e089/System.dll

----------------------------------------

System.Drawing

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f 7f11d50a3a/System.Drawing. dll

----------------------------------------

System.Configur ation

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configur ation/2.0.0.0__b03f5f 7f11d50a3a/System.Configur ation.dll

----------------------------------------

System.Xml

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c 561934e089/System.Xml.dll

----------------------------------------

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config ) must have the

jitDebugging value set in the system.windows. forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuratio n>

<system.windows .forms jitDebugging="t rue" />

</configuration>

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

Jan 5 '06 #1
1 1973
Jesper,
I made an application that ran without problems on a
number of 50+ machines (all running .Net 1.1). Now I've recompiled the
program using Visual studio 2005.
On two mahines however theres a problem, I get this error:

Cannot Access a disposed object. Object name: 'Button'.
The error message you've got pretty much tells why the error is happening
(from the documentation of the ObjectDisposedE xception: "the exception that
is thrown when an operation is performed on a disposed object"). However,
the tricky part is to find *why* and *where* this error is happening.

If I were in your situation, I would first try to roughly estimate the
location in code where this error happens. Probably you could get feedback
from your users what they do with your application when the error pops up.
The next thing would be to try to reproduce the error. Of course, this can
be difficult to since only two out of 50 PCs have this error.

As a countermeasure, you could try to enable some kind of debug logging to
your application, and deploy this special version of your application to
these two troublesome PCs (this is a lot easier if your application happens
to be a in-house application) to better understand what it going on. See for
example the System.Diagnost ics.Debug.Write method.

Another thing would be to investigate your code, and look for code that
updates the user interface. Since you using a button component once it has
been disposed, you might try to look at ever reference to a button in the
area of code you assume to be a suspect.
Know any good tutorials to learn how to JIT debug?


You might try searching for this using Google, but basically to JIT debug,
you would need Visual Studio installed on the machine for JIT debugging to
work. You cannot debug without a debugger, that is!

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethi s.dystopia.fi
http://www.saunalahti.fi/janij/
Jan 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4363
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two files containing some templates: adjacency_list.hpp and mem_fn.hpp can not compile. Does anyone have any solutions?
0
1663
by: David Sworder | last post by:
Hi there, I am using the SQL managed provider in ADO.NET to fill a dataset with a large number of records. I periodically get an exception with the description "General Network Error" when trying to fill the dataset. The problem occurs rarely. I've searched Google and have seen many posts dealing with this problem. The typical culprits are: ...
1
6389
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32 Debug-------------------- Linking... icarus_camera.obj : error LNK2001: unresolved external symbol _dgels_ icarus_leastsquares.obj : error LNK2001: unresolved...
3
5437
by: Matias Silva | last post by:
Hi Everyone, I wrote a for loop to build several select statements that are combined with a UNION. When I execute one of the queries separately, it works, but when I execute the query with a UNION it returns: ERROR 2013 (HY000): Lost connection to MySQL server during query I am able to run additional queries after I get the error, so the...
5
2665
by: mairhtin o'feannag | last post by:
Hello, <hiding from IBM contributors> Well, IBM have done it again! During an install of 8.1 to a new linux box, and ALWAYS in the same place (just after Set Instance Properties in a ./db2setup execution) I get the very helpful message below : BI1501E An internal error was encountered. Explanation:
0
991
by: Mike Eaton | last post by:
Hi all, I'm getting an error when I attempt to run the Dns.Resolve(hostName) method: No more results can be returned by WSALookupServiceNext I am able to ping the hostname I'm attempting to resolve from the command prompt, so it seems like my OS can resolve the hostname properly.
0
1621
by: roger23 | last post by:
I get this error C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(526,9): error MSB6006: "aspnet_compiler.exe" exited with code 1. at the end of my build step of my web deployment project. it does not give me any error messages to debug. the only place where i can see some problem is this: Dependency...
1
14478
by: Jason Richmeier | last post by:
I have encountered an error while attempting to sign an assembly. I have become quite frustrated since I seem to be going in circles and making no progress. Hopefully someone will have the magic answer. I am new to this so I will try to describe everything as well as I can. There are probably a number of things that I am doing wrong so I...
2
9063
by: rezapasha | last post by:
Hello, we have a website in ASP , the pages connected to .mdb access database by ODBC there is a big traffic on this site, so after 9-10 hour the server show this error to visitors : HTTP Error 500.13 - Server error: Web server is too busy. Internet Information Services (IIS) BUT only .asp pages on all domains make this error, all...
23
5059
by: deathtospam | last post by:
A day or two ago, I wrote a quick ASPX page with a CS codebehind using Visual Studio .NET 2005 -- it worked, I saved it and closed the project. Today, I came back to the project, reopened the solution, and was greeted with the following error: ======================================================================== It is an error to use a...
0
7468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7757
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.