Is it possible to delete a blog from the "I read these blogs" list?
Trying to trap a
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > .Net Development > Trying to trap a "first chance exception" 18 November 2008 02:08:59

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Trying to trap a "first chance exception"

Lee P. Gray 18 November 2008 02:08:59
 I keep getting a somewhat random first chance exception when filling a
DataTable:

"A first chance exception of type 'System.IndexOutOfR­angeException'
occurred in system.windows.form­s.dll"

Sometimes it happens on the first fill, and sometimes it takes several.

I've wrapped the DataAdapter.Fill() statement in try/catch block, and
I've set the IDE to "Break into the debugger" for that exception, but I
can't figure out how to view any more details about the exception to
troubleshoot any further.

When the debugger kicks in, it's on the .Fill() statement, but when I
step through it, the catch block doesn't catch the exception. Does that
mean it's getting caught in the DataAdapter's internals?

Any suggestions?

Thanks,
Lee

Add comment
Simon C. Hewitt 16 March 2006 10:11:34 permanent link ]
 Lee

Very small chance that this is your particular problem but I'll mention
it anyway for future reference for the group:

If you have a NAN (not a number) in a database row and read it into a
DataTable, an IndexOutOfRangeExce­ption is thrown - took us a while to
figure this one out.

Cheers
Simon

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Gray, Lee P.
Sent: 13 March 2006 21:11
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

I keep getting a somewhat random first chance exception when filling a
DataTable:

"A first chance exception of type 'System.IndexOutOfR­angeException'
occurred in system.windows.form­s.dll"

Sometimes it happens on the first fill, and sometimes it takes several.

I've wrapped the DataAdapter.Fill() statement in try/catch block, and
I've set the IDE to "Break into the debugger" for that exception, but I
can't figure out how to view any more details about the exception to
troubleshoot any further.

When the debugger kicks in, it's on the .Fill() statement, but when I
step through it, the catch block doesn't catch the exception. Does that
mean it's getting caught in the DataAdapter's internals?

Any suggestions?

Thanks,
Lee

Add comment
Greg Robinson 16 March 2006 16:51:56 permanent link ]
 Any chance you are doing this in a load event handler?

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM]On Behalf Of
Hewitt, Simon C. (Contractor)
Sent: Thursday, March 16, 2006 1:12 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"


Lee

Very small chance that this is your particular problem but I'll mention
it anyway for future reference for the group:

If you have a NAN (not a number) in a database row and read it into a
DataTable, an IndexOutOfRangeExce­ption is thrown - took us a while to
figure this one out.

Cheers
Simon

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Gray, Lee P.
Sent: 13 March 2006 21:11
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

I keep getting a somewhat random first chance exception when filling a
DataTable:

"A first chance exception of type 'System.IndexOutOfR­angeException'
occurred in system.windows.form­s.dll"

Sometimes it happens on the first fill, and sometimes it takes several.

I've wrapped the DataAdapter.Fill() statement in try/catch block, and
I've set the IDE to "Break into the debugger" for that exception, but I
can't figure out how to view any more details about the exception to
troubleshoot any further.

When the debugger kicks in, it's on the .Fill() statement, but when I
step through it, the catch block doesn't catch the exception. Does that
mean it's getting caught in the DataAdapter's internals?

Any suggestions?

Thanks,
Lee

Add comment
Lee P. Gray 16 March 2006 17:30:11 permanent link ]
 Thanks for the info... but how could I get a NaN in there?

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Hewitt, Simon C. (Contractor)
Sent: March 16, 2006 12:12 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

Lee

Very small chance that this is your particular problem but I'll mention
it anyway for future reference for the group:

If you have a NAN (not a number) in a database row and read it into a
DataTable, an IndexOutOfRangeExce­ption is thrown - took us a while to
figure this one out.

Cheers
Simon

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Gray, Lee P.
Sent: 13 March 2006 21:11
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

I keep getting a somewhat random first chance exception when filling a
DataTable:

"A first chance exception of type 'System.IndexOutOfR­angeException'
occurred in system.windows.form­s.dll"

