473,662 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugging designer bug

i have an app that uses a lot of bitmaps, associated with various classes
etc on the gui. Everytime i open then designer i am getting a "object
reference not set to an instance of an object" msg box. i know what it measn
but have no clue where it is comming from.
how can i debug this?
Nov 17 '05 #1
1 2064
"Raj Chudasama" <raj@asteriasgi _spamkiller.com > wrote in message news:O0******** *****@TK2MSFTNG P15.phx.gbl...
i have an app that uses a lot of bitmaps, associated with various classes etc on the gui. Everytime i open then designer i am
getting a "object reference not set to an instance of an object" msg box. i know what it measn but have no clue where it is comming
from.
how can i debug this?


With your original project open in Visual Studio .NET, switch to any tab
(for instance, a ".cs" source file tab) that's not the Designer panel.

Then open a second instance of Visual Studio .NET (so you have two
IDEs open at once). Load any debug project into this instance (for
example, your project for the designer code that's throwing the
exception) so you'll have source code when you enter the debugger.

In the second instance, choose to Debug | Attach to Process... and
hook yourself to the first "devenv.exe " (you can tell them apart by
the title bar caption). Then under Debug choose Exceptions ... and
turn on "Break into the debugger" for the System.NRE (and any
others you may be interested in). The dialog should show a red
globe with an X through it, when breaking on that Exception has
been enabled.

Task-switch back into your first instance of Visual Studio .NET and
change tabs to the Designer panel where you are receiving this "Object
not set to an instance of an object." error. If all worked correctly,
then you should be swapped back into the second instance with the
debugger on the line of source code throwing the NRE (provided
you have that debug builder of the designer and source code matching
what's loaded into the first instance -- you have to make sure your
versions/builds are the same for this to work.)

If the exception came from within Visual Studio .NET, you may only
be able to get "Disassembl y," in which case you usually want to F5
to let the designer run further. It may rethrow types of Exceptions
different from the original type that caused the fault (for this reason,
it's usually a good practice to turn on "Break into the Debugger" on
all CLR Exceptions, although some first-chance exceptions may be
a matter of routine and no cause for alarm) that will eventually bubble
up to your Designer's code.
Derek Harmon
Nov 17 '05 #2

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

Similar topics

1
1576
by: broebel | last post by:
I'm just wondering, people tell me that helping to debug someone elses program is a really good way to learn to understand the language it's programmed in. My question is: from wich point of can someone start to try to help a programmer by debugging or testing a program. If indeed you already need a profound knowledge of the language than how can you learn something about it? except for the fact that you see other
6
1627
by: Ashley Lloyd | last post by:
What do people generally use to debug their Python programs? I haven't seen anything out there that walks through the code, but perhaps I'm looking in the wrong places? TIA Ashley _________________________________________________________________ Tired of 56k? Get a FREE BT Broadband connection
0
1395
by: Severian | last post by:
Hi, I have a custom DTS task as a DLL written using .NET platform. I was able to debug a standard custom task writen in natively in C++ and COM, but somehow I got errors when dragging such task in DTS Designer. Now I have another one rewritten in .NET which works nicely, but I cannot debug it in any way I know. I set the MMC with DTS Designer as a calling application, but when creating a new task in package no breakpoint can be reached....
3
323
by: ally | last post by:
When I debug the project Icant into class.How can I do this??? Tahnks
2
1103
by: Bob | last post by:
What's the best way to debug an problem that only comes up in the forms designer? I get a compile error in the task list, but it's a not-so-helpful 'Object reference not set to instance of an object.', and clicking on it brings up nothing, just sends me to the top of the form code. Usually I can figure out what's going on, but this time I really need to see what's happening at design-time to fix it. TIA, Bob
6
1433
by: ?scar Martins | last post by:
Hi When I'm debugging and somewhere in the code I have a breakpoint, many times when the code after breakpoint finishes and the app returns I can do nothing within in it(it's like freeze)... The app behaves strangely and not accepts any event even close event!!!!! It just lefts for me to stop debugging clicking the respective button in the vs.net toolbar... I don't know if this behaviour is a bug of vs.net or if it's consequence of bad...
1
1822
by: Robin Tucker | last post by:
Hi, I have a problem with my code (somewhere in the InitialiseComponent) preventing any of my controls being visible in form design mode, although everything is ok at runtime. No errors are produced when I view the form in the designer; it just presents me with a blank form. Some of the controls are listed in the properties list, others aren't. What kind of things can cause this effect and how can I debug it, given that the VS form...
0
1144
by: krystian | last post by:
Hello, I've been following the previous thread "Windows Service Starts and Immediately Stops" and I have a similar problem. I've been trying to get started on a windows service and have followed the following rather well known tutorial (I also make some references to it in this writeup):
0
963
by: =?Utf-8?B?Y2luZHk=?= | last post by:
I have a web project in NET2.0/VS 2005 C# this question is not about CSS instead why using asp.net 2.0 csharp when I am debugging, the styles defined in the Style Sheets are not appearing on the screen. They show in the designer, but when I debug (OR look at it in the browser), they're gone. Doesn't change. in css stylesheet one style LABEL
0
8435
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8768
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.