Delphi XE2 and C++Builder XE2 Update 2 Bug Fix List

By: Tim DelChiaro

Abstract: List of user reported issues that are fixed in Update 2 for Delphi XE2, C++Builder XE2 and RAD Studio XE2

 The following is a list of user reported issues that have been fixed in Update 2 to Delphi XE2, C++Builder XE2 and RAD Studio XE2. You can get Update 2 at http://cc.embarcadero.com/item/28597.

You can check for all fo the latest updates and free additional software on the registered user pages for DelphiC++Builder and RAD Studio.

QC #: Date Reported: Area:
100352 10/23/2011 Demos
Description: Steps:
[QC Short Description]
The BindLookupVCLProject.dproj fails when you enable the Active checkbox.

[QC Description]
Not sure if this is just the demo, or something wrong with live bindings:

The BindLookupVCLProject.dproj fails when you enable the Active checkbox.


QC Entry 100352
Steps to reproduce: - update the radstudiodemos.sourceforge.net SVN - load radstudiodemos.sourceforge.net\branches\RadStudio_XE2\BindSamplesGroup.groupproj - select the BindLookupVCLProject.dproj in the project manager - check the "Active" checkbox // exp: no exception // act: this exception: ---------------------------------- Debugger Exception Notification ---------------------------------- Project BindLookupVCLProject.exe raised exception class EIntfCastError with message 'Interface not supported'. --------------------------------- [Break] [Continue] [Help] ----------------------
QC #: Date Reported: Area:
98612 9/6/2011 IDE\Dialogs\Project Options
Description: Steps:
[QC Short Description]
Dialog to Add Run-Time packages only adds them one at a time

[QC Description]
if you add multiple packages to the Ordered List of RuntimePackages dialog (see attachment), and click OK only the first one appears in the Project Options list of run-time packages.

This whole area needs a re-design. You should not have to go through a series of 3 dialogs to add a single run-time package if you don't know the filename. The default DCP output folder should also be selected so you don't have to configure a favorite directory (which I believe is a Jedi IDE Add-in) or constantly navigate to the DCP folder to select a package. I would recommend eliminating the Add Runtime Package dialog completely. When you click on the folder button in the Ordered List of Runtime Packages dialog it should invoke a dialog that shows the packages in the default DCP folder and allows you to multi-select packages to be added.
QC Entry 98612
1) click the elipsis button in the Project Options dialog in the Runtime package groupbox to invoke the ordered list of runtime packages dialog 2) click the Browse for folder button to invoke the Add Runtime Package dialog 3) click the Browse button to invoke the file selection dialog 4) Navigate to the DCP folder because it's not selected by default and there is no favorite set when the IDE is installed 5) select a DCP file and click Open. 6) Click Ok in the Add Runtime Package dialog 7) Click Add in the Ordered List of Runtime Packages dialog 8) repeat steps 3 to 7 selecting a different DCP file 9) note the two additional packages are shown in the Ordered List of RuntimePackages dialog 10) click Ok. 11) Notice with much amazement and dismay that only the first of the two additional packages have been added to the list of ruin-time packages in the project options dialog. 12) submit a bug report or vote for this one!
QC #: Date Reported: Area:
97115 8/4/2011 IDE\Project Management
Description: Steps:
[QC Short Description]
Deploying an app to OSX, Win32 then OSX again fails

[QC Description]
If you deploy an application to run on an OSX target, later compile it to target Win32, then deploy it again to run on OSX, compilation fails during the deployment stage with the error "[Fatal Error] This project object has been unloaded from the MSBuild engine and is no longer valid". 
QC Entry 97115
- Create a new FireMonkey HD application - Assign an OSX target to it - Ensure PAServer is running on the OSX target - Select 'Run->Run' from the main menu - Once the application starts up under OSX, quit it - Change the active target platform to 32-bit Windows - Select 'Project->Compile <project name>' from the main menu - Change the active target platform to OSX - Select 'Run->Run' from the main menu Expected: The project compiles, deploys to the OSX target and executes there Actual: The project fails during the deployment stage with the error "[Fatal Error] This project object has been unloaded from the MSBuild engine and is no longer valid".
QC #: Date Reported: Area:
92435 3/21/2011 IDE\Project Management
Description: Steps:
[QC Short Description]
Creating a unit test project fails to add platform info

[QC Description]
After creating a unit testing project, the node with platform selection is missing in the project view.
Manually changing the dproj file adds the platform info.
QC Entry 92435
Create some helloworld project Use unit testing expert to create a unit testing project Check the project view for generated unit testing project: no platform node displayed.
QC #: Date Reported: Area:
100342 10/22/2011 IDE\Project Management
Description: Steps:
[QC Short Description]
Adding x64 target does not always enable it for debugging

[QC Description]
On existing pre XE2 projects, adding x64 as a target does not enable debugging:
- you always get into CPU view
- none of the breakpoints work

The IDE does show blue dots though.
QC Entry 100342
Steps to reproduce: 1. Check out the http://radstudiodemos.svn.sourceforge.net/viewvc/radstudiodemos/branches/RadStudio_XE2/Delphi/RTL/Threads/ demo 2. Open the thrddemo project it in Delphi XE2 3. Set the "Output Directory" and "Unit Output Directory" to ."\ $(Config)\$(Platform)" 4. Press F8 to start debugging x86: this works (observe you get into the debugger, not the CPU view) 5. Press F9, then close the thrddemo application 6. Add Win64 as a target platform 7. Press F8 to start debugging x64: this doesn't work // exp: the debugger to start in source code // act: the debugger starts in CPU view, no way to get any source code; any preset breakpoints won't fire.
QC #: Date Reported: Area:
100309 10/21/2011 IDE\Project Management
Description: Steps:
[QC Short Description]
XE2 64-Bit Debugger Not Work Normaly With Existing Project

[QC Description]
Added by Sysop
<<<<<<<
This issue is similar to QC#100342(Internal#288343).
>>>>>>>

When open a existing delphi project, and want to compile and debug in 64-Bit, IDE open CPU debug windows, and cant debug it on source code !!!

But if i make a new VCL project with same name then copy .dproj file into my project the 64-Bit debugger work good.

Even if i create new project and then delete .dproj file XE2 cant debug it normaly, and open for me CPU window.
QC Entry 100309
1) Make new VCL project, 2) save unit and project files, then build it. 3) Close project. 3) Delete .dproj file side of your project file. 4) Reopen project via .dpr file 5) Add Windows 64-Bit Platform 6) Press F8 for debugging. Or you can open a old project (XE project or D2007 or ...) and try to debug it in 64-Bit mode.
QC #: Date Reported: Area:
99047 9/19/2011 IDE\Project Management\Project Source
Description: Steps:
[QC Short Description]
Add file to project corrupts .dpr

[QC Description]
When I add a file to the FireMonkey ControlsDemo project, for example FMX.Filter.pas, 
the .dpr gets corrupted. Compiler gives following errors:
[DCC Error] ControlsDemo.dpr(15): E2003 Undeclared identifier: 'AApplication'
[DCC Error] ControlsDemo.dpr(15): E2066 Missing operator or semicolon
[DCC Error] ControlsDemo.dpr(16): E2003 Undeclared identifier: 'pplication'
[DCC Error] ControlsDemo.dpr(16): E2066 Missing operator or semicolon

Corrupted .dpr:

program ControlsDemo;

uses
FMX.Forms,
ctrlsdemofrm in 'ctrlsdemofrm.pas' {Form51},
aboutboxfrm in 'aboutboxfrm.pas' {frmAbout},
FMX.Filter in 'c:\program files\embarcadero\rad studio\9.0\source\fmx\FMX.Filter.pas';

{$R *.res}

begin
Application.Initialize;
>> AApplication.CreateForm(TfrmCtrlsDemo, frmCtrlsDemo);
>> pplication.Run;
end.
QC Entry 99047
- open fmx ControlsDemo
- click the "add file to project" toolbar button
- Select FMX.Filter.pas from firemonkey sources
- Project | View Source
- bingo: dpr is "corrupt" - shows AApplication.CreateForm, "pplication.Run".
QC #: Date Reported: Area:
97592 8/13/2011 IDE\Code Editor\Error Insight
Description: Steps:
[QC Short Description]
REGRESSION: Error Insight cannot find include files that reside on the global Library path

QC Entry 97592
1. Open the attached project; note that Error Insight is unable to locate a.inc (as expected). 2. Add the full path to the subfolder "inc" in the project folder to the *global* Library path. 3. Reopen the project to be sure Error Insight catches up on the change. 4. Compile the project to assure that a.inc can, in fact, be found. Expected: Error Insight should now be able to find a.inc too, the same way the compiler is. Actual: Error Insight is still unable to locate a.inc.
QC #: Date Reported: Area:
100292 10/20/2011 IDE\Code Editor\Error Insight
Description: Steps:
[QC Short Description]
NullReferenceException in ErrorInsight parser: "High" without parentheses

[QC Description]
If you type "TPointerList = array[0..High" into the editor and wait some seconds after you types 
"High", the ErrorInsight parser will throw a NullReferenceException. This exception can be seen 
when you debug the IDE and the debugger is configured to handle $C0000005 access 
violations.
QC Entry 100292
1. Start RAD Studio XE2 Update 1 2. Make sure that the debugger handles the nativ OS-Exceptions Access violation ($C0000005) [Tools/Options/Debugger/Native OS-Exceptions] 3. Use "Start/Load Process..." to start another RAD Studio XE2 instance. ("$(BDS)\bin\bds.exe") 4. Create a new Delphi console application 5. Replace the code with the following code. program High_NullReference; type TPointerList = array[0..High begin end. Expected: "High" is underlined Actual: A NullReferenceException is thrown in the .NET ErrorInsight parser and error underlining is disabled for the whole file.
QC #: Date Reported: Area:
97072 8/3/2011 IDE\Performance
Description: Steps:
[QC Short Description]
Very very slow build and compile!

[QC Description]
Building and compiling of big software is unusable slow.
Some results:

Build 64bit:
4min43s, 965Mb
Hints: 157, Warnings: 251, Total lines: 1.133.261
Compile 64bit: 
1min 38s, mem 1.1Gb

Build 32bit:
Compile 32bit: 
2min27s, 1,4Gb

D2010, with IDE fix pack 
Build: 14.2s, 323Mb
Compile: 2,7s, 322Mb
D2010, without IDE fix pack 
Build: 16.7s, 315Mb
Compile: 4.8s, 317Mb

So XE2 is A LOT slower than D2010!
QC Entry 97072


(2011-08-13 JJS: Added a test case demonstrating the speed difference with dcc32 versus dcc64)

Extract the files from the attached zip file.

Build with dcc32 using the following command-line

build dcc32

Note the compile time reported by dcc32.exe.
In my case dcc32 reports a typical compile time of 4.51 secs for just under 500k lines of source.


Next rebuild with dcc64 using this command-line.

build dcc64

See that the compile time for dcc64 is significantly larger.
dcc64 reports a typical compile time for dcc64 of 14.54 secs for same test case or 300%+ longer.



QC #: Date Reported: Area:
98499 9/3/2011 Install
Description: Steps:
[QC Short Description]
Firemonkey installer on Mac doesn't work

[QC Description]
Mac version Lion 10.7.1
Xcode version 4.2 
Build 4D177b
Perhaps it's a problem with iOS 5 support.

Xcode correctly installed (apps already submitted to Appstore)

fpc installed without problem

FireMonkey-iOS-XE2.pkg can't terminate the install and have this error.

[Short Logs]
Sep 3 15:08:17 imac installd[53958]: PackageKit: ----- Begin install -----
Sep 3 15:16:26 imac installd[53958]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package ?ireMonkey-iOS-XE2?" UserInfo=0x107b362e0 {NSFilePath=./postflight, NSURL=file://localhost/Volumes/FireMonkey-iOS/FireMonkey-iOS-XE2.pkg#fpc.pkg, PKInstallPackageIdentifier=com.embarcadero.firemonkey.fpc.pkg, NSLocalizedDescription=An error occurred while running scripts from the package ?ireMonkey-iOS-XE2?} {
NSFilePath = "./postflight";
NSLocalizedDescription = "An error occurred while running scripts from the package \U201cFireMonkey-iOS-XE2\U201d.";
NSURL = "file://localhost/Volumes/FireMonkey-iOS/FireMonkey-iOS-XE2.pkg#fpc.pkg";
PKInstallPackageIdentifier = "com.embarcadero.firemonkey.fpc.pkg";
}
Sep 3 15:16:26 imac Installer[53950]: Install failed: Le programme d?nstallation a rencontr?une erreur qui a provoqu?l?chec de l?nstallation. Contactez l?diteur du logiciel pour obtenir de l?ide.
Sep 3 15:16:26 imac Installer[53950]: Displaying 'Install Failed' UI.
Sep 3 15:16:26 imac Installer[53950]: 'Install Failed' UI displayed message:'Le programme d?nstallation a rencontr?une erreur qui a provoqu?l?chec de l?nstallation. Contactez l?diteur du logiciel pour obtenir de l?ide.'.


[Long logs]

...Snip ...

Sep 3 15:16:25 imac installd[53958]: ./postflight: patching file uikit-skel/src/foundation/NSObjCRuntime.inc
Sep 3 15:16:25 imac installd[53958]: ./postflight: Hunk #1 succeeded at 6 with fuzz 2 (offset -2 lines).
Sep 3 15:16:25 imac installd[53958]: ./postflight: Hunk #2 succeeded at 74 with fuzz 1 (offset 4 lines).
Sep 3 15:16:25 imac installd[53958]: ./postflight: Hunk #3 succeeded at 108 with fuzz 1 (offset 16 lines).
Sep 3 15:16:25 imac installd[53958]: ./postflight: patching file uikit-skel/src/foundation/NSRange.inc
Sep 3 15:16:25 imac installd[53958]: ./postflight: Hunk #1 succeeded at 6 with fuzz 2 (offset -4 lines).
Sep 3 15:16:25 imac installd[53958]: ./postflight: Hunk #2 succeeded at 19 (offset -2 lines).
Sep 3 15:16:25 imac installd[53958]: ./postflight: The headers have been converted and placed under
Sep 3 15:16:25 imac installd[53958]: ./postflight: /Developer/Embarcadero/fpc/packages/cocoaint/utils/uikit-skel/src.
Sep 3 15:16:25 imac installd[53958]: ./postflight: If you wish to compile them, execute the following commands:
Sep 3 15:16:25 imac installd[53958]: ./postflight: cd uikit-skel/src
Sep 3 15:16:25 imac installd[53958]: ./postflight: ppcarm -XR/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -FD/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin -O2 -ap -Cfvfpv2 iPhoneAll.pas
Sep 3 15:16:25 imac installd[53958]: ./postflight: The compiled files can be installed afterwards by copying iPhoneAll.o iPhoneAll.ppu and
Sep 3 15:16:25 imac installd[53958]: ./postflight: AnonClassDefinitionsUikit.o AnonClassDefinitionsUikit.ppu to a directory in your FPC unit path.
Sep 3 15:16:25 imac installd[53958]: ./postflight: Building iOS headers for devices...
Sep 3 15:16:26 imac installd[53958]: ./postflight: Free Pascal Compiler version 2.5.1 [2011/09/03] for arm
Sep 3 15:16:26 imac installd[53958]: ./postflight: Copyright (c) 1993-2011 by Florian Klaempfl and others
Sep 3 15:16:26 imac installd[53958]: ./postflight: Target OS: Darwin for ARM
Sep 3 15:16:26 imac installd[53958]: ./postflight: Compiling iPhoneAll.pas
Sep 3 15:16:26 imac installd[53958]: ./postflight: Compiling AnonClassDefinitionsUikit.pas
Sep 3 15:16:26 imac installd[53958]: ./postflight: Assembling (pipe) AnonClassDefinitionsUikit.s
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSCalendar.inc(20,57) Error: Identifier not found "kCFCalendarUnitWeekOfMonth"
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSCalendar.inc(20,57) Error: Illegal expression
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSCalendar.inc(21,55) Error: Identifier not found "kCFCalendarUnitWeekOfYear"
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSCalendar.inc(21,55) Error: Illegal expression
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSCalendar.inc(22,69) Error: Identifier not found "kCFCalendarUnitYearForWeekOfYear"
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSCalendar.inc(22,69) Error: Illegal expression
Sep 3 15:16:26 imac installd[53958]: ./postflight: NSEnumerator.inc(18,18) Fatal: Syntax error, ";" expected but "identifier __UNSAFE_UNRETAINEDPTR" found
Sep 3 15:16:26 imac installd[53958]: ./postflight: Fatal: Compilation aborted
Sep 3 15:16:26 imac installd[53958]: ./postflight: There was an error running Building iOS headers for devices
Sep 3 15:16:26 imac installd[53958]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package ?ireMonkey-iOS-XE2?" UserInfo=0x107b362e0 {NSFilePath=./postflight, NSURL=file://localhost/Volumes/FireMonkey-iOS/FireMonkey-iOS-XE2.pkg#fpc.pkg, PKInstallPackageIdentifier=com.embarcadero.firemonkey.fpc.pkg, NSLocalizedDescription=An error occurred while running scripts from the package ?ireMonkey-iOS-XE2?} {
NSFilePath = "./postflight";
NSLocalizedDescription = "An error occurred while running scripts from the package \U201cFireMonkey-iOS-XE2\U201d.";
NSURL = "file://localhost/Volumes/FireMonkey-iOS/FireMonkey-iOS-XE2.pkg#fpc.pkg";
PKInstallPackageIdentifier = "com.embarcadero.firemonkey.fpc.pkg";
}
Sep 3 15:16:26 imac Installer[53950]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package ?ireMonkey-iOS-XE2?" UserInfo=0x7fe9894d1170 {NSFilePath=./postflight, NSURL=file://localhost/Volumes/FireMonkey-iOS/FireMonkey-iOS-XE2.pkg#fpc.pkg, PKInstallPackageIdentifier=com.embarcadero.firemonkey.fpc.pkg, NSLocalizedDescription=An error occurred while running scripts from the package ?ireMonkey-iOS-XE2?}
Sep 3 15:16:26 imac Installer[53950]: Install failed: Le programme d?nstallation a rencontr?une erreur qui a provoqu?l?chec de l?nstallation. Contactez l?diteur du logiciel pour obtenir de l?ide.
Sep 3 15:16:26 imac Installer[53950]: IFDInstallController 8951C3A0 state = 7
Sep 3 15:16:26 imac Installer[53950]: Displaying 'Install Failed' UI.
Sep 3 15:16:26 imac Installer[53950]: 'Install Failed' UI displayed message:'Le programme d?nstallation a rencontr?une erreur qui a provoqu?l?chec de l?nstallation. Contactez l?diteur du logiciel pour obtenir de l?ide.'.