Sometimes it happens on the first fill, and sometimes it takes several.

I've wrapped the DataAdapter.Fill() statement in try/catch block, and
I've set the IDE to "Break into the debugger" for that exception, but I
can't figure out how to view any more details about the exception to
troubleshoot any further.

When the debugger kicks in, it's on the .Fill() statement, but when I
step through it, the catch block doesn't catch the exception. Does that
mean it's getting caught in the DataAdapter's internals?

Any suggestions?

Thanks,
Lee

Add comment
Lee P. Gray 16 March 2006 17:46:06 permanent link ]
 Nope. It's after a form has loaded and I do a "search" at the click of
a button. Depending on a ComboBox selection, the search fills one of
four tables. I started getting the exception at random after I put the
search on a background thread (and unless I've missed something well
hidden, I'm not touching the GUI from that thread).

I have not been able to reproduce it for a couple of days now. Grasping
at straws, I had made a couple of changes in hopes of tracking down the
bug and it went away. I just undid those changes as a test and still
can't reproduce it, though.

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Greg Robinson
Sent: March 16, 2006 6:52 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

Any chance you are doing this in a load event handler?

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM]On Behalf Of
Hewitt, Simon C. (Contractor)
Sent: Thursday, March 16, 2006 1:12 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"


Lee

Very small chance that this is your particular problem but I'll mention
it anyway for future reference for the group:

If you have a NAN (not a number) in a database row and read it into a
DataTable, an IndexOutOfRangeExce­ption is thrown - took us a while to
figure this one out.

Cheers
Simon

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Gray, Lee P.
Sent: 13 March 2006 21:11
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

I keep getting a somewhat random first chance exception when filling a
DataTable:

"A first chance exception of type 'System.IndexOutOfR­angeException'
occurred in system.windows.form­s.dll"

Sometimes it happens on the first fill, and sometimes it takes several.

I've wrapped the DataAdapter.Fill() statement in try/catch block, and
I've set the IDE to "Break into the debugger" for that exception, but I
can't figure out how to view any more details about the exception to
troubleshoot any further.

When the debugger kicks in, it's on the .Fill() statement, but when I
step through it, the catch block doesn't catch the exception. Does that
mean it's getting caught in the DataAdapter's internals?

Any suggestions?

Thanks,
Lee

Add comment
Simon C. Hewitt 17 March 2006 09:56:31 permanent link ]
 It's a good question!
In our case, the database is shared between two business apps and the
NAN was coming from 'the other side'.
Once is there it is a bugger to get rid of them (can't search for them
in TSql)

Cheers
Simon


-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Gray, Lee P.
Sent: 16 March 2006 13:30
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

Thanks for the info... but how could I get a NaN in there?

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Hewitt, Simon C. (Contractor)
Sent: March 16, 2006 12:12 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

Lee

Very small chance that this is your particular problem but I'll mention
it anyway for future reference for the group:

If you have a NAN (not a number) in a database row and read it into a
DataTable, an IndexOutOfRangeExce­ption is thrown - took us a while to
figure this one out.

Cheers
Simon

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Gray, Lee P.
Sent: 13 March 2006 21:11
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

I keep getting a somewhat random first chance exception when filling a
DataTable:

"A first chance exception of type 'System.IndexOutOfR­angeException'
occurred in system.windows.form­s.dll"

Sometimes it happens on the first fill, and sometimes it takes several.

I've wrapped the DataAdapter.Fill() statement in try/catch block, and
I've set the IDE to "Break into the debugger" for that exception, but I
can't figure out how to view any more details about the exception to
troubleshoot any further.

When the debugger kicks in, it's on the .Fill() statement, but when I
step through it, the catch block doesn't catch the exception. Does that
mean it's getting caught in the DataAdapter's internals?

Any suggestions?

Thanks,
Lee

Add comment
Thomas Freudenberg 17 March 2006 21:29:03 permanent link ]
 You may try to enable catching exceptions right when they're thrown in
DevEnv's "Exceptions" dialog (don't know a better name). Hit
Ctrl+Alt+E to open that dialog. (screenshot [1])

