Debugging hangs while try to press step-in step-out (F10-F11


#1

Hi all,

I try to debug simple example, HelloWorld.
[ \extras\example projects\Builds\VisualStudio2008 ]

I open HelloWorld solution in Visual Studio 2010 Service Pack 1,
set Win32-configuration (debug),
open MainComponent.cpp,
and set breakpoint at:

//==============================================================================
void MainComponent::paint (Graphics& g)
{
//[UserPrePaint] Add your own custom painting code here…
//[/UserPrePaint]

------->>> here breakpoint <<- g.fillAll (Colour (0xffc1d0ff));

g.setColour (Colours::white);
g.fillPath (internalPath1);
g.setColour (Colour (0xff6f6f6f));
g.strokePath (internalPath1, PathStrokeType (5.2000f));

//[UserPaint] Add your own custom painting code here..
//[/UserPaint]

}

Next, when breakpoint occured, I press F11 (or F10) on breakpoint line "g.fillAll"
and Visual Studio was paused [hang up] and in command Window was writed:
first-chance exception in “0x03acf66f” in “HelloWorld.exe”: 0xC0000005: Access violation.

MS VS2010 SP1 paused and HelloWorld still paused [hang up] too while I cant press “stop debugging”.

In other way, when I set Win64-configuration, debugging in this place works fine.

In other places all works OK.

But in function:
"void MainComponent::paint (Graphics& g)"
Anywhere any breakpoints cant debug into or step-out.

Is it JUCE bug or Visual Studio 2010 bug ?

Bye,
Roman


#2

I don’t know about vs 2010 but sometimes the vs 2008 debugger hangs the whole IDE when you try to step. It usually happens at the worst possible time (i.e. when debugging something that is challenging or hard to reproduce). So I would not be surprised if there is a bug in visual studio.


#3

JUCE writes in output Window:

*** Leaked objects detected: 1 instance(s) of class class juce::WindowsBitmapImage
JUCE Assertion failure in c:\gui\juce.version 1.52\juce_amalgamated.h, line 3285

*** Leaked objects detected: 1 instance(s) of class class juce::WindowsBitmapImage
*** Leaked objects detected: 1 instance(s) of class class juce::Graphics
*** Leaked objects detected: 1 instance(s) of class class juce::LowLevelGraphicsSoftwareRenderer
*** Leaked objects detected: 1 instance(s) of class class juce::OwnedArray<class juce::LowLevelGraphicsSoftwareRenderer::SavedState,class juce::DummyCriticalSection>
*** Leaked objects detected: 1 instance(s) of class class juce::HeapBlock<class juce::LowLevelGraphicsSoftwareRenderer::SavedState *>
*** Leaked objects detected: 2 instance(s) of class class juce::FillType
*** Leaked objects detected: 1 instance(s) of class class juce::Image::SharedImage
*** Leaked objects detected: 2 instance(s) of class class juce::Font
*** Leaked objects detected: 3 instance(s) of class class juce::RectangleList
*** Leaked objects detected: 1 instance(s) of class class juce::HeapBlock
*** Leaked objects detected: 3 instance(s) of class class juce::HeapBlock<class juce::Rectangle >
*** Leaked objects detected: 6 instance(s) of class class juce::Image
*** Leaked objects detected: 4 instance(s) of class class juce::AffineTransform
Detected memory leaks!
Dumping objects ->
{1657} normal block at 0x00E01EA0, 28 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 41 66 66 69
{1656} normal block at 0x00E05D98, 8 bytes long.
Data: < > A0 1E E0 00 00 1E E0 00
{1647} normal block at 0x00E05D48, 18 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 49 6D 61 67
{1646} normal block at 0x00E01E00, 8 bytes long.
Data: <H] <_ > 48 5D E0 00 18 3C 5F 03
{1637} normal block at 0x035F3C60, 51 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 48 65 61 70
{1636} normal block at 0x035F3C18, 8 bytes long.
Data: <<_ X > 60 3C 5F 03 58 1E E0 00 {1627} normal block at 0x035F3B98, 62 bytes long. Data: <class juce::Heap> 63 6C 61 73 73 20 6A 75 63 65 3A 3A 48 65 61 70 {1626} normal block at 0x00E01E58, 8 bytes long. Data: < ;_ > 98 3B 5F 03 60 1D E0 00
{1617} normal block at 0x00E01DA8, 26 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 52 65 63 74
{1616} normal block at 0x00E01D60, 8 bytes long.
Data: < > A8 1D E0 00 C8 1C E0 00
{1607} normal block at 0x00E01D10, 17 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 46 6F 6E 74
{1606} normal block at 0x00E01CC8, 8 bytes long.
Data: < > 10 1D E0 00 20 1C E0 00
{1597} normal block at 0x00E01C68, 31 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 49 6D 61 67
{1596} normal block at 0x00E01C20, 8 bytes long.
Data: 68 1C E0 00 58 31 5F 03
{1587} normal block at 0x035F31A0, 21 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 46 69 6C 6C
{1586} normal block at 0x035F3158, 8 bytes long.
Data: < 1_ X _ > A0 31 5F 03 58 0B 5F 03
{1577} normal block at 0x00E01B90, 82 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 48 65 61 70
{1576} normal block at 0x035F0B58, 8 bytes long.
Data: < ` _ > 90 1B E0 00 60 0A 5F 03
{1567} normal block at 0x035F0AA8, 114 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 4F 77 6E 65
{1566} normal block at 0x035F0A60, 8 bytes long.
Data: < _ > A8 0A 5F 03 00 7F E0 00
{1557} normal block at 0x035F30E8, 45 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 4C 6F 77 4C
{1556} normal block at 0x00E07F00, 8 bytes long.
Data: < 0_ > E8 30 5F 03 88 1F E0 00
{1547} normal block at 0x00E06DA8, 21 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 47 72 61 70
{1546} normal block at 0x00E01F88, 8 bytes long.
Data: < m ] > A8 6D E0 00 00 5D E0 00
{1537} normal block at 0x00E06D48, 31 bytes long.
Data: 63 6C 61 73 73 20 6A 75 63 65 3A 3A 57 69 6E 64
{1536} normal block at 0x00E05D00, 8 bytes long.
Data: 48 6D E0 00 00 00 00 00
{1515} normal block at 0x035F3FD0, 16 bytes long.
Data: < X , > 01 00 00 00 1B 00 00 00 58 02 00 00 2C 01 00 00
{1514} normal block at 0x035F6780, 40 bytes long.
Data: < > F4 99 B6 01 CD CD CD CD 01 00 00 00 CD CD CD CD
{1513} normal block at 0x00E06CE8, 32 bytes long.
Data: <p4_ > 70 34 5F 03 CD CD CD CD CD CD CD CD CD CD CD CD
{1512} normal block at 0x035F3470, 116 bytes long.
Data: < /_ 3_ ?> E8 2F 5F 03 CD CD CD CD 98 33 5F 03 00 00 80 3F
{1003} normal block at 0x035F32E8, 116 bytes long.
Data: < /_ g_ ?> E8 2F 5F 03 CD CD CD CD 80 67 5F 03 00 00 80 3F
{990} normal block at 0x035F3400, 48 bytes long.
Data: < > 84 AA B6 01 CD CD CD CD 02 00 00 00 CD CD CD CD
{989} normal block at 0x00E07F88, 16 bytes long.
Data: < Z H > 00 00 00 00 00 00 00 00 5A 02 00 00 48 01 00 00
{988} normal block at 0x035F3398, 40 bytes long.
Data: < > F4 99 B6 01 CD CD CD CD 01 00 00 00 CD CD CD CD
{986} normal block at 0x035F3228, 128 bytes long.
Data: < Z H > 00 00 00 00 00 00 00 00 5A 02 00 00 48 01 00 00
{982} normal block at 0x035F2FE8, 192 bytes long.
Data: 6C 97 B7 01 CD CD CD CD 04 00 00 00 CD CD CD CD
{523} normal block at 0x035F0988, 40 bytes long.
Data: < < S > 00 00 00 00 CD CD CD CD 0C 00 00 00 3C 00 53 00
Object dump complete.
Thrwad ‘Juce Message Thread’ (0x1200) exit code 0 (0x0).

PS: In Win64 configuration all debugging in any places works fine.


#4

If you don’t want to get warnings about your leaked objects, I generally find the best strategy is not to leak any objects.


#5

I simply will not understand, where an error - in VS2010 without SP1 or in Visual Studio 2010 with Service Pack 1.

Debugging in void MainComponent::paint (Graphics& g)
dont work - dont work even in disassembly, step-by-step-command.

[attachment=0]J1.png[/attachment]


#6

Try Visual Studio 2008


#7

Hi again,
I found where is a problem.
When I disable “Enable RPC-debugging” in Tools->Options->Debugging->Machine code,
all debugging works fine.
Also was gone the message on an exception “first-chance exception”.