setting a breakpoint in template class crashes vc ide 
Author Message
 setting a breakpoint in template class crashes vc ide

When I set a breakpoint, immediately when I press F9, the VC IDE crashes
with a memory exception (NULL-ptr). This happens only under certain
circumstances however. Also, stepping through the code with the debuggger
shows some strange behaviour. All this happens only in the following
situation:

I have a class (B) derived from a template class (A). The derived class (B)
does not contain any members or methods of its own. The template class
contains two methods: foo_inner() and foo_outer(). Both may be called
independently, foo_outer() calls foo_inner().

When B::foo_inner() is called directly, stepping from the calling code into
foo_inner() using F11 the next stmt shown is not the first stmt of
foo_inner() but is inside the first stmt of foo_inner(). If I call
b::foo_outer() and step into it, the de{*filter*} takes me right into
foo_inner() - this time showing the actual statement. Looks like the
de{*filter*} skips one level of the call stack (where the skipped levels aren't
shown either).

This strange behaviour made me wish to set the breakpoint directly in the
method. But - bang! I'd suspect that these symptoms are related.

I have no idea where to start looking. Maybe some of you out there know of
similar problems.

I'm using VC6 with the Dinkumware STL (2.33). The latter might not have to
do anything with the problem but because templates are involved I thought I
better mention it.

Regards
Rudi



Sat, 31 Jul 2004 18:37:21 GMT  
 setting a breakpoint in template class crashes vc ide
On Tue, 12 Feb 2002 11:37:21 +0100, "Rudi Wiener"

Quote:

>When I set a breakpoint, immediately when I press F9, the VC IDE crashes
>with a memory exception (NULL-ptr). This happens only under certain
>circumstances however. Also, stepping through the code with the debuggger
>shows some strange behaviour. All this happens only in the following
>situation:

>I have a class (B) derived from a template class (A). The derived class (B)
>does not contain any members or methods of its own. The template class
>contains two methods: foo_inner() and foo_outer(). Both may be called
>independently, foo_outer() calls foo_inner().

>When B::foo_inner() is called directly, stepping from the calling code into
>foo_inner() using F11 the next stmt shown is not the first stmt of
>foo_inner() but is inside the first stmt of foo_inner(). If I call
>b::foo_outer() and step into it, the de{*filter*} takes me right into
>foo_inner() - this time showing the actual statement. Looks like the
>de{*filter*} skips one level of the call stack (where the skipped levels aren't
>shown either).

>This strange behaviour made me wish to set the breakpoint directly in the
>method. But - bang! I'd suspect that these symptoms are related.

>I have no idea where to start looking. Maybe some of you out there know of
>similar problems.

>I'm using VC6 with the Dinkumware STL (2.33). The latter might not have to
>do anything with the problem but because templates are involved I thought I
>better mention it.

Can you post a short, compilable program that exhibits the problem?

Tom



Sat, 31 Jul 2004 20:32:41 GMT  
 setting a breakpoint in template class crashes vc ide

    Not sure if this helps, but anyway checkout

    Q172892 - FIX: MSDEV Crashes If Same PDB Name Used for Compiler and
Linker

Cheers
Check Abdoul
-------------------


Quote:
> When I set a breakpoint, immediately when I press F9, the VC IDE crashes
> with a memory exception (NULL-ptr). This happens only under certain
> circumstances however. Also, stepping through the code with the debuggger
> shows some strange behaviour. All this happens only in the following
> situation:

> I have a class (B) derived from a template class (A). The derived class
(B)
> does not contain any members or methods of its own. The template class
> contains two methods: foo_inner() and foo_outer(). Both may be called
> independently, foo_outer() calls foo_inner().

> When B::foo_inner() is called directly, stepping from the calling code
into
> foo_inner() using F11 the next stmt shown is not the first stmt of
> foo_inner() but is inside the first stmt of foo_inner(). If I call
> b::foo_outer() and step into it, the de{*filter*} takes me right into
> foo_inner() - this time showing the actual statement. Looks like the
> de{*filter*} skips one level of the call stack (where the skipped levels
aren't
> shown either).

> This strange behaviour made me wish to set the breakpoint directly in the
> method. But - bang! I'd suspect that these symptoms are related.

> I have no idea where to start looking. Maybe some of you out there know of
> similar problems.

> I'm using VC6 with the Dinkumware STL (2.33). The latter might not have to
> do anything with the problem but because templates are involved I thought
I
> better mention it.

> Regards
> Rudi



Sun, 01 Aug 2004 03:54:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. setting a breakpoint in template class crashes vc ide

2. setting a breakpoint in template class crashes vc ide

3. Unable to set conditional breakpoints in templates

4. Unable to set conditional breakpoints in templates

5. Breakpoints in template classes

6. Breakpoints in template class member functions

7. VC++6: Cannot set breakpoints in MFC app

8. VC++40 Doesn't stop at set breakpoints

9. VC IDE strange behavior when set optimization

10. How to change default directory settings in IDE for VC 6.0

11. Abstract template class crashes in vc6.0

12. template functions in template classes declared outside the class definition

 

 
Powered by phpBB® Forum Software