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.com. 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.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Button'.
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToScreen(Point p)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr 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__b77a5c561934e089/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__b77a5c561934e089/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__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.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__b77a5c561934e089/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:
<configuration>
<system.windows.forms jitDebugging="true" />
</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. 1 1966
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 ObjectDisposedException: "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.Diagnostics.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***@removethis.dystopia.fi http://www.saunalahti.fi/janij/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| | |