QC Entry 98499
Mac version Lion 10.7.1 Xcode version 4.2 Build 4D177b Perhaps it's a problem with iOS 5 support. Run ifremonkey-ios-xe2.pkg on Mac
QC #: Date Reported: Area:
99484 9/30/2011 Install\Files
Description: Steps:
[QC Short Description]
32 bit SockConst.dcu is missing

[QC Description]
XE2 Update 1 is missing 32 bit SockConst.dcu.

If I change my project to compile to 64 bit, it works.
If I change my project to use debug dcu's, it works (both under 64 bit and 32 bit)

But when compiling 32 bit without debug dcu's, I get :

[DCC Fatal Error] SockRequestInterpreter.pas(17): F1026 File not found: 'SockConst.dcu'
QC Entry 99484
 
QC #: Date Reported: Area:
99616 10/4/2011 Database\DataSnap\Server
Description: Steps:
[QC Short Description]
[FATAL] Datasnap Server exception XE2 SP1

[QC Description]
Datasnap Server / Client application build with XE2 SP1:
Server does throw EInvalidPointer / Access violation 
exceptions after more than 1 clients connected.
QC Entry 99616
Added by Sysop
<<<<<<<
1. build attached projects(server/client)
2. run server
3. run multiple clients
4. click Button on client in the multiple clients
5. server throws exception!!
>>>>>>>

Build DS Server with DS Server Expert assistant;
Build DS Client with SqlConnection;
Run Server; Run several Clients;
Server throws exception, clients get un-connected.
QC #: Date Reported: Area:
99543 10/3/2011 International\Translation
Description: Steps:
[QC Short Description]
TLoginDialog and TPasswordDialog contain HTML strings in German localization

[QC Description]
The German login dialogs contain an "&" in their Ok buttons text.
QC Entry 99543
1. Start the IDE, German localization 2. Create a VCL application 3. Drop an TADOConnection on the form 4. In the object inspector, set connected to True
QC #: Date Reported: Area:
99132 9/20/2011 VCL
Description: Steps:
[QC Short Description]
pointer(longint) casts in Forms.pas

[QC Description]
1. These functions cast the Data longint to a pointer:

function CheckTaskWindow(Window: HWnd; Data: Longint): Bool; stdcall;
begin
Result := True;
if PCheckTaskInfo(Data)^.FocusWnd = Window then
begin
Result := False;
PCheckTaskInfo(Data)^.Found := True;
end;
end;

function CheckTaskWindowAll(Window: HWnd; Data: Longint): Bool; stdcall;
var
WinProcessId: DWORD;
begin
Result := True;
GetWindowThreadProcessId(Window, @WinProcessId);
if (PCheckTaskInfo(Data)^.FocusWnd = Window) and
(GetCurrentProcessId = WinProcessId) then
begin
Result := False;
PCheckTaskInfo(Data)^.Found := True;
end;
end;

2. Shouldn't TFormStyleHook.TMainMenuBarStyleHook.PopupMenuHook return LResult instead of longint?
QC Entry 99132
 
QC #: Date Reported: Area:
98937 9/15/2011 VCL\Additional Controls\TStringGrid
Description: Steps:
[QC Short Description]
[WinXP] TStringGrid DrawingStyle gdsThemed not working on Win XP

[QC Description]
Using the default DrawingStyle-property = gdsThemed hides the content of the cells, when you are runnig on Win XP with the default blue Windows-Theme.

This only occurs by selecting [goRowSelect] = True or [goRangeSelect] = True when multiple cells are selected.
QC Entry 98937
1. Create a new VCL-Forms-Application 2. Place a TStringGrid on the form 3. Fill the Grid with some Values 4. Enable RowSelect OR RangeSelect 5. Run the application on Win XP with default blue XP-Theming (green doesn't work too, silver has only less important painting problems but is also not perfect) 6. Select a Row or some Cells 7. The content of the selected cells vanish "under" the selected area. The frame of the selected area is randomly dotted or solid but should be always dotted or always solid (I think).
QC #: Date Reported: Area:
100144 10/17/2011 VCL\Additional Controls\TStringGrid
Description: Steps:
[QC Short Description]
Unable to select cells in TStringGrid when its parent panel is floating

[QC Description]
The attached sample illustrates TStringGrid placed on TCustomForm.

See also: report QC#71311
http://qc.embarcadero.com/wc/qcmain.aspx?d=71311
QC Entry 100144
1) Run the attached sample. 2) Click the "Test" button. 3) It is impossible either to focus a Grid cell by clicking it or select multiple cells by dragging the mouse cursor while keeping the left mouse pressed.
QC #: Date Reported: Area:
95659 6/28/2011 VCL\Additional Controls\Action Bar Controls
Description: Steps:
[QC Short Description]
Make TActionToolbar controls work on Glass

[QC Description]
Details of how to make TActionToolbar controls work correctly are glass are provided in the following blog post.

http://jed-software.com/blog/?p=471

Would be good to see these changes made in the released code.

Without these changes, no toolbar control that ships with the IDE can support being displayed on glass.
QC Entry 95659

Fix in .patch file attached
 
QC #: Date Reported: Area:
99353 9/26/2011 VCL\Graphics
Description: Steps:
[QC Short Description]
Colors messed up - clSkyBlue, clCream

[QC Description]
{USc: See reverse byte order for skyblue and cream

Delphi XE: $(BDS)\source\vcl\Graphics.pas

clMoneyGreen = TColor($C0DCC0);
clSkyBlue = TColor($F0CAA6);
clCream = TColor($F0FBFF);
clMedGray = TColor($A4A0A0);

Delphi XE2: 
$(BDS)\source\vcl\Vcl.Graphics.pas

clMoneyGreen = TColors.MoneyGreen;
clSkyBlue = TColors.LegacySkyBlue;
clCream = TColors.Cream;
clMedGray = TColors.MedGray;

$(BDS)\source\rtl\common\System.UITypes.pas

MedGray = TColor($A0A0A0);
DkGray = ...
MoneyGreen = TColor($C0DCC0);
LegacySkyBlue = TColor($A6CAF0);
Cream = TColor($FFFBF0);
}
QC Entry 99353
Create a new form and set the background color to either clSkyBlue or clCream - you will notice the two colors are totally different to previous versions of Delphi!? Looking on the web at the documentation you can see that the constants have changed - they are inversed for some reason !?! http://docwiki.embarcadero.com/VCL/XE/en/Graphics#Constants http://docwiki.embarcadero.com/VCL/XE2/en/Graphics#Constants
QC #: Date Reported: Area:
99646 10/5/2011 VCL\Standard Controls\TComboBox
Description: Steps:
Adding a blank string to a combobox with CharCase set to ecUpperCase or ecLowerCase will cause an AV.

[QC Short Description]
[WinXP] Access violation in kernel32.dll on open delphi form

[QC Description]
This issue occur on WinXP.

When we open some delphi forms from older delphi versions in Delphi XE2 update 1, the ide crash with the message "Access violation at address ... in module 'kernel32.dll'. Write of address ...".

System is
Windows XP SP3 / IE8.
RAD Studio XE2 Update 1.
QC Entry 99646
Drop a combox on a form and set CharCase to upper or lower.
Add a button and this code on it: 
ComboBox1.Items.Add('');
Run the app and click the button.

The AV also occurs when loading a form with an empty string and CharCase set as per the original QC report.
QC #: Date Reported: Area:
100248 10/19/2011 VCL\Standard Controls\TListBox
Description: Steps:
[QC Short Description]
Horizontal Scroll Bar skips even pages in control

[QC Description]
Horizontal Scroll Bar skips even pages in control
QC Entry 100248
Steps to Reproduce: 1. In FormShow exit, create Listbox on form. 2. Add numbers 100000 to 100100 as strings to the listbox. 3. Set Columns := 1 for the listbox to create a horizontal scroll bar. 4. Run Form When listbox displayed, click on right arrow and you can easily see numbers being displayed are not consecutive.
QC #: Date Reported: Area:
99249 9/23/2011 VCL\Win 32 Controls\TComboBoxEx
Description: Steps:
[QC Short Description]
TComboBoxEx impossible to override ItemsClass type by GetItemsClass function

[QC Description]
if you need to create you custom component descendant from 
TComboBoxEx 
then is impossible to override ItemsClass type 

in component definition is 
function TCustomComboBoxEx.GetItemsClass: TCustomComboBoxStringsClass;
begin
Result := TComboBoxExStrings;
end;

but it is never executed in on create

in constructor TCustomComboBoxEx.Create(AOwner: TComponent); is code like this
...
Items := TComboBoxExStrings.Create(Self);
....

but should be

Items := GetItemsClass.Create(Self);
QC Entry 99249
 
QC #: Date Reported: Area:
98933 9/15/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Writing to Forms Caption destroys vcl-style

[QC Description]
When using VCL-Styles (i.e. Aqua Light Slate) and writing to a form's caption then the form is not displayed correctly on executing formshow.
QC Entry 98933
New VCL-Application (form1). Add one aditional form (form2).
Use form2.Show to display form2 and change form2.Caption within form2.FormShow.

Test project is attached.
QC #: Date Reported: Area:
100078 10/15/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Simple combobox is painted incorrectly

[QC Description]
When custom styles are active, TComboBox control having Style=csSimple is painted incorrectly.
It looks like an editor frame is drawn not above a list, but at the size of a full control
QC Entry 100078
A sample project and a screenshot is attached.
QC #: Date Reported: Area:
99956 10/12/2011 VCL\Styles
Description: Steps:
[QC Short Description]
The help BorderIcon is not shown when using styles

[QC Description]
When selecting BorderIcond biSystemMenu and biHelp only the X icon is shown when using any Style but when using the standard Windows style both the ? and X icons are visible.
QC Entry 99956
Create a VCL Foems Application - Delphi or C++Builder. Select BorderIcons biSystemMenu and biHelp only. Run the application. Now the X icon and the ? icon will appear on the top right. Close and select a style and make it the default. When you now run the application, only the X icon will be visible.
QC #: Date Reported: Area:
98458 9/1/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Spin Button Arrow will not display if the Style's BorderColor is black

[QC Description]
For the SpinButton object in a custom Style, the arrow is NOT part of the bitmap image for the spin button. Instead the arrow is drawn using DrawFrameControlGlyph and DrawFrameControl.

Furthermore, the color of the arrow is set to be the Style Color for the border. In particular, the DrawFrameControlGlyph call in the TSeStyle.ButtonDraw method in the StyleAPI.inc file:

DrawFrameControlGlyph(Canvas, R, DFC_SCROLL, DFCS_SCROLLLEFT, Colors[ktcBorder]);

The problem is that for any custom style that has the Border color set to Black, the arrow will NOT be drawn. The root cause of the problem appears to be in the DrawFrameControlGlyph procedure (in StyleUtils.inc). The code compares the pixels of the glyph to 0 (which is black). The end result is that the entire glyph is treated as transparent and therefore does not appear when the element is rendered.

Given the code in DrawFrameControlGlyph, any code that calls this function with a color of Black will run into this issue with the glyph not being displayed.
QC Entry 98458
Create a new VCL application. Open the project options and check all included styles on the Appearance page. Set the Default Style to Windows. Drop a TPaintBox on the form and size it 80 x 80. It can be any size, but a larger button shows the issue more clearly. Then add the following OnPaint event handler: procedure TForm4.PaintBox1Paint(Sender: TObject); var Details: TThemedElementDetails; begin Details := StyleServices.GetElementDetails( tsDownNormal ); StyleServices.DrawElement( PaintBox1.Canvas.Handle, Details, PaintBox1.ClientRect ); end; Save the project and run. You will see the Windows Themed version of the SpinButton with a Down Arrow. Next, close the app. Go back into the Project Options and change the default style to Aqua Graphite, and run the Application. You will notice that there is no Down Arrow on the button image. Next, close the app. Go back into the Project Options and change the default style to Aqua Light Slate, and run the application. You will notice that the Down Arrow on the button image is now visible. As noted, the problem is that in the Aqua Graphite style, the BorderColor setting is clBlack. If you use the VCL Style Designer to create a copy of the Aqua Graphite style and change the color of the Border entry in the Colors node, the arrow will be visible. For example, I change the BorderColor to a dark red RGB(64,0,0). Of course, you will need to give the new Style a different name otherwise it will not show up in the Project Options page and then select the new style as the default style.
QC #: Date Reported: Area:
97995 8/22/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Aqua Light Slate and Green Light Slate styles grayed checkbox state issue

[QC Description]
With Aqua Light Slate and Green Light Slate custom styles, the checkboxes grayed state is a question mark. 

This is very non-standard and I'm not sure is the best symbol to use in a localisation sense.
QC Entry 97995
Drop a checkbox on a form Set the style to one of the Light Slate ones Change the AllowGrayed property to true for the checkbox and make it grayed exp: checkbox filled with a grayed square instead of being empty or checked act: question mark displayed
QC #: Date Reported: Area:
81881 2/5/2010 Debugger
Description: Steps:
[QC Short Description]
External Exception EEFFACE

[QC Description]
Added by Sysop
<<<<<<<
This issue still occur with Delphi XE(w/ Update1).
>>>>>>>

While debugging my application with Delphi 2009, I sometimes get an External Exception EEFFACE error occurring.

This only happens occasionally, but after pressing OK, then my IDE and program both may freeze. If I am lucky I can sometimes do a File/SaveAll in Delphi, but sometimes I can't. Either way I am stuck and then the only thing I can do is use Windows Task Manager to shut down Delphi. Of course, if I was unable to SaveAll, then I lose all the edits I had made since last saving.

I have all the Delphi 2009 Updates installed right up to and including Update 4. I also have IDE Fix Pack 2009 2.9 installed.

I posted a full description of this with the call stack at: http://stackoverflow.com/questions/2197351/external-exception-eefface-in-delphi

A second confirmation of another party (Alex of EurekaLog) getting this error along with a call stack is also given there.

Allen Bauer responded and said this should be reported in Quality Central, which I am now doing.
QC Entry 81881
Added by Sysop
<<<<<<<
1. open attached project with Delphi2009,2010,XE.
2. build and run it with Debug session.
3. Place breakpoint on line 146 ("DllHandle:=Windows.LoadLibrary(p);"
4. Run to breakpoint and hit F8 to step over LoadLibrary call.

Debugger fault notification pops up. Hit Okay.
External Exception EEFFACE now happens.

>>>>>>>

QC #: Date Reported: Area:
95431 6/21/2011 Debugger
Description: Steps:
[QC Short Description]
Automated Incident Report

[QC Description]
Debugger Assertion Failure: "obj"
in ..\win32src\rproxy.cpp at line 538

Debugging a 64-bit DLL (ODBC driver) in the IDE.
QC Entry 95431
Tried to use the expression evaluator to evaluate an expression that involved a call to an external DLL function.
QC #: Date Reported: Area:
99015 9/18/2011 Debugger
Description: Steps:
[QC Short Description]
IDE Freezes when using F8 in CPU View after an exception has occurred

[QC Description]
I am seeing occasional IDE freezes when stepping through code in the 64-bit Debugger's CPU View. I can reliably reproduce one such crash via the attached test case.
QC Entry 99015




{ USc: The following steps are for the case that Access Violation ($C0000005) is handled by the user program and not the debugger. ("Ignore this exception type" has been used)
When it is handled by the debugger you have of course additionally to press Continue on the Debugger Exception Notification dialog, 
but the important thing is that at steps 4 and 5 you have to press two times F8. This is once to get the debugger notification and once to get the exception dialog.
If you press CTRL+F2 after the debugger notification there is no issue. }

1) Press F9 to compile and run the attached application inside the 64-bit debugger
2) Click OK to dismiss the exception dialog that comes up
3) Press Ctrl+Alt+C to bring up the CPU view
4) Press F8 in the CPU view to step over the current instruction
5) Click OK to dismiss the exception dialog
6) Press Ctrl+F2 to reset the application

Expected: The debugger shuts down.
Actual: The IDE locks up.


program DebuggerCrashBug;

{$APPTYPE CONSOLE}

{Steps:
1) Press F9 to compile and run this application inside the 64-bit debugger
2) Click OK to dismiss the exception dialog that comes up
3) Press Ctrl+Alt+C to bring up the CPU view
4) Press F8 in the CPU view to step over the current instruction
5) Click OK to dismiss the exception dialog
6) Press Ctrl+F2 to reset the application

Expected: The debugger shuts down.
Actual: The IDE locks up.}

procedure Test;
asm
xor rax, rax
mov [rax], al
end;

begin
Test;
end.
QC #: Date Reported: Area:
96887 7/29/2011 Debugger
Description: Steps:
[QC Short Description]
dbkw64_16_0.exe does not shut down after debugging and leaks memory

[QC Description]
See steps
QC Entry 96887
a. create new VCL application
b. add 64 bit
c. run
d. close application
e. repeat step c.

Taskmanager shows 2 instances of dbkw64_16_0.exe running, one uses like 50MB - each new debugging session adds another 50MB to it until bds.exe is closed.
QC #: Date Reported: Area:
98335 8/30/2011 Debugger
Description: Steps:
[QC Short Description]
certain characters in a class name break OSX debugger

[QC Description]
When the unit PreventDebugging.pas (see steps) is used in a project it is not possible to debug this project in OSX. 