Regards,
Thomas

[1] http://thomasfreude­nberg.com/photos/ima­ges/14442/original.a­spx

On 3/13/06, Gray, Lee P. <Lee.Gray@uop.com> wrote:> I keep getting a somewhat random first chance exception when filling a> DataTable:>
"A first chance exception of type 'System.IndexOutOfR­angeException'> occurred in system.windows.form­s.dll">
Sometimes it happens on the first fill, and sometimes it takes several.>
I've wrapped the DataAdapter.Fill() statement in try/catch block, and> I've set the IDE to "Break into the debugger" for that exception, but I> can't figure out how to view any more details about the exception to> troubleshoot any further.>
When the debugger kicks in, it's on the .Fill() statement, but when I> step through it, the catch block doesn't catch the exception. Does that> mean it's getting caught in the DataAdapter's internals?>
Any suggestions?>
Thanks,> Lee>

Add comment
Lee P. Gray 17 March 2006 22:45:06 permanent link ]
 Thanks for the suggestion, but I tried that (that's what I meant by
"I've set the IDE to 'Break into the debugger' for that exception"
below) and it still never caught the exception.

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
Thomas Freudenberg
Sent: March 17, 2006 11:29 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

You may try to enable catching exceptions right when they're thrown in
DevEnv's "Exceptions" dialog (don't know a better name). Hit
Ctrl+Alt+E to open that dialog. (screenshot [1])

Regards,
Thomas

[1] http://thomasfreude­nberg.com/photos/ima­ges/14442/original.a­spx

On 3/13/06, Gray, Lee P. <Lee.Gray@uop.com> wrote:> I keep getting a somewhat random first chance exception when filling a> DataTable:>
"A first chance exception of type 'System.IndexOutOfR­angeException'> occurred in system.windows.form­s.dll">
Sometimes it happens on the first fill, and sometimes it takes
several.>
I've wrapped the DataAdapter.Fill() statement in try/catch block, and> I've set the IDE to "Break into the debugger" for that exception, but
can't figure out how to view any more details about the exception to> troubleshoot any further.>
When the debugger kicks in, it's on the .Fill() statement, but when I> step through it, the catch block doesn't catch the exception. Does
that> mean it's getting caught in the DataAdapter's internals?>
Any suggestions?>
Thanks,> Lee>

Add comment
John Brett 20 March 2006 13:14:42 permanent link ]
 On 17/03/06, Gray, Lee P. <Lee.Gray@uop.com> wrote:> Thanks for the suggestion, but I tried that (that's what I meant by> "I've set the IDE to 'Break into the debugger' for that exception"> below) and it still never caught the exception.


VS2005?
Have you checked Tools/Options/Debug­ging/General?
There's a checkbox "Enable Just My Code (Managed Only)"
that will cause the debugger to ignore code you didn't write,
including exceptions thrown & caught in library code.

John

Add comment
Lee P. Gray 20 March 2006 17:31:42 permanent link ]
 2003

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:D­OTNET-WINFORMS@DISCUSS.DEVELOP.COM] On Behalf Of
John Brett
Sent: March 20, 2006 3:15 AM
To: DOTNET-WINFORMS@DIS­CUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Trying to trap a "first chance exception"

On 17/03/06, Gray, Lee P. <Lee.Gray@uop.com> wrote:> Thanks for the suggestion, but I tried that (that's what I meant by> "I've set the IDE to 'Break into the debugger' for that exception"> below) and it still never caught the exception.


VS2005?
Have you checked Tools/Options/Debug­ging/General?
There's a checkbox "Enable Just My Code (Managed Only)"
that will cause the debugger to ignore code you didn't write,
including exceptions thrown & caught in library code.

John

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > .Net Development > Trying to trap a "first chance exception" 18 November 2008 02:08:59

see also:
Where can i find nbantext.jar ?
New packages for 200110050100_qbe6…
please remove unnecessary dependency in…
пройди тесты:
What is Your Temperament?
see also:
All in one Video Converter Platinum
Free video converter with Two real-time…
Run Fatboy Run Movie Review, A son? Did…

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .