Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Debugger/Stepping    [ Add a report in this area ]  
Report #:  20760   Status: Open
BCB6 IDE hangs when stepping through multithreaded applications
Project:  Delphi Build #:  Latest
Version:    6.0 Submitted By:   Zach Saw
Report Type:  Crash / Data loss / Total failure Date Reported:  10/28/2005 3:09:28 AM
Severity:    Critical / Show Stopper Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   212679
Resolution: Need More Info (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
3.00 out of 5
Total Votes: None
Description
(Note: Version field does not allow me to select BCB 6, which is what this is targeted)

When stepping through multithreaded code, IDE will lock up and a Process Kill is required.
Steps to Reproduce:
Open attached project
Set a breakpoint on the first SetName call in the the Execute method in Unit28.pas
Run and click button1 to hit the breakpoint
Hold down the F9 key to continually hit the breakpoints
The system will appear to hang, but it is just moving very slowly

OLD STEPS2:
Open attached project
Set a breakpoint on the first SetName call in the the Execute method in Unit28.pas
Run and click button1 to hit the breakpoint
Set a breakpoint on the last SetName call in the method
Hold down the F8 key to step over 10 or 12 SetName calls
Press F9 to hit the second breakpoint
The system will appear to hang, but it is just moving very slowly

OLD STEPS:
Open GalileoGroup (May not be needed; I can reproduce this w/several groups)

Set delphicoreide as the active project
Run
In the Debuggee:

New WinForm app
Drop BDPDataAdapter
Click Code
Click Design
Drop DataSync
Click Code
Click Design
Run
Close running application

In the main IDE, open dllmain.c (must have C eval installed)
Stick a breakpoint on the first line in CompilerGetUnit
Add a watch for unitName

Go back to the debuggee
Move the DataSync Component
click Code

// Breakpoint hit after a small delay
F9 // continue
// Breakpoint hit again
IDE will now be consuming all the CPU and it will be impossible to work w/it.
Workarounds
None
Attachment
DataSetBug.zip
Comments

Zach Saw at 7/25/2006 9:24:15 PM -
Same steps failed in BDS 2006 too!

Registered User at 12/21/2006 11:43:06 AM -
This was reported as report #31307, which has been recently closed with no explanation. I was very disappointed. This bug happens for literally *every* multi-threaded application that I have ever written using Builder.

I have attached my comments below from the above report. If you guys would fix this, it would be great as it is one of the two extremely frustrating bugs I have found in this otherwise wonderful product!

----------------------------------------------

I have also witnessed this problem relatively frequently, but only when running XP - Windows 2000 was fine, but when I changed computers, it hangs when debugging. This has been the case on 3 computers so far, all running XP.

The operating system locks right up to having to power off the machine - everything crawls to an almost dead stop. If you ctrl-alt-del and bring up up the task list, it comes up, but verrrrrry slowly (about 2-5 minutes) and lists all current applications as "not responding".

I have yet to come up with a set of circumstances that reproduces the bug with 100% reliability, but the following seems to cause it to happen more frequently:

1) run on an XP system (appears to be a requirement)
2) dynamically create a thread in your application
3) allocate and execute an instantiation of this thread
4) set a breakpoint in this thread which will be hit several times throughout the life of the thread
5) when it hits the breakpoint, press F9 to continue

This appears to cause the problem to occur relatively often (sometimes only about 10 times required before the whole system locks up), but seems to occur more often when I have a bug fix with a tight deadline.

Zach Saw at 12/11/2008 4:05:00 PM -
This appears to be a WinXP bug (?? or at least not specific to BCB) - I've encountered it numerous times in MSVC2005 too.

Actually, this report has been changed so many times by CodeGear's test team (and reproduced by many of their testers) that my original steps to reproduce is completely wiped off. Yet, at their convenience, they simply mark it as test case error.

Zach Saw at 3/24/2009 12:37:29 AM -
BTW, what's GalileoGroup? :)

I certainly didn't write those steps in "steps to reproduce"...

Florent Ouchet at 12/21/2006 9:50:21 PM -
I closed your report with reason "Test case error" Please attach a simple application with steps to make this problem reproducible on our computers.

Server Response from: ETNACODE01