The problem seems to come from the ä in the classname. As soon as certain characters are used in a class name somewhere in any unit of a project, it is not possible anymore to debug the project. There doesn't seem to be any line information, and F8 runs the entire application until it exits.

Renaming the classes is not always desired and the classes might not be easy to find.


Newsgroup reply from Jeremy North:

Output from console window (debugger didn't stop):

>[0] </Users/jeremynorth/Applications/Embarcadero/PAServer/dbkosx_16_0>
[1] <-listen>
[2] <64447>
listen
libStart @0x232486
[0] <dbkosx_16_0>
[1] <-pipe>
[2] <13>
[3] <10>
[4] <12>
Process Control Server Started pid 5523 exe built Jul 24
2011sentinelFunc 5527
- dbkosx_16_0 [pid 5522]: Debugger Assertion Failure: ""
in ../osxsrc/osxproc.cpp at line 2493
Continue execution?

Set breakpoint here
QC Entry 98335
1. Create a new console application from the dpr and unit posted at the bottom 2. Set Target Platform to OSX 3. (Optional) Set a breakpoint near WriteLn('Set breakpoint here'); 4. Press F8 to debug the application expected: the debugger stops act: the application runs until it finishes program DebugTest; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, PreventDebugging in 'PreventDebugging.pas'; type TNoProblemWithÄ = class(TObject) public procedure Refresh; end; { TNoProblemWithÄ } procedure TNoProblemWithÄ.Refresh; begin end; var MyClass: TNoProblemWithÄ; begin try MyClass := TNoProblemWithÄ.Create; MyClass.Refresh; WriteLn('Set breakpoint here'); MyClass.Free; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. {*****************************************************************} { } { PreventDebugging.pas unit } { } {*****************************************************************} unit PreventDebugging; interface type TProblemWithÄ = class(TObject) public procedure Refresh; end; implementation { TProblemWithÄ } procedure TProblemWithÄ.Refresh; begin end; end.
QC #: Date Reported: Area:
98717 9/9/2011 Debugger\Stepping
Description: Steps:
[QC Short Description]
"disconnected session" error in debugger

[QC Description]
disconnected session

This little program gives the error message every time when stepping through the debugger in 64-bit mode:

procedure TForm2.FormCreate(Sender: TObject);
var
x: array of single;
begin
setlength(x,10);
end;

It then requires a full restart of the IDE for debugger to work again.
QC Entry 98717
By USc: - create a new Delphi console app and replace it with the following program - set target to Win64 - put a breakpoint on line 9 - F9 - F8 on line 9 expected: stepping would lead me to line 10 actual: stepping leads me to line 10 followed by the error --------------------------- Error --------------------------- disconnected session --------------------------- OK Details >> --------------------------- program QC98717; {$APPTYPE CONSOLE} procedure Test; var X: array of Single; begin SetLength(X, 10);//<- place breakpoint here, F9 and then F8 end; begin Test; end.
QC #: Date Reported: Area:
98246 8/28/2011 Debugger\Stepping
Description: Steps:
[QC Short Description]
x64: "Disconnected session" error when stepping/tracing another thread

[QC Description]
Switching to another thread and trying to step leads to a "Disconnected session" error(*) and afterwards an IDE restart is required in order to be able to debug again.

(*) This is actually a failed assertion @ w64srv.cpp, line 2218, in the x64 debugger process. -- bthorn
QC Entry 98246
---- use the attached project instead ---

1. open the attached project
2. set target to Win64
3. f9
4. when you the program is suspended (caused by int 3), press F9
5. now, the program should be waiting in readln statement, press pause
6. open the thread-view, and click on another thread (this will make another thread the current suspended thread), now press step-into or step-over.

exp: step is successful
act: disconnect session error


- create a new Delphi console app and replace it's content with the following program
- set target to Win64
- run under debugger
- switch to the main thread
- hit F7 or F8

expected: stepping/tracing is successful
actual:
---------------------------
Error
---------------------------
disconnected session
---------------------------
OK Details >> 
---------------------------

(At this point further debugging sessions cannot be created -- one must restart the IDE.)

-------8<-------{code}
{ F9, switch to the main thread, then F7 or F8 }
//uses System.Classes;

function break(unused: pointer): integer;
asm
int 3
end;

var id: TThreadID;
begin {$apptype console}
BeginThread(nil, 0, break, nil, 0, id);
//TThread.NameThreadForDebugging('switch to this thread and F7|F8');
readln
end.
{code}-------8<-------
QC #: Date Reported: Area:
98238 8/28/2011 Debugger\Breakpoints
Description: Steps:
[QC Short Description]
x64: "Ignore non-user breakpoints" is itself ignored

[QC Description]
When the option "Ignore non-user breakpoints" is enabled, the test program runs under the x86 debugger without interruptions. The x64 debugger, however, always breaks the execution.
QC Entry 98238
uses WinAPI.Windows;

procedure foo;
begin
DebugBreak;
end;


procedure boo;
asm
int 3;
end;


in win64 - I get DbkTStop_UNKNOWN when DebugBreak or int 3 is executed. I should get DbkTStop_AT_BP

in mac - int 3 is treated like noop
QC #: Date Reported: Area:
99048 9/19/2011 Debugger\Watches
Description: Steps:
[QC Short Description]
Invalid variable value in the Watch List

[QC Description]
See bug: QC#98131(Internal#287068).
This bug wasn't fixed in the Delphi XE2 Release.
QC Entry 99048
See bug: QC#98131

Steps to reproduce:

a. open the attached project
b. when exeception notification dialog is displayed, press break. 

exp: local variable view to show the correct local variable entries
act: it is showing the local variable entires of the previous stack frame

(click on the callstack to see the local variable entries for each stack frame)


In the comments I wrote:
>> Here is second bug with debugger. Try to debug 64-bit application. Debugger shows invalid value for the Level variable (see attachment). 

This bug wasn't fixed in the Delphi XE2 Release.

So I want to repost this bug as separate bug:

Try to debug the following code and look at the Level variable value:

procedure TForm1.Button2Click(Sender: TObject);

procedure ReRaiseErrorExist(Level: integer = 0);
begin
try
raise Exception.Create('Error');
except
if Level < 10 then
ReRaiseErrorExist(Level + 1);
raise; // re-raise existing error
end;
end;

procedure ReRaiseErrorNew(Level: integer = 0);
begin
try
raise Exception.Create('Error');
except
if Level < 10 then
ReRaiseErrorNew(Level + 1);
raise Exception.Create('New error'); // raise a new error
end;
end;

var
i: integer;
begin
for i := 1 to 1000 do
begin
try
ReRaiseErrorExist;
except
end;
try
ReRaiseErrorNew;
except
end;
end;

ShowMessage('OK');
end;
QC #: Date Reported: Area:
98439 9/1/2011 Debugger\Evaluator\Delphi
Description: Steps:
[QC Short Description]
Debugger evaulation of Pointer(Self) returns EAX.

[QC Description]
I use the Pointer(Self) in the evaulator to show the actual address of the self class pointer. In this release of Pulsar.

Added by Sysop
<<<<<<<<<<
Yes this is a regression.

This wasn't a issue with earlier field test releases. especially around beta 4 I think. That version was removed from my computer when I installed xe2, so I don't have the exact info anymore.

If I could access the beta releases I could figure out which one worked the best.
>>>>>>>>>>>
QC Entry 98439
1. Create a new project 2. Dbl Click on the form to do a FormCreate event. 3. enter the code "if Self = Self then;" into the even. 4. Set a breakpoint on the begin, and hit F9. 5. When the debugger stops on the breakpoint hit Ctrl-F7 to bring up the evaulator 6. Type Self and hit enter. 7. you should see the class fields like normal. 8. type in Pointer(Self) and press enter 9. you will see EAX for the result 10. if you type pointer(EAX),h then you'll get the address. Normally steps 9 and 10 aren't necessary.
QC #: Date Reported: Area:
98239 8/28/2011 Debugger\Call Stack
Description: Steps:
[QC Short Description]
x64: Call Stack shows only the low DWORD of the 64-bit address

QC Entry 98239
- create a new Delphi console app and replace it's content with the following program - set target to Win64 - run under debugger expected: CPU View, Call Stack and Thread Status show the same address (000007FEFD132443) actual: CPU View shows 000007FEFD132443 Call Stack shows 00000000FD132443 Thread Status shows 000007FEFD132443 program X64CallStackAddressTest; {$APPTYPE CONSOLE} uses Winapi.Windows; begin DebugBreak; end.
QC #: Date Reported: Area:
100032 10/14/2011 Debugger\Interaction with IDE
Description: Steps:
[QC Short Description]
MacOS: Doesn't work debugger option "Notify on language exceptions"

QC Entry 100032
Try to turn off debugger option "Notify on language exceptions" and run application from attachment.
QC #: Date Reported: Area:
98995 9/16/2011 Debugger\Remote Debugging
Description: Steps:
[QC Short Description]
Add hint for initial password when starting PAServer on the Mac

[QC Description]
Right now, the PAServer on the Mac (paserver.command) just prompts "password:".

At that moment, the context is unclear:
- do you need a password at all?
- is this the password for the current user at the Mac, an administrator at the Mac, or...?

From the documentation (http://docwiki.embarcadero.com/RADStudio/en/Installing_and_Running_the_Platform_Assistant_on_the_Target_Platform) it is clear, but lots of people don't read that.

I'd suggest the "password: " prompt to be change to something like this:

"
The optional password you can enter below that is used between the PAServer and the debugger remote profile selected in the IDE. Press Enter if you want to use a blank password.
Password:

QC Entry 98995
Start the PAServer debugger host. Then wonder about the password asked.
QC #: Date Reported: Area:
98997 9/16/2011 Debugger\Remote Debugging
Description: Steps:
[QC Short Description]
PAServer should force the login user/password dialog to debug a process to happen sooner

[QC Description]
Right now on the Mac, the Mac will once ask permission for debugging processes.

I propose this question is forced to be asked as soon as the paserver.command starts.

This could be done by launching a dummy debug session.

I know that PAServer can be started for two other reasons, but I think not many people will use it that way: 
1- only "start without debugging"
2- deploy files to the Mac (or other target machine)

--jeroen
QC Entry 98997
run the paserver.command on the Mac
QC #: Date Reported: Area:
98864 9/13/2011 Debugger\CPU
Description: Steps:
[QC Short Description]
[x64] MOVQ r64 <-> mmx is disassembled incorrectly

QC Entry 98864
// an extended test case from bthorn:
{ Run this program under the x64 debugger with "Ignore non-user breakpoints" turned off
Expected: Upon breakpoint, CPU View shows
movq mm0,rbx
movq rax,mm1
movq rcx,mm2
movq rdx,mm7
Actual: CPU View shows
movq mm0,ebx
movq None,mm1
movq quiet_al,mm2
movq quiet_dl,mm7
}
asm {$DebugInfo off}
int 3
movq MM0, RBX
movq RAX, MM1
movq RCX, MM2
movq RDX, MM7
end.

------- original Steps -------

- create a new Delphi console app and replace it with the following program
- set target to Win64
- put breakpoint on line 7 ("MOVQ RAX, MM1")
- run
- on breakpoint show CPU View

expected: movq rax,mm1 is shown in CPU View
actual:
MOVQRaxMMDisassemblyTest.dpr.7: MOVQ RAX, MM1 //<- breakpoint here, F9, CTRL+ALT+C
0000000000409E40 480F7EC8 movq None,mm1


program MOVQRaxMMDisassemblyTest;

{$APPTYPE CONSOLE}

procedure DisassemblyTest;
asm
movq MM0, RBX //<- breakpoint here, F9, CTRL+ALT+C
movq RAX, MM1
movq RCX, MM2
movq RDX, MM7
end;

begin
DisassemblyTest;
end.
QC #: Date Reported: Area:
98062 8/24/2011 Debugger\Debugger UI
Description: Steps:
[QC Short Description]
Debug Visualizers reported as "out of scope" when they are not

[QC Description]
Some visualizers are reported as "out of scope", even though they are not. 

Copy of my original StackOverflow question:

As a debugging help I often introduce a "DebugString"-method on my objects, which returns a concise object summary. But sometimes my objects are too complex to be represented optimally in a single string, so I use stringlists. Now, I would like to use the excellent debug visualizers in Delphi to monitor my object. The way I do this is to introduce a property with a getter that rebuilds the stringlist.

This kinda works, but for every line I trace, the property gets out of scope, so I have to click the magnifying glass in the watch window again to see the value. Why is this?
QC Entry 98062


I have fixed the out of scope problem. It now works in Win32, but failed in OSX and Win64. On these platform, I got the assertion error on win32src\wmcipc.cpp line 1640.
To reproduce, create a new console application: program Project1; {$APPTYPE CONSOLE} uses SysUtils, Classes; type TMyClass = class private FInternalData : array[0..4] of integer; FDebugStringList : TStringList; procedure RebuildDebugStringlist; function GetDebugStringList: TStringList; function GetDebugString : string; public constructor Create; destructor Destroy; override; procedure Scramble; property DebugStringList : TStringList read GetDebugStringList; property DebugString : string read GetDebugString; end; constructor TMyClass.Create; begin FDebugStringList := TStringList.Create; end; destructor TMyClass.Destroy; begin FDebugStringList.Free; inherited; end; function TMyClass.GetDebugString: string; var I : integer; begin Result := 'Object state: '; for I := 0 to 3 do Result := Result + inttostr(FInternalData[I])+' '; end; function TMyClass.GetDebugStringList: TStringList; begin RebuildDebugStringlist; Result := FDebugStringlist; end; procedure TMyClass.RebuildDebugStringlist; var I : integer; begin FDebugStringList.Clear; FDebugStringList.Add('Object state:'); for I := 0 to 4 do FDebugStringList.Add(inttostr(FInternalData[I])); end; procedure TMyClass.Scramble; var I : integer; begin for I := 0 to 4 do FInternalData[I] := Random(100); end; var vMyObj : TMyClass; begin vMyObj := TMyClass.Create; try vMyObj.Scramble; vMyObj.Scramble; vMyObj.Scramble; finally vMyObj.Free; end; readln; end. 1. Add watches for "vMyObj.DebugStringList" and "vMyObj.DebugString" 2. Place a breakpoint on line 77 (the 2nd "vMyObj.Scramble"), and run. 3. Click the magnifying glass next to the "DebugStringList" watch to get the visualizer 4. Observe that the visualizer works nicely :) 5. Step over the next line. The visualizer now indicates the watch is out of scope. 6. Press the magnifying glass again to see the new state of the object.
QC #: Date Reported: Area:
99234 9/22/2011 Debugger\Exceptions
Description: Steps:
[QC Short Description]
x64 debugger doesn't break on exception with FastMM4 in FullDebugMode

[QC Description]
Giel reported in my blog (*) that the x64 debugger doesn't break on exceptions with FastMM4 in FullDebugMode and I can repeat that. This problem is related to the define AlwaysAllocateTopDown. If you disable it the debugger does catch the exception.

*=
http://www.bitcommander.de/blog/index.php/2011/09/18/fastmm-win64/#comment-438
QC Entry 99234
This steps do assume that you do have latest FastMM4 with x64 FullDebugMode support in your lib path and know about the FullDebugMode. I've tested with revision 40 and if you don't have latest FastMM yet then see at the end of the steps. - create a new Delphi console app and replace it with the following program - set target to Win64 - run expected: debuggers breaks on exception actual: debugger doesn't break program SimpleLeakTest; {$APPTYPE CONSOLE} uses FastMM4, SysUtils; procedure Leak; var P: Pointer; begin GetMem(P, 32); end; begin Leak; raise Exception.Create('Debugger does not stop?'); end. It would surprise me if you don't have FastMM4, but if you really don't have it this are the steps how to get it. o File | Open From Version Control… o enter as URL https://fastmm.svn.sourceforge.net/svnroot/fastmm o enter a destination directory o OK and wait till everything has been checked out
QC #: Date Reported: Area:
97069 8/3/2011 Debugger\Evaluator ToolTips
Description: Steps:
[QC Short Description]
[x64] AV after viewing "ParameterObject.Value" of ADO (inaccessible value) in 64bit

[QC Description]
While testing and debugging for QC 96860, I got an "inaccessible value" when reading (hovering mouse above) "ParameterObject.Value" (line 3163 of tp\runtime\data\ado\Data.Win.ADODB.pas).

After that I continued running and got several AVs
---------------------------
Debugger Exception Notification
---------------------------
Project FobisPM.exe raised exception class EAccessViolation with message 'Access violation at address 000007FEFDF6A5DA in module 'ole32.dll'. Read of address FFFFFFFFFFFFFFFF'.
---------------------------
Break Continue Help 
---------------------------

Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 000007FEF23EC16B in module 'msado15.dll'. Read of address FFFFFFFFFFFFFFFF'.
QC Entry 97069
 
QC #: Date Reported: Area:
99885 10/10/2011 ActiveX\Framework\DAX\RTL
Description: Steps:
[QC Short Description]
DispatchInvoke bug

[QC Description]
DispatchInvoke() in System.Win.ComObj.pas casts the value returned by GetDispatchInvokeArgs() (which returns non-reference counted TVarDatArray - array of TVarData) to TVarDynArray (which is a reference counted array of OleVariant).
As a result of the cast, the references of the interfaces in the array are not bumpted up, and when the array is cleaned up before DispatchInvoke returns, there is an extra call to Release(), which results (probably much later on) in a premature object release. BAM!

The VarParams variable must be declared as TVarDataArray, and the result of the call to GetDispatchInvokeArgs should not be cast.
QC Entry 99885
Just call any COM object through dispinterface and pass a COM object as a parameter. Let me know (dmitry@dimastr.com) if you need a sample project.
QC #: Date Reported: Area:
100414 10/24/2011 ActiveX\Samples\Servers\MS Office
Description: Steps:
[QC Short Description]
COM automation fails catastrophically in XE2 for both 32 and 64 bit targets

[QC Description]
COM automation fails catastrophically in XE2 for both 32 and 64 bit targets
QC Entry 100414


Added by Sysop
<<<<<<<<<
Primoz Gabrijelcic has some analysis of my particular problem here: http://stackoverflow.com/questions/7886116
>>>>>>>>>
The following program fails in XE2, 32 bit target. The same code runs on 2010. I do not have XE to compare with. The failure occurs when reading UsedRange.Columns. Notably the code fails only on the second time around the for Row loop. The error reported is: --------------------------- Debugger Exception Notification --------------------------- Project COMbug.exe raised exception class $C000001D with message 'system exception (code 0xc000001d) at 0x00dd6f3e'. --------------------------- Break Continue Help --------------------------- Interestingly the program fails also with a 64 bit target, but the error is a little different: --------------------------- Debugger Exception Notification --------------------------- Project COMbug.exe raised exception class $C0000005 with message ' c0000005 ACCESS_VIOLATION'. --------------------------- Break Continue Help --------------------------- program COMbug; {$APPTYPE CONSOLE} uses SysUtils, Variants, Windows, Excel2000; var Excel: TExcelApplication; Book: ExcelWorkbook; Sheet: ExcelWorksheet; UsedRange: ExcelRange; Row, Col: Integer; v: Variant; begin Excel := TExcelApplication.Create(nil); try Excel.Visible[LOCALE_USER_DEFAULT] := True; Book := Excel.Workbooks.Add(EmptyParam, LOCALE_USER_DEFAULT) as ExcelWorkbook; Sheet := Book.Worksheets.Add(EmptyParam, EmptyParam, 1, EmptyParam, LOCALE_USER_DEFAULT) as ExcelWorksheet; Sheet.Cells.Item[1,1].Value := 1.0; Sheet.Cells.Item[2,2].Value := 1.0; UsedRange := Sheet.UsedRange[LOCALE_USER_DEFAULT] as ExcelRange; for Row := 1 to UsedRange.Rows.Count do begin for Col := 1 to UsedRange.Columns.Count do begin v := UsedRange.Item[Row, Col].Value; end; end; finally Excel.Free; end; end.
QC #: Date Reported: Area:
99221 9/22/2011 Midas
Description: Steps:
[QC Short Description]
[REGRESSION] Invalid variant type exception in Multitiered Client/Server 32bit application where AppServer is TDispatchAppServer

[QC Description]
Exception: class EVariantBadVarTypeError with message 'Invalid variant type'. 
Stack trace of the application just before the exception is attached.

I believe the actual problem here in uninitialized local variable <Res: TVarData> in module System.Win.ComObj

procedure DispCallByID(Result: Pointer; const Dispatch: IDispatch;
DispDesc: PDispDesc; Params: Pointer); cdecl;
var
Res: TVarData;
begin
{$IFDEF CPUX86}
DispatchInvoke(Dispatch, @DispDesc.CallDesc,
@DispDesc.DispID, @Params, @Res);
{$ELSE}
DispatchInvoke(Dispatch, @DispDesc.CallDesc,
@DispDesc.DispID, Params, @Res);
{$ENDIF}
if (Result <> nil) then ...

This local variable contains "random" value for Res.VType. This "random" value failed to be cleared before assigning actual(new) value.

It is definitely, that Initialization of the local variable Res (FillChar(Res, sizeof(Res), 0); or VariantInit(Res);) is missed in the procedure DispCallByID and must be there as first line of code.

(If in the Debugger I set this variable to have Res.VType=0 -application continue to work until next such call)

QC Entry 99221
Test case attached.

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

Unfortunately I was not able to create simple test application to reproduce the problem, but I believe the description I gave is enough to convince Delphi's developers that this is real problem.

Our application is 32 bit windows application and reported problem appeared only in Delphi XE2 and works just fine for Delphi XE & 2010.

This problem is really BIG for us.
QC #: Date Reported: Area:
87948 9/10/2010 Compiler\Delphi
Description: Steps:
[QC Short Description]
F2084 Internal Error: G6657

[QC Description]
Load the Code Central
ID: 26124, DeCAL2009 (Generic Delphi Container and Algorithm Library)

Already present in 2010.
QC Entry 87948
By USc:
- save the following program
- dcc32 BTS280378.dpr

expected: it compiles
actual: BTS280378.dpr(16) Fatal: F2084 Internal Error: G6657

Additional note:
This is regression that happened between Weaver FT build 3391 (revision 20582) and Weaver FT build 3417 (revision 21151).


program BTS280378;

{$APPTYPE CONSOLE}

type
DIteratorStucture = (dsArray, dsList, dsMap, dsSet, dsDeque, dsHash);

DIterator<T> = record
function getSize: Integer; inline;
case DIteratorStucture of
dsArray,dsDeque, dsHash: (position: integer);
dsList: (dnode: TObject);
dsMap, dsSet: (treeNode: TObject);
end;

function DIterator<T>.getSize: Integer;
begin
Result := 0;
end;

begin
WriteLn('PASS'); // on compile
end.


Original steps:
Compile the the unittest.dpr in the maptest subdirectory.
The dcc raises the error : F2084 Internal Error: G6657
QC #: Date Reported: Area:
99411 9/28/2011 Compiler\Delphi
Description: Steps:
[QC Short Description]
[x64]Compiler ignores for-loop if inlining enabled

[QC Description]
A loop with a NativeInt loop counter is deleted by the compiler if it is preceded by an inlined function.
QC Entry 99411
By USc: - dcc64 QC99411.dpr - execute QC99411.exe expected: output is PASS actual: output is FAIL See #1, #2 and #3 program QC99411; {$APPTYPE CONSOLE} function Min(const A, B: Double): Double; inline;//#1 passes without inline begin if A < B then Result := A else Result := B; end; type TFoo = class public function Bar: Boolean; end; { TFoo } function TFoo.Bar: Boolean; var I: NativeInt; //#2 passes with Integer Counter: Integer; A, B, C: double; begin Counter := 0; C := Min(A, B);//#3 passes without this line for I := 0 to 1 do Inc(Counter); Result := Counter = 2; end; begin if TFoo.Create.Bar then WriteLn('PASS') else WriteLn('FAIL'); end. Original Steps: program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Math; type TFoo = class public procedure Bar; end; { TFoo } procedure TFoo.Bar; var i: NativeInt; //integer works a, b, c: double; begin c := Min(a, b); for i := 0 to 1 do WriteLn('executed'); //[DCC Hint] Project3.dpr(24): H2135 FOR or WHILE loop executes zero times - deleted end; begin TFoo.Create.Bar; Sleep(1500); end. exp: 'executed' appears twice obs: it doesn't
QC #: Date Reported: Area:
97003 8/1/2011 Compiler\Delphi
Description: Steps:
[QC Short Description]
[dcc64] Compiler fail with OutOfMemory

[QC Description]
[dcc64]

[DCC Fatal Error] RDBOSQLParser.pas(38266): F2046 Out of memory
QC Entry 97003


(
Compile project from Attachments with dcc64 or in IDE
RDBOSQLParser.pas is autogenerated file


(JJS: With dev build 16.0.4231.42308, I see the following error message at compile-time both in the IDE and using the command-line compiler.)

[DCC Fatal Error] RDBOSQLParser.pas(38266): F2084 Internal Error: M208

QC #: Date Reported: Area:
96344 7/18/2011 Compiler\Delphi\Code Generation/Optimization
Description: Steps:
(JJS: Test case involves old-style "objects" that is the old Turbo Pascal 5.5 object type)

(See also RAID 284978)

[QC Short Description]
Compiler produces different code after Build and Run

[QC Description]

See the attached project.
1) Comment the type declaration in unit1 as told in comments in the file.
2) Build and run the projest - press the button - there should be AV
3) add/delete a space to modify the file
4) Run the project (no build). - press the button - nothing happens.


