473,388 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Error that I can't figure out

YYZ
"Code generation for property 'LienPos' failed. Error was: 'Object
reference not set to an instance of an object.'"

I get this when, in design mode (ie, not running at all) I bring up the
designer for a usercontrol. This usercontrol (currently named
ucTestLoan.vb) contains and instance of another usercontrol, called
ucLoanScenario.

That ucLoanScenario contains a public property called LienPos. LienPos
is dimmed as clsListItem -- clsListItem is just a custom class that I
built that has a couple of properties.

I see this error in the Task List of the IDE listed as an error. If I
double click on the error it takes me to the very first line in
ucTestLoan. That doesn't really help me pinpoint where the error is.
Is there some sort of Error checking option I can enable to find out
exactly where and why this error is cropping up?

If I compile the project, it compiles and runs fine.

Any ideas?

Matt

May 18 '06 #1
3 1067

There are a few ways of doing this, one of which is to open a new instance
of Visual Studio and "attach" the debugger to the first instance, making
sure you are "breaking into debugger" on appropriate exceptions. I think a
VP here gave this suggestion some time ago and I use it from time-to-time
but cannot find a link to the thread.

Another thing to do is put "If Me.DesignMode Then Exit Sub" at appropriate
places in properties or methods in your class (such as "New") to see if that
fixes things, or causes more problems.

I used to want my controls to be functional on that level when I was in
design mode - for example connecting to a database, fetching records and
displaying them on the form designer, but these days I don't feel it's a
good idea to modify program logic to make these scenarios work, so I blank
out with DesignMode before anything interesting happens inside a control,
saving the real work for run-time.

"YYZ" <ma********@gmail.com> escribió en el mensaje
news:11**********************@g10g2000cwb.googlegr oups.com...
"Code generation for property 'LienPos' failed. Error was: 'Object
reference not set to an instance of an object.'"

I get this when, in design mode (ie, not running at all) I bring up the
designer for a usercontrol. This usercontrol (currently named
ucTestLoan.vb) contains and instance of another usercontrol, called
ucLoanScenario.

That ucLoanScenario contains a public property called LienPos. LienPos
is dimmed as clsListItem -- clsListItem is just a custom class that I
built that has a couple of properties.

I see this error in the Task List of the IDE listed as an error. If I
double click on the error it takes me to the very first line in
ucTestLoan. That doesn't really help me pinpoint where the error is.
Is there some sort of Error checking option I can enable to find out
exactly where and why this error is cropping up?

If I compile the project, it compiles and runs fine.

Any ideas?

Matt

May 18 '06 #2
YYZ wrote:
"Code generation for property 'LienPos' failed. Error was: 'Object
reference not set to an instance of an object.'"

I get this when, in design mode (ie, not running at all) I bring up the
designer for a usercontrol. This usercontrol (currently named
ucTestLoan.vb) contains and instance of another usercontrol, called
ucLoanScenario.

That ucLoanScenario contains a public property called LienPos. LienPos
is dimmed as clsListItem -- clsListItem is just a custom class that I
built that has a couple of properties.

I see this error in the Task List of the IDE listed as an error. If I
double click on the error it takes me to the very first line in
ucTestLoan. That doesn't really help me pinpoint where the error is.
Is there some sort of Error checking option I can enable to find out
exactly where and why this error is cropping up?

If I compile the project, it compiles and runs fine.

Any ideas?

Matt


I always got this when I did stuff in the paint event. Goes along with
Fred's sub new comment.

Chris
May 18 '06 #3
YYZ
Thanks for that, Fred (and Chris). I haven't been able to track it
down yet, but I'm trying the Designmode thing.

I tried to attach a debugger, but VS just crashed. Not sure if I have
all updates to VS2003, so I'll check that as well.

Matt

May 19 '06 #4

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

Similar topics

5
by: Bob Bamberg | last post by:
Hello All, I have been trying without luck to get some information on debugging the Runtime Error R6025 - Pure Virtual Function Call. I am working in C++ and have only one class that is derived...
6
by: Frankie Montenegro | last post by:
Hi everyone, I need some help with the following C++ code. It is supposed to read input line by line, each line as one string; then split each string into its component words and store these...
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
11
by: George | last post by:
Everytime when I redirect from one particular page to another, it will raise 4 exceptions, before Page_Load routine runs. I can't figure out a way to find out what are the exceptions. When I use...
3
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313...
6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
3
by: Brian Blais | last post by:
Hello, I have an odd kind of Heisenbug in what looks like a pretty simple program. The program is a progress bar code I got at the Python Cookbook: ...
7
by: Mathew Butler | last post by:
I'm investigating an issue I have when pulling data back from MS access I'm retrieving all rows from a column in a table of 5000 rows - accessing a column of type "memo" ( can be 65353 character...
4
by: Protoman | last post by:
Can you please help me figure out what the error is here, in this rotor cipher simulator, which I wrote to amuse myself? The runtime error is that it isn't symmetrical --decrypting a piece of...
4
by: jehugaleahsa | last post by:
Hello: I am going through an effort to standardize web applications for my company. We are trying to figure out the best practices for security, error handling, etc. I've just done a large...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.