(JJS: It may be necessary to remove the .dproj file that comes with the attachment as it refers to a non-existent .ico file. Allowing the IDE to create the .dproj will allow you to continue with the steps above.)

QC #: Date Reported: Area:
98843 9/12/2011 Compiler\Delphi\Language\Default Parameters
Description: Steps:
[QC Short Description]
[REGRESSION] TBytes argument cannot have default value nil

[QC Description]
Added by Sysop
<<<<<
QC#96778(Internal#285455) is NOT fixed completely.
>>>>>

In previous versions of Delphi (at least until 2010, don't know about XE), TBytes arguments could be set to a default nil value.

In XE2 however, the compiler gives internal error D11508 on this construct (while "array of Byte" does accept a default nil value).

See steps for code that shows the problem.
QC Entry 98843
type TTestDataArray = TBytes; // This definition will result in [DCC Fatal Error] Unit1.pas(35): F2084 Internal Error: D11508 // TTestDataArray = array of Byte; {$MESSAGE WARN 'Pulsar TBytes cannot have default argument value nil'} TBytesIssue = class(TObject) protected procedure func(a: TTestDataArray = nil); end; procedure TBytesIssue.func(a: TTestDataArray = nil); begin end;
QC #: Date Reported: Area:
99101 9/19/2011 Compiler\Delphi\Execution
Description: Steps:
[QC Short Description]
[DCC Fatal Error] txnnetwork.pas(355): F2084 Internal Error: AV08DBE6D1-R00000000-0

QC Entry 99101
First attempt to compile a large Delphi Application under Win32.

Consistently fails at the same location.

Have tried removing all DCU's, restarting IDE etc.

Project does not use any packages.


(JJS: A simple test case was able to be made from the larger code as follows.)

Compile with dcc64 and see the following error at compile time.

Fatal: F2084 Internal Error: AV004FF704-R00000000-0


program BTS287777;

{$APPTYPE CONSOLE}

uses
System.SysUtils;

const
zSysUsage_MaxHosts = 7;

type
TSystemUsageShort = array [1..zSysUsage_MaxHosts] of array [0..1] of Ansichar;

const
lcSystemUsageShort : TSystemUsageShort = ('C','R','I','Ca','Oz','B','S');


function ConvertSystemUsageShort (
const SystemUsageShort : ansichar;
var SystemUsageCode : Int16
): boolean; 
{ true if convert OK }
var
sysCode : Int16;
begin
Result := false;
SystemUsageCode := -1; 
{ Unknown system usage code }
for sysCode := low (lcSystemUsageShort) to high (lcSystemUsageShort) do
if SystemUsageShort = lcSystemUsageShort [sysCode] then
begin
SystemUsageCode := sysCode;
Result := true;
end;
end;


var
lUsage : Int16;
begin
ConvertSystemUsageShort ('Z', lUsage);
end.
QC #: Date Reported: Area:
93600 5/5/2011 Compiler\Delphi\Execution
Description: Steps:
[QC Short Description]
Compiler crashes when compiling application: F2084: Internal Error: C7733

[QC Description]
I have attached the source taken from FreeUDFLib.
QC Entry 93600


- save the following program - dcc32 QC93600.dpr expected: it compiles actual: F2084 Internal Error: C7733 program QC93600; {$APPTYPE CONSOLE} type YYtype = (B, D, N, S); TExprNumber = record case NumType: Byte of 1: (ivalue: Integer); 2: (dvalue: Double); end; YYSTYPE = record case YYtype of B: (bvalue: Boolean); D: (dvalue: TDateTime); N: (nvalue: TExprNumber); S: (svalue: array[0..1] of Char); end; threadvar yyval, yylval: YYSTYPE; function yyparse: Integer; begin yyval := YYSTYPE(yylval); end; begin WriteLn('PASS'); //on compile end.
QC #: Date Reported: Area:
99091 9/19/2011 Compiler\Delphi\Execution
Description: Steps:
[QC Short Description]
[x64] DCC64 consumes a lot of memory and complies very slow if procedure has a lot lines

[QC Description]
[x64]
Same code compiles on DCC32 w/o problems in a fractionb of second
QC Entry 99091
See attached sample project Compliing is trying to allocate over 1GB program TestDCC64; {$APPTYPE CONSOLE} uses System.SysUtils; begin WriteLn( '' ); WriteLn( '' ); WriteLn( '' ); .. // Add 4000-5000 lines like above end .
QC #: Date Reported: Area:
98708 9/8/2011 Compiler\Delphi\Execution
Description: Steps:
[QC Short Description]
Slow 64 bit compilation

[QC Description]
64-bit compiler is about 60 times slower than 32-bit in average case and did not finish in reasonable time in corner case

QC Entry 98708


Open attachment test041.dpr file dcc32: 0.17 sec dcc64: 11.09 sec ratio: about 60 times slower test012.dpr file dcc32: 1.7 sec dcc64: did not finish within 3 hours ratio: dcc64 is unusable
QC #: Date Reported: Area:
96323 7/17/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
AV when direct access to parent's private member field in propery read part

[QC Description]
friends checked on: 2010/XE/XE Beta2 

compiler AV when direct access to parent's private member field in propery read part.

Embarcadero Delphi for Win32 compiler version 22.0
Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
bugunit.pas(22) Fatal: F2084 Internal Error: AV0041311E-R00000018-0
QC Entry 96323
Compile the attached application and unit below.

See the following compile-time error indicating failure.

Fatal: F2084 Internal Error: AV00417265-R00000018-0


unit uBTS285044;

interface

type
tr1 = record
f1: integer; // field 1
end;

tc_base<T> = class
private
m1: T; // member 1
end;

tc1 = class(tc_base<tr1>)
property p1: integer read m1.f1;
end;

implementation

end.


program BTS285044;

{$APPTYPE CONSOLE}

uses
uBTS285044;

begin
WriteLn('PASS'); //PASS on compile//
end.
QC #: Date Reported: Area:
98209 8/27/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
problem with is and generic class constraint

[QC Description]
In the following function

{code: Delphi}
class function TMyRecord.IsClass<T>(const AObject: TObject): T;
begin
if AObject is T then
Result := T(AObject)
else
Result := nil;
end;
{code}

the statement "AObject is T" always returns true although the statement is false. 
QC Entry 98209
compile and run the following/attached program expected: output is PASS actual: output is FAIL #1 FAIL program IsGeneric; {$APPTYPE CONSOLE} type TMyObject = class(TObject); TMyObject2 = class(TMyObject); TMyRecord = record public class function IsClass<T: class>(const AObject: TObject): T; static; class function IsClassTypeContraint<T: TMyObject>(const AObject: TObject): T; static; end; { TMyRecord } class function TMyRecord.IsClass<T>(const AObject: TObject): T; begin if AObject is T then Result := T(AObject) else Result := nil; end; class function TMyRecord.IsClassTypeContraint<T>(const AObject: TObject): T; begin if AObject is T then Result := T(AObject) else Result := nil; end; var Counter: Integer; MyObjectInstance: TMyObject; ObjectInstance: TObject; begin Counter := 0; MyObjectInstance := TMyObject.Create; ObjectInstance := TObject.Create; try if not Assigned(TMyRecord.IsClass<TMyObject>(ObjectInstance)) then Inc(Counter) else WriteLn('FAIL #1'); if Assigned(TMyRecord.IsClass<TMyObject>(MyObjectInstance)) then Inc(Counter) else WriteLn('FAIL #2'); if not Assigned(TMyRecord.IsClassTypeContraint<TMyObject>(ObjectInstance)) then Inc(Counter) else WriteLn('FAIL #3'); if Assigned(TMyRecord.IsClassTypeContraint<TMyObject>(MyObjectInstance)) then Inc(Counter) else WriteLn('FAIL #4'); if not Assigned(TMyRecord.IsClassTypeContraint<TMyObject2>(MyObjectInstance)) then Inc(Counter) else WriteLn('FAIL #5'); if Counter = 5 then WriteLn('PASS') else WriteLn('FAIL'); finally ObjectInstance.Free; MyObjectInstance.Free; end; end.
QC #: Date Reported: Area:
92471 3/22/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
Internal error with interfaces, abstract classes and inheritance...

[QC Description]
This is a bug I found related to interfaces, abstract classes and inheritance.

I created my interfaces, defining my business objects, then, I created my classes, implementing such interfaces. Some of these classes are seen as abstracted by collecting some common characteristics, avoiding duplication of code.

The problem occurs when I try to compile the source code. As I compile only the interfaces and base classes (abstract), everything ok. But when I include the design classes of meaning (that implement the really important things), the compiler complains that "internal error X1234", usually in the term "end;" at the end of the class declaration.

I'm really worried because I don't know if the error is in the compiler, or more likely, in my code. :/

Please bring some light to my questions.
QC Entry 92471
Please, try compile the project files in attachments. :)


Simplified version by USc:
- save the following files
- dcc32 QC92471.dpr

expected: it compiles
actual: Fundation.Modelo.ContaBancaria.pas(10) Fatal: F2084 Internal Error: G8981

//--- QC92471.dpr ---
program QC92471;

{$APPTYPE CONSOLE}

uses
Fundation.Modelo.Intf in 'Fundation.Modelo.Intf.pas',
Fundation.Modelo in 'Fundation.Modelo.pas',
Fundation.Modelo.ContaBancaria in 'Fundation.Modelo.ContaBancaria.pas';

begin
WriteLn('PASS'); // on compile
end.
//--- Fundation.Modelo.Intf.pas ---
unit Fundation.Modelo.Intf;

interface

type //Generics.Collections
TList<T> = class(TObject);

type
IObservador = interface(IInterface)
end;

IObservavel = interface(IInterface)
function GetObservadores: TList<IObservador>; stdcall;
end;

IBase = interface(IObservavel)
end;

implementation

end.
//--- Fundation.Modelo.pas --- 
unit Fundation.Modelo;

interface

uses
Fundation.Modelo.Intf;

type
TBase = class abstract(TInterfacedObject, IBase)
public
function GetObservadores: TList<IObservador>; stdcall;
end;

implementation

function TBase.GetObservadores: TList<IObservador>;
begin
Result := nil;
end;

end.
//--- Fundation.Modelo.ContaBancaria.pas ---
unit Fundation.Modelo.ContaBancaria;

interface

uses
Fundation.Modelo.Intf, Fundation.Modelo;

type
TContaBancaria = class(TBase, IBase)
end;

implementation

end.
QC #: Date Reported: Area:
97737 8/17/2011 Compiler\Delphi\Anonymous Methods
Description: Steps:
[QC Short Description]
Anonymous functions + overload: compiler generates invalid code

[QC Description]
Compiler is confused by overloads when using anonymous functions with same type of return value as argument in overloaded function.
QC Entry 97737

1. Create new VCL application (Delphi, Win32).
2. Use this code:

type
TGetValue = reference to function: string;

function GetData(const Name, Value: string): string; overload;
begin
Result:=Name+'='+Value
end;

function GetData(const Name: string; GetValue: TGetValue): string; overload;
begin
Result:=Name+'='+GetValue
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
ShowMessage(GetData('Str1', function: string // <- here: must use second function, instead it seems that first function is used
begin
Result:='Str2'
end));
end;

3. Compile & Run.
4. Expected: message "Str1=Str2".
Actual: crash, AV or "priviledged instruction" exception.

console application:


program BTS286618;

{$APPTYPE CONSOLE}

uses
System.SysUtils;

type
TGetValue = reference to function: string;

function GetData(const Name, Value: string): string; overload;
begin
Result:=Name+'='+Value
end;

function GetData(const Name: string; GetValue: TGetValue): string; overload;
begin
Result:=Name+'='+GetValue
end;

var
str : String;
begin
try
str := GetData('Str1', function : string // <- here: must use second function, instead it seems that first function is used
begin
Result := 'Str2';
end
);
if('Str1=Str2' = str) then
writeln('PASS')
else
writeln('FAIL - ',str);
except
on E: Exception do
Writeln('FAIL -',E.ClassName, ': ', E.Message);
end;
end.
QC #: Date Reported: Area:
98914 9/14/2011 RTL\Delphi
Description: Steps:
[QC Short Description]
[x64] String compare (_PStrCmp) gives incorrect results in 64-bit

[QC Description]
[x64]
Comparing two shortstrings under 64-bit sometimes gives incorrect result, depending on the degree of similarity of the strings.
QC Entry 98914
Compile and run the attached program below with dcc64.

See the following program output indicating failure.

FAIL #2 - Not GT
FAIL=2/3



program BTS287680;

{$APPTYPE CONSOLE}

var
Expected: Integer = 0;
Counter: Integer = 0;

procedure mycomparestr (const s1, s2: shortstring);
begin
Inc(Expected);
if s1 < s2 then 
writeln('FAIL #1 - LT') 
else 
Inc(Counter);

Inc(Expected);
if s1 > s2 then 
Inc(Counter)
else 
writeln('FAIL #2 - Not GT');

Inc(Expected);
if s1 = s2 then 
writeln('FAIL #3 - EQ') 
else 
Inc(Counter);
end;


procedure DoTest;
begin
MyCompareStr('SOMETIMES', 'SOMETHING');
end;


begin
try
DoTest;
if Counter = Expected then
WriteLn('PASS=', Counter)
else
WriteLn('FAIL=', Counter, '/', Expected);
except
on E: TObject do
WriteLn('FAIL - Exception=', E.ClassName);
end;
end.

QC #: Date Reported: Area:
99696 10/7/2011 RTL\Delphi
Description: Steps:
[QC Short Description]
Memory leak in System.SyncObjs TEvent

[QC Description]
In TEvent's destructor MPDeleteEvent is never called: 

{$IFDEF MAXOSX}
MPDeleteEvent(FEvent);
{$ENDIF}

"MAXOSX" should be changed to "MACOS".




QC Entry 99696
See destription.
QC #: Date Reported: Area:
99276 9/24/2011 RTL\Delphi\Format + Float
Description: Steps:
[QC Short Description]
REGRESSION: Format does not handle poperly Variant with varUString

[QC Description]
Following code works on all version of Delphi except XE2 (both 32 and 64 bits)

var
v : Variant ;
s : String ;
begin
v := 'Test' ;
s := Format( '%s', [ v ] ) ;

Assert( s = 'Test' ) ; // contains some strange content
end.
QC Entry 99276
- save the following program - dcc32/dcc64/dccosx QC99276.dpr - execute QC99276 expected: output is PASS actual: output is FAIL #1 Expected: "Test" Actual: "?" FAIL #2 Expected: "Test" Actual: "" FAIL #3 Expected: "Test" Actual: "" FAIL #4 Expected: "C" Actual: "?" FAIL #5 Expected: "A" Actual: "" FAIL program QC99276; {$APPTYPE CONSOLE} uses SysUtils; var Counter: Integer = 0; procedure EvaluateTestResult(const AExpected, Actual: string; ATest: Integer); begin if Actual = AExpected then Inc(Counter) else begin WriteLn('FAIL #', ATest); WriteLn(' Expected: "', AExpected, '"'); WriteLn(' Actual: "', Actual, '"'); end; end; var V: Variant; begin V := 'Test'; EvaluateTestResult('Test', Format('%s', [V]), 1); V := AnsiString('Test'); EvaluateTestResult('Test', Format('%s', [V]), 2); V := WideString('Test'); EvaluateTestResult('Test', Format('%s', [V]), 3); V := Char('C'); EvaluateTestResult('C', Format('%s', [V]), 4); V := AnsiChar('A'); EvaluateTestResult('A', Format('%s', [V]), 5); if Counter = 5 then WriteLn('PASS') else WriteLn('FAIL'); end.
QC #: Date Reported: Area:
99975 10/12/2011 RTL\Delphi\Input/Output
Description: Steps:
[QC Short Description]
[x64] Memory leak in Readln

[QC Description]
[x64]
I have encountered a memory leak in the 64-bit version of the Delphi VCL. When running the code below, upon application exit, I am informed that the application leaked "265-280 bytes: Unknown x615"

Each line of the text file is approximately 265-280 bytes long, and there are around 615 lines in the file.

The CSV file in question is attached to this report, as is the sample code.
QC Entry 99975
Build the attached application targeting the 64-bit Windows platform and execute it. --- program memleak; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; function ReadFile( ) : string; var FileName : string; AporFile : TextFile; Data : string; begin // initialize return value to empty, and set the file name Result := ''; FileName := 'YieldTableFixed.CSV'; // make sure the file exists if not( FileExists( FileName ) ) then begin Result := 'File note found: ' + FileName; exit; end; FileMode := fmOpenRead; AssignFile( AporFile, FileName ); Reset( AporFile ); while not Eof( AporFile ) do begin // read in one line of the CSV file ReadLn( AporFile, Data ); end; // end file loop // free up resources CloseFile( AporFile ); end; // end ReadFile() var err : string; begin // turn on memory leak checking ReportMemoryLeaksOnShutdown := true; try Write( 'Reading file using ReadLn(): ' ); err := ReadFile(); if ( err = '' ) then Writeln( 'finished successfully!' ) else Writeln( 'error: ' + err ); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; // end try-except end.
QC #: Date Reported: Area:
98999 9/17/2011 RTL\Delphi\Pascal Strings
Description: Steps:
[QC Short Description]
The 64-bit SetLength leaks memory if the string has a reference count > 1

[QC Description]
The 64-bit implementation of _LStrSetLength is missing a call to _LStrClr. Consequently if the string has a reference count > 1 on entry then the original string data will leak.

The last few lines of _LStrSetLength should be:

if CopyCount > NewLength then
CopyCount := NewLength;
Move(PAnsiChar(str)^, PAnsiChar(Temp)^, CopyCount);
_LStrClr(Str); // <------This call is currently missing
Pointer(Str) := Temp;
QC Entry 98999
Compile and run the attached test case under 64-bit. Note the reported memory leak program LStrSetLengthLeak; {$APPTYPE CONSOLE} procedure Test; var a, b: AnsiString; begin SetLength(a, 1); b := a; SetLength(b, 1); end; begin ReportMemoryLeaksOnShutdown := True; Test; end.
QC #: Date Reported: Area:
99315 9/26/2011 SOAP\Client Applications
Description: Steps:
[QC Short Description]
[REGRESSION] HTTPRIO component can no longer be freed

[QC Description]
When an HTTPRIO component is placed on a form and used to call a web service, the component cannot be freed anymore and will cause an "Invalid pointer" error message when the form closes.
QC Entry 99315
1. Create a new VCL application. 2. Place a button and a memo on the main form. 3. Place an HTTPRIO component on the form. 4. Import a web service to use. I have recreated this with several .NET web services, but for the sake of this simple example, use http://www.xmlme.com/WSDailyNet.asmx?WSDL. You should now have a unit called WSDailyNet.pas, with the following two declarations in it: DotnetDailyFactSoap = interface(IInvokable) ['{926712D2-7DAE-225C-2E84-501849CC458E}'] function GetDotnetDailyFact: string; stdcall; end; function GetDotnetDailyFactSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): DotnetDailyFactSoap; 5. Double-click the button to create the event handler. Add the following code: procedure TForm1.Button1Click(Sender: TObject); var Service: DotnetDailyFactSoap; begin Service := GetDotnetDailyFactSoap; // Service := GetDotnetDailyFactSoap(True, 'http://www.xmlme.com/WSDailyNet.asmx?WSDL', HTTPRIO); Memo1.Text := Service.GetDotnetDailyFact; end; 6. Compile, run, click the button. Expected: A message appears in the memo control. The form can be closed without any errors. Actual: A message appears in the memo control. The form can be closed without any errors. 7. Now comment out the first Service := line and uncomment the second one. The event handler should look like this: procedure TForm1.Button1Click(Sender: TObject); var Service: DotnetDailyFactSoap; begin // Service := GetDotnetDailyFactSoap; Service := GetDotnetDailyFactSoap(True, 'http://www.xmlme.com/WSDailyNet.asmx?WSDL', HTTPRIO); Memo1.Text := Service.GetDotnetDailyFact; end; 8. Compile, run, click the button. Expected: A message appears in the memo control. The form can be closed without any errors. Actual: A message appears in the memo control. When you close the form, an exception is raised with the message "Invalid Pointer." This code still functions in Delphi XE if you remove unit scopes.
QC #: Date Reported: Area:
100277 10/20/2011 SOAP\Client Applications
Description: Steps:
[QC Short Description]
Memory leak when consuming web services

[QC Description]
Thanks to
ReportMemoryLeaksOnShutdown := (DebugHook <> 0)
we can see that there are memory leaks when consuming web services.
QC Entry 100277

Added by Sysop
<<<<<<
Please see comment of QC to fix this issue.
>>>>>>
Just create a console application with this code : ---------------------------------------- program WSMemLeak; {$APPTYPE CONSOLE} {$R *.res} uses Soap.InvokeRegistry, Soap.Rio; type IHelloWorld = interface (IInvokable) ['{A9EDEF17-5208-4FE2-8DDE-71993F69E4E0}'] procedure SayHello (); stdcall; end; procedure MainWSMemLeak (); var LRio : IHelloWorld; begin InvRegistry.RegisterInterface (TypeInfo (IHelloWorld)); LRio := TRIO.Create (nil) AS IHelloWorld; LRio := nil; end; begin ReportMemoryLeaksOnShutdown := (DebugHook <> 0); MainWSMemLeak (); end. ---------------------------------------- and run it : there is a memory leak, the TRIO object is not destroyed (RefCount is still 1 after LRio := nil)
QC #: Date Reported: Area:
99420 9/28/2011 SOAP\Components
Description: Steps:
[QC Short Description]
Freeing HTTPRIO raises exception 'Invalid pointer'

[QC Description]
Application with a datamodule unit with:
- HttpRIO component.
- a variable Myvar := RIO as ServerInterface.

When I close the application, the RefCount of RIO is 1, instead of 
0, as expected, and TRIO.BeforeDestruction raises an exception.

The same code doest not raise any exception in Delphi XE.

Added by Sysop
<<<<<<
This issue is related to QC#99315(Internal#287904).
>>>>>>
QC Entry 99420
Create a new application with a datamodule with this code: TMyDataModule = class(TDataModule) RIO: THTTPRIO; procedure DataModuleCreate(Sender: TObject); procedure DataModuleDestroy(Sender: TObject); private public end; var // ServerRIO is a global variable, declared in the unit ServerRIO: IMyServer; procedure MyDataModule.DataModuleCreate(Sender: TObject); begin ServerRIO := RIO as IMyServer; end; procedure MyDataModule.DataModuleDestroy(Sender: TObject); begin ServerRIO := nil; end; Run the application. Close the main form. 'Invalid pointer' exception.
QC #: Date Reported: Area:
98793 9/11/2011 FireMonkey
Description: Steps:
[QC Short Description]
Crash on MacOS when Form is set to Transparent

[QC Description]
Set up a FireMonkey application.

Set Form Transparency to True in designer


Run on WIndows - fine works as expected - form is transparent.

Run on Mac - it crashes. The Mac and PASserver are stuck - app is on screen but unresponsive.

Delphi IDE loses control over Mac and on PC the runtime is terminated.

Have found that if I set transparency to true in code after form is up then problem is avoided
QC Entry 98793
Set up a FireMonkey application. Set Form Transparency to True in designer Run on WIndows - fine works as expected - form is transparent. Run on Mac - it crashes. The Mac and PASserver are stuck - app is on screen but unresponsive. Delphi IDE loses control over Mac and on PC the runtime is terminated.
QC #: Date Reported: Area:
97924 8/20/2011 FireMonkey
Description: Steps:
[QC Short Description]
Changing the style name property of a style

[QC Description]
In the TStylebook resource editor, changing the stylename of an existing style does not immediately update the style name displayed in the style tree. You need to apply and close and then reopen the resource editor to see the change.
QC Entry 97924
1. Start a new Firemonkey HD project 2. Drop a TStylebook component onto to design area 3. Open the stylebook resource editor 4. Drag a button or something to start a new style tree. 5. Change the style name in the properties editor from newstyle1 to newstyle2. 6. Move off the style property and you will see that the name in the style tree still displays as newstyle1 7. Apply and close the resource editor and then reopen it. You will see that the name in the style tree has now changed to newstyle2
QC #: Date Reported: Area:
100386 10/24/2011 FireMonkey
Description: Steps:
[QC Short Description]
[MacOS] Regression: command+Q while showing a modalform crashes the application

[QC Description]
If a user presses cmd+Q in order to close a MacOS application while showing a modal form, the application crashes.

This is a regression in build 4300.
QC Entry 100386
procedure TForm1.Button1Click(Sender: TObject); begin MessageDlg('Press cmd+Q in order to crash this application', TMsgDlgType.mtError, [TMsgDlgBtn.mbClose], -1); // or Form2.ShowModal; end; Press cmd+Q while showing a messagedlg or a modal form. You will get one of the following three options: 1. PAServer shows: Runtime error 231 at 000169AD 2. The MacOS crash dialog comes up "Project quit unexpectedly" 3. The application hangs in the taskbar
QC #: Date Reported: Area:
98367 8/30/2011 FireMonkey
Description: Steps:
[QC Short Description]
[MacOS] Cannot select items in a TComboBox shown on a modal form on OSX

[QC Description]
[MacOS] 
If you have a TComboBox shown on a modal form on a FireMonkey app running on OSX, it is impossible to select any items in the TComboBox. 

Windows FireMonkey apps do not suffer from this problem.
QC Entry 98367
- Download and extract ComboText.zip - Open ComboTest.dproj in XE2 - Deploy to OSX and run - Drop down the TComboBox and select the first entry Expected: The first entry is selected and shown in the closed up TComboBox Actual: The first entry is selected and shown in the closed up TComboBox - Click the 'Modal Form' button - Drop down the TComboBox and select the first entry Expected: The first entry is selected and shown in the closed up TComboBox Actual: The first entry cannot be selected, and the TComboBox remains dropped down
QC #: Date Reported: Area:
98759 9/10/2011 FireMonkey
Description: Steps:
[QC Short Description]
[MacOS] OnIdle event never occurs in FireMonkey application

[QC Description]
[MacOS]
In FireMonkey application assigning an event to OnIdle event does not work. The event is never called. The same issue occurs both in normal FireMonkey applications and in FireMonkey 3D applications.

This issue only occurs on MAC OS, if you recompile for Windows, the OnIdle event works fine.
QC Entry 98759
Create FireMonkey application. Add this code: procedure TForm1.AppIdle(Sender: TObject; var Done: Boolean); begin Caption:= 'Idle event has been called.'; Done:= False; end; In TForm1.Create, do this: Application.OnIdle:= AppIdle; Execute the application on Mac OS. OnIdle event will never occur, the caption will never change.
QC #: Date Reported: Area:
98162 8/25/2011 FireMonkey
Description: Steps:
[QC Short Description]
TForm.IsActive property

[QC Description]
I see multiple issues with the TForm.IsActive property:
- Why is it published?
- Why is it writeable?
- Why does it start with "Is"?
QC Entry 98162
New FMX app Look at property "IsActive" on OI Uncheck it. Deselect the form and select it back // its checked again!
QC #: Date Reported: Area:
98023 8/23/2011 FireMonkey
Description: Steps:
[QC Short Description]
TAniIndicator default properties missing

[QC Description]
The Style and Enabled properties should have appropriate defaults assigned.
QC Entry 98023
Drop a TAniIndicator in a new FMX HD app and look at the bold properties. exp: Enabled and Style to be normal font act: Enabled and Style are bold (indicating they have been changed from their default value - which they haven't)
QC #: Date Reported: Area:
99097 9/19/2011 FireMonkey
Description: Steps:
[QC Short Description]
Can't make menu item invisible on firemonkey

[QC Description]
Can't make menu item invisible on firemonkey.
QC Entry 99097
Create an fire monkey application place TMainMenu on form and create say two menu items. Then on create make not visble procedure TForm1.FormCreate(Sender: TObject); begin MenuItem2.Visible := False; end; Run application, menu item will remain visible
QC #: Date Reported: Area:
98288 8/29/2011 FireMonkey
Description: Steps:
[QC Short Description]
TButton Default property ignored

[QC Description]
The "Default" property of a TButton is ignored, visual indication is missing.
QC Entry 98288
1. File | New FireMonkey HD application 2. Place a TEdit and a TButton on the form 3. Set the default property of the TButton to true 4. Add an OnClock to the TButton: ShowMessage('Hello World'); 5. Run the application (on windows) 6. Type something into the edit 7. Press Return expected: Message "Hello World" is shown; The TButton has some visual indication that it is the default button act: nothing happens
QC #: Date Reported: Area:
96763 7/27/2011 FireMonkey
Description: Steps:
[QC Short Description]
TCombBox and TComboEdit not behaving as expected

[QC Description]
TComboBox:
when it drops down, you cannot close it again by clicking on what you
clicked to open it. You have to choose an item or click outside of it.

TComboEdit:
You can put as much text in the Items property as your heart desires,
it's completely ignored.
On top of that, it decides to behave a tiny tad differently wrt closing again; now you can click on the edit to close it again, but not on the down arrow on its right.
QC Entry 96763
 
QC #: Date Reported: Area:
97041 8/2/2011 FireMonkey
Description: Steps:
[QC Short Description]
TComboTrackBar does not close when clicking on the arrow (you have to click off the control).

[QC Description]
TComboTrackBar opens when you click on the down arrow icon, but will not close with a second click on the down arrow icon.
QC Entry 97041
 
QC #: Date Reported: Area:
287188 8/27/2011 6:54:10 PM FireMonkey
Description: Steps:
FastReport components are not supported on iOS, yet they are available in ToolPalette and raise compiling issues when used in a iOS application  
QC #: Date Reported: Area:
97673 8/16/2011 FireMonkey
Description: Steps:
[QC Short Description]
FMI: Loading Image on iPhone covered by StatusBar

[QC Description]
The FireMonkey loading image on iPhone (used Simulator) is partly covered at the top by the iPhone status bar. The 'please wait' text is only half visible.
QC Entry 97673


Note: this happens on the device too.
 
QC #: Date Reported: Area:
99011 9/18/2011 FireMonkey\Dialogs
Description: Steps:
[QC Short Description]
TOpenDialog files list overwrite.

[QC Description]
When selecting multiple files with TOpenDialog the contents of the list (TStrings) is somehow overwriting the strings with the last selection. If the last selection is longer, the remains of the last string will fill the current string. Like this:

TOpenDialog.Execute -> Selection1: C:\SomeRandomFile.ext

TOpenDialog.Execute -> Selection2: C:\SomeFile.ext

When trying to read the contents of Selection 2 in TOpenDialog.Files at index 0 will have: C:\SomeFile.ext\e.ext wich is the overlaping string of the two selections.

Each selection is made with the ofAllowMultiselect property enabled, otherwise there is no problem at all. Each selection is made by separated.

If multiple files are selected the Files List will have all the selected files strings overlaped at the index 0 and hence the count is always 1.

I guess this problem comes down from the bug reported earlier: #98890 - TOpenDialog shows oldStyle when Multiple Selection
QC Entry 99011
1) Create a new Firemonkey HD Application. 2) Drop a TOpenDialog component and check the ofAllowMultiselect property 3) Drop a Button and create an event with the following code: procedure TForm1.Button1Click(Sender: TObject); var I: Integer; begin if OpenDialog1.Execute then begin for I := 0 to OpenDialog1.Files.Count - 1 do ShowMessage(OpenDialog1.Files[I]); end; end; 4) Run App and select files.
QC #: Date Reported: Area:
98480 9/2/2011 FireMonkey\Dialogs
Description: Steps:
[QC Short Description]
[MacOS] FMX OpenDialog should use composed filenames

[QC Description]
FMX OpenDialog (and SaveDialog) should use utf8decoded and composed filenames similar to FindFirst, so that a call to FileSystemStringToString (which does UTF8decode and Composition) is not needed. That way the filenames returned by the OpenDialog are consistent with FindFirst, TFileStream, ...
QC Entry 98480
1. File | New FireMonkey HD Application 2. Set target to Mac OSX 3. add a TOpenDialog 4. add the following code var FS: TStream; begin if OpenDialog1.Execute then begin FS := TFileStream.Create(OpenDialog1.FileName), fmOpenRead); FreeAndNil(fs); end; end; 5. Run on MacOS 6. Open a filename with German umlaut characters (like "ä") expected: file is loaded act: exception EFOpenError is raised
QC #: Date Reported: Area:
98890 9/14/2011 FireMonkey\Dialogs
Description: Steps:
[QC Short Description]
TOpenDialog shows oldStyle when Multiple Selection

[QC Description]
When using the TOpenDialog component with the ofAllowMultiselect property checked it shows the old style even if ofOldStyleDialog is not checked. There is no way to use the new dialog with the multiselect property. (Windows Only)
QC Entry 98890
.
Create a new Firemonkey HD Application. Drop a TOpenDialog component. Mark the ofAllowMultiSelect property. Drop a TButton. Invoke TOpenDialog.Execute Run the Application.
QC #: Date Reported: Area:
98167 8/25/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Changing style didn't trigger recompilation

[QC Description]
StyleBook doesn't inform designer about change...
QC Entry 98167
1) Open Attached project 2) Double click on style book 3) Click on "Clear All" 4) Click on "Load" 5) Select other style (C:\Users\test\Documents\RAD Studio\9.0\Styles\MacBlue.Style for example) 6) Click on "Open" 7) Click on "Apply and Close" 8) Hit "F9" 9) Application running with old style (with new, only after if I select "build")
QC #: Date Reported: Area:
98399 8/31/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Cannot select TButton on FMX form designer

[QC Description]
In one of my projects, I have a TButton (btnOK) that cannot be selected. Everytime I select it, a TCalendarEdit component on the form is always selected instead.

I can select it using the structure view, but as soon as I try to reposition it on the form designer, the initial left click on the TButton once again selects the TCalendarEdit, and the move operation moves that control instead.
QC Entry 98399


Note: TCalendarBox and TComboEdit have the same behaviour.
- Download and unzip RunningThings.zip - Open RunningThings.dproj in XE2 - Open the TAthlete_Form.pas and switch to the form designer - Click on the OK button Expected: The OK button is selected Actual: The Date of Birth CalendarEdit is selected - Select btnOK in the Structure view - Left-click and drag the OK button on the form designer Expected: The OK button is moved Actual: The Date of Birth CalendarEdit is selected and moved
QC #: Date Reported: Area:
99864 10/10/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
IDE hangs when opening custom style TPath (100% cpu)

[QC Description]
I tried to use a different ?ath·as marker in a checkbox, by making a custom style.
However, after changing the style (tpath) and reopen the path again, the IDE hangs with 100% CPU!
QC Entry 99864
Create new HD project Add checkbox to form Right click -> edit custom style Select checkmark (TPath) Open path designer (?ata·property) Replace marker with attached butterfly path Press OK Open path designer again ·ait forever·
QC #: Date Reported: Area:
98531 9/4/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Item Designer hangs up IDE when hierarchical items are inserted and the last child is deleted

[QC Description]
If I add items and child items and delete the last child of a child item the IDE freezes and I need to kill the process.

Added by Sysop
<<<<<<<<
This issue is similar to QC#98341.

> 9. Your IDE should freeze. 
In fact, error dialog box is behind Item Editor... You can see the error dialog box via TaskBar and close it.
>>>>>>>>
QC Entry 98531
1. Start a new FM 3D app 2. Add a Layer3D 3. Insert a stringgrid in the same layer 4. Set Align of the stringgrid to alClient 5. Popup the context menu of the stringgrid and select itemeditor 6. Add the rootitem 7. Add a few child items 8. Delete the last child 9. Your IDE should freeze. (This is at least what happens on my Vista 32 bit laptop on which the IDE is installed)
QC #: Date Reported: Area:
98321 8/30/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
FM3D - TModel3D Collada importer badly broken

[QC Description]
The Collada importer for the TModel3D-component is badly broken. I have tested with a dozen of different sample collada objects that all load fine with e.g. the OpenCOLLADA importer for 3D studio and not a single (!) one was display correct.

Some models have wrong texture coordinates, others have wrong vertices (resulting in triangles where there should be none and visual artefacts), others again ar not loaded at all and others cause the mesh collection editor to crash.
QC Entry 98321
- Download a COLLADA model sample pack from here : http://www.anthony-scavarelli.com/blog/downloads/SampleColladaFiles.zip - Create new FM3D app - Add TModel3D - Load some of the models Results in either wrong texture coordinates, wrong vertices, no objects loaded at all or even access violations.
QC #: Date Reported: Area:
98340 8/30/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
TMenuItem Shortcuts and shortcut property broken

[QC Description]
The ShortCut property of the TMenuItem is broken (if you've finally figured out a few numeric values).

The shortcuts expect "a" instead of "A" (shift is inversed)
I can't find the numerical values for for RIGHT. Many shortcuts don't work. And the numerical values are inconsistent with the VCL. The VCL seems to be the only source where you can find at least some of the numerical values.

(Currently I'm trying to persuade my image viewer application to go to the next image when the user presses the right arrow key. There is no OnFormShortCut event, and I can't even workaround this with TMenuItems.)
QC Entry 98340
1. File | New Firemonkey HD Application 2. Add TMainMenu to Form 3. Double Click the TMainMenu component on the form to open the menu designer 4. Click "Add Item" 5. Click on the Shortcut property of MenuItem1 in the Object Inspector 6. Enter 65 as this is the numerical shortcut for "A" 7. Add a ShowMessage command to the OnClick event of the MenuItem shortcut displayed in osx: Shift+A Shortcut works: NO 8. Enter 97 as this is the numerical shortcut for "a" shortcut displayed in osx: "A" Shortcut works: NO 9. Enter 16449 (Ctrl+A) in VCL shortcut displayed in osx: "Ctrl+Shift+A" Shortcut works: YES 10. Enter 16481 (Ctrl+1) in VCL shortcut displayed in osx: "Ctrl+A"; Shortcut works: YES 11. Enter 39 (Right) in VCL shortcut displayed in osx: "'"; Shortcut works: NO
QC #: Date Reported: Area:
96554 7/22/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
FMX designer - can't switch from code to designer with F12 after debug

[QC Description]
When debugged FMX application is closed, can't switch from editor to designer with F12 until another unit is selected
QC Entry 96554
New FMX 2D app. Switch to code editor with F12. Run app with F9. Close App. Now we are back in editor, but pressing F12 to show designer doesn't work. Than click to Welcome Page and back and F12 is working. In forum https://forums.embarcadero.com/thread.jspa?messageID=372132#372132 someone wrote: Even the "Toggle Form/Unit" Button don't work.
QC #: Date Reported: Area:
96586 7/23/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Cannot hide a tabcontrol TabItem at design-time

[QC Description]
Setting the TTabItem.Visible property to False at design-time, reverts automatically to True again when selecting the TabItem component at Structure View.

At runtime works fine, ie: TabItem2.Visible:=False hides the tab correctly.
QC Entry 96586
[andreano]
-New FMX 2D app -Drop a TTabControl -Double-click tabcontrol and click 3 times "Add Item" button to create 3 tab items. -Now select TabItem2, and using Object Inspector, set the Visible property to False. -The tab is correctly hidden from tabcontrol, but: -Now select the TabItem2 at Structure View Exp: TabItem2 selected Act: TabItem2 selected *and* Visible property set to True, Tabitem2 is displayed at tabcontrol.
QC #: Date Reported: Area:
98061 8/24/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Deleting a TStylebook resource

[QC Description]
After deleting a TStylebook resource from the style tree the properites and image of the style are still displayed. It should not display any properties and not display the style image, preferrably it should automatically select the next style in the style tree if there is one.
QC Entry 98061
1. Start a new firemonkey HD project 2. Drop on a TStylebook component and open the resouce editor 3. Start a new style, E.g. TButton 4. Start another style, E.g. TCheckbox 4. Select the TButton style, the style properties and image will be displayed. 5. Delete the style, the properties and image of the deleted style are still displayed. Also focus did not move to the TCheckbox style
QC #: Date Reported: Area:
97672 8/16/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
FMX DblClick on TColorButton in FormDesigner creates OnChange Handler

[QC Description]
Doubleclicking on a TColorButton in the Form Designer of any FireMonkey project creates the OnChange Event Handler NOT the expected OnClick Handler
QC Entry 97672
* Create a FM HD or FM iOS project * Place a TColorButton on the Form * DblClick the TColorButton Exp: OnClick Handler created Act: OnChange Handler created
QC #: Date Reported: Area:
98341 8/30/2011 FireMonkey\Menu Designer
Description: Steps:
[QC Short Description]
TMainMenu: Invalid Pointer Operation when deleting a child menu item

[QC Description]
When deleting a child menu item in the menu designer, I'm getting "Invalid Pointer Operation" or the IDE hangs.

==> The IDE hangs because the error message is not visible (QC#98243)
QC Entry 98341


Added by Sysop
<<<<
The error message dialog is behind the MenuItem designer.
>>>>
1. File | New Firemonkey HD Application 2. Add TMainMenu to Form 3. Double Click the TMainMenu component on the form to open the menu designer 4. Click "Add Item" 5. Click "Add Child Item" 6. Click Delete ==> Invalid Pointer Operation ==> The IDE hangs because the error message is not visible (QC #98243)
QC #: Date Reported: Area:
98243 8/28/2011 FireMonkey\Menu Designer
Description: Steps:
[QC Short Description]
FireMonkey TMenuItem Shortcut hangs IDE

[QC Description]
Entering a shortcut (as string) for a FireMonkey MenuItem hangs the IDE. The IDE has to be killed using the taskmanager.

I expect that I can enter a shortcut as a string (i.e. Ctrl+A), because I don't remember the numeric value of the ShortCut Ctrl+A, ...

Reproduces every time, but do not switch windows / applications when trying to reproduce the steps.
QC Entry 98243
1. File | New Firemonkey HD Application 2. Add TMainMenu to Form 3. Double Click the TMainMenu component on the form to open the menu designer 4. Click "Add Item" 5. Click on the Shortcut property of MenuItem1 in the Object Inspector (do not close the menu designer) 6. Type "Ctrl+A" and press Enter ==> The IDE hangs forever and needs to be killed using the taskmanager
QC #: Date Reported: Area:
98154 8/25/2011 FireMonkey\Menu Designer
Description: Steps:
[QC Short Description]
Menubar items with text and bitmap are painted incorrectly

[QC Description]
On a TMenuBar if menu items are inserted that have both a bitmap (I used 16x16) and text then the text is cut off. It looks like the size of the bitmap is being counted twice.
QC Entry 98154
1.Place a TMenuBar on a form 2.add a few TMenuItems that include both a 16x16 bitmap and some text. You will see that the text is cut off. I just uploaded a zip file with the sample project and zip file to Binaries Thread in the beta forum.
QC #: Date Reported: Area:
98212 8/27/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
TPathData.SetPathString fails if string contains a CR character

[QC Description]
TPathData.SetPathString parses SVG path commands from a string. However, it will not work when this string contains a CR character.

Added by Sysop
<<<<<
Please see [Workaround] in QC for more details.
>>>>>

QC Entry 98212
Let's assume that the following path node has been loaded from an SVG document: <path d="M53.479 714.216 L103.401 757.359 116.344 756.127 86.7606 730.241 54.0954 701.89 z"/> When we assign the path data to TPathData.PathString, it will fail with the error "757.359116.344 is not a valid floating point number" (i.e. the two numbers have been erroneously concatenated.) Please see the suggested workaround.
QC #: Date Reported: Area:
99181 9/21/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
[MacOS] Controls wilth a popup (like TCalendarEdit, TComboBox) fail on a form shown with ShowModal on MacOS

[QC Description]
TCalendarEdit on Modal form does not work on Mac OS.

Please see [Steps].
QC Entry 99181
Create a FireMonkey app Create a 2nd form, let's call it Form2. On first form, put a button with OnClick : Form2.ShowModal On 2nd form, put a TCalendarEdit. Deploy on Mac OS. Click the button, then on 2nd form drop the calendar... You can't use it with mouse, if you click it you hear some sound, obviously MacOS is telling you "hey guy, this window is not clickable while the other is shown".
QC #: Date Reported: Area:
97546 8/12/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
TPlatformCocoa.SetCursor should use NSCursor.pointingHandCursor

[QC Description]
TPlatformCocoa.SetCursor currently uses NSCursor.openHandCursor as crHandPoint cursor. That's a rather weird cursor which doesn't even point at the hotspot.

NSCursor.pointingHandCursor would be a better choice, that's the cursor Safari uses when hovering links.
QC Entry 97546
1. New FireMonkey HD application.
2. Drop TPanel onto the form.
3. Add OnMouseEnter event handler to the TPanel with this code:

procedure TForm1.Panel1MouseEnter(Sender: TObject);
begin
Panel1.Cursor := crHandPoint;
end;

4. Run application on OS X and move mouse over the panel.

// exp: Mouse cursor changes to a pointing hand
// act: Mouse cursor changes to an open hand

QC #: Date Reported: Area:
98359 8/30/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
Linear gradients are painted incorrectly (GDI+ canvas)

[QC Description]
This problem occurs whenever filling a path/rectangle/ellipse/polygon of the TCanvasGdiPlus class and using the linear gradient style.

The problem is due to the following code in TCanvasGdiPlus.ApplyFill, which does not set the correct coordinates for TGPLinearGradientBrush:

if Gradient.Style = TGradientStyle.gsLinear then
begin
{ Linear }
FGPBrush := TGPLinearGradientBrush.Create
(MakePoint(ARect.Left + Gradient.StartPosition.X * ARect.Right,
ARect.Top + Gradient.StartPosition.y * ARect.Bottom),
MakePoint(ARect.Left + Gradient.StopPosition.X * ARect.Right,
ARect.Top + Gradient.StopPosition.y * ARect.Bottom),
Color, Color);
TGPLinearGradientBrush(FGPBrush).SetWrapMode(WrapModeTileFlipX);
TGPLinearGradientBrush(FGPBrush).SetInterpolationColors
(PGPColor(@ColorArray), PSingle(@OffsetArray),
Gradient.Points.Count + Count);
end

The corrected version should look like this:

if Gradient.Style = TGradientStyle.gsLinear then
begin
{ Linear }
FGPBrush := TGPLinearGradientBrush.Create
(MakePoint(ARect.Left + Gradient.StartPosition.X * ARect.Width,
ARect.Top + Gradient.StartPosition.y * ARect.Height),
MakePoint(ARect.Left + Gradient.StopPosition.X * ARect.Width,
ARect.Top + Gradient.StopPosition.y * ARect.Height),
Color, Color);
TGPLinearGradientBrush(FGPBrush).SetWrapMode(WrapModeTileFlipX);
TGPLinearGradientBrush(FGPBrush).SetInterpolationColors
(PGPColor(@ColorArray), PSingle(@OffsetArray),
Gradient.Points.Count + Count);
end
QC Entry 98359
1. Create a new FMX application 2. Add the following OnFormPaint event handler procedure TForm1.FormPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF); begin Canvas.Fill.Kind := TBrushKind.bkGradient; with Canvas.Fill.Gradient do begin Style := TGradientStyle.gsLinear; StartPosition.Point := PointF(0, 0); StopPosition.Point := PointF(1, 1); with Points.Add as TGradientPoint do begin Offset := 0; Color := TAlphaColors.Black; end; with Points.Add as TGradientPoint do begin Offset := 1; Color := TAlphaColors.White; end; end; Canvas.FillRect(RectF(0, 0, 100, 100), 0, 0, [], 1); Canvas.FillRect(RectF(100, 0, 200, 100), 0, 0, [], 1); Canvas.FillRect(RectF(0, 100, 100, 200), 0, 0, [], 1); Canvas.FillRect(RectF(100, 100, 200, 200), 0, 0, [], 1); end; Expected: the rectangles are filled with a diagonal linear gradient from black to white going from the top left corner to the bottom right corner. Actual: only the top left rectangle is filled correctly.
QC #: Date Reported: Area:
98429 9/1/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
FMX: TBitmap.FlipHorizontal and FlipVertical are swapped

[QC Description]
In FireMonkey TBitmap.FlipHorizontal and FlipVertical are swapped.

I take the definition of flip horizontally from Gimp, Word, ...:
http://docs.gimp.org/en/gimp-layer-flip-horizontal.html
http://www.cs.nott.ac.uk/~smx/IVIPracticals/exercise1.html
or compare to the Flip function in Microsoft Word
QC Entry 98429
1. File | New FireMonkey Application 2. Add code to FormCreate similar to this: ImageViewer1.Bitmap.LoadFromFile('G:\Pictures\SamplePicture.JPG'); ImageViewer1.Bitmap.FlipHorizontal; 3. Run the application expected: Image flipped horizontally act: Image is flipped vertically
QC #: Date Reported: Area:
96610 7/24/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
ApplicationMenu can't have seperator items

[QC Description]
TApplication.ApplicationMenuItems can't have seperator items.

If an item caption equals '-' NSMenuItem.separatorItem should be used.
QC Entry 96610
- create a new FMX 2D app - add an OnCreate handler with this code: procedure TForm1.FormCreate(Sender: TObject); var AppQuitItem: TMenuItem; AppPrefsItem: TMenuItem; AppMenuItems: TMenuItem; seperatoritem: TMenuItem; begin AppQuitItem := TMenuItem.Create(nil); AppQuitItem.Text := 'Quit ' + Application.Name; seperatoritem := TMenuItem.Create(nil); seperatoritem.Text := '-'; AppPrefsItem := TMenuItem.Create(nil); AppPrefsItem.Text := 'Preferences'; AppMenuItems := TMenuItem.Create(nil); AppMenuItems.AddObject(AppPrefsItem); AppMenuItems.AddObject(seperatoritem); AppMenuItems.AddObject(AppQuitItem); Application.ApplicationMenuItems := AppMenuItems; end; - run on Mac - click the application menu There's a '-' item instead of a seperator line.
QC #: Date Reported: Area:
97468 8/11/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
TControl3D.PaintToBitmap can be multisampled, but not currently

[QC Description]
There's a comment at TControl3D PaintToBitmap (at interface section) :

"Multisampling not supported in render to texture."

I've just tried to change this (see steps), and it works fine (Windows, DX9)

So I'm requesting to enable multisampling at PaintToBitmap by default, or a parameter TMultiSample to decide if enabling it or not.


QC Entry 97468
FMX.Types3D.pas TControl3D.PaintToBitmap method: Before: BitmapContext := DefaultContextClass.CreateFromBitmap(ABitmap, TMultisample.msNone, True); After: BitmapContext := DefaultContextClass.CreateFromBitmap(ABitmap, TMultisample.ms4Samples, True);
QC #: Date Reported: Area:
98714 9/9/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
TMemo wordwrap issue

[QC Description]
If TMemo.WordWrap is on, there's a word that doesn't fit the memo an extra line is inserted before said long word. This isn't right.
QC Entry 98714
- create a new FMX HD app - add a TMemo, set WordWrap to true. - run - press the '1' key, release it when the line is filled exp: the '11111' word wraps around, so it's on multiple lines. That's what VCL does. obs: an empty line is added above the '11111' line. It doesn't wrap around.
QC #: Date Reported: Area:
98581 9/5/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
Unexpected behaviour of the dropdown arrow on TCalendarEdit & TComboBox

QC Entry 98581
Drop a TCalendarEdit or a TComboBox on your form, fill items if necessary. Run. Click the arrow to drop the popup. Click it again, the popup stays. The commonly expected behaviour is that the 2nd click will close the popup.
QC #: Date Reported: Area:
97927 8/21/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
TControl.SetCursor has no effect until mouse is moved (2)

[QC Description]
In addition to QC97891:

Setting TControl.Cursor in a key event handler has no effect until the mouse is moved. This code, which is similar to VCL, solves this:

procedure TControl.SetCursor(const Value: TCursor);
var
Obj: IControl;
begin
if FCursor <> Value then
begin
FCursor := Value;
if (Root <> nil) and (Root.Captured = nil) then
begin
Obj := ObjectAtPoint(Platform.GetMousePos);
if (Obj <> nil) and (Obj.GetObject = self) then
Platform.SetCursor(nil, FCursor); //"nil" only works because the parameter isn't used !!!!
end;
end;
end;
QC Entry 97927
 
QC #: Date Reported: Area:
97891 8/20/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
TControl.SetCursor has no effect until mouse is moved

[QC Description]
Setting TControl.Cursor while the mouse is over the control (in an OnMouseMove event for example) has no effect until the mouse is moved.


TCommonCustomForm.MouseMove does something like this:

NewCursor := Obj.Cursor;
....
Obj.MouseMove(Shift, P.X, P.Y);
....
Platform.SetCursor(Self, NewCursor);


The problem would be solved if NewCursor where assigned after calling Obj.MouseMove.


This code:

if (Obj <> nil) then
begin
if ((Obj.QueryInterface(ISizeGrip, SG) = 0) and Assigned(SG)) then
NewCursor := crSizeNWSE
else
NewCursor := Obj.Cursor;

if (Obj <> FHovered) then
begin
if FHovered <> nil then
begin
FHovered.DoMouseLeave;
FHovered.RemoveFreeNotify(Self);
end;
FHovered := Obj;
FHovered.DoMouseEnter;
FHovered.AddFreeNotify(Self);
end;

P := Obj.ScreenToLocal(ClientToScreen(PointF(FMousePos.X, FMousePos.Y)));
Obj.MouseMove(Shift, P.X, P.Y);
end

should be change to:

if (Obj <> nil) then
begin
if (Obj <> FHovered) then
begin
if FHovered <> nil then
begin
FHovered.DoMouseLeave;
FHovered.RemoveFreeNotify(Self);
end;
FHovered := Obj;
FHovered.DoMouseEnter;
FHovered.AddFreeNotify(Self);
end;

P := Obj.ScreenToLocal(ClientToScreen(PointF(FMousePos.X, FMousePos.Y)));
Obj.MouseMove(Shift, P.X, P.Y);

if ((Obj.QueryInterface(ISizeGrip, SG) = 0) and Assigned(SG)) then
NewCursor := crSizeNWSE
else
NewCursor := Obj.Cursor;
end
QC Entry 97891
 
QC #: Date Reported: Area:
97565 8/12/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Pressing ESCAPE key while editing a Grid cell is closing a modal dialog

[QC Description]
When a grid inside a modal form is being edited (ie: typing text on a grid cell) the modal form is closed when pressing the escape key.

Escape key should stop cell editing, but shouldn't pass up to the form key handling.
QC Entry 97565
-New FMX HD app -New FMX Form2 -Add "Uses Form2" to Form1.pas -Place a Button1 on Form1 -At Button1Click : Form2.ShowModal -Place a StringGrid at Form2 -Add a column to grid (items editor->add item) -Run -Click button1 to modal show Form2 -Start typing grid cell -Press escape key Exp: Grid editing is cancelled, form2 still visible Act: Form2 is closed
QC #: Date Reported: Area:
95096 6/13/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TPopupBox doesn't work when ControlRoot.Scale>1

[QC Description]
When ControlRoot.Scale>1 the TPopupBox doesn't work well.
The popup list is truncated and all items are not visible.
QC Entry 95096
Open Ctrlsdemo project Run Change scale Click Popupbox in Additional page
QC #: Date Reported: Area:
98156 8/25/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
[MacOS] Keyboard shortcuts for clipboard operations don't work in TMemo on OSX

[QC Description]
If you use a TMemo in a FireMonkey app deployed to OSX, keyboard shortcuts cannot be used to invoke clipboard operations. The context menu is available and does work.
QC Entry 98156
- Create a new FireMonkey HD application - Add a TMemo to the form - Deploy to OSX and run - Type text in the TMemo - Press Command+A Expected: The contents of the memo is highlighted Actual: Nothing happens - Highlight the text using the mouse - Press Command+X Expected: The contents of the memo is cut to the clipboard Actual: Nothing happens
QC #: Date Reported: Area:
98345 8/30/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
FMX MainMenu shortcuts not visible in Windows (and don't work)

[QC Description]
Shortcuts of MainMenu items are not visible in Windows (and don't work)
QC Entry 98345
1. File | New Firemonkey HD Application 2. Add TMainMenu to Form 3. Double Click the TMainMenu component on the form to open the menu designer 4. Click "Add Item" 5. Click "Add Child Item" 6. Click on the Shortcut property of MenuItem2 in the Object Inspector (do not close the menu designer) 6. Type "65" or "16481" or "16449" and press Enter 7. Add an Onclick Event 8. Run the application in Windows 9. Open the menu using the mouse expected: shortcut is displayed in the menu act: no shortcut is displayed 10. Press the shortcut expected: the OnClick event fires act: nothing happens
QC #: Date Reported: Area:
99230 9/22/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TComboBox.Items.Insert doesn't work

[QC Description]
Using TComboBox.Items.Insert to insert an item at a specified location, the item is not inserted at all.
QC Entry 99230
- Create a new FireMonkey HD application - Add a TComboBox to the form - Enter the following code in the forms OnCreate event procedure TForm17.FormCreate(Sender: TObject); var I: Integer; begin for I := 1 to 10 do ComboBox1.Items.Add(IntToStr(I)); ComboBox1.Items.Insert(0, '0'); end; - Run the application Expected: The combobox contains 11 entries numbered from 0 to 10 Actual: The combobox contains 10 entries numbered from 1 to 10
QC #: Date Reported: Area:
96949 7/31/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Memory leak at TComboTrackBar, when closing app while popup open

[QC Description]
Closing an app with a combo trackbar leaks memory (a TForm instance), if the combo was in dropdown mode at that time.

Instance leaked is TPopup FPopupForm, created at TPopup.Popup.

Popup calls FPopupForm Release method at closing/destroy, but the WM_RELEASEFORM message never gets processed.
QC Entry 96949
-New FMX 2D app -Drop a TComboTrackBar control -At "View->Project source", just after "begin": begin ReportMemoryLeaksOnShutdown:=True; Application.Initialize; ... -Run -Click combo right arrow to dropdown trackbar -Close form -Exp: nothing -Act: System "beeps" indicating a memory leak
QC #: Date Reported: Area:
98515 9/4/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TMemo/TEdit: caret should flash instead of fade

[QC Description]
In FMX the caret fades from white to black and back. Native Windows and OS X carets don't fade, they switch between black and white instantly.

Also, the FMX caret is two pixels wide, whereas native Windows and OS X carets are just one pixel wide.
QC Entry 98515
Run an FMX app with a TMemo. Notice how the caret fades from black to white and back.
QC #: Date Reported: Area:
97711 8/16/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Visible has no default property value

[QC Description]
The Visible property for a firemonkey TForm does not have a default value set. 
QC Entry 97711
 
QC #: Date Reported: Area:
97710 8/16/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Transparency property has no default set

[QC Description]
The Transparency property for a firemonkey Form has no default defined so it is always written to the fmx file.
QC Entry 97710
 
QC #: Date Reported: Area:
99951 10/11/2011 FireMonkey\Style Designer
Description: Steps:
[QC Short Description]
Setting style from a popup menu causes AV

[QC Description]
When setting StyleBook.FileName (or using resource.loadfromfile) the application crashes with an access violation only when called from a popup menu.
QC Entry 99951
Using the attached project right click on the button and select "Change Style". Choose any style and the program will crash. You will notice that if you left click on the button the crash does not occur only when using the popup menu. Could not attach a file to this for some reason... 1. Create a firemonkey form. 2. Add a TButton, StyleBook, PopupMenu and an OpenDialog 3. Link the popup menu to the button 4. Create a menu item with the following OnClick code... procedure TForm1.MenuItem1Click(Sender: TObject); begin if OpenDialog1.Execute then StyleBook1.FileName := OpenDialog1.FileName; end; 5. Run and test
QC #: Date Reported: Area:
99987 10/12/2011 Databinding
Description: Steps:
[QC Short Description]
After deleting last record in a TClientDataset, setting RecNo to 0 via LiveBinding fails

[QC Description]
Somewhat similar to closed bug QC#98639(Internal#287524).

When deleting the last record in a TClientDataset, either in code or with a TBindNavigator, clicking on a bound control will generate an 'At beginning of table' error.

Even when RecNo is set to the proper value of 0, the error is still generated.
QC Entry 99987
See attached project. The second list box is bound to the datasource with a TBindListLink. Click on the Add button to add a record, then click on Post to save it. Click on the Remote button to remove the record. Now clicking on either the string grid or on the bound listbox will generate the error. Even when hard coding an expression of '0' in the LiveBinding for the ListBox1 PosSource Control expression, after deleting the last record, you still get the error. The problem is only resolved by reloading the dataset.
QC #: Date Reported: Area:
99985 10/12/2011 Databinding
Description: Steps:
[QC Short Description]
LiveBindinds fail to update controls when appending records in code

[QC Description]
When appending a record in a TClientDataSet via code using ClientDataSet's Append method, the controls that are bound with LiveBindings do not properly update.

Even if I added several rows by clicking buttons(without using TBindNavigator), rowcount of StringGrid is always 1.
So, you have to re-activate TClientDataSet as below so that StringGrid is refreshed correctly.
----
procedure TForm1.btnResetClick(Sender: TObject);
begin
ClientDataSet1.Active := False;
ClientDataSet1.Active := True;
end;
----
QC Entry 99985
Create a new Firemonkey HD project. Add a TClientDataSet to the form. Add a single field to the TClientDataset named "Name" of type String, length 30. Right-click the client dataset and select Create Data Set. Add a TDataSource to the form and set the DataSet to the ClientDataSet. Drop a TStringGrid on the form. Right click the StringGrid and select Link to DB DataSource. Select the newly created TBindScopeDB. Add a Button to the Form. In the button's OnClick event, enter the following code: ClientDataSet1.Append; ClientDataSet1.FieldByName('Name').AsString := FloatToStr(Now); ClientDataSet1.Post; Run the form and click the button. Though the records are added to the dataset, the StringGrid's rowcount does not increase. When binding other controls, such as a TListBox, though the rowcount updates, the values do not display properly. See attached project. If you add records via a TBindNavigator, even programatically (via btnClick()), it works in the sample project, but it does not work as a solution on my large project for some reason, so it's not a viable workaround.
QC #: Date Reported: Area:
99163 9/21/2011 Install\Files
Description: Steps:
[QC Short Description]
Unable to open file 'BCBSMP.BPI'

[QC Description]
Hello,

we have a VCL component for our reporting tool List & Label. If we try to compile it for the C++ Builder, we get the following linker error:
...
[ILINK32 Error] Fatal: Unable to open file 'BCBSMP.BPI'
...

In C++Builder XE, 'BCBSMP.BPI' does exist. In C++Builder XE2(RTM), 'BCBSMP.BPI' is missing.
QC #: Date Reported: Area:
98716 9/9/2011 Database\DBExpress
Description: Steps:
Please deliver the following files in Starter SKU:

Data.DBXJSON.hpp 
DBXJSON.hpp
Data.DBXJSONCommon.hpp DBXJSONCommon.hpp Data.DBXJSONReflect.hpp
DBXJSONReflect.hpp
Data.DBXClient.hpp
DBXClient.hpp
Data.DbxSocketChannelNative.hpp
DbxSocketChannelNative.hpp
Data.DBXStream.hpp
DBXStream.hpp
Data.DBXStreamPlatform.hpp
DBXStreamPlatform.hpp
Data.DBXStreamer.hpp
DBXStreamer.hpp
Data.DBXMetadataCommon.hpp
DBXMetadataCommon.hpp
Data.DBXMessageHandlerCommon.hpp
DBXMessageHandlerCommon.hpp
Data.DBXMessageHandlerJSonCommon.hpp
DBXMessageHandlerJSonCommon.hpp
Data.DBXMessageHandlerJSonClient.hpp
DBXMessageHandlerJSonClient.hpp
Data.DBXEncryption.hpp
DBXEncryption.hpp
Data.DBXTransport.hpp
DBXTransport.hpp
Data.DBXTransportFilter.hpp
DBXTransportFilter.hpp
Data.DbxCompressionFilter.hpp
DbxCompressionFilter.hpp
Data.DBXClientResStrs.hpp
DBXClientResStrs.hpp
Data.DBXOpenSSL.hpp
DBXOpenSSL.hpp
Data.DBXOpenSSLRes.hpp
DBXOpenSSLRes.hpp
Data.DBXRSAFilter.hpp
DBXRSAFilter.hpp
Data.DBXCommonIndy.hpp
DBXCommonIndy.hpp

[QC Short Description]
dbExpress and C++ Builder XE2 Starter

[QC Description]
Added by Sysop
<<<<<
Accoding to feature matrix of C++Builder XE2, Starter Edition can connect local InterBase via dbExpress.
>>>>>

When I add a dbExpress TSQLConnection to a VCL or FireMonkey Form and I compile the project the IDE show this error:

[BCC32 Error] Data.DBXCommon.hpp(26): E2209 Unable to open include file 'Data.DBXJSON.hpp'
Full parser context
Unit1.cpp(6): #include Unit1.h
Unit1.h(12): #include c:\program files (x86)\embarcadero\rad studio\9.0\include\windows\rtl\Data.SqlExpr.hpp
Data.SqlExpr.hpp(22): #include c:\program files (x86)\embarcadero\rad studio\9.0\include\windows\rtl\Data.DBXCommon.hpp

In fact, the file 'Data.DBXJSON.hpp' is not present in any dirs. This issue is blocking and I can't use the dbExpress component to interface to Interbase DB.
QC Entry 98716
(ONLY ON !!!STARTER!!! RELEASE) Create a new form project (VCL or FireMonkey), paste a dbExpress TSQLConnection object in the main form and simply compile the project.
QC #: Date Reported: Area:
99012 9/18/2011 Database\DBExpress
Description: Steps:
[QC Short Description]
Can not link TDbxDataGenerator

[QC Description]
the compiler will show unsolved external error for TDbxDataGenerator class 

Added by Sysop
<<<<
Both XE and XE2 have same linker issue.
>>>>
QC Entry 99012
1. Create a TDbxDataGenerator object like the following #include "DbxDataGenerator.hpp" void __fastcall TForm4::Button1Click(TObject *Sender) { TDbxDataGenerator *pDataGenerator; pDataGenerator = new TDbxDataGenerator(); delete pDataGenerator; } 2. compile the program , the compiler will show unsolved external error for TDbxDataGenerator class
QC #: Date Reported: Area:
99531 10/2/2011 VCL\Emulation Classes
Description: Steps:
[QC Short Description]
Membername 'thunks' need to be changed to support unit scopes

[QC Description]
XE2 has a problem using class members that are the same name as many Microsoft API functions. Members such as FindText, OpenFile, ReplaceText, etc. Microsoft API defines these functions using a #define, eg:

#ifdef UNICODE
#define FindText FindTextW
#else
#define FindText FindTextA
#endif // !UNICODE

Because of the #define, the C++ compiler renames all FindText members to FindTextW thus changing the mangled name. Delphi does not have this problem so its mangled name is FindText.

Prior to XE2 these problems were corrected by "thunks" being applied that recognize the most common of these cases. However, with XE2 unit scope support it appears that not all of the thunks were updated.

The case that brought my attention to this was when attempting to use TCustomRichEdit::FindText(). However, I suspect there to be others throughout the VCL that need to be corrected as well.
QC Entry 99531
1. Create a new C++Builder application 2. Drop a TRichEdit on the form 3. Add this code to the constructor: RichEdit1->FindText("", 0, 0, TSearchTypes()); 4. Build exp: Successful build act: [ILINK32 Error] Error: Unresolved external '__fastcall Vcl::Comctrls::TCustomRichEdit::FindTextW(const System::UnicodeString, int, int, System::Set<Vcl::Comctrls::TSearchType, 0, 1>)'
QC #: Date Reported: Area:
99486 9/30/2011 VCL\Emulation Classes
Description: Steps:
[QC Short Description]
[REGRESSION] Linker error in TCustomRichEdit::FindTextW

[QC Description]
Linker error when try to compile the attached sample:

[ILINK32 Error] Error: Unresolved external '__fastcall Vcl::Comctrls::TCustomRichEdit::FindTextW(const System::UnicodeString, int, int, System::Set<Vcl::Comctrls::TSearchType, 0, 1>)' referenced from UNIT50.OBJ
QC Entry 99486
1.Drop RichEdit on the form 2.Call FindText RichEdit method somewhere in the unit 3.Try to build the project
QC #: Date Reported: Area:
99658 10/5/2011 VCL\Emulation Classes
Description: Steps:
[QC Short Description]
Cannot assign a Wide/UnicodeString to a RawByteString

[QC Description]
When assigning a WideString or UnicodeString to a RawByteString, the RawByteString gets assigned a blank value. this is because AnsiStringT's Unicode constructors are calling the base class AnsiStringBase() constructor specifiying AnsiStringT's compile-time codepage affinity as input. This causes _LStrFromPWCharLen() in System.pas to be called with CodePage=65535, so the conversion from Unicode to Ansi always fails as 65535 is not a valid codepage.

However, the equivilent code in Delphi works fine. System._LStrFromPWCharLen() gets called with CodePage=0 
instead, so the conversion from Unicode to Ansi uses the System.DefaultSystemCodePage variable and succeeds.

To be consistent with Delphi, constructing an AnsiStringT from Unicode data in C++ should use CodePage 0 when AnsiStringT's affinity is 65535.

QC Entry 99658
This fails in C++: RawByteString s = "test"; SetCodePage(s, 1252, false); UnicodeString w; // or WideString, doesn't matter w = s; // <-- OK s = w; // <-- fails, s is empty! This succeeds in Delphi: var s: RawByteString; w: UnicodeString; // or WideString, doesn't matter begin s := 'test'; SetCodePage(s, 1252, false); w := s; // <-- OK s := w; // <-- OK end;
QC #: Date Reported: Area:
99083 9/19/2011 VCL\Emulation Classes
Description: Steps:
[QC Short Description]
conflict EOF

[QC Description]
Conflict EOF constant in files stdio.h and Winapi.ADOInt.hpp

[BCC32 Error] Winapi.ADOInt.hpp(503): E2040 Declaration terminated incorrectly
__property System::WordBool EOF = {read=_scw_Get_EOF};
QC Entry 99083
Add ADOQuery to form. Insert #include <stdio.h> in code. Compile. error: [BCC32 Error] Winapi.ADOInt.hpp(503): E2040 Declaration terminated incorrectly lline: __property System::WordBool EOF = {read=_scw_Get_EOF};
QC #: Date Reported: Area:
88545 9/30/2010 Debugger\Evaluator\C++
Description: Steps:
[QC Short Description]
Unable to inspect a std::vector correctly

[QC Description]
In the included C++ code, invoking a debug inspector and then typing 
"chain[0]" or "chain[1]" as a new Expression into it causing the following 
error from the evaluator:

Error inspecting 'chain[0]': E2451 Undefined symbol 'std::vector<TCoordPt, std::allocator<TCoordPt> >::std::vector<TCoordPt, std::allocator<TCoordPt> >::ope

That does not look like a properly formatted symbol to begin with. Why is "std::vector" duplicated twice> What is "::ope" at the end supposed to be?

Oddly, this only happens if you manually type "chain[0]" as an Expression in an inspector. If you write "chain[0]" in the actual code, then put the edit cursor behind the closing bracet and invoke a debug inspector from there, it works fine.

Apparently, the issue is related to the use of "#include <vector.h>" instead of "#include <vector>". Once that is corrected, and the vector variable is qualified with the "std" namespace, typing "chain[0]" as an Expression in an inspector works correctly as expected.
QC Entry 88545
Using this code, typing in "chain[0]" or "chain[1]" as an Expression in a debug inspector fails with the evaluator error: #include <windows.h> #pragma hdrstop #include <tchar.h> #include <vector.h> class TCoordPt { public: double x; double y; }; #pragma argsused WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { vector <TCoordPt> chain; TCoordPt coord; coord.x = 5; coord.y = 7; chain.push_back(coord); // chain[0] coord.x = 9; coord.y = 10; chain.push_back(coord); // chain[1] coord.x = 10; // <-- breakpoint here return 0; } This code, however, works just fine: #include <windows.h> #pragma hdrstop #include <tchar.h> #include <vector> // <-- fix here class TCoordPt { public: double x; double y; }; #pragma argsused WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { std::vector <TCoordPt> chain; // <-- fix here TCoordPt coord; coord.x = 5; coord.y = 7; chain.push_back(coord); // chain[0] coord.x = 9; coord.y = 10; chain.push_back(coord); // chain[1] coord.x = 10; // <-- breakpoint here return 0; }
QC #: Date Reported: Area:
92945 4/8/2011 Linker\ILINK32
Description: Steps:
[QC Short Description]
Default suffix for default libraries should be LIB, not OBJ

[QC Description]
The test program can be compiled and linked using Microsoft tools or compiled by BCC and linked using third-party OMF linkers (I tried two) BUT NOT by ILink which reports
Unable to open file 'USER32.OBJ'
The reason for this is that ILink, when faced with an OMF record like
000135 COMENT Purge: Yes, List: Yes, Class: 159 (09Fh)
Default Library: 'user32'
appends the wrong suffix .obj and searches for user32.obj instead of proper user32.lib.
QC Entry 92945
extern "C" int __stdcall MessageBoxA(void*, const char*, const char*, int); #pragma comment(lib, "user32") void main() { MessageBoxA(0, "hello", "ilinked", 0); }
QC #: Date Reported: Area:
99223 9/22/2011 Linker\ILINK32
Description: Steps:
[QC Short Description]
Unresolved external xMonitorFromWindow

[QC Description]
[ILINK32 Error] Error: Unresolved external '__fastcall Vcl::Forms::TScreen::xMonitorFromWindow(const const unsigned int, Vcl::Forms::TMonitorDefaultTo)' referenced from C:\USERS\VOLEG\DOCUMENTS\RAD STUDIO\PROJECTS\WIN32\DEBUG\UNIT10.OBJ
QC Entry 99223
1) Create C++Bulder VCL form project 2) Add code at any place Forms::TMonitor* mon=Screen->MonitorFromWindow((unsigned int)Handle,mdNearest); 3) Build project You will get linker error: [ILINK32 Error] Error: Unresolved external '__fastcall Vcl::Forms::TScreen::xMonitorFromWindow(const const unsigned int, Vcl::Forms::TMonitorDefaultTo)' referenced from C:\USERS\VOLEG\DOCUMENTS\RAD STUDIO\PROJECTS\WIN32\DEBUG\UNIT10.OBJ
QC #: Date Reported: Area:
99913 10/11/2011 ActiveX\Framework\DAX
Description: Steps:
[QC Short Description]
definition missing in axbase.h

[QC Description]
public INTF4, public INTF5, public INTF6 

is missing

for TCppAutoObjectEvent 
QC Entry 99913
The definition of TCppAutoObjectEvent in axbase.h is ---------------------------------- template <typename INTF1, typename INTF2=IUnknown, typename INTF3=IDispatch, typename INTF4=__default_Intf1, typename INTF5=__default_Intf2, typename INTF6=__default_Intf3> class TCppAutoObjectEvent : public System::Win::Comobj::TAutoObjectEvent, public INTF1, public INTF2, public INTF3 -------------------------------------- should be ------------------------------------------ template <typename INTF1, typename INTF2=IUnknown, typename INTF3=IDispatch, typename INTF4=__default_Intf1, typename INTF5=__default_Intf2, typename INTF6=__default_Intf3> class TCppAutoObjectEvent : public System::Win::Comobj::TAutoObjectEvent, public INTF1, public INTF2, public INTF3, public INTF4, public INTF5, public INTF6 --------------------------------------
QC #: Date Reported: Area:
99729 10/7/2011 Compiler\C++
Description: Steps:
[QC Short Description]
Default assignment operator destroys source operand for member arrays

[QC Description]
Default assignment operator destroy source operand (see below)

Added by Sysop
<<<<<<
This issue exists in both XE and XE2.
>>>>>>
QC Entry 99729
class foo { public: std::wstring bar[4]; }; ... foo foo1, foo2; foo1.bar[0] = L"HAHA OH WOW1"; foo1.bar[1] = L"HAHA OH WOW2"; foo1.bar[2] = L"HAHA OH WOW3"; foo1.bar[3] = L"HAHA OH WOW4"; foo2 = foo1; --- at this point foo2 will contain the strings and foo1 will be empty.
QC #: Date Reported: Area:
30617 6/26/2006 Compiler\C++\Back End
Description: Steps:
[QC Short Description]
ICE on compiling constructor invokation which has default TDate parameter

[QC Description]
create empty form in new project, remove it from the list of autocreated forms

change declaration of form constructor to
__fastcall TForm1(TComponent* Owner, TDate const &Param=Date())

now in project source include corresponding form header and type in winmain TForm *frm=new TForm(Application)

compile and see F1004 Internal compiler error at 0x1259130 with base 0x1200000
QC Entry 30617
bcc32 -c unit1.cpp

res:
Borland C++ 5.90 for Win32 Copyright (c) 1993, 2005 Borland
Unit1.cpp:
Fatal F1004 Unit1.cpp 17: Internal compiler error at 0x45ab1c with base 0x400000
in function _fastcall TForm1::TForm1(TComponent *)
Fatal F1004 Unit1.cpp 17: Internal compiler error in function _fastcall TForm1:
:TForm1(TComponent *)
QC #: Date Reported: Area:
99530 10/2/2011 Compiler\C++\Front End
Description: Steps:
[QC Short Description]
ICE in release mode from tiny file

[QC Description]
The following code results in an E2152 error followed by an F1004 ICE when compiled in Release mode, but compiles cleanly (and works as expected) when compiled in debug mode:

#include <vcl.h>
#pragma package(smart_init)

class TSql {
public:
TSql ( String const& progname = Application->ExeName );
};

Not sure if the E2152 error is technicallyaccurate, but it appears to be due to something introduced in RS 2010 as the code builds cleanly in RS 2009.
QC Entry 99530
bcc32 -c Unit1.cpp Exp: Clean build (as with the -v flag added) Act: Error E2152 C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\rtl\ustring.h 80: Default expression may not use l ocal variables in function _fastcall UnicodeString::UnicodeString() Fatal F1004 C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\rtl\ustring.h 80: Internal compiler error at 0x470 dd8 with base 0x400000 in function _fastcall UnicodeString::UnicodeString() Fatal F1004 C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\rtl\ustring.h 80: Internal compiler error in func tion _fastcall UnicodeString::UnicodeString()
QC #: Date Reported: Area:
98186 8/26/2011 Compiler\C++\Front End\Exception Handling
Description: Steps:
[QC Short Description]
Delphi Exceptions not caught in C++ code

[QC Description]
I can no longer reproduce this in VCL forms apps, but Delphi exceptions cannot be caught in C++ code in a console app.

Code:
//ExceptTest.cpp
#include <tchar.h>
#include <iostream.h>
#include <SysUtils.hpp>
#include "Unit8.hpp"

int _tmain() {
try {
try {
RaiseUnit8Exception();
} catch ( Exception& e ) {
std::wcout << L"Delphi Exception caught: " << e.Message.c_str() << std::endl;
} catch ( ... ) {
std::wcout << L"Unknown exception caught" << std::endl;
}
} __finally {
std::wcout << L"finally" << std::endl;
std::getchar(); 
}
return 0;
}

//Unit8.pas
unit Unit8;
interface
procedure RaiseUnit8Exception();

implementation
uses System.SysUtils;

procedure RaiseUnit8Exception();
begin
raise Exception.Create( 'Exception from Unit8.pas' );
end;

end.
QC Entry 98186
[ See resolution comment - MD ]

Open ExceptTest.cbproj
F9 to build and run
Dismiss the debugger exception notification

Exp: Console window will show:
Delphi Exception caught: Exception from Unit8.pas
finally

Act: Console window shows:
finally

and after hitting a key:
Program terminated abnormally

Note that you can also reproduce this with the code from the tutorial http://docwiki.embarcadero.com/RADStudio/XE2/en/Tutorial:_Using_LiveBinding_Programatically .

Using this code, a Delphi exception can be raised by commenting out the line:
#pragma explicit_rtti methods()
QC #: Date Reported: Area:
98784 9/11/2011 RTL\C++\Math
Description: Steps:
[QC Short Description]
Bug in cmath

[QC Description]
[BCC32 Error] cmath(230): E2186 Unexpected end of file in comment started on line 197

There is an error in the cmath file found at "C:\Program Files
(x86)\Embarcadero\RAD Studio\9.0\include\dinkumware", specifically at
line 197:

196: 
197: #else /* __CODEGEARC__ && __MACH__
198: 
199: /* cmath.h
200: 
201: Standard C header file wrapper for math.h
202: */

Notice that line 197 has no closing "*/".

The project compiles and runs correctly in XE but cannot compile in XE2
QC Entry 98784
Additional Info
=============
See this thread on Forum: https://forums.embarcadero.com/thread.jspa?threadID=61668
QC #: Date Reported: Area:
99287 9/24/2011 RTL\C++\Math
Description: Steps:
[QC Short Description]
Errors in cosl() calls _matherr() instead of _matherrl()

[QC Description]
When cosl() fails it calls _matherr() instead of _matherrl(). This also means that the parameters are wrong.

The source file cosl.asm in the RTL with the cosl() function contains the following lines:
;return __matherrl (TLOSS, "cosl", &x, NULL, *(long double *) NANTRIGL);
matherr TLOSS, cosl, x, NULL, NANTRIGL

The comment is correct, but the code is wrong.
QC Entry 99287
Create a new console application with the following code. #include <tchar.h> #include <cmath> #include <limits> //--------------------------------------------------------------------------- #pragma argsused int _tmain(int argc, _TCHAR* argv[]) { std::cosl(std::numeric_limits<long double>::quiet_NaN()); return 0; } //--------------------------------------------------------------------------- int _RTLENTRY _matherrl(_exceptionl *a) { return 0; } //--------------------------------------------------------------------------- int _matherr(_exception *a) { return 0; } Place a breakpoint at _matherr() and _matherrl(). When cosl fails _matherr() is called instead of _mat

Server Response from: ETNASC01