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

By: Calvin Tang

Abstract: List of user reported issues that are fixed in Update 4 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 4 to Delphi XE2, C++Builder XE2 and RAD Studio XE2. You can get Update 4 ISO at http://cc.embarcadero.com/item/28758.

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:
98590 9/6/2011 IDE
Description: Steps:
[QC Short Description]
incorrect code generated by Delphi XE + XE2 IDE for event handler

[QC Description]
there are a number of duplicate issues but it is not an Indy issue; it is an IDE issue and a very anoying one.

If one cannot trust the code the IDE generates... why would I trust the compiler to generate executables that actually work. This is mindblowing ! I understand there may be bug in software; I cannot understand why it is not fixed in the latest XE2 release.

This is going to be a "showstopper" in all of my new projects (32 and 64 bit)
QC Entry 98590
Incorrect code generated by Delphi XE + XE2 IDEfor event handler *** Using Delphi XE2 !! 1. Create a new VCL application. 2. Place an tidUDPserver component on the new form 3. Double click the OnUDPRead event generates error: "Expected '>' but '.' found." generated code: procedure TForm1.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread; AData: TArray<System.Byte>; ABinding: TIdSocketHandle); begin end; the AData: TArray<System.Byte> should be AData: TidBytes as declared in (idUDPserver.pas:) ... TUDPReadEvent = procedure(AThread: TIdUDPListenerThread; AData: TIdBytes; ABinding: TIdSocketHandle) of object; (idGlobal.pas) ... {$IFDEF HAS_TBytes} TIdBytes = TBytes; {$ELSE} TIdBytes = array of Byte; {$ENDIF} (System.SysUtils.pas) ... TBytes = TArray<Byte>; (System.pas) ... TArray<T> = array of T; cannot believe this bug is still in XE2 ! Please fix this. I was already reported by Indy
QC #: Date Reported: Area:
100462 10/26/2011 IDE\Dialogs\Environment Options
Description: Steps:
[QC Short Description]
IDE Search path is modified after opening the project options dialog (Project\Options)

[QC Description]
IDE Search path is modified after opening the project options dialog (Project\Options).
All environment variables will be expanded, ie $(BDSLIB)\$(Platform)\release becomes c:\program files\embarcadero\rad studio\9.0\lib\Win32\release

It happens on a fresh Delphi XE2 installation. I can reproduce it all the time.
QC Entry 100462
Start Delphi XE2 Open IDE Options dialog box and check the search path library (should be populated with stuff like $(BDSLIB)\$(Platform)\release) Close IDE Options (OK button) Create a new VCL Application Open the project's options dialog box Close the project's options dialog box (OK button) Open IDE Options dialog box and check the search path library Act : all environment variables are expanded now (ie $(BDSLIB)\$(Platform)\release becomes c:\program files\embarcadero\rad studio\9.0\lib\Win32\release) Exp: : search path library should be unchanged
QC #: Date Reported: Area:
102434 1/9/2012 IDE\Code Editor
Description: Steps:
[QC Short Description]
REGRESSION: "Open File At Cursor" fails when only Delphi personality is used

[QC Description]
When one is using only the Delphi personality when Delphi and C++Builder are installed (-pDelphi) or one has only Delphi installed then "Open File At Cursor" (CTRL+ENTER) fails for units that are not explicitly added to the project/aren't in the project source (DPR).

This is regression from XE.
QC Entry 102434
1. Start only the Delphi personality (param -pDelphi when Delphi and C++Builder are installed) 2. Extract the attached test case 3. open OpenFileAtCursorUp3Bug\Project1.dpr 4. open Code View of Unit1 5. Place the caret on the "Unit2" in the uses list 6. Press CTRL+ENTER Expected: The SubDir\Unit2.pas is openend Actual: The open dialog pops up showing "Unit2" without the ".pas" suffix.
QC #: Date Reported: Area:
100989 11/13/2011 IDE\Code Editor
Description: Steps:
[QC Short Description]
Shortcut Overlapped - Ctrl+Shift+D

[QC Description]
Up to Delphi 2010 the Ctrl+Shift+D shortcut opens Refactor > Declare Field form.
In the Delphi XE2 this command open s the Documentation form.
Please change one of the shortcuts
QC Entry 100989
Using code editor, press Ctrl+Shift+D in Delphi 2010 opens the Refactor Declare Field Form Using code editor, press Ctrl+Shift+D in Delphi XE2 opens the Documentation Form
QC #: Date Reported: Area:
99432 9/29/2011 IDE\Form Designer
Description: Steps:
[QC Short Description]
Inheritable Items in VCL

[QC Description]
Inheritable Items error in VCL
"Error Reading Form 'Root'. Access violation at address 00000000.
Please see [Steps].
QC Entry 99432
1. Start Delphi XE2
2. Create a new VCL Application
3. Toggle to from form design to code view * important step *
4. File->New->Other... Inheritable Items->Form1 anda OK

Error
Error message: "Error Reading Form 'Root'. Access violation at address 00000000.



{ USc: alternative steps from german Delphi-PRAXiS forum
"Delphi XE2: Fehler beim Ableiten eines Formulars"
www.delphipraxis.net/165666-delphi-xe2-fehler-beim-ableiten-eines-formulars.html }

- start Delphi
- create a new VCL application
- save all
- build (SHIFT+F9)
- F12 (switch to Code View)
- CTRL+Mouse click to open Vcl.Dialogs.pas from interface uses clause
- switch back to the VCL application main form, but do *not* active the Design tab
- File | New | Other
- select the main form on page "Delphi Projects" | "Inheritable Items"
- OK

expected: new VCL form inherited from the existing main form will be created
actual:

- dialogs "Error Reading Form: 'Root'", "Error reading Root.Caption: Access violation..."
- error message

[Window Title]
Error

[Content]
Error creating form: Access violation at address 503359EC in module 'vcl160.bpl'. Read of address 3F23F0E6.

[OK]

- warning message

[Window Title]
Warning

[Content]
Unit "Unit2.pas" is incompatible with the VCL framework used by the project.

Adding it may result in compilation errors or unexpected behavior. Continue?

[Yes] [No]

(Yes creates a FMI form)
QC #: Date Reported: Area:
100568 10/29/2011 IDE\Form Designer
Description: Steps:
[QC Short Description]
IDE locks up after changing the Form class name in source code.

[QC Description]
If intentional or accidental form class name change and you want to see Form (F12) in this article Delphi will be show you a error message then hong and CPU usage > %50 (No completely, if hold and stay ESC key you will see delphi work and show repeated message) and you must be end task it with Task manager!

Now, If you forget to save the sources, your datas will be lose. This is very disturbing.

Regards
QC Entry 100568
Simple way:

1) Create new VCL frorm application project
2) Go form source and rename Form Class Name (TForm1 -> TForm2) .

Example:
type
TForm1 = class(TForm) // Change TForm1 to TForm2
private
{ Private declarations }
public
{ Public declarations }
end;


3) Press F12 for view form.
4) Now you must be end task bds.exe

Note (from Iulian): This is a regression. I checked it on Fulcrum and the bug doesn't reproduces.
QC #: Date Reported: Area:
100595 10/31/2011 IDE\Form Designer
Description: Steps:
[QC Short Description]
XE2 Compiler is raise error and hong, when I put a character after variable declaration in class section

[QC Description]
If intentional or accidental you put any character after a component variable declaration then you want to see Form (F12) in this article Delphi will be show you a error message then hong and you must be terminate it with Task manager!

This error occurs only in system variable declaration, if put any character after user declaration section this error does not occur.

Important:
If you forget to save the sources, your datas will be lose.

Regards
QC Entry 100595
1) Create New Project 2) Put any visual component on form. (I put TEdit ) 3) Go source code and put a character ( Such as "a" ) 4) Press F12 for view form Sample: type TForm2 = class(TForm) Edit1: TEdit; a // ---> Raise error and compiler will Hong private { Private declarations } public { Public declarations } end;
QC #: Date Reported: Area:
89768 11/17/2010 IDE\Object Inspector
Description: Steps:
[QC Short Description]
Double Click Adding Events Error

[QC Description]
Hi I have the following error.
Open New VCL Forms application
File->New->VCL Forms Application - Delphi
Drag TIdTelnet component from Tool Palette onto form
Select Object Inspector->Events
Double Click on 'OnDataAvailable' event for TIdTelnet
IDE Error dialog appears witht the following error
"Expect '>' but '.' found
The IDE makes the event method but won't assign the event to the telnet object.
The procedure IdTelnet1DataAvailable(Sender: TIdTelnet; const Buffer: TArray<System.Byte>); is what the IDE creates and 'System.' seems to be the incorrect parameter.
If I remove 'System.' it says the property and method are not compatible and I still cannot assign the event to the Telnet Object.
QC Entry 89768
Open New VCL Forms application File->New->VCL Forms Application - Delphi Drag TIdTelnet component from Tool Palette onto form Select Object Inspector->Events Double Click on 'OnDataAvailable' event for TIdTelnet IDE Error dialog appears witht the following error "Expect '>' but '.' found
QC #: Date Reported: Area:
103164 2/5/2012 IDE\Object Inspector
Description: Steps:
[QC Short Description]
[Translation: Japanese] The mistake of translation in Object Inspector.

[QC Description]
[Translation: Japanese] The mistake of translation in Object Inspector.
Please see Steps.
QC Entry 103164

[ttsuchiya, Feb 8, 2012] Typo in the below for translation
[CONTEXT] PropInspManage.pas|sNSelectedCaption
[ORIGINAL] %d items selected
1.Put TButton on the TForm. 2.Put TButton on the TForm. ... 3.Choose two or more components. 4.Please see Object-Inspector. EXP: n KO NO KOUMOKU GA SENTAKU SARETEIMASU ACT: n KO NO KOUMOKU GA SENTAKU SAREIMASU
QC #: Date Reported: Area:
101212 11/22/2011 IDE\Visual Form Inheritance
Description: Steps:
[QC Short Description]
[REGRSSION] Inheritable forms with custom components

[QC Description]
(This is a regression. In D2010 it works just fine)

You put a custom component on FormA.
You have FormB that inherits from FormA.
Make FormB visible in Form-Designer.
Now Compile your Package that has the custom component in it.
Delphi IDE will now try to close your FormB, because the custom component is on it.
In this moment you get an Access Violation.
QC Entry 101212
1. Open 'FormInheritsBug.groupproj' 2. Install the 'PkgComponent.bpl' - Now you have the Component 'TDemoLabel', that is a simple 'TCustomLabel' - The Form in 'fParent.pas' has the 'TDemoLabel' on it. 3. Open 'TFrmChild' that is in 'fChild.pas' (Inherits from 'TFrmParent' that is in 'fParent.pas') 4. Make it Visible in the IDE 'F12' (if not already did) 5. Now Compile the 'PkgComponent.bpl' You get an access violation in the 'rtl160.bpl'.
QC #: Date Reported: Area:
100611 10/31/2011 IDE\Open Tools API
Description: Steps:
[QC Short Description]
Constants required for target platform nodes in Project Manager

[QC Description]
ToolsAPI.pas provides constants like sBaseContainer for the use with IOTAProjectMenuItemCreatorNotifier and says that all other items would be file names. Unfortunately there are no constants for the target platforms container node and the target platform nodes. Due the fact that the platform container node is localized one has to check for all localized strings to make sure that a item is shown in all localized versions.

Something like the following constants should be added to ToolsAPI.pas and used in the IDEs source

sTargetPlatformsContainer = 'TargetPlatformsContainer';
sTargetPlatform = 'TargetPlatform';

-> see steps
-> see comments in TPlatformCommandTestProjectManagerMenu.AddMenu in test case
QC Entry 100611
1. save the attached package and unit 2. set IDE locale with $(BDSBIN)\BDSSetLang.exe to US in first run and to DE, FR or JA in second run 3. start Delphi 4. open ProjManPlatformCommandTest.dpk 5. install ProjManPlatformCommandTest.dpk 6. create a new console app 7. show the popup menu for the "Target Platforms" node in the Project Manager expected: it contains an item "[OTA] Target Platforms container command" actual: US: expected item exists DE, FR and JA: item does not exist 8. close the IDE 9. go back to 2. and set to locale to DE, FR or JA unless you've already tested them See also following comments from TPlatformCommandTestProjectManagerMenu.AddMenu in test case procedure TPlatformCommandTestProjectManagerMenu.AddMenu(const Project: IOTAProject; const IdentList: TStrings; const ProjectManagerMenuList: IInterfaceList; IsMultiSelect: Boolean); begin { 1. Add a command for the Target platforms container node IdentList has currently two items and the content in the US version is: [0] BaseContainer [1] Target Platforms The first item is the constant ToolsAPI.sBaseContainer, but there is none for the second and it depends on the localization you are using. The strings for [1] in the localized versions are: DE = Zielplatformen FR = Plates-formes cible JA = #12479#12540#12466#12483#12488 + ' ' + #12503#12521#12483#12488#12501#12457#12540#12512 There should be rather a constant and the code should look like this if IdentList.IndexOf(sTargetPlatformsContainer) <> -1 then... while sTargetPlatformsContainer could be defined like this in ToolsAPI.pas sTargetPlatformsContainer = 'TargetPlatformsContainer'; } if IdentList.IndexOf('Target Platforms') <> -1 then ProjectManagerMenuList.Add(TOTAProjectManagerMenuItem.Create('[OTA] Target Platforms container command', 'OTAPlatformsCommand')); { 2. Add a command for the Target platform nodes like Win32 or OSX32 platform IdentList has currently two items and the content is [0] BaseContainer [1] Win32 [1] is a platform ID (see PlatformAPI.pas for cWin32Platform, cOSX32Platform, ...) IdentList should rather contain another item like sTargetPlatform, because checking for all platform ID's or enumerating over IOTAPlatformServices.AllPlatforms isn't a good approach to find out that the current node is a platform node. sTargetPlatform could be defined like this in ToolsAPI.pas sTargetPlatform = 'TargetPlatform'; } if (IdentList.IndexOf(cWin32Platform) <> -1) or (IdentList.IndexOf(cOSX32Platform) <> -1) or (IdentList.IndexOf(cWin64Platform) <> -1) or (IdentList.IndexOf(cLinux32Platform) <> -1) then ProjectManagerMenuList.Add(TOTAProjectManagerMenuItem.Create('[OTA] Target Platform command', 'OTAPlatformCommand')); end;
QC #: Date Reported: Area:
93131 4/15/2011 IDE\Packages\Installing Components
Description: Steps:
[QC Short Description]
Designtime package "Register" procedure is not called when package unit name has "." dots

[QC Description]
When a package unit name has "." dots, and it's included in a design-time package, its "Register" procedure is not called when the package is installed.

QC Entry 93131
Create a new package with a unit named "Test.Register.pas", and compile and install the package. exp: "Hello" message act: nothing unit test.register; interface uses Dialogs; procedure Register; implementation procedure Register; begin ShowMessage('Hello'); end; end.
QC #: Date Reported: Area:
99368 9/27/2011 IDE\Packages\Installing Components
Description: Steps:
[QC Short Description]
Register not called in units with initial underscrore in the name

[QC Description]
We are using components from LMD Ltd. All units registering the components begin with an underscore. We couldn't install any components from LMD. After a check we detected, that the register function from the corresponding unit was not called by IDE at installing (or importing) the component.
We needed about 10 hours to detect the problem:

If we rename the unit wich registers, the register function will be called. The problem is not only at components, but at every delphi unit, wich name begins with an underscroe.

QC Entry 99368
Make a unit named with an underscore at initial and place a register funtcion. The function will not be called. Rename the unit-> The register function will be called. You can check it if a ShowMessage is placed into the register funtcion. Thanks Embarcadero for our 10 hours bug-searching... New version, new bugs: In BDS 2009 it works.
QC #: Date Reported: Area:
102187 12/28/2011 IDE\Packages\Installing Components
Description: Steps:
[QC Short Description]
Package installs, but no component is registered

[QC Description]
Delphi XE2 has major problems installing packages. Some packages install, but the components which are inside are not registered. With XE the same packages install and the components are registered without a problem.

See video: http://youtu.be/S2LDxFLfRpE
and http://youtu.be/3yELxzAOULo

I also tried the workaround of report # 99368, but it does not work (and the error with the underscore is still present). I also made a new package and added the pas-files and I tried it on a different machine - same problem.

This is a show-stopper, I had to do a rollback to Delphi XE.
QC Entry 102187
See video: http://youtu.be/S2LDxFLfRpE and http://youtu.be/3yELxzAOULo
QC #: Date Reported: Area:
98192 8/26/2011 Install\Files
Description: Steps:
[QC Short Description]
Default bpl folder for x64 is not created by the installer

[QC Description]
The default bpl output folder for x64 packages is a subdirectory of the x86 folder
The installer creates just fine the x86 BPL folder but it does not create the x64 subfolder which means noone can ever use it to compile packages, unless one has administrator privileges under windows 7.

The installer should create the x64 subfolder for BPLs
QC Entry 98192
Install the latest beta and see that the default x64 folder for BPLs does not exist
QC #: Date Reported: Area:
102702 1/18/2012 Install\Files
Description: Steps:
[QC Short Description]
[DataSnap Mobile Connector] free_pascal_ios42 and free_pascal_ios50 are not installed for JA/FR/GR

[QC Description]
With the latest beta build for Update 4, Mobile connector for DataSnap added FreePascal support.

But, free_pascal_ios42 and free_pascal_ios50 are not installed for JA/FR/GR.

These files are copied in only English(en) folder.
QC Entry 102702
1. install 16.0.4399.46403 with English and Japaese edition 2. see ...\RAD Studio\9.0\ObjRepos\ja\dsrest\connectors folder 3. there is no free_pascal_ios42 and free_pascal_ios50 fodlers 4. see ...\RAD Studio\9.0\ObjRepos\en\dsrest\connectors folder 5. there are free_pascal_ios42 and free_pascal_ios50 fodlers
QC #: Date Reported: Area:
99919 10/11/2011 Install\Files
Description: Steps:
[QC Short Description]
[DCC Error] E1026 File not found: 'midas64.res'

[QC Description]
[x64]

When adding the uses MidasLib on a x64 bit project I get the following errors:

[DCC Error] E1026 File not found: 'midas.res'
[DCC Error] E1026 File not found: 'midas64.res'
QC Entry 99919
Add the following unit to a project and try to compile under x64. you will get the following errors: [DCC Error] E1026 File not found: 'midas.res' [DCC Error] E1026 File not found: 'midas64.res' unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, MidasLib; type TForm1 = class(TForm) private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} end.
QC #: Date Reported: Area:
99407 9/28/2011 Install\Files
Description: Steps:
[QC Short Description]
Some foreign language dcu installed with german version

[QC Description]
After installing the german version with only german locale selected, a subset of translated dcu files is found in

RAD Studio\9.0\lib\win32\release\ja

BindingGraphResStrs.dcu
Data.Bind.Consts.dcu
Fmx.Bind.Consts.dcu
FMX.Consts.dcu
System.Bindings.Consts.dcu
Vcl.Bind.Consts.dcu

C:\Programme\Embarcadero\RAD Studio\9.0\lib\osx32\release\fr

Datasnap.DSServerResStrs.dcu
Fmx.Bind.Consts.dcu
FMX.Consts.dcu

C:\Programme\Embarcadero\RAD Studio\9.0\lib\osx32\release\ja

Datasnap.DSServerResStrs.dcu

Also the Objrepos and Welcome page having some subdirectories and files of foreign locale.
QC Entry 99407
1. Install XE2(RTM) 2. During install, check only German as language 3. Check directories and contents
QC #: Date Reported: Area:
98649 9/7/2011 Install\Files
Description: Steps:
[QC Short Description]
Unable to remote debug to Win32/64 targets when "OSX cross platform development" component is not installed

[QC Description]
In installer there is component named "OSX cross platform development". If this is not installed it is not possible to remote debug not only OSX but also Win32/64 targets, because $(BDS)\bin\CodeGear.Deployment.targets and some other MSBuild related files are not installed.

Deploy fails with message:
[MSBuild Error] xxxx.dproj(1): The target "Deploy" does not exist in the project.

Suggestion: either rename component "OSX cross platform development" to have more meaningful name as it contains also non-OSX cross platform files or move Win-related files to another component that is installed by default.

Current anyone who does not expect to do OSX development may unselect this component during install but later finds out cryptic MSBuild error messages when trying to remotely debug Win32/64 targets.
QC Entry 98649
 
QC #: Date Reported: Area:
100725 11/4/2011 Database\Data Aware Controls\TDBCtrlGrid
Description: Steps:
[QC Short Description]
[REGRESSION] PanelBorder property(gbRaised) has no effect

[QC Description]
This issue was reported bu my important customer.

In XE2, PanelBorder property(gbRaised) has no effect.
Even if I set PanelBorder property to gbRaised, there is no border for rows.

This is a regression in XE2.
QC Entry 100725
1. create VCL form applicaition. 2. drop TDBCtrlGrid 3. make sure PanelBorder property is set to gbRaised 4. build/run app 5. no border is rendered.
QC #: Date Reported: Area:
2879 11/10/2002 Database\Data Access Controls
Description: Steps:
This is a bug new to Delphi 7 due to the changes to the TDataSet.DataEvent method. The problem starts on line 9600 in DB.PAS:

deUpdateState:
if ControlsDisabled then
begin
Event := deDisabledStateChange;
Info := Integer(State <> dsInactive);
NotifyDataSources := True;
end;

The new "deDisabledStateChange" DataEvent serves to notify TDataLinks that the TDataSet state has changed while controls are disabled. However, the following code in DBCtrls.pas (line 1589) causes data-aware controls to repaint themselves when this notification is sent:

procedure TFieldDataLink.DataEvent(Event: TDataEvent; Info: Integer);
begin
inherited;
if Event = deDisabledStateChange then
begin
if Boolean(Info) then
UpdateField
else
FField := nil;
end;
end;

The UpdateField call leads to a chain of calls that eventually lead to a RecordChanged(nil) which in turn causes the control to repaint itself.

This problem is easily demonstrated in the attached example program by disabling controls and subsequently putting the DataSet in Edit mode.

This bug has the effect that data-aware controls are repainted when they should not. This causes display flicker and also slows down the program.

Please refer to attachments for the example.
QC Entry 2879
Refer to the attached example.
QC #: Date Reported: Area:
98257 8/28/2011 Database\DataSnap
Description: Steps:
[QC Short Description]
Datasnap Server Exception in Callbacks

[QC Description]
Added by Sysop
<<<<
Initially, this issue was reported for Delphi XE.
This issue still occur with Delphi XE2(Trial).
Please see comments of QC for more detail.
>>>>

A datasnap server with mutiple clients connected on a single channel will give an AV exception caused by what appears to be a TMonitor issue.

This appears related to reports 91246 and 78415

If you are using the BroadcastMessage to all clientIDs on a channel Datasnap will delete the callback and you can sometimes get the callback to work again by disconnecting from the client and reconnecting.

If you are using the BroadcastMessage to a single ClientID on a channel the exception will simply kill the server and you can no longer use the callback nor reconnect from the client.

Seems to be related to
http://www.thedelphigeek.com/2011/05/tmonitor-bug.html
QC Entry 98257
Attached is a modified version of the basic callback example. We are using TCP connectivity. Run the server application. Run 3 or more clients each with the same channel ID but different ClientIDs. Doesn't matter which channel or Client callbackIDs you use(exception will not appear for a single client, the more clients the more likely it will fail). On the server app check the "Continuous Callbacks" checkbox and wait for the exception to occurr (Can take 30seconds to 10 minutes but will occurr). AV Exception occurrs in Generics.Collections (line 2172): function TThreadedQueue<T>.PushItem(const AItem: T; var AQueueSize: Integer): TWaitResult; begin TMonitor.Enter(FQueueLock); <- Access Violation here If you check the "Use Single Callback" checkbox the exceptions will occurr continuously, if this is unchecked the callback is deleted.
QC #: Date Reported: Area:
101968 12/20/2011 Database\DataSnap\Client
Description: Steps:
[QC Short Description]
Reading data from TStringFields in a TDataSet remoted from a DataSnap REST client returns the wrong data

[QC Description]
If you remote a TDataSet from a DataSnap REST client, the incorrect string value is returned if you call TStringField.AsString on a field with a large string, followed by a call to TStringField.AsString on a field with a smaller string.

For example, if you call TStringField.AsString on a field containing 'Robert', and then call TStringField.AsString on a field containing 'VP', the second call returns 'VPbert'
QC Entry 101968
Note: The attached project assumes there is a connection called EMPLOYEE in dbxconnections.ini that points to the sample Employee database that ships with Delphi XE2 - Download and unzip the attached zip file - Open RESTStringGroup.groupproj in Delphi XE2 - Compile and run RESTString.dproj - Click the 'Start' button - Compile and run 'RESTStringClient.dproj' - Click the 'GetEmployees' button Expected: The memo shows the following output:- JOB_CODE=VP FIRST_NAME=Robert JOB_CODE=VP Actual: The memo shows the following output:- JOB_CODE=VP FIRST_NAME=Robert JOB_CODE=VPbert
QC #: Date Reported: Area:
100916 11/10/2011 Database\DataSnap\Server
Description: Steps:
[QC Short Description]
Disconnection errors cause ShowMessage on server

[QC Description]
In a DataSnap REST Application server in case the browser disconnects before receiving the result (for example, because the user moved to another page) the disconnection exception is mismanaged, resulting in a "ShowMessage" on the server, which is at least very annoying (but can also hamper proper behavior).

The problem (in general) is that in many scenarios there is no option for the server application to handle socket-related exceptions in a custom way, for example handling the IWebExceptionHandler in the web module.


Have full demo if needed, but it is simple to replicate.
QC Entry 100916
1. Create a DataSnap REST Server application using the wizard.

2. Slow down the HTML rendering (simulating a real world scenario), for example adding the line RAID in TWebModule1.WebModuleDefaultAction.

3. Run the program and click repeatedly and very fast on the refresh browser button on the main page (the effect is more visible in IE, but is there for each browser).

4. You'll get an EIDSocket... exception indicating the client asked to disconnect. In fact, the server was unable to write the response to the client (which is expected).

5. You'll get a message box, even if you are not debugging. This is very difficult to prevent.

6. Add a proper implementation for the IWebExceptionHandler in your web module, with the TWebModule1.HandleException method: it won't be called, and you invariably get the system message box.
QC #: Date Reported: Area:
101807 12/14/2011 Database\DataSnap\Server
Description: Steps:
[QC Short Description]
[Mobile Connector for Android] DSRESTSSLFactory.java is not delivered

[QC Description]
In DSRESTConnection.java, DSRESTSSLFactory class is added in Update 3.
-----
...
private DSRESTSSLFactory SSLFactory;
...
-----

But, DSRESTSSLFactory.java is not delivered!!
QC Entry 101807
1. Apply Update 3 to Update 2.
2. Create DataSnap REST Server with mobile connector support.
3. Run it and get proxy files.

In DSRESTConnection.java, DSRESTSSLFactory class is added in Update 3.
-----
...
private DSRESTSSLFactory SSLFactory;
...
-----

But, DSRESTSSLFactory.java is not delivered!!
QC #: Date Reported: Area:
102703 1/18/2012 Database\DataSnap\Server
Description: Steps:
[QC Short Description]
Datasnap.DSProxyFreePascal_iOS.dcu is not found.

[QC Description]
When adding mobile connector support for DataSnap REST server and building the project,

[F1026] Datasnap.DSProxyFreePascal_iOS.dcu is not found
QC Entry 102703
1. isntall 16.0.4399.46403 2. create new DataSnap REST server project with mobile connector 3. build it 4. [F1026] Datasnap.DSProxyFreePascal_iOS.dcu is not found
QC #: Date Reported: Area:
98742 9/9/2011 Database\DataSnap\Server
Description: Steps:
[QC Short Description]
Memoy leak occurred when datasnap server exe closed

[QC Description]
QC#91526(Internal #281914) is NOT fixed yet.

When client invokes server method(LifeCycle is 'Invocation') multiple times, Memory leaks are TDSProviderDataModuleAdapter instances.

Please see [Steps] and attached projects(server/client).
QC Entry 98742
1.create datasnap server project with wizard. 2.change DSServerClass1.LifeCycle to 'Invocation',and turn on ReportMemoryLeaksOnShutdown switch in project file. 3.Create a vcl client project,and add ClientClassesUnit1 unit with client module wizard. 4.Add a button and a edit control to client main form. 5.In button click event, call server method EchoString, show return string in edit. <<<<<<<<<<< 6. INVOKE SERVER METHOD MULTIPLE TIMES!!!! >>>>>>>>>>> 7.Close client program, close server program. 8.Memory leak occurred when close server. Memory leaks are TDSProviderDataModuleAdapter instances.
QC #: Date Reported: Area:
102083 12/24/2011 VCL
Description: Steps:
[QC Short Description]
[REGRESSION] HTMLHelpViewer.pas critical issue in initialization and finalization methods

[QC Description]
The DLL and app don't unload when HTMLHelpViewer.pas unit is used.

The same Report #89616 marked as fixed a one year ago. But the issue still exists on the latest version of Delphi XE2 Update 3 (16.0.4358.45540).
QC Entry 102083
1. Create a DLL: --------------- library Test; uses ComServ, HtmlHelpViewer; exports DllGetClassObject, DllCanUnloadNow, DllRegisterServer, DllUnregisterServer; begin end. --------------- 2. Compile DLL and then just execute: regsvr32.exe /s Test.dll 3. DLL will hang. ComServ and regsrv32 is needed to have ability to register DLL. Registration process will hang. You don't need them to see EXE hang on application closure. But I have reported DLL hang on this bug report. Please make something! [Original Steps] 1. Just add HTMLHelpViewer.pas to interface uses list in DLL. DLL will never be registered. App using this DLL will never be closed / unloaded. The issue is URGENT. Can't release the app to customers. The same Report #89616 marked as fixed a one year ago. But the issue still exists on the latest version of Delphi XE2 Update 3 (16.0.4358.45540).
QC #: Date Reported: Area:
101259 11/23/2011 VCL
Description: Steps:
[QC Short Description]
Incorrect casting in the TCustomStyleServices.DrawText function (the Vcl.Themes unit)

[QC Description]
The following function operates incorrectly with bit flags as the Flags parameter:

unit Vcl.Themes;
...
function TCustomStyleServices.DrawText(DC: HDC; Details: TThemedElementDetails;
const S: string; R: TRect; Flags, Flags2: Cardinal): Boolean;
begin
Result := DrawText(DC, Details, S, R, TTextFormat(Flags));
end;

Although it operates correctly with set assigned as the Flags parameter, this function must have the same result both for the bit flags and for the set.
QC Entry 101259
Run the attached example. You will see that the left PaintBox does not contain any text, although the following code is used to draw the 'TEST' text.
QC #: Date Reported: Area:
101109 11/17/2011 VCL\Additional Controls\TCheckListBox
Description: Steps:
[QC Short Description]
Access violation in TCheckListBox

[QC Description]
TCheckListBox can crash with an access violation when you free it if it has the focus and at least 1 item.



The event leading to the problems occurs like this:

TCheckListBox.Free is called;
TCheckListBox's destructor free it's canvas, (amongs other)
The inherited destructor (in RemoveFocus) call RemoveFocus
Remove the focus make the TCheckListBox try to repaint its item with a freed Canvas. It crash in NTDll (in procedure TFont.Assign) when trying to lock the font with a freed Critical Section.
QC Entry 101109
With the application in attachments, - Click on the first element of the CheckListBox - Press ALT + B Crash.
QC #: Date Reported: Area:
88668 10/5/2010 VCL\Core VCL Classes\TApplication
Description: Steps:
[QC Short Description]
TApplication.CreateForm access an object instance after it has been freed

[QC Description]
Forms.TApplication.CreateForm has an obvious flaw which, intermittently, results in an access violation.

procedure TApplication.CreateForm(InstanceClass: TComponentClass; var Reference);
var
Instance: TComponent;
begin
// Set flag that TCustomForm constructor can read, so it knows if it's being
// created as a main form or not (required when MainFormOnTaskbar is True)
FCreatingMainForm := (FMainForm = nil) and InstanceClass.InheritsFrom(TForm);
Instance := nil;
try
{$IF DEFINED(CLR)}
Instance := InstanceClass.Create(Self);
Reference := Instance;
{$ELSE}
Instance := TComponent(InstanceClass.NewInstance);
TComponent(Reference) := Instance;
try
Instance.Create(Self);
except
TComponent(Reference) := nil;
raise;
end;
{$IFEND}

if (FMainForm = nil) and (Instance is TForm) then
begin
TForm(Instance).HandleNeeded;
FMainForm := TForm(Instance);
if MainFormOnTaskBar then
SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_NOACTIVATE);
ChangeAppWindow(Handle, not MainFormOnTaskBar, not MainFormOnTaskBar);
end;
finally
if (FMainForm = nil) and (Instance is TForm) then
TForm(Instance).FCreatingMainForm := False;
end;
end;

The problem occurs when the constructor raises an exception (i.e. inside the call Instance.Create). What happens next is that the destructor is called by the RTL framework which results in FreeInstance being called on Instance. When the finally clause executes, and if FMainForm is nil, then an AV can occur in the Instance is TForm condition test (this lands in TObject.InheritsFrom) or indeed in TForm(Instance).FCreatingMainForm := False. The AV doesn't occur repeatably because of the way memory managers work. Although the memory has been freed it typically is not returned to the system immediately. I think the flaw manifests more commonly for large forms (i.e. those form whom InstanceSize is large) since large blocks are less likely to be retained for re-use by a memory manager.

The solution is trivial. In addition to the line TComponent(Reference) := nil in the except clause should be added the line Instance := nil
QC Entry 88668
 
QC #: Date Reported: Area:
100024 10/14/2011 VCL\Dialog Controls
Description: Steps:
[QC Short Description]
[REGRESSION] Inputbox fails to display text with several linebreaks in it

[QC Description]
If you invoke a inputbox with some linebreaks in the text, the prompt scrolls out of the visible area of the window

I test the problem with Delphi 2010 and Delphi 2006. It was not there. Someone changed the inputbox code , in order to change the position of the label to the left hand side of the textbox.
In Delphi 2010 the Label was in top of the textbox, so the window grows to the bottom. Now it grows to the sides and produces this missbehaviour.
QC Entry 100024
Invoke the following inputbox InputBox(Application.Title,'A text'+#13#10+#13#10+#13#10+#13#10+#13#10+#13#10+'with some linebreaks','');
QC #: Date Reported: Area:
100887 11/9/2011 VCL\Win 32 Controls\TTreeView
Description: Steps:
[QC Short Description]
TTreeView.OnAddition can be fired when main form being created and can crash app

[QC Description]
Run the test app where I have the following:
1- A TreeView with items in it at design time.
2- A memo that was placed second on the form (after the treeview). I here assume it will be created second.
3- TTreeView.OnAddition to access the memo1 object:

procedure TForm5.TreeView1Addition(Sender: TObject; Node: TTreeNode);
begin
// Without this If, the app crashes:
If Memo1 <> Nil Then
Memo1.Lines.Add(Node.Text);
end;


If you have the If test, no crash occurs, if the If test is removed, the app won't start due to exceptions. I suspect it's because OnAddition is fired after the teree view was created but before memo1 is and therefore, is accessing an invalid pointer to memo1.
QC Entry 100887
Workaround is changing creation order by editing .dfm file as below. from ------------------- ... object TreeView1: TTreeView Left = 8 Top = 8 ... end object Memo1: TMemo Left = 198 Top = 8 ... end ... ------------------- to ------------------- ... object Memo1: TMemo Left = 198 Top = 8 ... end object TreeView1: TTreeView Left = 8 Top = 8 ... end ... ------------------- This seems to support my suggestion that the OnAddition is triggered after the tree view is created but before the memo is.
QC #: Date Reported: Area:
101435 11/30/2011 VCL\Win 32 Controls\TListView
Description: Steps:
[QC Short Description]
TListColumns: A moved column loses it's order after adding a new column

[QC Description]
The order of the subitems gets corrupt after adding a new column, when you moved a column by setting it's index to some value < Columns.Count-2 or by dragging it between other existing columns.
This only happens when using TListColumns.Add for the new column. Insert works fine.

This seems to be a very old bug. Encountered in Delphi 7 and in XE, XE2 (and very likely in the versions between).

Please see [Workaround] of QC for more information.
QC Entry 101435
Place a TListView control on a VCL form, set it's ViewStyle to 'vsReport' and set FullDrag to 'true'. Put the below code to the OnCreate handler of the form: ListView1.Columns.Add.Caption := 'col 1'; ListView1.Columns.Add.Caption := 'col 2'; ListView1.Columns.Add.Caption := 'col 3'; ListView1.AddItem('cell 1', nil); ListView1.Items[0].SubItems.Add('cell 2'); ListView1.Items[0].SubItems.Add('cell 3'); Place a TButton on the form, and put the below code to its OnClick handler: ListView1.Columns.Add.Caption := 'col 4'; Run the project and drag the column header of 'col 3' to in-between 'col 1' and 'col 2': Everything is fine at this point. Click the button to add a new column: Notice that 'cell 2' has reclaimed it's original position.
QC #: Date Reported: Area:
98075 8/24/2011 VCL\Action Classes
Description: Steps:
[QC Short Description]
Using AllowScrolling causes crash

[QC Description]
When setting the AllowScrolling property to True for a popup menu descendent for TActionMainMenuBar, navigating menus can cause an AV.


The attachment includes source for sample project, video of error plus two precompiled executable files. One with the current Vcl.ActnCtrls.pas unit and the other using the fixed Vcl.ActnCtrls.pas unit.
QC Entry 98075
- Create a new popup menu for use in a ActionMainMenuBar menu - Make sure AllowScrolling is set to True for the descendent to allow menu to support scrolling if the contents don't fit on the screen - Set the GetPopupClass event of the ActionMainMenuBar to return the new descendent - With one menu item still visible, move the mouse to another menu item so that it displays automatically exp: new menu displays without issues act: new menu with AV with error The easiest way to reproduce the bug with the existing vcl.actnctrls.pas unit is to click on the File menu item. While the File menu item is still visible, move the mouse of each other menu item moving from left to right. ie. File, Edit, Tools and then Help. When the Help menu attempts to drop down, an AV will result. Replace the existing Vcl.ActnCtrls.pas unit with the one attached to this report and running the same test about will not cause an AV at anytime. ============================== Sample project and merged fix attached to this report in the Vcl.ActnCtrls.pas unit. This change verifies that the code in TCustomActionDockBar.ShowScrollButtons makes sure that internal data structures have the correct data in them before attempting to access those structures. It also doesn't automatically set the buttons for scrolling within the menu to AutoScroll if the scrollingrate for the menu is 0 (TCustomActionDockBar.CreateScrollButtons).
QC #: Date Reported: Area:
99820 10/9/2011 VCL\Ribbon Controls
Description: Steps:
[QC Short Description]
Ribbon does not shows an application Icon in 64bit

[QC Description]
Ribbon does not shows an application Icon in 64bit
QC Entry 99820
Compile & run sample in \Samples\Delphi\VCL\Ribbon Controls\Application Menu\AppMenuDemo for 64 bit.
QC #: Date Reported: Area:
87650 8/31/2010 VCL\Ribbon Controls
Description: Steps:
[QC Short Description]
Ribbon font size not used

[QC Description]
When I change the font size of the TRibbon control, it has no effect. It still uses the default font size (8).
QC Entry 87650
I already posted a question in stackoverflow.com http://stackoverflow.com/questions/3573375/is-it-possible-to-set-the-font-of-the-builed-in-ribbon-controls-d2009
QC #: Date Reported: Area:
100076 10/15/2011 VCL\Ribbon Controls
Description: Steps:
[QC Short Description]
No background for the app menu in TRibbon under WinXP

[QC Description]
A TRibbon's application menu paints a wrong background under WinXP with enabled themes.
Initially a background is black, it becomes gray after repainting items (when items are unselected)
QC Entry 100076
This bug can be reproduced, for example, in RibbonControls\Ribbon Demo
QC #: Date Reported: Area:
102458 1/9/2012 VCL\Styles
Description: Steps:
[QC Short Description]
EOutOfResources with VCL Styles and TBitBtn

[QC Description]
Using Delphi XE2 with Update 3 on Windows 7.

Application locks up when using VCL Themes and setting TBitBtn Enabled Property. (Many times)

EOutOfResources or EInvalidOperation 'Canvas does not allow drawing'

Every application Enables and disables buttons, so this is why I marked as Serious.

Please fix as soon as possible. It has cost me a lot of time already. Thanks, Rick Waltemire


QC Entry 102458
Try this simple test. -Put 5 bitbtns on a form -Set a glyph for each of the buttons. -Add a timer that sets each button like this BitBtn1.Enabled := not BitBtn1.Enabled; every 200ms. (Toggle the buttons enabled property on and off) -Pick one of the VCL Styles for the project. Run the application and it will crash within a minute or so. It eats up resources and can no longer write to the bitmap canvas of the bitbtns. I am unable to debug the exact problem. -Remove the Style and it will run forever like it should.
QC #: Date Reported: Area:
101287 11/24/2011 VCL\Styles
Description: Steps:
[QC Short Description]
RichEdit doesn't work with styles

[QC Description]
Changing SelAttributes of the RichEdit text has no effect when using the style, other than Windows.


Added by Sysop
<<<<<<<<
May be it is related to the QC#99265, but I think that this report describes more general issue.
>>>>>>>>
QC Entry 101287
This code has no effect if you build your project with, say, Amethist Kamri style. If style is Windows the code works as expected. procedure TForm1.FormCreate(Sender: TObject); begin with RE do begin SelStart := 0; SelLength := Length(RE.Text) - 1; SelAttributes.Color := clRed; SelLength := 0; end; end;
QC #: Date Reported: Area:
101470 12/1/2011 VCL\Styles
Description: Steps:
[QC Short Description]
VCL WordWrap on Button control does not wrap text when skinned

[QC Description]
The word wrap works on a button in classic Windows but does
not 'wrap' the text when skinned.
QC Entry 101470
Put a button on a VCL form unskinned. Add the caption to the button: 'Toggle WordWrap.'. Check WordWrap:=true. Run the application. The text wraps fine. Now skin the form. Run the application. The text does now wrap to additional lines.
QC #: Date Reported: Area:
101671 12/8/2011 VCL\Styles
Description: Steps:
[QC Short Description]
VCL Memo can not be made invisible when styled/ VCL Statusbar cannot use Owner Draw

[QC Description]
See attached example. These failures seem related to 101470 reported earlier.

VCL Memo can be visible/invisible in classic Windows but not when Styled.

VCL Statusbar can not user owner draw property.
QC Entry 101671
Put a vcl memo on form without skinning. Place button to toggle between memo.visible:=true or memo.visible:=false. Works on classic. Windows. Do the same on a skinned form, it does not toggle. Put vcl Statusbar on a form. For one panel select ownerdraw and insert text; for a second panel, select text and insert text. On classic windows, ownerdraw works; on Styled form, it does not. [Does not work] ------ procedure TVCLdbGrid.Button2Click(Sender: TObject); begin if Memo2.visible = false then Memo1.visible:=true else Memo2.visible:=false; end; ------ [Does work] ------ procedure TVCLdbGrid.Button3Click(Sender: TObject); begin Memo2.Show; end; procedure TVCLdbGrid.Button4Click(Sender: TObject); begin memo2.Hide; end; ------
QC #: Date Reported: Area:
101798 12/14/2011 VCL\Styles
Description: Steps:
[QC Short Description]
[TStaticText] Styles break specified Word Wrap and Font.Color

[QC Description]
TStaticTexts no longer word wrap when a style is applied. Fonts cannot have a color set when a color is applied.
QC Entry 101798
1. Create a form. 2. Drop a TStaticText, and TButton on it. 3. Set the TStaticText to be tall but not wide. 4. Plug in a caption for the TStaticText that causes it to span multiples lines. 5. Set the TStaticText font color to clRed. 5. In the code behind for the TButton, add: StaticText1.Font.Color := clBlue; StaticText1.Font.Style := [fsBold]; 6. Run and test 7. Pick any Custom Style, and now run and test. Bug 1: The TStaticText no longer has lines plural. It has one line only, and the text disappears off the side. There's no WordWrap property to set or alter. Bug 2: When starting the application, the font color on the TStaticText was reset to the style color. The custom style should only override system colors such as clBtnFace, and never ones like clRed, clBlack, or a manual one such as $121212. Bug 3: If someone disagrees with me on #2, then at least allow me to control my own destiny in the PAS file. When the button is clicked the TStaticText font color should surely update. The font style does, so some updates are allowed. Why not color?
QC #: Date Reported: Area:
101995 12/21/2011 VCL\Styles
Description: Steps:
[QC Short Description]
[Golden Graphite] VCL Style fails when using a TButton on a TToolBar..incorrect painting

[QC Description]
The VCL Style skinning does not operate correctly when using a TButton on a TToolBar.
It is most noticible when using the VCL Golden Graphite style, but correct button painting occurs when styled with any style example provided except Carbon.

Note if a TBitBtn is placed on the ToolBar, there are no issues with the TBitBtn, which styles correctly.


...Thanks for looking at this.
-- Steve
QC Entry 101995
Place a ToolBar on a form. Style for Golden Graphite. Place a TButton and a TBitBtn on the tool bar . Run application. Note the skinning issue with the TButton but not the BitBtn. The problem is not noticible using the Carbon style.
QC #: Date Reported: Area:
101371 11/28/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Run-time style change results in Main menu disappearing

[QC Description]
Changing the style at run time causes the main menu of the application to disappear for a few seconds (or even get lost completely on a virtual Win XP x86).
QC Entry 101371
1. create a new vcl application. 2. have a main menu 3. include all custom styles using Project - Options - Application - Appearance - Custom Styles. 4. add a command that changes the style using "TStyleManager.SetStyle(newStyleName);", where "newStyleName" is any value from the TStyleManager.StyleNames. 5. run the application 6. change the style by the command added in 4. -> main menu disappears for a few seconds or is sometimes completly lost.
QC #: Date Reported: Area:
101100 11/17/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Cannot drag TListView vertical scrollbar to top to view first item if style is applied to project

[QC Description]
When a style is applied to the project, I am unable to drag TListView vertical scrollbar all the way to the top to view the top item. However, subsequence drag would work.
QC Entry 101100
-Create a new project set project appearance style to "Aqua Light Slate" (or anything) -Add TListView, set Height to 120 pixels, add 1 column, add 10 items, set ViewStyle to vsReport -Run the project and initially drag TListView vertical scrollbar to bottom -Move the mouse away from TListView -Now use the mouse and directly grab and drag TListView vertical scrollbar from bottom to top -You will see that you will not be able to drag the Vertical scrollbar all the way to top to view the first item.
QC #: Date Reported: Area:
102201 12/28/2011 VCL\Styles
Description: Steps:
[QC Short Description]
First Menu appears on wrong monitor

[QC Description]
This ONLY happens when running with a VCL Style

See Screen Capture in attatched zip file.
QC Entry 102201
1. Build and Launch the Attached Application on a machine with two monitors where the right monitor is the primary one. 2. Make sure that the Application is full-screen on the right monitor 3. Click the FILE menu and you'll see that the menu itself appears on the wrong monitor NOTE: This ONLY happens when running with a VCL Style
QC #: Date Reported: Area:
101266 11/23/2011 VCL\Styles
Description: Steps:
[QC Short Description]
Columns Failure in TListBox

[QC Description]
When the Windows style is selected and I have a TListBox on the form with ListBox1.Columns = 5, the listbox is populated with five columns and all works well.

If I select any other style for the same project, the listbox is populated with a single column. If you select an item in the items displayed in the single column and use the down-arrow to move down the column, the listbox will populate with the rest of the columns if you hold down the down-arrow. As the selected item is highlighted, it moves to the appropriate column.

If you left-click in the blank area where the other columns should be, the correct item will show up in that spot as the selected item.

If you have all the items that displayed properly in their columns because you have down-arrowed all the way to the end of the list and then you hit the HOME key, everything reverts to the single column mode.

QC Entry 101266
Set up a form with a TListBox with columns = 5. Populate the listbox with a list long enough to fill well beyond the five columns. See that it works properly if Windows is the style and fails to use the columns if any other style is selected.
QC #: Date Reported: Area:
101022 11/14/2011 VCL\Styles\TStyleEngine
Description: Steps:
[QC Short Description]
Repeated LoadLibrary call occurs EStyleEngineException in module vcl160.bpl

[QC Description]
A repeated LoadLibrary call occurs an Exceptio in vcl160.bpl.

The First Exception is called 'EStyleEngineException' and refers to TListBoxStyleHook class, which is already registered for TCheckListBox.
After that a second Exception occurs immediately:
Runtime error 216 at 00000000004B5B35.

Program hangs now in memory. I have to kill process with taskmanager.
QC Entry 101022
Workflow: 1. calling LoadLibrary to load an DLL 2. calling create function of DLL 3. calling destroy function of DLL 4. calling FreeLibrary to unload DLL 4. calling LoadLibrary to load (same/another) DLL again --> Program crashes here: Application error (i have translated from german to english): Exception EStyleEngineException in module vcl160.bpl at 00000000001A352A. Class 'TListBoxStyleHook' is already registered for 'TCheckListBox'" [Vcl.Themes.pas] --------------------- class procedure TCustomStyleEngine.RegisterStyleHook(ControlClass: TClass; StyleHookClass: TStyleHookClass); ... ... ... else raise EStyleEngineException.CreateResFmt(@SStyleHookClassRegistered, [StyleHookClass.ClassName, ControlClass.ClassName]); end; end; ---------------------
QC #: Date Reported: Area:
101447 11/30/2011 VCL\Styles\TStyleEngine
Description: Steps:
[QC Short Description]
Styles MDI Window Menu Selection Failure

[QC Description]
In an MDI application, the Window menu item lists the open MDI Child windows and indicates the active MDI child with a check mark. This works for the Windows style and for any other style that is selected.

With the Windows style, the user can click on an unchecked MDI child menu item and the focus will be transferred to that MDI child along with the check mark in the menu item. However, with any other style selected, this process does not work. Clicking on an unchecked MDI child in the child list of the Window menu item does not do anything except to close the Window menu list.

Project is attached.
QC Entry 101447
Run the attached project. Click on the Set Windows button to set the Windows style. Click the LaunchMDI button three times to laundh three MDI children. Click on the Window menu item and note that three MDI children are listed with one being checked. Click successively on the MDI children in the Window menu item and note that the focus transfers to the window that was checked. Now click the Set Iceberg button to change the style to Iceberg Classico. Click on the Window menu item and note that the three MDI children are listed as before. Click on an unchecked MDI Child in the Window menu item. Note that the newly checked window does not receive the focus. Not good. If you click directly on the MDI child form, the check mark will move to the proper MDI child in the Window menu item child list, but you cannot use the Window menu item child list to select a window unless you are using the Windows style.
QC #: Date Reported: Area:
101346 11/26/2011 VCL\Styles\Control Hooks
Description: Steps:
[QC Short Description]
TPageControl draw incorrect image index in TTabSheet(s) when VCL Styles is active

[QC Description]
When a imagelist is asociatted to a TPageControl and a VCL Style is active, the tabsheets are draw with a incorrect imageindex.

Thre is not a workaround, but I track down the bug to the TTabControlStyleHook class in the Vcl.ComCtrls unit. in the DrawTab method the calls to the StyleServices.DrawIcon use the Index of the tabsheet as parameter instead of the imageindex associated to the tabsheet.
QC Entry 101346
1. Put a TPagecontrol in a form 2. Add some tansheets to the TPageControl 3. Add a imagelist with some images 4. Associate the imagelist to the TPageControl 5. Assign some iageindex to the tabsheets (for example set the imageindex property to 1 in the first tabsheet) 6. Assign avcl style to the app and make active. 7. run the application 8. the first tabsheet will show the image associated to the imageindex 0 instead of the assignated value 1.
QC #: Date Reported: Area:
102059 12/23/2011 VCL\Styles\Other
Description: Steps:
[QC Short Description]
Scrollsbars do not work in derived TListView and TTreeView with style other than Windows

[QC Description]
If you derive a new control from TCustomListView or TCustomTreeView, dragging the scrollbars does not work if the application uses a style other than the default Windows style.

The copied unit demonstrated the problem in a brief example.
QC Entry 102059
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls; type TMyTree = class(TCustomTreeView) procedure CreateWnd; override; end; TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure TMyTree.CreateWnd; var parent: TTreeNode; begin inherited; if Items.Count > 0 then exit; parent := Items.AddChild(nil, 'Root'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); Items.AddChild(parent, 'Node ABC'); end; procedure TForm1.FormCreate(Sender: TObject); begin With TMyTree.Create(Self) do Parent := Self; end; end.
QC #: Date Reported: Area:
101075 11/17/2011 Debugger
Description: Steps:
[QC Short Description]
Huge memory leak when debugging

[QC Description]
Delphi XE2 exhibit a consistant memory leak when running a program in debug mode.

On an empty VCL application it's around 12K per run, on a complex 700K lines project it's around 100MB.

The leak only seems to occur once after each build when launching with the debugger attached (F9).

We've been able to reproduce the problem on different computers (Windows 7 x64, Windows XP SP3 x32) with no addons (IDE Fix Pack, cnPack, madExcept, ...).

Needless to say XE2 is pretty unusable as is.
QC Entry 101075



- New->VCL Forms Application (or open an application) - Shift+F9 to build - F9 to run - Repeat build & run steps to notice memory leak
QC #: Date Reported: Area:
97246 8/6/2011 Debugger\Breakpoints
Description: Steps:
[QC Short Description]
Debugger stops at the wrong breakpoint

[QC Description]
See steps.
QC Entry 97246
Create a new console app for Delphi, exchange generated source with source below. Set the breakpoints, hit F9. In Win32 (and Win64) execution halts at breakpoint #2 (as expected), hit F9. Add and switch target to OSX32, hit F9 execution halts at breakpoint #1. Note that overloaded Synchronize() with the "reference to procedure" argument is used here. program Project1; {$APPTYPE CONSOLE} uses System.Classes, System.SysUtils; type TXThread = class(TThread) protected FReady: Boolean; procedure Execute; override; end; procedure SyncBeep; begin Beep; // <= Breakpoint #1 end; procedure TXThread.Execute; begin inherited; FReady := True; Synchronize(SyncBeep); // <= Breakpoint #2 end; begin try with TXThread.Create(True) do begin FreeOnTerminate := False; Start; while not FReady do System.SysUtils.Sleep(10); Free; end; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
QC #: Date Reported: Area:
101840 12/15/2011 Debugger\Breakpoints
Description: Steps:
[QC Short Description]
[x64] Data breakpoints do not work on full 64-bit addresses

QC Entry 101840
{ 1. Run to the marked line (F4). 2. When the execution is stopped, add a data breakpoint for the address held in the pointer variable "p". 3. Hit "Run". Expected: The execution is stopped on the line "integer(p^) := 42" Actual: The debuggee runs and exits. This works as expected with the Win32 debugger, or if mem_Top_Down is removed from the call to VirtualAlloc (pass "false" to "Test()"). } uses WinAPI.Windows; procedure Test(const HighAddress: boolean); var p: pointer; f: uint32; begin f := mem_Reserve + mem_Commit; if HighAddress then inc(f, mem_Top_Down); p := VirtualAlloc(nil, 100, f, page_ReadWrite); if HighAddress then // <-- RUN TO THIS LINE assert( nativeuint(p) > {$if sizeof(pointer)>4}$FFFFFFFF{$else}$70000000{$ifend} ) else assert( nativeuint(p) < $FFFFFFFF ); integer(p^) := 42 end; begin Test(true) end.
QC #: Date Reported: Area:
101886 12/18/2011 Debugger\Evaluator\Delphi
Description: Steps:
[QC Short Description]
[x64] Disconnected Session while using Evaluate/Modify Window

[QC Description]
Session disconnect comes up when try to evalute a function which returns a Class (simple Singleton Implementation)

See steps.
QC Entry 101886
1) Save the following program and open it (test case guessed by USc, because reporters test case was incomplete) 2) Place a breakpoint on MyObject.ToString() 3) Run the program on a 64 Bit Target 4) When the program stops at the breakpoint open the evaluate/modify window. 5) Type in MyObject expected: No Disconnect actual: Disconnected Session dialog comes up program QC101886; {$APPTYPE CONSOLE} type TMyObject = class private class var FMyObject: TMyObject; public class constructor Create; function ToString: string; override; end; class constructor TMyObject.Create; begin FMyObject := TMyObject.Create; end; function TMyObject.ToString: string; begin Result := 'Foo'; end; function MyObject: TMyObject; begin Result := TMyObject.FMyObject; end; begin MyObject.ToString;//<- breakpoint here and evaluate MyObject (with side effects) end.
QC #: Date Reported: Area:
101569 12/5/2011 Debugger\Evaluator\Delphi
Description: Steps:
[QC Short Description]
[x86 REGRESSION] Evaluation of procedural variables crashes the debuggee

[QC Description]
Win32: Resuming the execution results in an AV in the debuggee.
Win64: Works as expected.
OS X: The debuggee and PAServer hang, consuming the CPU. An attempt to terminate the debuggee from the IDE results in "Debugger Assertion Failure: "!"invalid remote api"" in .\rdbg_proxy.cpp at line 1685".

USED TO WORK IN XE
QC Entry 101569
{ 1. Set the breakpoint and run the test case under the Win32 debugger. 2. Evaluate "Foo()". Result: "(no value)". Notice the debug output "Foo" in the Event Log. 3. Evaluate "P()". Expected: Same result as (2) Actual: "Unknown exception 0E22FACC at 07066245" } {$ifdef MSWindows} uses Windows; {$endif} procedure Foo; begin {$ifdef MSWindows} OutputDebugString('Foo') {$else} writeln('foo') {$endif} end; var P: procedure; begin P := Foo; P() // <-- BREAKPOINT HERE end.
QC #: Date Reported: Area:
102352 1/4/2012 Debugger\Evaluator\Delphi
Description: Steps:
[QC Short Description]
[x64] Evaluation of expressions casted to pointers results in garbage

[QC Description]
Works fine with the Win32 debugger.
QC Entry 102352
{ 1. Run to the marked line (F4) under the Win64 debugger. 2. Evaluate "pointer(result)", you get $2A. 3. Evaluate "pointer(result+1)". Expected: $2B Actual: Seemingly unrelated hex value. Hit <Enter> to re-evaluate, you get /yet another/ unrelated value. } function Test: NativeUInt; begin result := 42 end; // <-- RUN TO THIS LINE begin Test end.
QC #: Date Reported: Area:
101169 11/20/2011 Debugger\Call Stack
Description: Steps:
[QC Short Description]
64-bit debugger crashes, IDE locks up

QC Entry 101169
- enable "Use debug .dcus"
- set a breakpoint on the marked line
- run (F9) under the x64 debugger
- when the breakpoint is hit, step into (F7) RTTI.Invoke()
Actual: The IDE opens System.RTTI.pas; the x64 debugger crashes; the IDE shows the "Disconnected session" dialog and locks up.

program QC_101169;

uses
RTTI,
TypInfo;

procedure Test;
var
args: TArray<TValue>;
begin
setlength(args, 1);
Invoke(nil, args, ccReg, nil); // <-- place a breakpoint here
end;

begin
Test;
end.
QC #: Date Reported: Area:
96642 7/25/2011 Debugger\Call Stack
Description: Steps:
[QC Short Description]
Call stack doesn't always show source info

[QC Description]
This is the call stack from the test case. The 3rd line is in "TCommonCustomForm.MouseMove", but it reads ":001fec21 FMX + $1FEC21"

Unit4.TForm4.Button1MouseLeave($1841A00)
FMX.Types.TControl.DoMouseLeave
:001fec21 FMX + $1FEC21
FMX.Platform.Mac.TFMXViewBase.mouseMoved(Pointer($DB2DC0) as NSEvent)
Macapi.ObjectiveC.DispatchToDelphi
:000f0046 Macapi + $F0046
:95c27fe0 ; /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
:95b40843 ; /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
:95ad44ff ; /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Macapi.ObjectiveC.DispatchToImport
:000f01ff Macapi + $F01FF
FMX.Platform.Mac.TPlatformCocoa.Run
:001ae743 FMX + $1AE743
Project8.Project8
QC Entry 96642
- create a new FMX HD app
- drop a TButton on the form
- give it an OnMouseLeave event like this:

procedure TForm1.Button1MouseLeave(Sender: TObject);
begin //BreakPoint here
//
end;

- add OS X platform
- switch on "Use Debug DCUs" in the Options window
- set the breakpoint in TForm1.Button1MouseLeave
- run on Mac
- click the window to activate the app
- move the mouse over the button, and back to the form again

Now you see the callstack which fails to mention TCommonCustomForm.MouseMove.
QC #: Date Reported: Area:
101506 12/2/2011 Debugger\Call Stack
Description: Steps:
[QC Short Description]
[x64] Invalid call stack trace

[QC Description]
Actual trace:
:000007FEFF6D37DE ; C:\Windows\system32\msvcrt.dll
:000000000012FB18 ; ???
:0000000002080000 ; ???
:0000000000000001 ; ???
:000000000040809D @NewUnicodeString + $2D
:00000000FFFFFFFF ; ???
PROGRAM.Test
PROGRAM.PROGRAM
It is obvious that return addresses like 0x0000000000000001 cannot appear in a valid call chain, that addresses annotated with "???" refer to uncommitted memory, and that System.NewUnicodeString is not actually called from Test.

Here is how Process Explorer displays the same trace:
msvcrt.dll!woutput_l+0x2d5
msvcrt.dll!vswprintf_l+0x59
test.exe+0x234c4
test.exe+0x265e4
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x1d

OS: Windows 7 x64 SP1
QC Entry 101506
{ 0. Make sure that the Win64 debugger is set to break on first-chance access violation notifications. 1. Run the test case under the Win64 debugger. 2. When the access violation happens, hit "Break" and take a look at the stack trace. } uses Windows, SysUtils; var Buffer: array[0..1024-1] of char; function vswprintf(const s, fmt: pchar; const args: pointer): integer; cdecl; external 'msvcrt.dll'; procedure Test; var dummy: cardinal; begin try vswprintf(Buffer, '[%s]', nil{<-- DELIBERATE}); WriteConsole(GetStdHandle(std_Output_Handle), @Buffer, lstrlen(Buffer), dummy, nil) except end end; begin {$apptype console} Test end.
QC #: Date Reported: Area:
102152 12/28/2011 Debugger\Interaction with IDE
Description: Steps:
[QC Short Description]
Debugger dont show errorlines

[QC Description]
When activating Range-Check in compiler option,
On FMX 64bit the debugger dont jump to lines with error.
On 32bit, debugger jump to the wrong line(e.g., last line of .dpr file).
QC Entry 102152
Create a new Firemonkey-HD-Projekt. On Form place 2 buttons and add the code: procedure TForm1.Button1Click(Sender: TObject); var i: integer; arr: array [0 .. 5] of integer; begin i := 8; arr[i]:= 3; end; procedure TForm1.Button2Click(Sender: TObject); var i: integer; begin i := StrToInt('sss'); end; add Target Win64. make sure Activate Range-Check in compiler option After showing the Messagebox with range message no line is selected. An ERangeError on Win32 will select the last line in project source, on Win64 also no line is selected. See sample.
QC #: Date Reported: Area:
100544 10/28/2011 Debugger\Execution
Description: Steps:
[QC Short Description]
x64: "Continue" after the first-chance notification works incorrectly when a breakpoint is involved

[QC Description]
When a breakpoint is set on the same address at which an exception is raised, the debugger always resumes the debuggee after the first-chance notification as if the exception has been handled, regardless of the debugger setting for that specific exception code. This causes an infinite string of first-chance exception notifications.

This happens because after the Step #4 the x64 debugger passes DBG_CONTINUE into WinAPI.ContinueDebugEvent, while it should pass DBG_EXCEPTION_NOT_HANDLED.

Without the breakpoint, it works as expected.
The x86 debugger works as expected with or without the breakpoint.
QC Entry 100544
1. Make sure that the x64 debugger is set to break on Access Violations, and that the "On resume" action is set to "Run unhandled". 2. Run the following programme under the x64 debugger, having placed a breakpoint on the commented line beforehand: -------8<------- uses SysUtils; begin int8(nil^) := 42 // <-- PLACE A BREAKPOINT HERE end. -------8<------- 3. After the breakpoint is hit, let the execution continue. 4. The first-chance exception notification dialog is shown; hit "Continue". Expected: The debuggee displays an error message and terminates. Actual: Another first-chance notification dialog is shown. Keep "Continuing".
QC #: Date Reported: Area:
101485 12/1/2011 Debugger\Execution
Description: Steps:
[QC Short Description]
[REGRESSION] ocx cause delphi to shut down in debug mode

[QC Description]
works fine outside the debuger

the error i recieve were
1. Access Violation ($C0000005)
2. illegal instructions ($C0000017)
3.Privileged Instruction ($C0000096)

same OCX works fine with 2009
QC Entry 101485
To register OCX on Windows 7 32bit/64bit, do the following
You must register as administrator (Run as) in order to register the OCX in win 7
1. place both files in a directory of your choice
2. in command screen type regsvr32 "<your directory>\EDWord.ocx"

3. build/install the package
- create new pkg
- import ocx(see attach) as ActiveX control
- component -- inport component into new package
- call the package edword_xe2
- make sure the import folder is in your library path
- compile and install

4. create new vcl project
5. drop the newly created component (TEDWord) on the form
6. run the progrom blowup.


QC #: Date Reported: Area:
101571 12/5/2011 Debugger\Local Variables View
Description: Steps:
[QC Short Description]
[x64] The data portion of the method pointer always appears as NIL

[QC Description]
Win32, OS X: Works as expected.
QC Entry 101571
{ 1. Set the breakpoint and run the test case under the Win64 debugger. 2. Look at "p" in the Local Variables view. Expected: (System.TObject.Free,$XXXX) Actual: (System.TObject.Free,nil) } procedure Test; var obj: TObject; p: procedure of object; begin obj := TObject.Create; p := obj.Free; with TMethod(p) do begin assert( Code = @TObject.Free ); assert( Data = obj ) end; p() // BREAKPOINT HERE end; begin Test end.
QC #: Date Reported: Area:
101567 12/5/2011 Debugger\Local Variables View
Description: Steps:
[QC Short Description]
[x64] Procedure pointer values are not displayed as identifiers

[QC Description]
Debug Inspector shows the same.
Win32, OS X: Works as expected.
QC Entry 101567
{ 1. Set the breakpoint and run the test case under the Win64 debugger. 2. Look at the value of "p" in the Local Variables view. Expected: PROGRAM.Test Actual: $XXXX } procedure Test(doNest: boolean = true); var p: procedure (doNest: boolean = false); begin p := Test; if doNest then p() // <-- BREAKPOINT HERE end; begin Test() end.
QC #: Date Reported: Area:
102370 1/5/2012 Debugger\CPU
Description: Steps:
[QC Short Description]
[x64] Unable to call 3-argument function in single-step mode

[QC Description]
[x64]
See attached project and screenshot. I tried to construct the simplest example possible for this bug.
First consider the unit TestFuncCall:

The function
function CallDoubleFunc( x:Double; func:Pointer ): Double;

serves to indirectly call a function func, passing to it the parameter x. The "Double" return value from func is passed through. func might be something like sin, exp, sqrt, or, in this example, the included function dmul2.

The second function,
type PDouble = ^Double;
procedure CallVDFunc( Y, X:PDouble; size:UInt64; func:Pointer );

does the same for two vectors X and Y whose size is given as the third argument.

While the first function can be followed in the CPU view in single-step mode, the second cannot. Instead, the debugger crashes with the message, "disconnected session".
Actually, it does correctly execute the first three commands of CallVDFunc, namely,

push rbp
sub rsp, $20
lea rbp, [rsp+$20]

Then, the cursor jumps to the next line,

call r9d

However, before one can actually execute this line, the crash occurs. After that, the debugger does not react any more. To restart, it is necessary to finish and re-start the whole RAD Studio.

Judging from the above and from the detailed messages visible in the screenshot, it seems that the debugger is only able to recognize a function passed as the first or the second argument, as in the first sample routine. In the second routine, the function comes fourth place, in r9, and it seems like the debugger cannot identify it, getting crazy about this.


QC Entry 102370
1) Open the project TESTFC.dproj. 2) Compile. 3) Hit F8 to perform single steps until you reach the second function call, CallVDFunc( @x, @x, 1, @VD_mul2 ); 4) Press Ctrl-Alt-C to switch into CPU view. 5) Repeatedly hit F7 to step into this function, until you reach the line where the debugger crashes. 6) Close and restart RAD Studio. 7) Perform steps 1), 2), 3) once more, but this time, stop at the first function call, x := CallDoubleFunc( 1, @dmul2 ); In contrast to the second one, this call poses no problems to the debugger.
QC #: Date Reported: Area:
102354 1/4/2012 Debugger\CPU
Description: Steps:
[QC Short Description]
[x64] cqo command incorrectly disassembled as cwd

[QC Description]
[x64]
The cqo command (sign-extension of rax into rdx) is correctly executed in the debugger. However, the disassembly calls it cwd (which is the sign-extension of the 16-bit register ax into dx).
QC Entry 102354
write the command cqo in any ASM file included in a Delphi64 .dcu.
QC #: Date Reported: Area:
101268 11/23/2011 Debugger\CPU
Description: Steps:
[QC Short Description]
[x64] CALL operands are shown as offsets, not identifiers

[QC Description]
Actual view:
test.dpr.13: Foo( Bar() )
000000000040A0F5 call $0000000000409910
000000000040A0FA mov ecx,eax
000000000040A0FC call $0000000000409900
test.dpr.14: end.
000000000040A101 call $0000000000406f60
Expected view (as seen with the Win32 debugger):
test.dpr.13: Foo( Bar() )
004050CC call Bar
004050D1 call Foo
test.dpr.14: end.
004050D6 call @Halt0

This is causing some real pain in real projects:
1) It's disorientating, even if the source lines are shown in the CPU view.
2) Debugging with full debug info but without the sources is next to impossible.
3) Even with the sources, procedures in nested calls are not easily distinguishable.
QC Entry 101268
{ 1. Place a breakpoint on the marked line and run the test case under the Win64 debugger. 2. When the breakpoint is hit, open the CPU view. 3. Notice that the next three CALL instructions are annotated with offsets instead of identifiers. } procedure Foo(const x: integer); begin end; function Bar: integer; begin end; begin Foo( Bar() ) // <-- place a breakpoint here end.
QC #: Date Reported: Area:
101449 11/30/2011 Debugger\CPU
Description: Steps:
[QC Short Description]
[x64] Memory operand of the selected instruction is not displayed

[QC Description]
... in the band on top of the disassembly; for the certain types of instructions.
QC Entry 101449
{ 0. Make sure that "Ignore non-user breakpoints" is off. 1. Run the test case under the Win32 debugger. When the breakpoint is hit, the CPU view shows (right above the disassembly) [value-of-EAX]=$00000007 Thread #xxxx for the selected instruction mov [eax],$0000002a 2. Run the test case under the Win64 debugger. Expected: for the selected instruction mov [rax],$0000002a the CPU view should show [value-of-RAX]=$00000007 Thread #xxxx Actual: Thread #xxxx } var X: integer = 7; procedure Test; asm {$if defined(CPUx64)} mov RAX, offset X int 3 mov [RAX], 42 {$elseif defined(CPUx86)} mov EAX, offset x int 3 mov [EAX], 42 {$else} {$message fatal 'Unknown CPU'} {$ifend} end; begin {$DebugInfo off} Test end.
QC #: Date Reported: Area:
100601 10/31/2011 Debugger\CPU
Description: Steps:
[QC Short Description]
Debugger does not recognise AES instructions

[QC Description]
The debugger does not know the Intel AES instruction set (i.e. instructions AESENC , AESENCLAST, AESDEC , AESDECLAST , AESIMC, AESKEYGENASSIST).
QC Entry 100601
Execute the following procedure and inspect the code in the debugger. procedure x; asm INT 3 AESENC xmm0, xmm3 AESENCLAST xmm3, xmm4 AESDEC xmm1, xmm4 AESDECLAST xmm3, xmm0 AESIMC xmm4, xmm5 AESKEYGENASSIST xmm2, xmm4, 2 end;
QC #: Date Reported: Area:
77064 11/19/2011 5:23:19 PM Debugger\CPU
Description: Steps:
REGRESSION: Garbled identifiers in the CPU view, caused by unit scope names

Actual view:
lea eax,[ebp-$04]
call System + $FA444510
mov ecx,[ebp-$04]
mov dl,$01
mov eax,[$00412488]
call Exception.Create
call System + $FA444504
Expected view (as seen with earlier Delphi versions):
lea eax,[ebp-$04]
call Bar
mov ecx,[ebp-$04]
mov dl,$01
mov eax,[$00405164]
call Exception.Create
call Foo

This is causing some real pain in real projects -- half of the names is garbled:
1) It's disorientating, even if the source lines are shown in the CPU view.
2) Debugging with full debug info but without the sources is next to impossible.
3) Procedures in nested calls are indistinguishable.
{
1. Place a breakpoint on the marked line and run the test case under the Win32 debugger.
2. When the breakpoint is hit, open the CPU view.
3. Notice how the routine names are garbled -- the debugger shows the first prefix in the unit scope name ("System" from "System.SysUtils" in this case) plus some offset.
}
program GarbledNames;

uses SysUtils;

procedure Foo(const obj: TObject);
begin
end;

function Bar: string;
begin
result := 'hello'
end;

procedure Test;
begin
Foo( Exception.Create( Bar() ) ) // <-- place a breakpoint here
end;

begin
Test
end.
QC #: Date Reported: Area:
101018 11/14/2011 Debugger\CPU
Description: Steps:
[QC Short Description]
x64: CALL and JMP QWORD PTR are disassembled as DWORD PTR

QC Entry 101018
{ Place a breakpoint on the marked line and run the programme under the x64 debugger. When the breakpoint is hit, switch to the CPU view and take a look at the CALL instruction. Expected: call qword ptr [rbx-$08] Actual: call dword ptr [rbx-$08] } {$D+} var obj: TObject; begin obj := TObject.Create; obj.Destroy // <-- place a breakpoint here end.
QC #: Date Reported: Area:
101526 12/4/2011 Debugger\CPU
Description: Steps:
[QC Short Description]
x64: movlps [mem], xmm0 disassembled incorrectly

[QC Description]
The line
movlps [rsi], xmm0
in an included assembler-written module is disassembled incorrectly as
movlps xmm0, [rsi]
However, execution is correct.
QC Entry 101526
By USc: - save and open the following program - set target platform to Win64 - put breakpoint on line 7 (movlps...) - F9 - CTRL+ALT+C to show CPU view expected: QC101526.dpr.7: movlps [rsi], xmm0 //<- break point here 0000000000409900 0F1306 movlps qword ptr [rsi], xmm0 actual: QC101526.dpr.7: movlps [rsi], xmm0 //<- break point here 0000000000409900 0F1306 movlps xmm0,qword ptr [rsi] program QC101526; {$APPTYPE CONSOLE} procedure TestMovlps; asm movlps [rsi], xmm0 //<- breakpoint here end; begin TestMovlps; end.
QC #: Date Reported: Area:
101440 11/30/2011 Debugger\Exceptions
Description: Steps:
[QC Short Description]
[x64] Repetitive language exception notifications

[QC Description]
When the RTL re-raises the same exception, of which the user has already been notified, the Win64 debugger issues subsequent notifications.
This is quite obnoxious and not how the Win32 debugger behaves.

Notice also how, for Win64, the presence of debug info affects the number of notifications -- this probably shouldn't be the case.

Actually, I imagine there are situations where such consecutive notifications could be useful, but there still should be a way to turn them off.
QC Entry 101440





In Win32, I got the following notification:
a. cDelphiException -> show dialog
b. cDelphiExcept
c. cDelphiExcept
d. cDelphiExcept
e. cDelphiUnhandled


In Win64, I got the following notification:
a. cDelphiException -> show except dlg
b. cDelphExcept
c. cDelphiReRaise -> internally, IDE set the re-raise flag
d. cDelphiException -> does not show except dlg (correct) because re-raise flag is set
e. cDelphiFinally
f. cDelphiTerminate -> internally, IDE clears the re-raise flag
g. cDelphiException -> show except dlg because re-raise flag is no longer set
h. cDelphiFinally
i. cDelphiTerminate
j. cDelphiException -> show except dlg
k. cDelphiFinally
l. cDelhpiTerminate
m. cDelphiUnhandled
{ 1. Make sure that "Notify on language exceptions" is enabled. 2. Run the test case under the Win32 debugger. You get only one exception notification. 3. Run the test case under the Win64 debugger. Expected: You get only one exception notification as well. Actual: You get THREE or FOUR notifications(*): one proper and the other two/three on re-raise. (*) You get three notifications when debug info is available, but four, if it isn't (no RSM generated/loaded). } uses SysUtils; type C = class constructor Create(const doRaise: boolean = false); end; constructor C.Create; begin if doRaise then raise Exception.Create('Oops'); // ONE C.Create(true) end; // TWO and THREE procedure Test; begin try C.Create except raise // FOUR end end; begin Test end.
QC #: Date Reported: Area:
287188 8/27/2011 8:12:03 PM AddOn
Description: Steps:
[FastReports] It's necessary to hide FastReport components for FireMonkey projects FastReport supports only VCL projects, so, it's necessary to hide FastReport components for all other projects.
Else compilation error occurs in unsupported ones.

For example:
1. Create a new FireMonkey HD application.
2. Add to the form a control from the FastScript or FastReport 4.0 or FastReport 4 exports tab.
3. Try to compile.

Notice an error is generated. Error message :
[DCC Fatal Error] fs_isysrtti.pas(24): F1026 File not found: 'Dialogs.dcu'

QC #: Date Reported: Area:
100654 11/2/2011 Internet\Controls\TWebBrowser
Description: Steps:
[QC Short Description]
[x64] TWebBrowser crashes the whole app in 64bit - FLOAT_DIVIDE_BY_ZERO exception

[QC Description]
[x64]
There is a critical bug in TWebBrowser when running in 64bit environment. As soon as some JS code is run it crashes the whole application with FLOAT_DIVIDE_BY_ZERO exception.

Notice, it runs perfect in 32bit environment.
QC Entry 100654
Option 1) Extract the attached zip and open the project and run Option 2) 1. Create a new VCL project 2. Add unit SHDocVw 3. Create an new form OnShow event and set it as below 4. Add a new 64bit platform to the project 5. Create the file test.html as explained below 6. Run the app (* This is a very simple reproduction code of a fatal TWebBrowser bug on x64 platform. Just create a TWebBrowser instance and navigate to test.html which contains: <html> <body onload="javascript:document.frmLogin.password.focus();"> <form name="frmLogin"> <table > <tr> <td ><b>Password:</b></td> <td><input type="password" maxlength="16" size="18" id="password" name="password"> </td> </tr> </table> </form> </body> </html> Once loaded the JS focus() call causes a fatal crash (FLOAT_DIVIDE_BY_ZERO exception) on x64 build. Notice that x86 build works perfect. *) procedure TMainForm.FormShow(Sender: TObject); Var WebBrowser: TWebBrowser; begin // Create TWebBrowser and align to form WebBrowser := TWebBrowser.Create(Self); TWinControl(WebBrowser).Parent := Self; WebBrowser.Align := alClient; // Load test.html which contains a simple JS focus() and causes FLOAT_DIVIDE_BY_ZERO exception WebBrowser.Navigate('file://' + ExtractFilePath(ParamStr(0)) + 'test.html'); end;
QC #: Date Reported: Area:
89662 11/14/2010 Internet\Indy
Description: Steps:
[QC Short Description]
generate IdUDPServer.onUDPRead event raise "Expected '>' but '.' found"

[QC Description]
Auto generated event code is:

procedure IdUDPServer1UDPRead(AThread: TIdUDPListenerThread;
AData: TArray<System.Byte>; ABinding: TIdSocketHandle);

But,the real function define is:
TUDPReadEvent = procedure(AThread: TIdUDPListenerThread; AData: TIdBytes; ABinding: TIdSocketHandle) of object;

if I press and hold 'Ctrl' key,and click the word 'TIdBytes',the code insight navigated me to here:
system.pas:
TArray<T> = array of T;
QC Entry 89662
1?Put a TIdUDPServer on a Form 2?Switch to 'Event' page on "object inspector" 3?Double click "onUDPRead" go exception: Expected '>' but '.' found
QC #: Date Reported: Area:
98751 9/10/2011 ActiveX\IDE\Import ActiveX Control/Type Library
Description: Steps:
[QC Short Description]
Import Component dialog problem

[QC Description]
Import Component | Import Type Library(the others are the same) | Select a Type Library Next | Class Name(s),click the ... button,in the 'class names' dialog the 'cancel' button act as the 'help' button.

Added by Sysop
<<<<
This is a regression. Delphi XE does not have this problem.
>>>>
QC Entry 98751
1 Import Component 2 Import Type Library | Import ActiveX Control | Import .NET Assembly 3 click 'Next' Button 4 click '...' button beside class name(s) 5 click 'cancel' button
QC #: Date Reported: Area:
102805 1/22/2012 ActiveX\IDE\Import ActiveX Control/Type Library
Description: Steps:
[QC Short Description]
Tlibimp: failing to import 64-bit typelibs with dependencies

[QC Description]
I'm working for a company that mostly develops code in C++. Central is a huge amount of COM servers and we have one developer here who also writes Delphi code on top of all this. At this moment we're porting all of our code to 64-bits and the Delphi code must come along too. Therefore we started working with the Delphi XE2 suite.

In the build process several TLBs are pulled in using the tlibimp tool. All went well, until we started a 64-bit only build on a clean build-pc. The trouble started with TLBs that had dependencies to other TLBs or DLLs which were also 64-bit.

After some investigating it seemed that all typelibs were neatly registered in both the 32- and the 64-bit registry. All guid-branches in the typelib part of the registry have a win64 branch. When I rename the 'win64' branch of the typelib that my typelib depends on to 'win32', the import succeeds when I do this in the 32-bit registry.

So my best guess is that there's something wrong with the lookup mechanism of the tool with regard to the depending libs. It seems that it only looks at the win32 branches in the 32-bit registry.

QC Entry 102805
Two IDL files for a testcase: coordinate.idl: [ uuid(A0A0A0A0-A0DE-11D4-A6AA-00C04F010BFD), version(1.0), helpstring("Coordinate 1.0 Type Library") ] library CoordinateLib { importlib("stdole32.tlb"); // IUnknown, etc. [ version(1.0), dual, oleautomation, helpstring("Interface ICoordinate"), uuid(A0A0A0A0-8FC7-4f33-9FDD-63F834B25634) ] interface ICoordinate : IDispatch { [propget, id(1), helpstring("property x")] HRESULT x([out, retval] DOUBLE* pVal); [propput, id(1), helpstring("property x")] HRESULT x([in] DOUBLE pVal); [propget, id(2), helpstring("property y")] HRESULT y([out, retval] DOUBLE* pVal); [propput, id(2), helpstring("property y")] HRESULT y([in] DOUBLE pVal); }; [ version(1.0), helpstring("CoCoordinate"), uuid(A0A0A0A0-44A7-4a63-AC59-420F4F1B5DAA) ] coclass CoCoordinate { [default] interface ICoordinate; }; }; linearmath.idl: [ uuid(A0A0A0A0-A45E-11D4-A6AA-00C04F010BFD), version(1.0), helpstring("LinearMath 1.0 Type Library") ] library LinearMathLib { importlib("stdole32.tlb"); // IUnknown, etc. importlib("coordinate.tlb"); [ version(1.0), dual, oleautomation, helpstring("Interface ICoordinate"), uuid(A0A0A0A0-8FE7-4f33-9FDD-63F834B25634) ] interface ILinearMath : IDispatch { [id(0x00000001)] double CalcDistanceBetween ( [in] ICoordinate* A, [in] ICoordinate* B ); }; [ version(1.0), helpstring("CoLinearMath"), uuid(A0A0A0A0-44A5-4a73-AC59-420F4F1B5DAA) ] coclass CoLinearMath { [default] interface ILinearMath; }; }; - Build typelibs from the IDLs, (Make sure you generate 64-bit TLBs. I used the 64-bit midl compiler from VS2010, because GenTLB.exe from EX2 only creates 32-bit TLBs.) - "c:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin64\TRegSvr.exe" coordinate.tlb (Check that the TLB is registered in the registry with a 'win64' part only.) - "c:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin\tlibimp.exe" -P linearmath.tlb
QC #: Date Reported: Area:
100457 10/25/2011 ActiveX\IDE\Import ActiveX Control/Type Library
Description: Steps:
[QC Short Description]
Delphi XE2 Importing ActiveX problems

[QC Description]
In XE2 the IDE does not generate suitable code based on the definitions in the type library, but Delphi 2010 does.
Sample code produced by XE2
{
procedure TMintController.Set_SentinelAction(nSentinelChannel: Smallint; Param2: Smallint);
begin
DefaultInterface.SentinelAction := (nSentinelChannel, Param2);
end;

procedure TMintController.Set_SentinelActionParameter(nSentinelChannel: Smallint; Param2: Smallint);
begin
DefaultInterface.SentinelActionParameter := (nSentinelChannel, Param2);
}
and here is the correct Delphi 2010 code
{
procedure TMintController.Set_SentinelAction(nSentinelChannel: Smallint; Param2: Smallint);
begin
DefaultInterface.SentinelAction[nSentinelChannel] := Param2;
end;

procedure TMintController.Set_SentinelActionParameter(nSentinelChannel: Smallint; Param2: Smallint);
begin
DefaultInterface.SentinelActionParameter[nSentinelChannel] := Param2;
}
QC Entry 100457
Menu selection Component|Import Component then Import ActiveX Control select "Mint Controls Build 5628" for example, set Palette Page and class names with Generate Component Wrappers checked, then Install to New Package, give package name and description, then (Minor problem here that the Next and Finish buttons are both disabled untill you give an unused name even though the package name has not been used successfiully) then click Finish. There is a prompt to add the Graphics unit, click yes then compiles with many errors.
QC #: Date Reported: Area:
98468 9/2/2011 ActiveX\Code Generators\Pascal
Description: Steps:
[QC Short Description]
Cleanup problem using 'out WideString' parameter on AppServer using MIDAS socket server

[QC Description]
When an 'out WideString' parameter is used in a custom method of the AppServer in a MIDAS implementation using socket server a strange error occurs when the cleanup code of System.Win.ComObj.DispatchInvoke is executed.

The problem seems to be in the cleanup of the VarParams variable.

If a Win32 client is used the debugger breaks on a 'int 3' instruction in NTdll.dll and after F9 the code continues. A Win64 client generates a C0000374 message on continuing.

Outside of the IDE (debugger) Windows indicates the application is closed unexpectedly...

An 'out Integer' parameter seems to work well.
QC Entry 98468
See attached project. Remember to register the server as an admin and also run ScktSrvr.exe as admin.
QC #: Date Reported: Area:
101123 11/17/2011 Midas\TClientDataSet
Description: Steps:
[QC Short Description]
TClientDataSet.Filter with LIKE

[QC Description]
In uses clause, I put MidasLib,
Access violation at address 76F093A9 in module 'msvcrt.dll'. Read of address FC010262.

This error occur when filtering with:
Name LIKE 'aaaa1'

Added by Sysop
<<<<<
In case of using 'midas.dll', Access violation at address 4DB2DCFD in module 'midas.dll'. Read of address FC01063E.
>>>>>


In uses clause I put MidasLib because for me Midas.dll v16 is not registered by XE2 installer and to be sure that v16 is used.
I can not test with 64-bit because: File not found 'midas64.res'

QC Entry 101123
Using Midas ver.16 ClientDataSet1.FieldDefs.Clear; ClientDataSet1.FieldDefs.Add('Name', ftString, 20); ClientDataSet1.CreateDataSet; ClientDataSet1.AppendRecord(['aaaa']); ClientDataSet1.AppendRecord(['aaaa1']); ClientDataSet1.Filter := 'Name LIKE ''aaaa1'''; ClientDataSet1.Filtered := True; // Access Violation occurs
QC #: Date Reported: Area:
100532 10/28/2011 Compiler
Description: Steps:
[QC Short Description]
CGRC.exe fails on some enviroments

[QC Description]
CGRC.exe contains bug of missing quotes for spaces in file names.

This is the reason for http://qc.embarcadero.com/wc/qcmain.aspx?d=96020 and https://forums.embarcadero.com/message.jspa?messageID=393399

See attached cgrc_log.csv for proof. Near the end of the log you can notice that CGRC.exe tries to access "C:\Program" file - which clearly indicates a bug in CGRC.exe: missing quotes in full file name when it tries to run the "C:\program files(x86)\embarcadero\rad studio\9.0\bin\rc.exe" file. Without quotes system tries to run "C:\program" file with "files(x86)\embarcadero\rad studio\9.0\bin\rc.exe" as the argument.

See steps to reproduce for reproducing this bug. I'm not sure about exact conditions here. I was able to reproduce it on Delphi XE and XE2 and also on WinXP SP3 x32 and Windows 7 SP1 x64.

It seems that CGRC.exe works OK if there is a short file name available for "program files" and "RAD Studio" folders and/or CGRC.exe itself was launched via short name.

Correct code to run rc.exe from CGRC.exe should be as follows:

Application := 'c:\program files(x86)\embarcadero\rad studio\9.0\bin\rc.exe';
Params := ' -c65001 "Project8.vrc" -foProject8.res -v';
CmdLine := Format('"%s" %s', [Application, Params]);
CreateProcess(PChar(Application), PChar(CmdLine), ...);

Note using first parameter for CreateProcess and quotes in CmdLine. Please, apply this fix for CGRC.exe.
QC Entry 100532
1. Unpack attached demo to folder which doesn't contain spaces in its name, like "C:\Example". 2. Edit TestFail.bat - change path to CGRC.exe according to your system (if needed). 3. Run TestFail.bat. Expected: Project8.res appears. Actual: cgrc.exe fails with this message: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Example\Fail>testfail C:\Example\Fail>call "c:\program files (x86)\embarcadero\rad studio\9.0\bin\rsvars.bat" C:\Example\Fail>"c:\program files(x86)\embarcadero\rad studio\9.0\bin\cgrc.exe" -c65001 "Project8.vrc" -foProject8.res -v CodeGear Resource Compiler/Binder Version 1.2.0 Copyright (c) 2008-2010 Embarcadero Technologies Inc. Error: Unable to invoke c:\program files (x86)\embarcadero\rad studio\9.0\bin\\rc.exe 4. Run TestWorkaround.bat 5. Expected and actual: compilation will be succeded. As you can see the only difference between fail and success cases is that success case uses cgrc.exe and rc.exe located in the folder without spaces. (note: fail at step 3 may depend on your enviroment - see details in general description)
QC #: Date Reported: Area:
101656 12/8/2011 Compiler\Delphi
Description: Steps:
[QC Short Description]
Internal error when comparing thread vars of floating point type

[QC Description]
The compiler emits

[DCC Fatal Error] ThreadVarBug.pas(18): F2084 Internal Error: URW2426

when comparing thread vars of floating point type.
QC Entry 101656
Add the following unit to a Delphi project. unit ThreadVarBug; interface implementation threadvar a, b: Double; procedure F2084InternalErrorURW2426; begin if a>b then ; end; end. The internal error will be produced for any floating point type, Single, Double, Extended. The 64 bit compiler does not show the problem and compiles the code without error.
QC #: Date Reported: Area:
102356 1/4/2012 Compiler\Delphi
Description: Steps:
[QC Short Description]
Internal Compiler Error when you assign an open array parameter to TValue.From<T>

[QC Description]
If you try to assign open array parameter to TValue.From<T> and then compile,
you receive ICE: [DCC Fatal Error] XXXXX.dpr(20): F2084 Internal Error: AV068DACB9-R00000000-0
QC Entry 102356
1) Create empty console project: -------------- program xe2_bug_tValue_from__openArray; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, rtti; function foo(a: array of TValue): TValue; begin result := TValue.From(a); end; begin end. -------------- 2) Compile the project You receive: [DCC Fatal Error] xe2_bug_tValue_from__openArray.dpr(20): F2084 Internal Error: AV068DACB9-R00000000-0
QC #: Date Reported: Area:
100538 10/28/2011 Compiler\Delphi
Description: Steps:
[QC Short Description]
F2048 internal error: C5906

[QC Description]
see steps
QC Entry 100538
Simplified version by USc: - dccosx QC100538.dpr expected : it compiles actual: QC100538.dpr(19) Fatal: F2084 Internal Error: C5904 program QC100538; {$APPTYPE CONSOLE} type NSSize = record width: Single; height: Single; end; CGSize = NSSize; function CGDisplayScreenSize: CGSize; cdecl; external 'lib' name 'name'; procedure Test; var S: Single; begin S := CGDisplayScreenSize.height / 72; end; begin WriteLn('PASS'); // on compile end. Original steps: - create a new console app - add OS X platform - paste this code: program Project1; {$APPTYPE CONSOLE} {$R *.res} uses Macapi.CoreGraphics; var i: integer; begin i := Round(CGDisplayScreenSize(CGMainDisplayID).height / 72); end. - build Now the error appears.
QC #: Date Reported: Area:
101907 12/19/2011 2:51:06 PM Compiler\Delphi
Description: Steps:
Salesforce support case 00238887, QC 101907

An executable project is dependent on Package 2, which is dependent on Package 1. If a change is made to package 1, which is rebuilt and then the Executable is built, the following compiler error is generated:

Compiler Error F2084 Internal Error: U10725
1. Unzip the attached project.
2. Build all projects in the group.
3. Change the signature of Dosomething in Package1.Unit1 from

function DoSomething() : string;

to

function DoSomething() : string; virtual;

4. Build Package1.
5. Build App.

Compiler error is generated
QC #: Date Reported: Area:
98621 9/6/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
[x64] JE/JMP instructions missing from compiled routine

[QC Description]
[x64]
Created the following simple in-line assembler routine. When compiling in 64 bit mode, the JE instruction is missing from the object code causing logic issues.

On the basis that this is an optimization error, I turned optimization off in the compiler options and then got a fatal internal error from the compiler
----------
...
...
36: done:
37: nop
38: end;
39:
40: procedure TForm1.Button1Click(Sender: TObject);
...
...

[DCC Fatal Error] Unit1.pas(38): F2084 Internal Error: NI16392
----------
QC Entry 98621
create an in-line routine like this...compile and test: function Cmp(A, B: longint): integer; label equal, done; asm CMP A,B JE equal mov @Result, 1 jmp done equal: mov @Result, 0 done: nop end; procedure TForm1.Button2Click(Sender: TObject); begin ShowMessage(IntToStr(Cmp(10,11))); end;
QC #: Date Reported: Area:
99023 9/18/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
64-bit compiler generates bad RIP-relative addresses for some addressing modes

[QC Description]
The current compiler generates an incorrect address for instructions of the form:

mov GlobalVar, ImmediateValue

The generated code uses RIP-relative addressing as expected, but the offset is incorrect.

See the attached test case for an example.

//USc: That blocks FastMM x64 BASM version.
QC Entry 99023
1) Compile the attached test case with the 64-bit compiler 2) Run it Expected: All tests return "PASS" Actual: Some tests return "FAIL" Slightly modified version by USc: - dcc64 AddressGenBugV2.dpr - execute AddressGenBugV2 expected: output is PASS actual: output is FAIL #1 FAIL #2 FAIL #3 FAIL #7 FAIL #8 FAIL #9 FAIL program AddressGenBugV2; {$APPTYPE CONSOLE} var Counter: Integer = 0; AGlobal1: Byte; AGlobal2: Word; AGlobal3: Cardinal; AGlobal4: Byte; AGlobal5: Word; AGlobal6: Cardinal; AGlobal7: Byte; AGlobal8: Word; AGlobal9: Cardinal; AGlobal10: Byte; AGlobal11: Word; AGlobal12: Cardinal; procedure RunTest; asm mov AGlobal1, 1 mov AGlobal2, 2 mov AGlobal3, 3 mov al, 4 mov AGlobal4, al mov ax, 5 mov AGlobal5, ax mov eax, 6 mov AGlobal6, eax mov [AGlobal7], 7 mov [AGlobal8], 8 mov [AGlobal9], 9 lea rax, AGlobal10 mov byte ptr [rax], 10 lea rax, AGlobal11 mov word ptr [rax], 11 lea rax, AGlobal12 mov dword ptr [rax], 12 end; procedure EvaluateTestResult(ATestPassed: Boolean; ATest: Integer); begin if ATestPassed then Inc(Counter) else WriteLn('FAIL #', ATest); end; begin RunTest; EvaluateTestResult(AGlobal1 = 1, 1); EvaluateTestResult(AGlobal2 = 2, 2); EvaluateTestResult(AGlobal3 = 3, 3); EvaluateTestResult(AGlobal4 = 4, 4); EvaluateTestResult(AGlobal5 = 5, 5); EvaluateTestResult(AGlobal6 = 6, 6); EvaluateTestResult(AGlobal7 = 7, 7); EvaluateTestResult(AGlobal8 = 8, 8); EvaluateTestResult(AGlobal9 = 9, 9); EvaluateTestResult(AGlobal10 = 10, 10); EvaluateTestResult(AGlobal11 = 11, 11); EvaluateTestResult(AGlobal12 = 12, 12); if Counter = 12 then WriteLn('PASS') else WriteLn('FAIL'); end.
QC #: Date Reported: Area:
98412 8/31/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
[x64] BASM64: Wrong codegen for JRCXZ conditional jump

[QC Description]
[x64]
In early Pulsar versions, JRCXZ was incorrectly called JECXZ (QC 92632). This was fixed, but instead the JRCXZ instruction now generates incorrect code, affecting the branching of BASM code (Very Bad!)

QC Entry 98412
The following fails on Win64: program TestX64; {$APPTYPE CONSOLE} function CheckJRCXZ: boolean; asm xor ecx, ecx mov al, TRUE {$IFDEF CPUX64} jrcxz @Exit //Codegen: E002 loopne $0000000000426cc8 <--- WRONG //Correct would be: //db 0E3h, 02h {$ELSE} jecxz @Exit //E302 jcxz $0041b5c8 (CORRECT) {$ENDIF} mov al, FALSE @Exit: end; begin if CheckJRCXZ=true then writeln ('PASS') else writeln ('FAIL'); readln; end.
QC #: Date Reported: Area:
100184 10/18/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
[x64] Invalid register combination error

[QC Description]
When using inline asm, the compiler (64-bit Windows target) stops at the line "INC RCX" with an "Invalid register combination" error.

[DCC Error] Unit1.pas(64): E2112 Invalid register combination
QC Entry 100184
Add this function to a project: procedure FPUSwap(const Source,Dest;Count:NativeInt); asm MOV RAX,Source // main (16 bytes) MOV RCX,Count SHR RCX,4 JRCXZ @Remainder @Loop: // read FILD QWORD PTR [RAX] FILD QWORD PTR [RAX+8] FILD QWORD PTR [RDX] FILD QWORD PTR [RDX+8] // write FISTP QWORD PTR [RAX+8] FISTP QWORD PTR [RAX] FISTP QWORD PTR [RDX+8] FISTP QWORD PTR [RDX] ADD RAX,16 ADD RDX,16 DEC RCX JNZ @Loop // remainder @Remainder: MOV RCX,Count AND RCX,$F JZ @TheEnd PUSH RBX ADD RAX,RCX ADD RDX,RCX NEG RCX @LoopRemainder: MOV BL,[RAX+RCX] MOV BH,[RDX+RCX] MOV [RDX+RCX],BL MOV [RAX+RCX],BH INC RCX JNZ @LoopRemainder POP RBX @TheEnd: end;
QC #: Date Reported: Area:
98616 9/6/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
PADDW MM2,[R8] -> PADDW MM2,[RAX]

[QC Description]
While doing some more work on the GR32 library (mainly assembler optimizations for the x64 platform) I found that:

The BASM compiler seems to translate the opcode

PADDW MM2,[R8]

to

PADDW MM2,[RAX]

This is very annoying, because these issues are hard to find.



Also, it seems as if

MOVD MM0, ECX

is translated to

MOVQ MM0, ECX

(see example)
QC Entry 98616
Steps by USc: - dcc64 QC98616.dpr - execute QC98616 expected: output is PASS actual: output is FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 00000000004251CB in module 'QC98616.exe'. Read of address 0000000000000012 See under the debugger that MOVD MM0, ECX MOVD MM1, EDX PADDW MM0, [R8] MOVD EAX, MM0 aren't encoded incorrectly program QC98616; {$APPTYPE CONSOLE} uses System.SysUtils; {.$DEFINE FIXED_MANUALLY} {$IFDEF CPUX64} function ADD_MMX(A, B: Integer; Data: Pointer): Integer; asm {$IFDEF FIXED_MANUALLY} DB $0F, $6E, $C1 //MOVD MM0, ECX DB $0F, $6E, $CA //MOVD MM1, EDX PADDW MM0, MM1 DB $41, $0F, $FD, $00 //PADDW MM0, [R8] DB $0F, $7E, $C0 //MOVD EAX, MM0 {$ELSE} MOVD MM0, ECX //encodes as 480F6EC1 -> should be 0F6EC1 MOVD MM1, EDX //encodes as 480F6ECA -> should be 0F6ECA PADDW MM0, MM1 PADDW MM0,[R8] //encodes as 0FFD00 -> should be 410FFD00 MOVD EAX,MM0 //encodes as 480F7EC0 -> should be 0F7EC0 {$ENDIF} end; var A, B: Integer; begin try A := 1; B := 2; if ADD_MMX(A, B, @A) = 4 then WriteLn('PASS') else WriteLn('FAIL'); except on E: Exception do begin Writeln('FAIL - Exception Error'); WriteLn(' ClassName=', E.ClassName); WriteLn(' Message=', E.Message); end; end; {$ELSE} begin WriteLn('PASS') {$ENDIF} end. Original steps: Given the following procedure: function ADD_MMX(A, B: Integer; Data: Pointer): Integer; asm MOVD MM0, ECX MOVD MM1, EDX PADDW MM0, MM1 PADDW MM0,[R8] MOVD EAX,MM1 end; You will get an exception as soon as you call it with any data, like: var A, B: Integer; begin a := 1; b := 2; if ADD_MMX(A, B, @A) <> 4 then raise Exception.Create('Error'); end;
QC #: Date Reported: Area:
100602 10/31/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
BASM x64 does not know JECXZ instruction

[QC Description]
BASM correctly accepts the JRCXZ instruction on x64 (which should be encoded as E3 cb [but isn't - this is covered in another QC report]). However, in addition, also JECXZ should be available on x64 (67 E3 cb ; i.e. with 67h address-size operrride).

Reference:
Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volumes 1 and 2A.

See also discussion here:
https://forums.embarcadero.com/thread.jspa?threadID=62246
QC Entry 100602

Per Uwe Schuster: Related to 287358
test the following program on Win64: program test; {$APPTYPE CONSOLE} function JECXZ_ok: boolean; asm mov rcx, 1111111100000000h mov eax, 1 jecxz @Out //<- NOT RECOGNISED. SHOULD BE: db 67h, 0E3h, 02h xor eax, eax @Out: end; begin if JECXZ_ok then writeln ('PASS') else writeln ('FAIL'); end.
QC #: Date Reported: Area:
99005 9/17/2011 Compiler\Delphi\BASM
Description: Steps:
[QC Short Description]
64-bit compiler accepts invalid BASM, generating non-functional machine code

[QC Description]
The 64-bit compiler currently correctly returns error E2577 when attempting to compile the following code:

mov al, [IsMultiThread + rax * 2]

The code below is equally invalid, but the compiler accepts it and consequently generates bad machine code:

mov al, [IsMultiThread + rax]

In both cases above the compiler should return an E2577 error.
QC Entry 99005

(JJS: See comments)
Attempt to compile the attached test case with the 64-bit compiler. Note that the first BASM example compiles, but the second does not. Neither should be compiling. program BASMCompilerBug; {$APPTYPE CONSOLE} procedure Test; asm xor rax, rax mov al, [IsMultiThread + rax] //this should not compile, but does xor rax, rax mov al, [IsMultiThread + rax * 2] //this should not compile end; begin Test; end.
QC #: Date Reported: Area:
102395 1/6/2012 Compiler\Delphi\Code Generation/Optimization
Description: Steps:
[QC Short Description]
Initialization of a class fields

[QC Description]
The problem arises at confluence of three circumstances:
1. Usage inline directives;
2. Usage generics;
3. Implementation of classes is in different units.

In a method "Proc1" to a class field "Enum" there is a reversal to the wrong address (the attached archive with examples see).

In a method "Proc1": "Enum" in 00423ED4 address (that is wrong).
And in a method "Proc2": "Enum" in 00423ED0 address (and it is correct).

Please see [Steps], [Comment] of QC for more details.
QC Entry 102395
I run attached code. I get result as below ----- Enum = 0 // default value Enum = 1 // new value Enum = 0 (at address 00417E7C) // Proc1 call Enum = 1 (at address 00417E78) // Proc2 call ----- If I remove 'inline' directive from Proc1, I get this result. This is expected/correct result. ----- Enum = 0 // default value Enum = 1 // new value Enum = 1 (at address 00417E78) // Proc1 call Enum = 1 (at address 00417E78) // Proc2 call ----- program Project1; {$APPTYPE CONSOLE} uses SysUtils, Unit1 in 'Unit1.pas', Unit2 in 'Unit2.pas'; begin Writeln(Format('Enum = %d // default value', [Byte(TSomeClass2.Enum)])); TSomeClass2.Enum := sEnum2; Writeln(Format('Enum = %d // new value', [Byte(TSomeClass2.Enum)])); TSomeClass2.Proc1; TSomeClass2.Proc2; Readln; { Result: Enum = 0 // default value Enum = 1 // new value Enum = 0 (at address 00423ED4) // Proc1 call - Expected '1', but the actual '0'! Enum = 1 (at address 00423ED0) // Proc2 call } end. unit Unit1; interface uses SysUtils; type TSomeEnum = (sEnum1, sEnum2); TSomeClass1<R> = class public class var Enum: TSomeEnum; class procedure Proc1; inline; end; implementation class procedure TSomeClass1<R>.Proc1; begin Writeln(Format('Enum = %d (at address %p) // Proc1 call', [Byte(Enum), @Enum])); end; end. unit Unit2; interface uses SysUtils, Unit1; type TSomeClass2 = class(TSomeClass1<Integer>) public class procedure Proc2; end; implementation class procedure TSomeClass2.Proc2; begin Writeln(Format('Enum = %d (at address %p) // Proc2 call', [Byte(Enum), @Enum])); end; end.
QC #: Date Reported: Area:
102346 1/4/2012 Compiler\Delphi\Code Generation/Optimization
Description: Steps:
[QC Short Description]
inline function calling other inline function causes crash

[QC Description]
Check the attached test project.

The function DoKillSubVoice is inline. The second parameter is an item from the VoiceList object, which is retrieved with the inline TQuickList.Get function.

As shown by the disassembly, it uses the inlined Get function whenever the Voice variable is accessed in DoKillSubVoice.

This causes a crash when the Voice pointer is removed from the list becfore being disposed itself, which happens in this function.

It's possible to work around this issue in various ways, but it should work like this too. This is even more important with XE2's "auto inline" compiler option.

For what it's worth, this also happens in Delphi 2007.
QC Entry 102346
1. run the test project 2. click the "Add" button at least twice 3. click "Kill all voices" There will be an "Invalid pointer" exception.
QC #: Date Reported: Area:
101826 12/15/2011 Compiler\Delphi\Code Generation/Optimization
Description: Steps:
[QC Short Description]
[REGRESSION] Getting address of a virtual method crashes on old-style object.

[QC Description]
The compiler doesn't locate the VMT table correctly (the object field offset isn't applied).

Tested on:
- Delphi 5: OK
- Delphi 6: OK
- Delphi 2010: bug
- Delphi XE2: bug
QC Entry 101826
Compile and run this sample: program TestObject; {$APPTYPE CONSOLE} type T_Ptr_O_Test = ^T_O_Test; T_O_Test = object private FInt: integer; public constructor Init; procedure DoDynamic; virtual; end; { T_O_Test } constructor T_O_Test.Init; begin end; procedure T_O_Test.DoDynamic; begin Writeln('Hello world.'); end; var LPObj: T_Ptr_O_Test; LProc: procedure of object; begin New(LPObj, Init); LPObj^.DoDynamic; LProc := LPObj^.DoDynamic; //Access violation FreeMem(LPObj); readln; end.
QC #: Date Reported: Area:
99069 9/19/2011 Compiler\Delphi\Code Generation/Optimization
Description: Steps:
[QC Short Description]
[x64] Imporoper exit codegen on safecall procdures

[QC Description]
[x64]
Calling exit left some things unwinded as a result COM interope can cause errors

On RTM, DCC64 only
Will try to prapre a sample but it is somhow difficult to extract proper part from the code.

Take a look

procedure Test( _dummy : Integer ) ;
begin
exit ;
end ;

procedure Test( _dummy : Integer ) ; safecall ;
begin
exit ;
end

An compare how differnet exit is treated.
QC Entry 99069
If exist is called in a following procedure: procedure test( dummy : Integer ) ; safecall ; begin exit ; end; Then lines 000000000059AA9E line is never executed (but should be!) Generally proecedure "end" should start 000000000059AA9E Unit7.pas.26: begin 000000000059AA90 55 push rbp 000000000059AA91 4883EC10 sub rsp,$10 000000000059AA95 488BEC mov rbp,rsp 000000000059AA98 894D20 mov [rbp+$20],ecx 000000000059AA9B 90 nop Unit7.pas.27: exit ; 000000000059AA9C EB08 jmp $000000000059aaa6 000000000059AA9E C7450800000000 mov [rbp+$08],$00000000 000000000059AAA5 90 nop Unit7.pas.28: end; 000000000059AAA6 8B4508 mov eax,[rbp+$08] 000000000059AAA9 488D6510 lea rsp,[rbp+$10] 000000000059AAAD 5D pop rbp 000000000059AAAE C3 ret
QC #: Date Reported: Area:
101221 11/22/2011 Compiler\Delphi\Linker
Description: Steps:
[QC Short Description]
[x64] Delphi linker does not align IMAGE_THUNK_DATA in the PE image

[QC Description]
... whereas the Microsoft linker does.
Let's take a look at how DCC64 arranges the IDATA section. The following map is for two imported DLLs with three imported functions; all records are emitted one after another, without gaps:
---
00: IMAGE_IMPORT_DESCRIPTOR for DLL0 (20 bytes)
20: IMAGE_IMPORT_DESCRIPTOR for DLL1
40: IMAGE_IMPORT_DESCRIPTOR filled with zeroes
// <-- here the linker should emit 4 zero bytes, so the next thunk data would be at the qword-aligned offset 64
60: IMAGE_THUNK_DATA for DLL0 func0 (8 bytes)
68: IMAGE_THUNK_DATA for DLL0 func1
76: IMAGE_THUNK_DATA filled with zeroes
84: IMAGE_THUNK_DATA for DLL1 func0
92: IMAGE_THUNK_DATA filled with zeroes
100: a copy of the above array of IMAGE_THUNK_DATA
140: DLL and function names
---
From this picture, it should be obvious that the alignment of all IMAGE_THUNK_DATAs solely depends on the number of imported DLLs. Should this number be odd, you'd be fine; should it be even, you'd be screwed: all calls to statically imported DLL functions would go via misaligned qwords.

In the same situation, the Microsoft linker always aligns IMAGE_THUNK_DATA properly, inserting zero bytes where it's necessary.
QC Entry 101221
NB: In order to obtain the complete control over the content of the IDATA section and to simplify the analysis of the generated executable, the test program does not use the Delphi RTL. Instructions for the attachment: 1. Run makeSystem.bat to make the ersatz-RTL. 2. Run makeTest.bat to make the test case. 3. Run Test.exe to observe two "FAIL" messages. 4. Uncomment the call to DefeatSmartLinker to make the number of imported DLLs odd. 5. Make and run the test case again to observe two "PASS" messages. ----------8<---------- program Test; {$SetPEFlags 1} {$PointerMath on} // the import thunk -- the JMP PTR QWORD [rel xxxxxxxx] instruction type JMPptr = packed record Opcode: word; // FF 25 Rel: integer end; type PJMPptr = ^JMPptr; // returns IMAGE_THUNK_DATA for the specified import thunk function AddressOfImageThunkData(const pImportThunk: PJMPptr): nativeuint; begin // todo: x64-specific result := nativeuint(pImportThunk+1) + pImportThunk.Rel end; // makes sure that IMAGE_THUNK_DATA is aligned procedure Validate(const pImportThunk: PJMPptr; const s: pchar); begin if AddressOfImageThunkData(pImportThunk) mod sizeof(pointer) = 0 then alert('PASS: aligned', s) else alert('FAIL: MISALIGNED', s) end; // the parameter list and the calling convention do not matter: we never call this one procedure HACK; external 'gdi32.dll' name 'DeleteObject'; // forces the linker to include the symbol procedure DefeatSmartLinker(const p: pointer); begin end; begin // uncomment this to force the proper alignment in the IDATA section //DefeatSmartLinker(@HACK); Validate(@MessageBoxW, 'MessageBoxW'); Validate(@ExitProcess, 'ExitProcess') end. ----------8<----------
QC #: Date Reported: Area:
80818 1/4/2010 Compiler\Delphi\Errors - Warnings
Description: Steps:
[QC Short Description]
[DCC Fatal Error] F2092 Program or unit '.xyz' recursively uses itself

[QC Description]
This error occurs sporadically when compiling a package that contains a unit with the same name as the package itself (i.e. xyz.dpk contains xyz.pas).

Building the package may work, while compiling it does not.
QC Entry 80818
The error may not be consistently reproducible, but it occurs when a unit 'xyz.pas' has been added to a package 'xyz.dpk'.
QC #: Date Reported: Area:
100735 11/4/2011 Compiler\Delphi\Exceptions
Description: Steps:
[QC Short Description]
[x64] Access Violation in try-finally/try-except statement

[QC Description]
[x64]
This is a simple (and stupid) unit of code wrote for delphi XE2 (win64) to explain the problem:

TForm1 = class(TForm)
Button1: TButton;
ComboBox1: TComboBox;
procedure Button1Click(Sender: TObject);
private
function Test(AText: string): string;
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

function CiaoFunc: string;
begin
Result := 'ciao';
end;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
s: string;
begin
try
s := 'hello';
Test( CiaoFunc );
Exit;
finally
try
ComboBox1.ItemIndex := 0;
except
end;
end;
end;

function TForm1.Test(AText: string): string;
begin
Result := AText;
end;

The Button1Click procedure event generates an ACCESS_VIOLATION exception in win64 execution, but not in win32 execution. Does anyone know explain why?
QC Entry 100735
Please build/run attached project in x64. -------- ... procedure TForm1.Button1Click(Sender: TObject); var s: string; begin try s := 'hello'; Test( CiaoFunc ); Exit; finally try ComboBox1.ItemIndex := 0; except end; // <<<---- Access Viaolation occurs!! end; end; ... --------
QC #: Date Reported: Area:
100562 10/28/2011 Compiler\Delphi\Exceptions
Description: Steps:
[QC Short Description]
[x64] Runtime error 216 by reproducing(re-throwing) exception in 64-bit DLL

[QC Description]
[x64]
Runtime error 216 (access violation) occurs and the 64-bit application crashes when linked DLL reproduces(re-throw,re-raise) an exception. For example, following Case1 works correct but Case2 results in the application crash.

Case1:
begin
Abort;
end;

Case2:
begin
try
Abort;
except
raise;
end;
end;

Added by Sysop
<<<<
all types of exceptions, which I tried, caused the phenomenon.
>>>>

This phenomenon does not appear in following conditions.
- Not within DLL
- 32-bit build (doesn't care of execution platforms: 32-bit Windows or WOW64)
QC Entry 100562
1. Extract 2 test projects, DLLExceptTrapTest and TestDLL, from the attachment. 2. Build both using Delphi XE2 update 1, in Win64 platform and Release mode. The attached .exe and .dll are both built in the above condition. Addd by Sysop <<<< The phenomenon appears also with Debug mode binaries. >>>> 3. Put DLLExceptTrapTest.exe and TestDLL.dll into the same directory, which is created on a 64-bit Windows 7. 4. Start DLLExceptTrapTest.exe and click Test1/Test2 buttons. Actual: Test2 button click causes an error dialog indicating runtime error 216. After clicking the OK button, running DLLExceptTrapTest.exe crashes. Expected: 'TMainForm.TestB E' message appears in the console window with the application. [TestDLL] ----------- library TestDLL; uses SysUtils; procedure ExportA; stdcall; begin WriteLn('ExportA 1'); {<=======} Abort; WriteLn('ExportA 2'); {<=======} end; procedure ExportB; stdcall; begin WriteLn('ExportB 1'); {<=======} try Abort; except raise; end; WriteLn('ExportB 2'); {<=======} end; exports ExportA name 'ExportA', ExportB name 'ExportB'; begin end. -----------
QC #: Date Reported: Area:
103015 1/30/2012 Compiler\Delphi\Version resilience
Description: Steps:
[QC Short Description]
DCU incompatibility (since Update 4 beta 3)

[QC Description]
According to Uwe Schuster, "the breaking change seems to be between Beta 2 (4387) and Beta 3 (4399)".
QC Entry 103015
In the attachment: 1) FastMM4.dcu, compiled by DCC32 from Update 4 beta 1 (16.0.4372.45897.2); 2) test.dpr, using FastMM4. An attempt to compile test.dpr using DCC32 from Update 4 beta 3 (16.0.4399.46403) is expected to succeed, however the compiler reports: F2051 Unit FastMM4 was compiled with a different version of System.@LStrLen The signature (and the implementation) of System._LStrLen seems to be the same.
QC #: Date Reported: Area:
101683 12/9/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
Regression: Spring Framework for Delphi fails to compile on XP

[QC Description]
When trying to compile spring4delphi (get it from http://code.google.com/p/delphi-spring-framework/source/checkout) revision r391 I get [DCC Fatal Error] Spring.Collections.Base.pas(241): F2084 Internal Error: AV053A2CBC-R00016B77-0.

Look also https://forums.embarcadero.com/thread.jspa?threadID=64592 for several attempts to locate that bug on different configurations. It seems to be related to Windows XP only.

{ USc: This is regression that happend between build 4329 (revision 45019; Update #3 Beta 1) and 4339 (revision 45321; Update #3 Beta 2).

When putting the code into the project source I see that it fails already with Fulcrum U#1 (nothing lower tested), but the AV's data changed between build 4329 and 4339
< 4339: QC101683.dpr(20) Fatal: F2084 Internal Error: AV0044B8F4-R00000015-0
>= 4339: QC101683.dpr(20) Fatal: F2084 Internal Error: AV0044B93C-R00023448-0

When compiling only the unit the issue occurs only with dotted file names:
- Base.pas: compiles
- Collections.Base.pas: Collections.Base.pas(20) Fatal: F2084 Internal Error: AV0044B93C-R0001BCC8-0
- Spring.Collections.Base.pas: Spring.Collections.Base.pas(20) Fatal: F2084 Internal Error: AV0044B93C-R00016B77-0

The AV's data portion seems to be related to the file name as this changes when you change the filename }
QC Entry 101683
By USc: - dcc32 QC101683.dpr expected: it compiles actual: on Vista x64: it compiles (per Tagawa-San) on Win 7 x64: it compiles on XP: Spring.Collections.Base.pas(20) Fatal: F2084 Internal Error: AV0044B93C-R00016B77-0 //--- QC101683.dpr --- program QC101683; {$APPTYPE CONSOLE} uses Spring.Collections.Base; begin WriteLn('PASS'); // on compile end. //--- Spring.Collections.Base.pas --- unit Spring.Collections.Base; interface type TCollectionBase<T> = class abstract(TObject) protected function GetIsReadOnly: Boolean; virtual; public property IsReadOnly: Boolean read GetIsReadOnly; end; TListBase<T> = class abstract(TCollectionBase<T>) private function GetOnNotify: IInterface; public property IsReadOnly: Boolean read GetIsReadOnly; end; implementation function TCollectionBase<T>.GetIsReadOnly: Boolean; begin Result := False; end; function TListBase<T>.GetOnNotify: IInterface; begin Result := nil; end; end.
QC #: Date Reported: Area:
100012 10/13/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
E2037 Declaration of ... differs from previous declaration / using collections as genereics

[QC Description]
When I Compile this project in XE vs XE2, I get different compile problems.

But I'm still unable to compile it either way.

I was actually trying to track down a internal error

F2084 Internal Error: AV221E0FCF-R0000000C-0

In my main application.
QC Entry 100012
Compile attached project in XE, I get
----
[DCC Error] InternalErrorATest.pas(6698): E2010 Incompatible types: 'TFixCommunicationLime.TAccount' and 'TCollectionItem'
----

Compile attached project In XE2 Update 1, I get
----
[DCC Error] InternalErrorATest.pas(6042): E2009 Incompatible types: 'Parameter lists differ'
[DCC Error] InternalErrorATest.pas(6043): E2009 Incompatible types: 'Parameter lists differ'
[DCC Error] InternalErrorATest.pas(6044): E2009 Incompatible types: 'Parameter lists differ'
[DCC Error] InternalErrorATest.pas(6045): E2009 Incompatible types: 'Parameter lists differ'
[DCC Error] InternalErrorATest.pas(6066): E2037 Declaration of 'DoGetOpenPositionsQueryReply_' differs from previous declaration
[DCC Error] InternalErrorATest.pas(6082): E2037 Declaration of 'DoGetEasyToBorrowListQueryReply_' differs from previous declaration
[DCC Error] InternalErrorATest.pas(6098): E2037 Declaration of 'DoGetThresholdListQueryReply_' differs from previous declaration
[DCC Error] InternalErrorATest.pas(6115): E2037 Declaration of 'DoGetCurrentBuyingPowerQueryReply_' differs from previous declaration
----


(JJS: Simplified test case from Uwe Schuster)

program BTS288196;

{$APPTYPE CONSOLE}

{.$MINENUMSIZE 4} //#1 helps for 32-bit, but not for 64-bit

type
TEnum1<T> = record
FValue: T;
end;

TQueryTypeLime = record
type
TEnum = (qt);
var
FValue: TEnum1<TEnum>;//#2 compiles when SizeOf(T) of TEnum1<T> is greater or equal than SizeOf(Pointer)
end;

TGetOpenPositionsQueryReply = record
QueryType: TQueryTypeLime;
QueryID: Boolean;//#3 compiles without this field
end;

TFixCommunicationLime = class(TObject) //#4 compiles without const
procedure DoGetOpenPositionsQueryReply_(const Data: TGetOpenPositionsQueryReply);
end;

procedure TFixCommunicationLime.DoGetOpenPositionsQueryReply_(const Data: TGetOpenPositionsQueryReply);
begin
//
end;

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


QC #: Date Reported: Area:
100268 10/20/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
[x64] crash on NEW in generic involving a pointer to a string.

[QC Description]
in generic TObject<T>:
1. defining type P_T = ^T;
2. define variable: var ptr:P_T
3. dynamically allocating: New( ptr)
4. assigning value: ptr^:= ...
results in crash
QC Entry 100268
type
TMyTest<T> = record
type
P_T = ^T;
procedure save_Val(v: T);
end;

procedure TMyTest<T>.save_Val(v: T);
var
ptr: P_T;
begin
New(ptr); //GetMem being called instead of New//
ptr^ := v; // <- access violation
end;

procedure TForm1.Button1Click(Sender: TObject);
var
a_obj: TMyTest<String>;
begin
a_obj.save_Val('Hello');
end;
QC #: Date Reported: Area:
100561 10/28/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
Incorrect InstanceSize

[QC Description]
Generic class containing an array of T has incorrect InstanceSize.
QC Entry 100561
This bug came to light at this Stack Overflow question: http://stackoverflow.com/questions/7933158 program InstanceSizeBug; {$APPTYPE CONSOLE} type TMyClass<T> = class V: array [1..256*256] of T; end; TMyClassSingle = class(TMyClass<Single>); begin Writeln(TMyClass<Single>.InstanceSize); Writeln(TMyClassSingle.InstanceSize); TMyClassSingle.Create.V[256*256] := 0; Readln; end. Clearly the two Writeln commands should output the same value. In fact the output is 262160 65552 It's easy to see that TMyClassSingle.InstanceSize is too small. The array V does not fit. The AV raised on the assignment to V[...] is further demonstration. Automatable test case by USc: program QC100561A; {$APPTYPE CONSOLE} type TMyClass<T> = class V: array [1..256*256] of T; end; TMyClassSingle = class(TMyClass<Single>); begin if TMyClass<Single>.InstanceSize = TMyClassSingle.InstanceSize then WriteLn('PASS') else WriteLn('FAIL'); end. program QC100561B; {$APPTYPE CONSOLE} type TMyClass<T> = class V: array [0..255] of T; end; TMyClassSingle = class(TMyClass<Single>); TMyClassByte = class(TMyClass<Byte>); TMyClassInteger = class(TMyClass<Integer>); TMyClassInt64 = class(TMyClass<Int64>); var Counter: Integer = 0; procedure EvaluateTestResult(const ATypeStr: string; ASize1, ASize2, ATest: Integer); begin if ASize1 = ASize2 then Inc(Counter) else begin WriteLn('FAIL #', ATest); WriteLn(' TMyClass<', ATypeStr, '>: ', ASize1:4); WriteLn(' class(TMyClass<', ATypeStr, '>): ', ASize2:4); end; end; begin Counter := 0; EvaluateTestResult('Single', TMyClass<Single>.InstanceSize, TMyClassSingle.InstanceSize, 1); EvaluateTestResult('Byte', TMyClass<Byte>.InstanceSize, TMyClassByte.InstanceSize, 2); EvaluateTestResult('Integer', TMyClass<Integer>.InstanceSize, TMyClassInteger.InstanceSize, 3); EvaluateTestResult('Int64', TMyClass<Int64>.InstanceSize, TMyClassInteger.InstanceSize, 4); if Counter = 4 then WriteLn('PASS') else WriteLn('FAIL'); end.
QC #: Date Reported: Area:
99049 9/19/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
incorrect handling of generic constraint parametrized by mixed scope generic types

[QC Description]
see steps and comments at the end of sample program
QC Entry 99049
try to compile the following program (also duplicated in attachments) expected result: no errors actual result: E2515, see comments in the program program dbug6; type TGenericClass<T1,T2> = class end; type TTest<T1_out,T2_out; T_out_constrained: TGenericClass<T1_out,T2_out>> = record procedure P<T1_in; T_in_constrained: TGenericClass<T1_in,T2_out>>(x: TTest<T1_in, T2_out, T_in_constrained>); end; procedure TTest<T1_out,T2_out,T_out_constrained>.P<T1_in,T_in_constrained>; begin end; var x: TTest<String,Integer,TGenericClass<String,Integer>>; y: TTest<Integer,Integer,TGenericClass<Integer,Integer>>; begin //Error: E2515 Type parameter // T_in_constrained // is not compatible with type // TGenericClass< // System.Integer, // TGenericClass<System.Integer,System.Integer> //incorrect type, see comment below // > x.P<Integer,TGenericClass<Integer,Integer>>(y); //compiler uses type T_in_constrained=TGenericClass<Integer,Integer> instead of T2_out=Integer //because it has the same index as T2_out //in other words - type parameter #2 of procedure P is used instead of //specified type parameter #2 of record TTest end.
QC #: Date Reported: Area:
100526 10/27/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
Integer and pointer expressions cannot be casted to a class-constrained generic type parameter

[QC Description]
The compiler reports E2089 Invalid typecast.

Pointer(0) and NIL are exempt from this restriction.

But it should work in all cases, just like with the normal class type.
QC Entry 100526
{ Expected: this programme gets compiled Actual: DCC issues three bogus E2089 errors } type C = class var X: integer; end; type G<T: C> = class function Foo: integer; end; function G<T>.Foo: integer; var O: TObject; p: UIntPtr; z: pointer; begin // it works with class types, O := C(0); O := TObject(p+42); O := C(z); // ... but class-constrained type-parameters are not good enough O := T(z); // BOGUS: E2089 Invalid typecast O := T(p); // BOGUS: E2089 Invalid typecast // returning the offset of X in T result := integer( @T(0).X ) // BOGUS: E2089 Invalid typecast end; begin {$apptype console} writeln('PASS: ', G<C>.Create.foo) end.
QC #: Date Reported: Area:
101115 11/17/2011 Compiler\Delphi\Generics
Description: Steps:
[QC Short Description]
Complie error. - E2010 Incompatible types: 'array of Char' and 'Dynamic array'

[QC Description]
procedure TForm1.Button2Click(Sender: TObject);
var
a: array of Char;
begin
SetLength(a, 3);
TArray.Sort<Char>(a); // [DCC Error] Unit1.pas(30): E2010 Incompatible types: 'array of Char' and 'Dynamic array'
end;


See steps.

QC Entry 101115
The Button1Click complies success, but Button2Click failed. procedure TForm1.Button1Click(Sender: TObject); var a: array of String; begin SetLength(a, 3); TArray.Sort<String>(a); end; procedure TForm1.Button2Click(Sender: TObject); var a: array of Char; begin SetLength(a, 3); TArray.Sort<Char>(a); // E2010 Incompatible types: 'array of Char' and 'Dynamic array' end;
QC #: Date Reported: Area:
101710 12/11/2011 RTL\Delphi\WinAPI
Description: Steps:
[QC Short Description]
winapi.winsvc: wrong case in name of EnumServicesStatusEx

[QC Description]
The following API names are wrongly spelled:
function EnumServicesStatusEX; external advapi32 name 'EnumServicesStatusEXW';
function EnumServicesStatusEXA; external advapi32 name 'EnumServicesStatusEXA';
function EnumServicesStatusEXW; external advapi32 name 'EnumServicesStatusEXW';

The correct spelling of course would be:
function EnumServicesStatusEx; external advapi32 name 'EnumServicesStatusExW';
function EnumServicesStatusExA; external advapi32 name 'EnumServicesStatusExA';
function EnumServicesStatusExW; external advapi32 name 'EnumServicesStatusExW';

As API names are case sensitive, the above functions can't be resolved by Windows.

{ USc: This is related to the reporters report, which has been fixed in XE2

Report No: 76638 (RAID: 272387) Status: Closed
Unit WinSvc out of date
http://qc.embarcadero.com/wc/qcmain.aspx?d=76638 }
QC Entry 101710
- dcc32/dcc64 QC101710.dpr - execute QC101710.exe expected: output is PASS actual: messagebox about "EnumServicesStatusEXA" not being found in DLL "advapi32.dll" - open $(BDS)\source\rtl\win\Winapi.WinSvc.pas - look for EnumServicesStatusEx in interface section and see case of Ex in function names is Ex - look for EnumServicesStatusEx in implementation section and check case of Ex in function names and name part in external directive expected: it is Ex actual: it is EX program QC101710; {$APPTYPE CONSOLE} uses Winapi.WinSvc; procedure Test; var ExecuteCall: Boolean; begin ExecuteCall := False; if ExecuteCall then begin EnumServicesStatusEx(0, SC_ENUM_PROCESS_INFO, 0, 0, nil, 0, nil, nil, nil, nil); EnumServicesStatusExA(0, SC_ENUM_PROCESS_INFO, 0, 0, nil, 0, nil, nil, nil, nil); EnumServicesStatusExW(0, SC_ENUM_PROCESS_INFO, 0, 0, nil, 0, nil, nil, nil, nil); end; end; begin Test; WriteLn('PASS'); end.
QC #: Date Reported: Area:
101926 12/19/2011 RTL\Delphi\WinAPI
Description: Steps:
[QC Short Description]
GetNamedPipeClientComputerName is declared wrongly

[QC Description]
In Winapi.Windows.pas

The first one of the declarations below is wrongly declared.
the quoted procedure name should end in '...W'.
As it is, if you try using it on win7, it'll throw a funky error that after googling resolves to "procedure of that name does not exist".


function GetNamedPipeClientComputerName; external kernel32 name
'GetNamedPipeClientComputerName' delayed;
function GetNamedPipeClientComputerNameA; external kernel32 name
'GetNamedPipeClientComputerNameA' delayed;
function GetNamedPipeClientComputerNameW; external kernel32 name
'GetNamedPipeClientComputerNameW' delayed;
QC Entry 101926
make sample app add call to GetNamedPipeClientComputerName run, and when procedure is called, observe exception is raised because there is no procedure named GetNamedPipeClientComputerName in the windows DLL
QC #: Date Reported: Area:
103065 1/31/2012 RTL\Delphi\Other RTL
Description: Steps:
[QC Short Description]
Perform subtraction on two BCD values raise BCD overflow error

[QC Description]
When perform Bcd substraction on 2 special Bcd Value:

Value 1: -9.67

Value 2: 3.223333333333333333333333333333333333333333333333333333333333333

The application will raise Bcd overflow error.
QC Entry 103065
Run the following code in Delphi XE2:

See the following program output indicating failure.

FAIL EBcdOverflowException BCD overflow


program BTS289731;

{$APPTYPE CONSOLE}

uses
System.SysUtils,
Data.FmtBcd;

var A, B, C: TBcd;
begin
try
A := StrToBcd('-9.67');
B := StrToBcd('3.223333333333333333333333333333333333333333333333333333333333333');
C := A - B;
writeln('PASS');
except
on E: Exception do
writeln('FAIL ', E.ClassName, ' ',E.Message);
end;
end.

QC #: Date Reported: Area:
103106 2/2/2012 RTL\Delphi\Other RTL
Description: Steps:
[QC Short Description]
[REGRESSION in XE2] BcdDivide(1, 3) returns Bcd value of up to 64 decimal places

[QC Description]
Running the following code in Delphi XE2 console apps:

var A, B, C, D: TBcd;
begin
A := StrToBcd('1');
B := StrToBcd('3');
BcdDivide(A, B, C);
WriteLn(BcdToStr(C));

try
BcdMultiply(C, C, D);
WriteLn(BcdToStr(D));
except
on E: Exception do
WriteLn(E.Message);
end;

ReadLn;
end.

The output will be:

0.333333333333333333333333333333333333333333333333333333333333333
BCD overflow

The variable C contains a Bcd Value with decimal places of 63. Perform further BcdMultiply operation on variable C will cause Bcd overflow error.

However, running the same code in Delphi XE yields the following result without any exception prompt:

0.3333333333
0.11111111108888888889

QC Entry 103106
Compile and run the attached app below.

See the following output indicating failure.

FAIL EBcdOverflowException BCD overflow



program BTS289755;

{$APPTYPE CONSOLE}


uses
System.SysUtils,
FmtBcd;

var A, B, C, D: TBcd;
begin
A := StrToBcd('1');
B := StrToBcd('3');
BcdDivide(A, B, C);
WriteLn(BcdToStr(C));

try
BcdMultiply(C, C, D);
WriteLn(BcdToStr(D));
writeln('PASS');
except
on E: Exception do
WriteLn('FAIL ', E.ClassName,' ', E.Message );
end;
end.
QC #: Date Reported: Area:
103096 2/1/2012 RTL\Delphi\Other RTL
Description: Steps:
[QC Short Description]
[REGRESSION in XE2] NormalizeBcd returning invalid value

[QC Description]
I attempt to normalize a bcd value after a series of bcd operation. The NormalizeBcd function perform wrong calculation on the Fraction part of Bcd.
QC Entry 103096
Run the following test case: var B: TBcd; begin BcdDivide(StrToBcd('6269.75'), StrToBcd('52'), B); NormalizeBcd(B, B, 19, 8); CheckEquals('120.57211538', BcdToStr(B)); end;
QC #: Date Reported: Area:
101373 11/28/2011 RTL\Delphi\Other RTL
Description: Steps:
[QC Short Description]
Bug in System.Win.ComObj.DispCallByID

[QC Description]
Using an Active X leads to "Invalid Address specified to RtlSizeHeap" in debugger window (and stops at "Non-user Breakpoint at...").
QC Entry 101373
Using an ActiveX controls... When the application is run from the IDE (debug or release configuration), the debugger reports "Invalid Address specified to RtlSizeHeap" and I cannot "escape" the debugger (keeps hitting a "Non-user Breakpoint at $7C90120F."). In the method System.Win.ComObj.DispCallByID, the following excerpt begin if PPointer(Result)^ <> nil then SysFreeString(PWideChar(Result)); PPointer(Result)^ := Res.VOleStr; end; should actually be begin if PPointer(Result)^ <> nil then SysFreeString(PWideChar(Result^)); // POINTER TO A POINTER TO A WIDECHAR PPointer(Result)^ := Res.VOleStr; end; p.s. Located by Blaise Thorn.
QC #: Date Reported: Area:
101666 12/8/2011 RTL\Delphi\RTL Exceptions
Description: Steps:
[QC Short Description]
[x64] Access violation while using try..finally in a try..finally block

[QC Description]
See Steps

and, it also raises an Access Violation using try..except in the try finally block
QC Entry 101666

//added by QA:
SIGSEGV(11) on [dccosx]
1) Create a New FMX HD Application 2) Copy this code into the FormCreate 3) Run this on 64-Bit Windows 4) Actual: Access Violation in the second try..finally Expected: No Access Violation procedure TForm3.FormCreate(Sender: TObject); var s: string; begin try raise Exception.Create('SNotOverriddenMethod'); finally try s := ''; finally end; end; end;
QC #: Date Reported: Area:
93645 5/6/2011 RTL\Delphi\RTL Exceptions
Description: Steps:
[QC Short Description]
Expecting ESafeArrayError exception but getting EConvertError - Wrong passing arguments for formatted message

[QC Description]
Problem codes in VarUtils unit. The formatted message expects to have a string and a number but the caller only passes number causing malformed format exception error

Expecting ESafeArrayError exception but getting EConvertError which is wrong

constructor ESafeArrayError.CreateHResult(AResult: HRESULT; const AMessage: string);
var
S: string;
begin
S := AMessage;
if S = '' then
S := Format(SVarArrayWithHResult, [AResult]);
Create(S);
FErrorCode := AResult;
end;


SVarArrayWithHResult = 'Unexpected variant or safe array error: %s%.8x';
QC Entry 93645
Expecting ESafeArrayError exception but getting EConvertError which is wrong --------- procedure TForm1.Button1Click(Sender: TObject); begin // Problem code 1 try SafeArrayError(VAR_INVALIDARG); except on E: ESafeArrayError do ShowMessage('Correct exception'); else ShowMessage('Buggy exception: EConvertError'); end; // Problem code 2 try raise ESafeArrayError.CreateHResult(VAR_INVALIDARG); except on E: ESafeArrayError do ShowMessage('Correct exception'); else ShowMessage('Buggy exception: EConvertError'); end; end; ---------
QC #: Date Reported: Area:
98455 9/1/2011 RTL\Delphi\RTL Exceptions
Description: Steps:
[QC Short Description]
Vanishing error descriptions and and codes in COM

QC Entry 98455
Create a sample COM server (attached) and compile it in 64 bit. I ran it from the 64 bit Outlook VBA editor, but a 64 bit Delphi executable would do.

re-raised exceptions do not provide the error code and error description to the caller:

procedure TSampleCOMObject.BadCOMException;
begin
try
raise EOleSysError.Create('Exception from BadCOMException', E_NOTIMPL, 0);
except
raise;
end;
end;


produces

---------------------------
Microsoft Visual Basic for Applications
---------------------------
Run-time error '-2147418113 (8000ffff)':

Method 'BadCOMException' of object 'ISampleCOMObject' failed
---------------------------
OK Help
---------------------------

Raising an exception without re-raising it works as expected

procedure TSampleCOMObject.GoodCOMException;
begin
try
raise EOleSysError.Create('Exception from GoodCOMException', E_NOTIMPL, 0);
finally
end;
end;

produces

---------------------------
Microsoft Visual Basic for Applications
---------------------------
Run-time error '-2147467263 (80004001)':

Exception from GoodCOMException
---------------------------
OK Help
---------------------------
QC #: Date Reported: Area:
101552 12/5/2011 RTL\Delphi\Format + Float
Description: Steps:
[QC Short Description]
[REGRESSION in XE2] Format function doesn't handle #0 characters

[QC Description]
After upgrading from Delphi 2007 to Delphi XE2 I have found that when using the Format function with %s then if the string contains #0 characters, only the characters up to the first #0 are returned. Delphi 2007 returned all the characters.

Added by Sysop
<<<<<<
ShowMessage(IntToStr(Length(str2)));
In Delphi 6, ... XE, it outputs 17.
But in Delphi XE2, it outputs 10.
Please see [Steps] for more details.
>>>>>>
QC Entry 101552
var str, str2: string; i: integer; begin i := 10; str := 'hello' + #0 + ' world'; str2 := format('%d - %s', [i, str]); ShowMessage(IntToStr(Length(str2))); end; In Delphi 2007/XE it outputs 17, but in Delphi XE2 it outputs 10.
QC #: Date Reported: Area:
103094 2/1/2012 RTL\Delphi\Format + Float
Description: Steps:
[QC Short Description]
[REGRESSION in XE2] FormatBcd returns invalid result for format '#,0;-#,0'

[QC Description]
FormatBcd return invalid result if display format is '#,0;-#,0'.

[Output]
-----
1
10.
100.
-----

These should be without comma as below.
-----
1
10
100
-----

Note:
This issue is regression in XE2.
QC Entry 103094
Run the following test case:

---------------
uses
Data.FmtBcd;
var
F: string;
begin
F := '#,0;-#,0';
WriteLn(FormatBcd(F, DoubleToBcd(1)));
WriteLn(FormatBcd(F, DoubleToBcd(10)));
WriteLn(FormatBcd(F, DoubleToBcd(100)));
end.
---------------

[Output]
-----
1
10.
100.
-----


Running the following related program produces this output.

FAIL #2
FAIL #3
FAIL 1/3

program BTS289738;

{$APPTYPE CONSOLE}

uses
Data.FmtBcd,
System.SysUtils;

var
F: string;
Counter : Integer;
begin
F := '#,0;-#,0';
Counter := 0;
if(0 = AnsiCompareStr('1', FormatBcd(F, DoubleToBcd(1)))) then
Inc(Counter)
else
writeln('FAIL #1');
if(0 = AnsiCompareStr('10', FormatBcd(F, DoubleToBcd(10)))) then
Inc(Counter)
else
writeln('FAIL #

program BTS289738;

{$APPTYPE CONSOLE}

uses
Data.FmtBcd,
System.SysUtils;

var
F: string;
Counter : Integer;
begin
F := '#,0;-#,0';
Counter := 0;
if(0 = AnsiCompareStr('1', FormatBcd(F, DoubleToBcd(1)))) then
Inc(Counter)
else
writeln('FAIL #1');
if(0 = AnsiCompareStr('10', FormatBcd(F, DoubleToBcd(10)))) then
Inc(Counter)
else
writeln('FAIL #2');
if(0 = AnsiCompareStr('100', FormatBcd(F, DoubleToBcd(100)))) then
Inc(Counter)
else
writeln('FAIL #3');

if( 3 = Counter) then
writeln('PASS')
else
writeln('FAIL ', Counter, '/3');
end.
QC #: Date Reported: Area:
102074 12/23/2011 RTL\Delphi\Format + Float
Description: Steps:
[QC Short Description]
[Regression in XE2] FormatBcd() formats incorrectly

[QC Description]
FormatBcd incorrectly returns a extra dot character with '0.##' mask and numbers without decimals.

ej.:

FormatBcd('0.##', 1.0) output: '1.' (with a final dot)

This bug affects to the DisplayFormat of TBcdFields and TFmtBcdFields.

//USc: This is regression from XE.
QC Entry 102074
By USc: - dcc QC102074.dpr - execute QC102074 expected: output is PASS actual: FAIL #1 Expected: "1" Actual: "1." FAIL program QC102074; {$APPTYPE CONSOLE} uses SysUtils, FMTBcd; var Counter: Integer; S: string; Bcd: TBcd; begin FormatSettings.DecimalSeparator := '.';//make test #2 pass on non US systems Counter := 0; Bcd := DoubleToBcd(1.0); S := FormatBcd('0.##', Bcd); if S = '1' then Inc(Counter) else WriteLn('FAIL #1 Expected: "1" Actual: "', S, '"'); Bcd := DoubleToBcd(1.23); S := FormatBcd('0.##', Bcd); if S = '1.23' then Inc(Counter) else WriteLn('FAIL #2 Expected: "1.23" Actual: "', S, '"'); if Counter = 2 then WriteLn('PASS') else WriteLn('FAIL'); end. Original steps: procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage(FormatFloat('0.##', 1.0)); // output: '1' ShowMessage(FormatCurr('0.##', 1.0)); // output: '1' ShowMessage(FormatBcd('0.##', 1.0)); // output: '1.' (with dot) end;
QC #: Date Reported: Area:
103173 2/5/2012 RTL\Delphi\Format + Float
Description: Steps:
[QC Short Description]
[Regression in 2010, XE] FormatBcd returns empty string when TBcd is 0

[QC Description]
var
fbcd: TBcd;
begin
fbcd := IntegerToBcd(0);
ShowMessage( FormatBcd('#,###',fbcd) );
end;

output : empty

It must be 0.
QC Entry 103173
 
QC #: Date Reported: Area:
102149 12/27/2011 RTL\Delphi\Format + Float
Description: Steps:
[QC Short Description]
[REGRESSION] Format function raises exception when passed null variant for %s

[QC Description]
The Format function is raising an exception when passed a null variant and the %s format specifier. In previous releases this would convert without error to a blank string.

This is a regression introduced in XE2 Update 2.
QC Entry 102149
Execute this code: var v : Variant ; s : String ; begin v := null; s := Format( '%s', [ v ] ) ; end; exp: s is assigned blank string act: exception raised
QC #: Date Reported: Area:
101114 11/17/2011 RTL\Delphi\Thread support
Description: Steps:
[QC Short Description]
TThreadedQueue fails with multiple consumers part 2

[QC Description]
See QC91246 for a background.
TThreadedQueue failed when multiple consumers were draining the queue empty.

This was fixed in XE2.

A similar problem arises when the queue is full.
The fault is in TMonitor.RemoveWaiter.

See attached test program that stresses the queue in the full state.
QC Entry 101114
Run attached test program.
QC #: Date Reported: Area:
100403 10/24/2011 SOAP\WSDL Importer
Description: Steps:
[QC Short Description]
WSDL Import crashes IDE

[QC Description]
Importing the attached WSDL using the WSDL import wizard immediately crashes the IDE with no error message.
QC Entry 100403

NOTE 12/14/11: The steps no longer crash the IDE, but the resulting project does not compile. Reopening the bug so that Bruneau can investigate.
1. File | New | Delphi VCL Application 2. File | New | Other | Webservices | WSDL Importer 3. Use the wizard to select the attached WSDL file and finish the wizard, and note that the IDE crashes immediately.
QC #: Date Reported: Area:
101080 11/17/2011 FireMonkey
Description: Steps:
[QC Short Description]
dpr2xcode error parse - units without forms

[QC Description]
In addition to report #99981, I notice that when in the .dpr "uses" section you add a unit without a form, you'll get an error "errror parse" during dpr2xcode.exe command.
QC Entry 101080
This create the errror on the "Unit2" line: uses FMX_Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas';
QC #: Date Reported: Area:
100593 10/30/2011 FireMonkey
Description: Steps:
[QC Short Description]
Canvas.SetClipRects Hangs App On Windows 7(32bit/64bit)

[QC Description]
When using Canvas.SetClipRects in a custom control's overridden Paint procedure. The application will lock up.
CPU usage for the app is at 0%. But, client area of TForm is not rendered correcly.

I've attached a sample application that works on my 32-bit Windows XP machine, but fails on Windows 7 both 32-bit and 64-bit.

I believe this to be similar to issue #100335, which was closed because it could not be reproduced.

Added by Sysop
<<<<<<<<<<<
This issue is confirmed with
- NVIDIA GeForce GT 220 on Windows 7 64bit
- NVIDIA GeForce 8600M GS on Vista 64bit
- ATI Radeon HD 3200 on Windows 7 32bit
Note:
the latest video driver is used.
>>>>>>>>>>>
QC Entry 100593
procedure TCustomControl.Paint; var r:TRectF; begin r:=TRectF.Create(0,0,self.Width,self.Height); Canvas.SetClipRects([r]); Canvas.Stroke.Kind:=TBrushKind.bkSolid; Canvas.Stroke.Color:=TAlphaColorRec.Red; Canvas.DrawRect(r,0,0,[],1); end; The output should be the outline of a rectangle in the upper left corner of the control.
QC #: Date Reported: Area:
101322 11/25/2011 FireMonkey
Description: Steps:
[QC Short Description]
Accessing printer count crashes application if no printer present

[QC Description]
When Printer.Count is accessed on a system with no printer installed, the application will crash with a stack overflow.

See workaround for the fix.
QC Entry 101322
Create a new FM HD application: 1) Add FMX.Printer to form's uses clause 2) Add a button with OnClick code: ShowMessage(Format('%d printers', [Printer.Count])); 3) Run (on a system with no printer) 4) Click button -> crash
QC #: Date Reported: Area:
100168 10/17/2011 FireMonkey
Description: Steps:
[QC Short Description]
OpenGL/Quartz Syncing

[QC Description]
Presumably there is a problem with the sync on osx. This problem arises in all applications when drawing and moving visual objects of any class type (as far as I know).
QC Entry 100168
Make a new Firemonkey HD App. Drop a TTimer. Drop a PaintBox. Set timer interval to 1. Add a variable named X of type Integer on Private section of the form. Set the following code inside PaintBox OnPaint event: procedure TForm1.PaintBox1Paint(Sender: TObject; Canvas: TCanvas); var I: Integer; begin Canvas.Fill.Color := claBlue; for I := 1 to Trunc(PaintBox1.Width / 20) do Canvas.FillRect(RectF(X * I, 0, X * I + 15, PaintBox1.Height), 0, 0, [], 1); end; Set this code on Timer OnTime event procedure TForm1.Timer1Timer(Sender: TObject); begin X := X + 2; if X > PaintBox1.Width / 2 then X := 1; PaintBox1.Repaint; end; Execute.
QC #: Date Reported: Area:
99558 10/3/2011 FireMonkey
Description: Steps:
[QC Short Description]
[iOS] Scrolling problem - TScrollbox

[QC Description]
When running an app on the iPhone device which has a TScrollbox in it, it is very difficult (almost impossible) to scroll the contents of the scrollbox. Attempting a workarroud with MouseWheel procedure fails.
QC Entry 99558
Build a Firemonkey HD iOS app, place a scrollbox on the form, add some items so that the scrollbars become visible, bring app over to XCode and run app (iPhone or simulator), try moving contents in the scrollbox.
QC #: Date Reported: Area:
99358 9/27/2011 FireMonkey
Description: Steps:
[QC Short Description]
CustomListbox demo - FireMonkey apps too hungry for RAM

[QC Description]
Hi,

I executed the CustomListBox from the samples directory. At startup, the app consumes ~35MB of memory. After pressing the "Add 1000 by code" button and scrolling through the list, I encountered the following:
1) Memory consumption went up to more than 200MB!!!
2) Scrolling became slower and slower

For such a very simple and basic demo app, I really worry about FireMonkey now. What happens with memory for much more sophisticated apps?

Best regards,
Fred
QC Entry 99358
See above. Just compile the CustomListbox demo, add items, scroll trough the list and have a look at task manager.
QC #: Date Reported: Area:
100379 10/24/2011 FireMonkey
Description: Steps:
[QC Short Description]
TSpinBox does not show the float-value (when DecimalSeparator=',')

[QC Description]
DecimalSeparator:=',';
SpinBox2.ValueType:=TNumValueType.vtFloat;
SpinBox2.Value:=5.5;
QC Entry 100379
procedure TForm1.FormCreate(Sender: TObject); begin DecimalSeparator := ','; SpinBox1.ValueType:=TNumValueType.vtFloat; SpinBox1.Value:=5.5; end;
QC #: Date Reported: Area:
100008 10/13/2011 FireMonkey
Description: Steps:
[QC Short Description]
[MacOS] Setting a control's Cursor property has no effect on Mac OS

[QC Description]
Perhaps related to QC#99345.

Setting a FireMonkey control's Cursor property has no effect on Mac OS. The control continues to render the default cursor.

For example, setting the cursor to crHandPoint or crSizeAll for an image or edit control shows the proper cursor on Windows when the mouse is hovered over the control. However, on Mac OS, the selected cursor is not rendered. Instead, on Mac OS, only the default cursor displays.
QC Entry 100008
Create a new FireMonkey HD project. Drop a TEdit control on the form. Set the Edit control's Cursor property to crSizeAll via the Object Inspector. Run the program. On Windows, the crSizeAll cursor will be shown, On Mac OS, it will show just the default cursor.
QC #: Date Reported: Area:
98292 8/29/2011 FireMonkey
Description: Steps:
[QC Short Description]
Edit to FMX TStringGrid kills navigation keys <-- -->

[QC Description]
The FMX StringGrid has a serious navigation problem after a record is edited - there is no direct way to move to the next column, as the current cell remains in edit mode and the left and right arrow keys continue to move the insertion point within the cell instead of moving to a different cell.

While the user can discover a workaround of moving to a different row first, this is not a solution. For example, when entering a new record to a dataset, there may be required fields, which would not then allow navigation to a different record.

Note that after editing a cell in a VCL StringGrid and hitting enter, the navigations keys all still function properly.

The best work-around for this problem would be to add an onKey event to terminate the Edit, but I don't see any way in code to return the grid to a navigatable state.
QC Entry 98292
File | New FireMonkey HD App Drop a TStringGrid on the form Add several columns to the StringGrid F9 to run Add text to a cell Enter to complete edit Arrow Right to go to next column Exp: Can go to next column with keyboard as in a VCL Grid Act: Only way to move to next column without changing to a different grid row (or record) is to click with the mouse.
QC #: Date Reported: Area:
98027 8/23/2011 FireMonkey
Description: Steps:
[QC Short Description]
Can't customise colours used in TAniIndicator control

[QC Description]
It is not possible to customise the colours used for the TAniIndicator control.

The colours used are hard coded in the paint method.
QC Entry 98027
 
QC #: Date Reported: Area:
99636 10/5/2011 FireMonkey
Description: Steps:
[QC Short Description]
TComboEdit doesn't have a clear method

[QC Description]
The TComboEdit control doesn't have a clear method like the VCL does.
QC Entry 99636
 
QC #: Date Reported: Area:
100757 11/4/2011 FireMonkey\Effects
Description: Steps:
[QC Short Description]
TShadowEffect slowly in ios

[QC Description]
put one Button and one ShadowEffect under the button
run in Windows and Mac OS and iOS(iPad&Xcode), the app is quickly

but put 5 buttons and 5 shadoweffecfs, in Win and Mac OS still quickly,
but in iOS the app become very very slowly, like the app is dead?
(click the buton -showmessage(test!)), you will find this
QC Entry 100757
Added by Sysop <<<<<< I'm using Update 2 and have a memo with a shadow in a TLayout that gets scrolled in the X direction. Just one memo and the scrolling is shocking on the IPad 2 IOS5 device. If I remove the shadow scrolling goes back to normal. >>>>>>
QC #: Date Reported: Area:
101403 11/29/2011 FireMonkey\
Description: Steps:
[QC Short Description]
TMemo fails to draw bottom line if it's partially scrolled out

[QC Description]
1.
In TMemo.DoContentPaint this line:

if round(VScrollBarValue / GetLineHeight) + LPageSize - 1 < Lines.Count - 1
then
LEndLine := round(round(VScrollBarValue / GetLineHeight) + LPageSize - 1)
else
LEndLine := Lines.Count - 1;


should be:

LEndLine := Min(Ceil(VScrollBarValue / GetLineHeight + LPageSize - 1), Lines.Count - 1);


or the bottom line will sometimes disappear when it's partially scrolled out.

2.
In TMemo.GetSelArea these lines:

if EndLine > round(VScrollBarValue / GetLineHeight) + LPageSize - 1 then
begin
EndLine := round(round(VScrollBarValue / GetLineHeight) + LPageSize - 1);
SelEndLineVisible := False;
end;


should be

if EndLine > Ceil(VScrollBarValue / GetLineHeight + LPageSize - 1) then
begin
EndLine := Ceil(VScrollBarValue / GetLineHeight + LPageSize - 1);
SelEndLineVisible := False;
end;


or the selected part will be painted to the end of the line if the line is at the bottom and it's partially scrolled out.
QC Entry 101403
Compile and run attached project
Click Memo at end of first line.
-> Three lines (1,2 and 3) are displayed.

Hit "Down arow" key three times to move down the caret
-> 4th line has a caret. At this time, first line (1) is displayed partially with clipped.

Hit "Up arow" key three times to move up the caret
-> 1st line has a caret again.

At this time, 4th line doesn't display anything.
It should be displayed simething of line 4.


QC #: Date Reported: Area:
101858 12/16/2011 FireMonkey\Dialogs
Description: Steps:
[QC Short Description]
TPrinterSetupDialog still does not work correctly

[QC Description]
TPrinterSetupDialog printer selection menu does not actually change the selected printer, and always reverts to default printer. This bug was supposedly fixed in Update 3 according to the bug fix notes, but problem still exists.

I notice this is true for the print dialog as well. No matter what printer is selected, the default printer receives the printer output.
QC Entry 101858
PrinterSetupDialog1.Execute; Open printer setup dialog. Change the printer. Close the dialog. Print. Regardless of what is selected in print setup, the default comes back up as selected. And, the default printer always receives the print output.
QC #: Date Reported: Area:
102196 12/28/2011 FireMonkey\Dialogs
Description: Steps:
[QC Short Description]
[regression, MacOS] FileOpenDialog crash

[QC Description]
[regression, MacOS] FileOpenDialog crashes as soon as the user closes the dialog.

The reason is that the new Field FModalStack is nil.

This is a regression in Update 4 Beta 1. This is a different issue than QC #101513.
QC Entry 102196
1. Create a new FireMonkey HD application 2. Set target to MacOS 3. Add the following code procedure TForm1.FormCreate(Sender: TObject); begin TOpenDialog.Create(nil).Execute; end; 4. Run the application 5. Select a file and close the open dialog Offending code: function TPlatformCocoa.DialogOpenFiles(var AFileName: TFileName; const AInitDir, ADefaultExt, AFilter, ATitle: string; var AFilterIndex: Integer; var AFiles: TStrings; var AOptions: TOpenOptions): Boolean; // .... OpenFile.retain; try outcome := OpenFile.runModal; if FModalStack.Count > 0 then //<-- FModalStack = nil FRestartModal := True; if outcome = NSOKButton then
QC #: Date Reported: Area:
102896 1/25/2012 FireMonkey\
Description: Steps:
[QC Short Description]
TColorPanel is not correctly showing selected Color property on display

[QC Description]
When setting ColorPanel1.Color property, the dialog displays but the selected color is always red.
TColorPanel is not using the Color Hue component.

See steps and suggested fix.
QC Entry 102896
-New FMX HD app -Drop a TColorPanel control -Type FormCreate: procedure TForm83.FormCreate(Sender: TObject); begin Fill.Style:=bsSolid; Fill.Color:=$FF3629AE; ColorPanel1.Color:=Fill.Color; end; -Type ColorPanel1 OnChange event: procedure TForm83.ColorPanel1Change(Sender: TObject); begin Fill.Color:=ColorPanel1.Color; end; -Run Exp: ColorPanel initial selected value should be blue, the same as Form background. Act. Selected color is in the red range. Suggested fix: FMX.Colors.Pas: procedure TColorPanel.SetColor... ... C := Value; RGBtoHSL(C, H, S, L); FColorQuad.Lum := L; FColorQuad.Sat := S; FColorQuad.Hue :=H; // <-- add this line ...
QC #: Date Reported: Area:
100095 10/16/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Cut in fm style editor - Automated Incident Report

[QC Description]
Invalid pointer operation.

Cut in fm style editor.

[5003C4E4]{rtl160.bpl } System.TObject.FreeInstance (Line 12927, "System.pas" + 2) + $2
[50037CC6]{rtl160.bpl } System.ErrorAt (Line 4343, "System.pas" + 3) + $4
[50037D0A]{rtl160.bpl } System.Error (Line 4354, "System.pas" + 1) + $7
[5003C4E4]{rtl160.bpl } System.TObject.FreeInstance (Line 12927, "System.pas" + 2) + $2
[5003CC62]{rtl160.bpl } System.@ClassDestroy (Line 14127, "System.pas" + 0) + $2
[500A4468]{rtl160.bpl } System.Classes.TPersistent.Destroy (Line 4721, "System.Classes.pas" + 3) + $6
[5003C52C]{rtl160.bpl } System.TObject.Free (Line 12946, "System.pas" + 1) + $4
[0A100280]{fmx160.bpl } FMX.Types.TControl.Destroy (Line 9353, "FMX.Types.pas" + 2) + $6
[0A073BC6]{fmx160.bpl } FMX.Layouts.TLayout.Destroy (Line 198, "FMX.Layouts.pas" + 1) + $7
[5003C52C]{rtl160.bpl } System.TObject.Free (Line 12946, "System.pas" + 1) + $4
[20FF242C]{designide160.bpl} ComponentDesigner.TComponentRoot.DeleteSelection (Line 4695, "ComponentDesigner.pas" + 44) + $2
[09E1CF49]{fmxdesigner160.bpl} FmxFormDesigner.TFmxRootDesigner.CutSelection (Line 468, "FmxFormDesigner.pas" + 3) + $4
[09E1D061]{fmxdesigner160.bpl} FmxFormDesigner.TFmxRootDesigner.EditAction (Line 524, "FmxFormDesigner.pas" + 4) + $0
[09E1908A]{fmxdesigner160.bpl} FmxFormContainer.TFmxEditorFormDesignerWrapper.EditAction (Line 818, "FmxFormContainer.pas" + 2) + $7
[2104F2C6]{designide160.bpl} EmbeddedDesignerForm.TFormEditorView.EditAction (Line 173, "EmbeddedDesignerForm.pas" + 3) + $4
[20756875]{coreide160.bpl} EditorForm.TEditWindow.EditAction (Line 1192, "EditorForm.pas" + 12) + $1
[004224B0]{bds.exe } Sanctuary.Util..{Sanctuary.Util}TSortedList<System.string,System.string> (Line 13, "Sanctuary.Util.pas" + 0) + $2CD0
[00422559]{bds.exe } Sanctuary.Util..{Sanctuary.Util}TSortedList<System.string,System.string> (Line 13, "Sanctuary.Util.pas" + 0) + $2D79
[0041F7F3]{bds.exe } Sanctuary.Util..TByteArrayOutputStream (Line 13, "Sanctuary.Util.pas" + 0) + $13
[500B5103]{rtl160.bpl } System.Classes.TBasicAction.Execute (Line 13372, "System.Classes.pas" + 3) + $7
[5031B70D]{vcl160.bpl } Vcl.ActnList.TContainedAction.Execute (Line 448, "Vcl.ActnList.pas" + 8) + $2C
[5031C4F8]{vcl160.bpl } Vcl.ActnList.TCustomAction.Execute (Line 1094, "Vcl.ActnList.pas" + 7) + $8
[500B4FC7]{rtl160.bpl } System.Classes.TBasicActionLink.Execute (Line 13301, "System.Classes.pas" + 2) + $7
[21734A65]{vclactnband160.bpl} Vcl.ActnMenus.TCustomActionMenuBar.ExecAction (Line 1076, "Vcl.ActnMenus.pas" + 6) + $D
[217362DC]{vclactnband160.bpl} Vcl.ActnMenus.TCustomActionMenuBar.TrackMenu (Line 1842, "Vcl.ActnMenus.pas" + 19) + $15
[21739C16]{vclactnband160.bpl} Vcl.ActnMenus.TCustomActionMainMenuBar.TrackMenu (Line 3636, "Vcl.ActnMenus.pas" + 5) + $3
[21734625]{vclactnband160.bpl} Vcl.ActnMenus.TCustomActionMenuBar.CMItemClicked (Line 955, "Vcl.ActnMenus.pas" + 3) + $4
[50332830]{vcl160.bpl } Vcl.Controls.TControl.WndProc (Line 7204, "Vcl.Controls.pas" + 91) + $6
[5033717B]{vcl160.bpl } Vcl.Controls.TWinControl.WndProc (Line 9976, "Vcl.Controls.pas" + 152) + $6
[50332454]{vcl160.bpl } Vcl.Controls.TControl.Perform (Line 6982, "Vcl.Controls.pas" + 10) + $8
[503368C8]{vcl160.bpl } Vcl.Controls.GetControlAtPos (Line 9712, "Vcl.Controls.pas" + 4) + $76
[5033703E]{vcl160.bpl } Vcl.Controls.TWinControl.WndProc (Line 9933, "Vcl.Controls.pas" + 109) + $1D
[5033717B]{vcl160.bpl } Vcl.Controls.TWinControl.WndProc (Line 9976, "Vcl.Controls.pas" + 152) + $6
[5003D48B]{rtl160.bpl } System.TMonitor.TryEnter (Line 14707, "System.pas" + 10) + $0
[5003D000]{rtl160.bpl } System.TMonitor.Enter (Line 14410, "System.pas" + 4) + $2
[5003CEA4]{rtl160.bpl } System.TMonitor.CheckOwningThread (Line 14332, "System.pas" + 2) + $0
[5003D1AA]{rtl160.bpl } System.TMonitor.Exit (Line 14521, "System.pas" + 9) + $7
[217363F2]{vclactnband160.bpl} Vcl.ActnMenus.TCustomActionMenuBar.WndProc (Line 1881, "Vcl.ActnMenus.pas" + 25) + $4
[503367D0]{vcl160.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9689, "Vcl.Controls.pas" + 3) + $6
[500B5DF8]{rtl160.bpl } System.Classes.StdWndProc (Line 13878, "System.Classes.pas" + 8) + $0
[5032D63E]{vcl160.bpl } Vcl.Controls.FindControl (Line 3540, "Vcl.Controls.pas" + 6) + $9
[50451EC3]{vcl160.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10161, "Vcl.Forms.pas" + 23) + $1
[50451F06]{vcl160.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10191, "Vcl.Forms.pas" + 1) + $4
[50452239]{vcl160.bpl } Vcl.Forms.TApplication.Run (Line 10328, "Vcl.Forms.pas" + 26) + $3
QC Entry 100095
I can provide a project to reproduce this. Just open a style designer and press cut form edit menu 1. Open attached project 2. Select 'edit custom style' for the radiobutton from popup menu 3. Main menu->Edit->cut
QC #: Date Reported: Area:
96524 7/22/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Ugly brush designer (gradient) designer layout

[QC Description]
See attachment:
- "linear" combo in the middle of the screen
- only one gradient point is visible/selectable
- previous rectangle is placed outside box / over "make resource" button
- etc

(note: within Win7 64bit Vmware)
QC Entry 96524
- new FMX 2d app - add button to form - right mouse click -> edit custom style - select rectangle, select fill, click on "..." to open brush designer, - select gradient tab
QC #: Date Reported: Area:
98197 8/26/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
Drag and Drop to reorder menu items doesn't work

[QC Description]
The menu designer lets you drag and drop to reorder items, but the new order doesn't take effect.
QC Entry 98197
New FMX HD app Drop a TMainMenu Double click on it. Click Add Item five times Click on MenuItem1 to select it Click again on MenuItem1 and drag it to the bottom of the list. Close the dialog Open it again exp: order should be the same as it was before act: order was reset
QC #: Date Reported: Area:
97215 8/5/2011 FireMonkey\Form Designer
Description: Steps:
[QC Short Description]
In the Style Designer, stylename will not change at once.

[QC Description]
In the style designer, following problem:

1. If want to change a component's stylename, input the name, if you havn't press the enter key, the name will not valid.

2.After press the enter key, the stylename in the right listbox will not update at once, you must apply and close the window, re-enter the style designer, then, can see the result.

3.About two problems should be solved if FMX want to release.
QC Entry 97215
1. place a stylebook on the form. 2. enter into the style designer. 3. create a new resource/or load a style file. 4. try to name/or rename a component's stylename. 5. If you just enter the stylename then left the input area, the input data will lost and will not valid 6. After press the enter key to make sure you want use the name, you will not see any change at the right listbox, you must apply and close the window. 7. above two problems is very inconvient for a developer/designer.
QC #: Date Reported: Area:
101305 11/25/2011 FireMonkey\Menu Designer
Description: Steps:
[QC Short Description]
PopupMenu items are shown with Visible := False

[QC Description]
I have a TPopup menu with some item.
If I set Visible property to False to one or more items, those items will not appear but the PopupMenu
will not repaint. If I set visible to false for the last item, this item will not be showned but the space reserved for that item
in the menu will be there the same.
QC Entry 101305
Create HD Firemonkey App, add a TEdit and TPopupMenu, link the TPopupMenu to the TEdit.PopupMenu property. Add some item to the PopupMenu and put one or more of them, with Visible to False. The will be an empty space for each one of them.
QC #: Date Reported: Area:
101119 11/17/2011 FireMonkey\Menu Designer
Description: Steps:
[QC Short Description]
[MacOS] Can't make menu item invisible on firemonkey

[QC Description]
QC#99097 was fixed with Udpate 2 on Windows.

but, the problem is still there when compiling for Mac OS.
QC Entry 101119
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 on "MacOS", menu item will remain visible
QC #: Date Reported: Area:
101005 11/14/2011 FireMonkey\Menu Designer
Description: Steps:
[QC Short Description]
[MacOS] TMenuItem's Shortcut is not work. (In the cases of a cursor key etc. )

[QC Description]
If Ctrl+Up etc. are set to ShortCut by MacOS, it will not operate well.

ShortCutToMACKey() of FMX.Platform.Mac considers that I am imperfect.

For example, you should make it as follows:(It is not perfect.)

procedure ShortCutToMACKey(ShortCut: TShortCut; var Key: Char; var ModifierMask: NSUInteger);
begin
Key := Char(Lo(ShortCut));
ModifierMask := 0;
case Key of
'A'..'Z' : Key := Char(Ord(Key)+$20);
#$08 : Key := Char(NSBackspaceCharacter);
#$09 : Key := Char(NSTabCharacter);
#$0d : Key := Char(NSEnterCharacter);
#$21 : Key := Char(NSPageUpFunctionKey);
#$22 : Key := Char(NSPageDownFunctionKey);
#$23 : Key := Char(NSEndFunctionKey);
#$24 : Key := Char(NSHomeFunctionKey);
#$25 : Key := Char(NSLeftArrowFunctionKey);
#$26 : Key := Char(NSUpArrowFunctionKey);
#$27 : Key := Char(NSRightArrowFunctionKey);
#$28 : Key := Char(NSDownArrowFunctionKey);
#$2e : Key := Char(NSDeleteCharacter);
#$70..#$87 : Key := Char(NSF1FunctionKey+Ord(Key)-$70);
end;

if ShortCut and scCommand <> 0 then ModifierMask := ModifierMask or NSCommandKeyMask;
if ShortCut and scShift <> 0 then ModifierMask := ModifierMask or NSShiftKeyMask;
if ShortCut and scCtrl <> 0 then ModifierMask := ModifierMask or NSControlKeyMask;
if ShortCut and scAlt <> 0 then ModifierMask := ModifierMask or NSAlternateKeyMask;
end;
QC Entry 101005
<case 1> 1. Create FireMonkey HD project. 2. Create TMainMenu and Create a TMenuItem as 'mnuParent'. 3. Create a child item as 'mnuTest'. 4. Set mnuTest.ShortCut := 16422; // Ctrl+Up 5. Execute on OSX 6. Although it expects being displayed as "^Up" as shortcut, it is displayed as "^&". <case 2> 1. Create FireMonkey HD project. 2. Create TMainMenu and Create a TMenuItem as 'mnuParent'. 3. Create a child item as 'mnuTest'. 4. Set 'Del' to Shoftcut property by IDE's object inspector. 5. Execute on OSX 6. expects "Del", but displayed as "."
QC #: Date Reported: Area:
100788 11/6/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
[MacOS] Memory leaks in Macapi.ObjectiveC.pas

[QC Description]
In 5 places in Macapi.ObjectiveC.pas, a local TList or TDictionary object is created that is never freed. This causes memory leaks, as shown by the Leaks module of Apple's Instruments application.
QC Entry 100788
1. Create a new FireMonkey HD application
2. add a button to the form
3. handle the button’s OnClick event by calling ShowMessage.
4. Add OS X as a target, buld and deploy the application to the mac.
5. Launch Instruments on the Mac.
6. Choose the Leaks instrument.
7. Select target by selecting Choose Target and navigating to the application.
8. Start recording.
9. Click the button on the form and close the resulting popup message.
10. Repeat step 9 a few times.
11. Shut down the application and look at the leaks detected in Instruments.

See attached image for results from customer.

== Original Steps below ==
Create any object through the Delphi to Objective-C bridge, and leaks will result. More discussion here: http://delphihaven.wordpress.com/2011/11/06/memory-leaks-on-os-x/
QC #: Date Reported: Area:
96839 7/29/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
file dialogs end modal form's modal loop

[QC Description]
If a file dialogs that was popped up by a modal forms closes, the modal form's modal loop ends as well.

see steps
QC Entry 96839
- create a new FMX HD app - add two buttons with these OnClick handlers: procedure TForm1.Button1Click(Sender: TObject); begin try TForm1.Create(nil).ShowModal; finally Caption := 'Modal loop ended!'; end; end; procedure TForm1.Button2Click(Sender: TObject); begin TOpenDialog.Create(nil).Execute; end; - run on Mac - click Button1 - on in the (modal) form click Button2 - close the file dialog that appeared exp: main form's caption bar still reads "Form1" obs: it reads "Modal loop ended!"
QC #: Date Reported: Area:
99035 9/19/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
ShowModal and displaying Exception

[QC Description]
XE2 with FMX Forms on Mac OSX:

There is a different behavier when I raise an exception in a Modal Form.
When the exception dialog (or other MsgDlg) is shown, the modal form will always be closed.

QC Entry 99035
Create FMX application with Target OSX: Create FMX HD Form place 2 TButtons Click Button1 then Button2. ... procedure TForm1.Button1Click(Sender: TObject); begin with TForm1.Create(Application) do ShowModal; end; procedure TForm1.Button2Click(Sender: TObject); begin raise Exception.Create('An Error'); end; ...
QC #: Date Reported: Area:
97528 8/12/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
Memory leak at TPrinterWin (FDeviceMode)

[QC Description]
The global heap allocated at FDeviceMode is not released. It is only released when changing the active printer.

Suggested fix:

destructor TPrinterWin.Destroy;
begin
if FDeviceMode <> 0 then
begin
GlobalUnlock(FDeviceMode);
GlobalFree(FDeviceMode);
end;

inherited;
end;
QC Entry 97528
-New FMX HD app -At FormCreate: "if Printers.Count > 0 then begin end;" -Run under AQTime allocation profiler, check results. Note: This does not detect global heap leaks: ReportMemoryLeaksOnShutdown:=True;
QC #: Date Reported: Area:
97805 8/18/2011 FireMonkey\Runtime
Description: Steps:
[QC Short Description]
Performance increase by caching InvertAbsoluteMatrix (TControl3D)

[QC Description]
I was profiling a Form3D performance issue.

When moving the mouse over 3D controls with animations, the animation framerate speed degrades and the visual effect is unpleasing. (Animation slows when moving the mouse over).

One of the possible speed opts would be caching the costly calculation of InvertAbsoluteMatrix, just at the place FAbsoluteMatrix is recalculated (which is already cached, so I think its not a harmful optimization).

InvertAbsoluteMatrix is heavily used at mouse move (TControl3D ObjectAtPoint method).

QC Entry 97805
FMX.Types3D.pas TControl3D ... FInvAbsoluteMatrix: TMatrix3D; property InvertAbsoluteMatrix: TMatrix3D read FInvAbsoluteMatrix; ... function TControl3D.GetAbsoluteMatrix: TMatrix3D; begin ... Result := FAbsoluteMatrix; FInvAbsoluteMatrix:=Result; InvertMatrix(FInvAbsoluteMatrix); ...
QC #: Date Reported: Area:
101045 11/15/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
[iOS] TSpinBox vtFloat startup rounding wrong

[QC Description]
[iOS]
If you set the ValueType to vtFloat, Min=0 and Max=1 and your value to 0.79. Then run the program your value of 0.79 will get rounded to 1 ?

But, in your Form.OnCreate, set your default value to 0.79 and the application will start correctly.

Added by Sysop
<<<<<
In my environment(Xcode 4.2 / iOS 5), TSpinBox shows 0 instead of 0.79 at runtime on both Win32 and iOS.
>>>>>
QC Entry 101045
Under XE2 Update 2 Add a TSpinBox to your application Set the ValueType to vtFloat Set Min to 0 Set Max to 1 Set Value to 0.79 Start application your value will get rounded to 1
QC #: Date Reported: Area:
95031 6/11/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TMemo does not display initial empty lines from the Lines editor

[QC Description]
TMemo does not display empty lines at the start of the text if they come edited from the Lines property editor.
Empty lines are only displayed once some "real text" has been typed.


Notes:

In the standard VCL TMemo, lines are stored in a different way than in the FMX TMemo. For a TMemo, each line is single quoted and listed:

Lines.Strings = (
''
''
'blah')

while in the FMX TMemo, the component stores the Text as a classic string and never the property 'Lines'.

in the dfm we have:

Text = 'blah'

(while with the same example as previous we would expect this value: #13#10#13#10'blah' )
QC Entry 95031
Reproduction (A): - add a Memo - edit Lines - press Enter as many times a needed - type some text - validate edition =>initial empty lines are not displayed. Reproduction (B): - add a Memo - ALt+F12, view as text - object memo, type: Lines.Strings = ( '' '' 'blah') - Alt+F12 => the Memo only displays 'blah' without the two first empty lines.
QC #: Date Reported: Area:
102768 1/21/2012 FireMonkey\Components
Description: Steps:
[QC Short Description]
TMemo crash - regression

[QC Description]
see steps. Worked fine with update. 3
QC Entry 102768
- create a new FMX 2D app - add an OnCreate event like this. procedure TForm1.FormCreate(Sender: TObject); var memo: TMemo; begin memo := TMemo.Create(self); memo.Parent := self; memo.Lines.Clear; memo.Lines.Add(''); memo.Lines[0] := '_'; //<-- access violation here end; - add FMX.Memo to uses clause - run If you replace "memo.Lines.Add('');" with "memo.Lines.Add('x');" a range check error occurs, so there may actually be two problems.
QC #: Date Reported: Area:
101369 11/28/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TScrollBar thumb sometimes can't reach end of track

[QC Description]
TCustomTrack.GetThumbRect contains some code that prevents the thumb from becoming too small. This code can shift the position of the thumb by a few pixels in some cases, so the thumb can't reach the end of the track anymore.

This:

if Result.right - Result.left < Height then
begin
Result.right := Result.left + trunc(Height / 2);
Result.left := Result.left - trunc(Height / 2);
end;

should be change to:

if Result.right - Result.left < Height then
Result.right := Result.left + Height;



and this:

if Result.bottom - Result.top < Width then
begin
Result.bottom := Result.top + trunc(Width / 2);
Result.top := Result.top - trunc(Width / 2);
end;


should be change to:


if Result.bottom - Result.top < Width then
Result.bottom := Result.top + Width;
QC Entry 101369
[Update3 regression]
[svo] good values to reproduce: min 0 max 1000 viewport 150
QC #: Date Reported: Area:
99335 9/26/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Sorted ListBox duplicates selection when setting ItemIndex

[QC Description]
A single-selection sorted listbox shows two selected items when setting ItemIndex.
QC Entry 99335
-New FMX HD app -Drop a TListBox -FormCreate below, run. Exp: First item in the list is selected Act: First and second list items are selected. procedure TForm70.FormCreate(Sender: TObject); var i : TListBoxItem; begin ListBox1.MultiSelect:=False; // <-- just to be sure i:=TListBoxItem.Create(Self); i.Text:='t'; i.Parent:=ListBox1; i:=TListBoxItem.Create(Self); i.Text:='ur'; i.Parent:=ListBox1; i:=TListBoxItem.Create(Self); i.Text:='bo'; i.Parent:=ListBox1; ListBox1.Sorted:=True; // <-- commented works fine ListBox1.ItemIndex:=0; end;
QC #: Date Reported: Area:
97170 8/4/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Opacity value of 3D objects ignored

[QC Description]
The opacity value for 3D objects (tested with spheres, cones, boxes) is ignored. From the name of it this property should make objects translucent when lower than the default 1.0 but changing it won't make any visual difference so it looks like this value is either ignored or it's functionality is ignored. This applies to both design- and run-time.

Note that for correct rendering of translucent objects like spheres techniques like depth peeling have to be used.
QC Entry 97170
- Create a FireMonkey 3D application - Place a 3D object on it (e.g. a sphere) - Change opacity value Nothing happens. Object is always solid.
QC #: Date Reported: Area:
98900 9/14/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TTreeview ExpandAll does not work correctly

[QC Description]
Scenario:

a Treeview with 3 levels.
Close all levels, so that only root is visible.

then (by program) Treeview1.expandall;

--> only the first level is expanded.
second level is closed.

This is different behavior to VCL TTreeView and also different behavior what method name expects.
QC Entry 98900
function TForm3.AddTreeViewItem(Parent: TTreeViewItem; st: String)
: TTreeViewItem;
var
Tvi: TTreeViewItem;
begin
Tvi := TTreeViewItem.Create(self);
Tvi.Text := st;
if Parent = Nil then
TreeView1.AddObject(Tvi)
else
Parent.AddObject(Tvi);
Result := Tvi;
end;

procedure TForm3.MenuItem1Click(Sender: TObject);
var
T0, T1: TTreeViewItem;
begin
TreeView1.Clear;
T0 := AddTreeViewItem(nil, 'Rootentry');
T1 := AddTreeViewItem(T0, 'Level 1 entry');
AddTreeViewItem(T1, 'Level 2 entry');
TreeView1.ExpandAll;
end;

QC #: Date Reported: Area:
99698 10/7/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TTrackBar triggers OnChange event, even if Value has not changed.

[QC Description]
When mouse dragging a TrackBar past its minimum or maximum, the OnChange event is triggered repeteadly with same Value.
QC Entry 99698
-New FMX HD app -Drop a TTrackBar and a TMemo -Add TrackBar.OnChange event code below. -Run -Mouse drag the trackbar to left or right, past its limits -Exp: Memo shows 0 or 100 (min or max) only once. Act: Memo shows 0 or 100 repeteadly while mouse is pressed. procedure TForm74.TrackBar1Change(Sender: TObject); begin Memo1.Lines.Add(FloatToStr(TrackBar1.Value)) end; ----------- The problem I think it is at FMX.Controls TCustomTrack.SetValue. The Value parameter should maybe be limited between min and max *before* comparing with current FValue, not after : procedure TCustomTrack.SetValue(const AValue: Single); begin if FFrequency <> 0 then AValue:= Round(AValue / Frequency) * Frequency; if AValue > FMax - FViewportSize then AValue:= FMax - FViewportSize; if AValue < FMin then AValue:= FMin; if FValue <> AValue then begin FValue:= AValue; ... ...
QC #: Date Reported: Area:
99969 10/12/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
The TopRow property of TStringGrid is read only

[QC Description]
Currently the TopRow property of the TStringGrid control in FMX is read only.

It should be possible to also write to this value, meaning that it is easy to set a specific row at the top of the control, just like the VCL can.
QC Entry 99969
Create new fmx app Add TStringGrid Add TButton In the TBUtton OnClick event add the following code: StringGrid1.TopRow := 5; exp: project compiles act: project fails to compile with "Cannot assign to a read-only property" error
QC #: Date Reported: Area:
99718 10/7/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Arrow keys in TSpinBox do not fire the OnChange event

[QC Description]
Pressing the up and down arrow keys cause the value in a TSpinBox to increment or decrement. When the value changes the OnChange event does not fire.

I would expect the behavior of the up and dow arrow keys to be the same as clicking on the left and right arrow glyps that are part of the control. In the case of clicking on the glyphs the OnChange event does fire.
QC Entry 99718
Place a TSpinBox on a form. Add an OnChange event to it. Run the form. When you click the arrows on the left or right side of the form you will see the value change and the onChange event will fire. Press the up and/or down arrow key and you will see the value change but the onChange event will not fire.
QC #: Date Reported: Area:
100851 11/8/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Combo Box inconsistencies

[QC Description]
The various types of combo boxes in FireMonkey, behave differently when you click on the window caption:

The TPopupBox closes the pop-up when you click the window caption. This is similar to the VCL and in my opinion the most logical behavior: you click on something else, the pop-up should close.

The TCalendarBox does nothing when you click the window caption. The pop-up calendar is left open, and if you drag the window to a new position, the calendar remains in its original location.

The TComboBox, TComboTrackBar, TComboEdit and TComboColorBox remains open when you click the window caption and when you move the window, the pop-up moves with it. This behavior is of course better than the TCalendarBox, but in my opinion it would have been better if the pop-up was closed.
QC Entry 100851
- Compile and run ControlsDemo project - Try the following steps for the various combo box components: TPopupBox, TCalendarBox, TComboBox, TComboTrackBar, TComboEdit and TComboColorBox 1: Open the combo box by clicking the down arrow 2: Click the window caption and drag the window to a new position 3: Observe different behavior for the different combo box types
QC #: Date Reported: Area:
94686 6/2/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
TComboTrackBar displays incorrect cursor over drop down arrow

[QC Description]
See steps
QC Entry 94686
1: Run ctrlsdemo app
2: On the NEW page: move cursor over drop down arrow of TComboTrackBar
3: Observe carert cursor is diplayed instead of arrow


Tester zone:

Just create a new FireMonkey HD application.
Add a TComboTrackBar to the Form
Run the application
Move the cursor over the drop down arrow of the TComboTrackBar.

Notice that it displays the wrong cursor. It should be arrow.
QC #: Date Reported: Area:
102577 1/13/2012 FireMonkey\Components
Description: Steps:
[QC Short Description]
Caret improvement

[QC Description]
The caret should be black ('on') after its position changes, so you can see where it is. If you keep the space bar pressed in NotePad or TextEdit etc. you can always see the caret. In FMX TMemo the caret sometimes isn't visible. This is annoying because this means you sometimes can't see the caret after you've moved it, and you have to wait till it goes on again to see it. It's also easily noticable when usng the arrow keys.

The caret's timing cycle should restart every time it's position changes.
QC Entry 102577
 
QC #: Date Reported: Area:
102271 12/31/2011 FireMonkey\Components
Description: Steps:
[QC Short Description]
Caret often at wrong position in TMemo

[QC Description]
Besides the dancing text, clearly visible when holding the "i" or "l" key (kerning changes continually), the caret is often wrongly positioned, also clearly demonstrated by holding the "i" or "l" key.

This is unacceptable since it confuses the user into thinking the caret is positioned before the last character, while, internally, it is considered to be positioned behind it.
QC Entry 102271
Hold down the "i" or "l" key. Hit the CR key once in a while. Then hold the "i" or "l" key again. On some lines, you'll see that the caret gets overtaken by the typed text. Please see video http://dominique.willems.perso.sfr.fr/CaretOvertaken.swf I just put a TMemo on a fresh form, run the application, click inside the TMemo, and just hold the "i" key down. First, you can see that the kerning changes after a while, for a series of "i"s. Then, when I stop holding the "i" key down, the caret is positioned one "i" to the left. When I type further, however, the text is indeed added at the end again. It's just an issue of visually positioning the caret. And the annoying kerning, of course.
QC #: Date Reported: Area:
99043 9/19/2011 FireMonkey\Style Designer
Description: Steps:
[QC Short Description]
Problem editing a gradient fill in a StyleBook

[QC Description]
If you open a gradient fill in a StyleBook, the start color is always changes the start color
This can be quite annoying when you want to adjust the colors of a gradient.
QC Entry 99043
- Double click a StyleBook and select an item with a gradient fill - Observe that the start color of the gradient changes to white or a neutral gray
QC #: Date Reported: Area:
102207 12/28/2011 Databinding
Description: Steps:
[QC Short Description]
Possible error in System.Bindings.EvalSys.pas

[QC Description]
In System.Bindings.EvalSys.pas on line 710 there is code:

function MakeBasicConstants: IScope;
var
Scope: TDictionaryScope;
begin
Scope := TDictionaryScope.Create;
Result := Scope;

Scope.Map.Add('nil', TValueWrapper.Create(nil));
Scope.Map.Add('True', TValueWrapper.Create(true));
Scope.Map.Add('False', TValueWrapper.Create(true)); // !!! Should this be TValueWrapper.Create(false) ???
Scope.Map.Add('Pi', TValueWrapper.Create(pi));
end;

I'm not sure, what functionality is affected by this issue.

QC Entry 102207
In System.Bindings.EvalSys.pas on line 710 there is code: Scope.Map.Add('False', TValueWrapper.Create(true)); must be Scope.Map.Add('False', TValueWrapper.Create(false));
QC #: Date Reported: Area:
100415 11/15/2011 12:38:18 PM Databinding
Description: Steps:
Extract part of raid 288394...

With LiveBinding setting the column ReadOnly property via the Columns Editor has no effect.

Create a firemonkey form with TStringGrid bound to TClientDataSet
Right click StringGrid1, choose Columns Editor...
Add all columns
Set ReadOnly on a column

Run

Expected: column is read only
actual: column is editable
QC #: Date Reported: Area:
100331 10/21/2011 IDE\Dialogs
Description: Steps:
[QC Short Description]
C++ Audits Configuration: TCheckListBox not resized with the window

[QC Description]
In C++Builder XE2, the TCheckListBox in the "Checking project Project.cbproj" window is not resized when changing the size of the window.
QC Entry 100331
File | New | VCL Forms App - C++ View | C++ Audits Click blue go button Click the Project... button Resize the window
QC #: Date Reported: Area:
101439 11/30/2011 Install\Files
Description: Steps:
[QC Short Description]
"Data.Bind.Components.hpp" is not installed.

[QC Description]
I cannot use "LiveBindings".

When I installed only C++Builder, this issue occurs.
QC Entry 101439
I installed it from "delphicbuilder_xe2_4316_win_dl.iso". (ID: 28616, Delphi XE2 and C++Builder XE2 ISO (includes Update 2)) When I installed only C++Builder, it occurred.
QC #: Date Reported: Area:
103416 2/14/2012 Install\Files
Description: Steps:
[PRO][QC Short Description]
TAmazonConnectionInfo fails with C++Builder XE2 Professional

[QC Description]
If you drop a TAmazonConnectionInfo on a new C++Builder XE2 VCL form and attempt to compile, you receive the two following errors:

[BCC32 Error] Unit1.h(10): E2209 Unable to open include file 'Data.Cloud.AmazonAPI.hpp'
Full parser context
Unit1.cpp(6): #include Unit1.h

[BCC32 Error] Unit1.h(11): E2209 Unable to open include file 'Data.Cloud.CloudAPI.hpp'
Full parser context
Unit1.cpp(6): #include Unit1.h

Note that Amazon and Azure Cloud components are explicitly supported in the Professional version, as per the feature matrix.
QC Entry 103416
* Must use C++ Builder XE2 Professional SKU

1. File | New | VCL Forms Application - C++Builder

2. Drop a TAmazonConnectionInfo on the form (Cloud | TAmazonConnectionInfo).

3. Compile / Run

Note the error relating to the missing header files.
QC #: Date Reported: Area:
101737 12/12/2011 Database\DataSnap
Description: Steps:
[QC Short Description]
DSProxyObjvectiveCiOS must be DSProxyObjectiveCiOS

[QC Description]
[...\9.0\source\data\datasnap\connectors\Datasnap.DSProxyObjectiveCiOS.pas]
-----------
{$HPPEMIT '#pragma link "Datasnap.DSProxyObjvectiveCiOS"'} { Do not Localize }
must be
{$HPPEMIT '#pragma link "Datasnap.DSProxyObjectiveCiOS"'} { Do not Localize }
-----------

[...\9.0\include\windows\rtl\Datasnap.DSProxyObjectiveCiOS.hpp]
-----------
#pragma link "Datasnap.DSProxyObjvectiveCiOS"
must be
#pragma link "Datasnap.DSProxyObjectiveCiOS"
-----------

Due to this typo, C++Builder causes link error
-----
[ILINK32 Error] Fatal: Unable to open file 'DATASNAP.DSPROXYOBJVECTIVECIOS.OBJ'
-----
QC Entry 101737
In C++Builder server, add .hpp files in WebModuleUnit header for REST Server and link .objs.
-----
#include <Datasnap.DSProxyJavaAndroid.hpp>
#include <Datasnap.DSProxyJavaBlackBerry.hpp>
#include <Datasnap.DSProxyObjectiveCiOS.hpp>
#include <Datasnap.DSProxyCsharpSilverlight.hpp>
-----


remove 'v' in .pas and .hpp
QC #: Date Reported: Area:
102803 1/22/2012 Database\DataSnap\Server
Description: Steps:
[QC Short Description]
'DATASNAP.DSPROXYFREEPASCAL_IOS.OBJ' is missing

[QC Description]
When building a Datasnap REST server, liker error occurs
----
[ILINK32 Error] Fatal:
Can not open
File 'DATASNAP.DSPROXYFREEPASCAL_IOS.OBJ'
----
QC Entry 102803
1. install the latest build of C++Builder XE2 2. create new Datasnap REST server 3. add #include <Datasnap.DSProxyFreePascal_iOS.hpp> 4. build app 5. [ILINK32 Error] Fatal: Can not open File 'DATASNAP.DSPROXYFREEPASCAL_IOS.OBJ'
QC #: Date Reported: Area:
101478 12/1/2011 Internet\XML\Data Binding
Description: Steps:
[QC Short Description]
[REGRESSION] XML Data binding doesn't work

[QC Description]
In the XML Data binding wizard you must define a "Document Element Type".
In the submited example select the "aplicaciones" as Document Element type.

The XML Data binding tool crash in any case when the .cpp or .pas creation process.
In the case of C++ Builder it the .h file is never created. A ERROR message appears --> "Format '#define TargetNamespace "%d" invalid or incompatible with argument.

This behavior only occurs when the Update 2 is applied. With previous updates/versions it works fine.
QC Entry 101478
In the XML Data binding wizard you must define a "Document Element Type". In the submited example select the "aplicaciones" as Document Element type. a.- Create a new VCL Forms Application --> C++ Builder. b.- Add a new item in with the XML application wizard. Use ANY .xsd file. c.- Follow the XML Data Binding wizard steps and press the "finish" button d.- The error appear in this step I use a few .xsd files to test (small and big files) and has the same behaviour. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="titulo"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="size"> <xs:simpleType> <xs:restriction base="xs:short"/> </xs:simpleType> </xs:element> <xs:element name="fallos"> <xs:simpleType> <xs:restriction base="xs:byte"/> </xs:simpleType> </xs:element> <xs:element name="app"> <xs:complexType> <xs:sequence> <xs:element ref="titulo"/> <xs:element ref="size"/> <xs:element ref="fallos"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="aplicaciones"> <xs:complexType> <xs:sequence> <xs:element ref="app" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
QC #: Date Reported: Area:
95808 7/4/2011 ActiveX\Code Generators\C++
Description: Steps:
[QC Short Description]
Importing AxtiveX Control fails

[QC Description]
I tried to import the ActiveX of the Axis Media Control into a new C++ type package. The generated include file contains the following lines with invalid class definition:
__property System::Comp CurrentPosition64={ read=GetCompProp, write=SetCompProp, stored=false, index=159 };
__property System::Comp StartPosition64={ read=GetCompProp, write=SetCompProp, stored=false, index=160 };
__property System::Comp StopPosition64={ read=GetCompProp, write=SetCompProp, stored=false, index=161 };

The package cannot be compiled. THIS IS THE "MAIN' FAILURE.

If I replace the System::Comp with a valid type (internally is unsigned int64), then I can compile and install the component. But putting the components onto a form in a VCL application, I get an access violation.
A send the accident report from the compiler directly.
(Nr. 95807)

I make another report for Delphi: Here is another error, not at the same place....
QC Entry 95808
I would like to attach the 'AXISMediaControlSDK_5_90.zip', but the attachment menue is disabled (grayed)... So if I can attach it..., please install. Go to Component/Import Component/Import ActiveX Control. Choose Axis Media Control Type Library. Install it to a new package. The compiler error occurs. If You replace System::Comp with a valid type (internally is unsigned int64), then You can compile and install the component. If You make a VCL forms application and place the new component onto the form, You will get an access violation. Only the task manager helps...
QC #: Date Reported: Area:
100330 10/21/2011 Tools CL\TDump
Description: Steps:
[QC Short Description]
TDump does not decode the DllCharacteristics field in the PE header

[QC Description]
... the way it decodes the Characteristics field.
QC Entry 100330
Run the command >tdump "%windir%\system32\notepad.exe" | find "DLL flags" Expected: > DLL flags 8140 [ termsrv DEP ASLR ] Actual: > DLL flags 8140 [ ]
QC #: Date Reported: Area:
100543 10/28/2011 Tools CL\TDump
Description: Steps:
[QC Short Description]
TDump lists only the first function for every imported x64 DLL

QC Entry 100543
Dump a simple x64 Delphi application:
-------8<-------
test
-------8<-------

Actual:
>tdump -em=kernel32.dll test.exe
IMPORT: kernel32.dll='Sleep'
IMPORT: kernel32.dll='GetProcAddress'
Expected:
>dumpbin /imports:kernel32.dll test.exe
kernel32.dll
0 Sleep
0 VirtualFree
0 VirtualAlloc
0 VirtualQuery
0 GetSystemInfo
0 GetVersion
0 GetACP
0 GetStartupInfoW
0 GetProcAddress
0 GetModuleHandleW
0 GetCommandLineW
0 FreeLibrary
0 UnhandledExceptionFilter
0 RtlUnwind
0 RaiseException
0 ExitProcess
0 GetCurrentThreadId
0 DeleteCriticalSection
0 InitializeCriticalSection
0 WriteFile
0 GetStdHandle
0 CloseHandle
kernel32.dll
0 GetProcAddress
0 RaiseException
0 LoadLibraryA
0 GetLastError
0 TlsSetValue
0 TlsGetValue
0 LocalFree
0 LocalAlloc
0 GetModuleHandleW
0 FreeLibrary
QC #: Date Reported: Area:
101307 11/25/2011 Compiler\C++
Description: Steps:
Ternary operators used with properties cause an Access Violation.

[QC Short Description]
Ternary operators may not work with properties

[QC Description]
Accessing properties through a ternary operator may cause an AV.
QC Entry 101307
1. Build and run the attached project (F9).
2. Click on the Button1.
exp: no AV
act: AV

====== old steps ======
The following code, causes an Access Violation:

struct {
__property int Bar = { read = GetBar };
int GetBar() { return 0; }
void Foo() {
int Foo1 = 0;
const int &Foo2 = (int(Date()) ? Bar : Foo1);
}
} FooBar;

void __fastcall TForm1::Button1Click(TObject *Sender)
{
FooBar.Foo();
}


QC #: Date Reported: Area:
101088 11/17/2011 Compiler\C++
Description: Steps:
IBE with fastcall and params in complicated expressions.
This is a regression from BCB 2009.


[QC Short Description]
F1001 Internal code generator error

[QC Description]
Please build attached project.

--------
bcc32 command line for "Arr.cpp"
...
...
[BCC32 Fatal Error] Arr.cpp(85): F1001 Internal code generator error
--------
QC Entry 101088
Compile the source below.
ext: clean compile
act: Internal Backend Error

void __fastcall foo(
int param1,
unsigned int param2)
{
char *arr;
int n;
int m = param1;

if (param2)
arr[3 % m] = 1 << (7 - (n & 7));
else
arr[(n >> 3) % m] = 1 << (7 - (n & 7));
}

==== old steps ====
Error while compiling code with Project/Options/Optimizations/Generate fastest possible code = True

Command line:

c:\program files (x86)\embarcadero\rad studio\9.0\bin\bcc32.exe -DNDEBUG -D_RTLDLL;USEPACKAGES -n.\Release\Win32 -I"c:\program files
(x86)\embarcadero\rad studio\9.0\include\windows\vcl";D:\WorkXE\Builder\Junk;"C:\Program Files (x86)\Embarcadero\RAD
Studio\9.0\include\boost_1_39\boost\tr1\tr1";"C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\boost_1_39";"c:\program files
(x86)\embarcadero\rad studio\9.0\include";"c:\program files (x86)\embarcadero\rad studio\9.0\include\dinkumware";"c:\program files
(x86)\embarcadero\rad studio\9.0\include\windows\crtl";"c:\program files (x86)\embarcadero\rad studio\9.0\include\windows\sdk";"c:\program files
(x86)\embarcadero\rad studio\9.0\include\windows\rtl";"c:\program files (x86)\embarcadero\rad studio\9.0\include\windows\vcl";"C:\Program Files
(x86)\FastReports\LibD16";"c:\program files (x86)\embarcadero\rad studio\9.0\RaveReports\Lib";"C:\Program Files (x86)\Raize\CS5\Lib\RS-XE2\Win32";
"C:\Users\Public\Documents\RAD Studio\9.0\hpp" -Q -6 -c -RT- -B -tM -tU -tW -C8 -o.\Release\Win32\Arr.obj -w-par -O2 -v- -vi
-H=.\Release\Win32\Project1.pch -H Arr.cpp


QC #: Date Reported: Area:
91550 2/14/2011 Compiler\C++
Description: Steps:
[QC Short Description]
boost enable_if problem with XE update1

[QC Description]
I'm failing to build an application which builds fine in C++ Builder 2010 but fails in C++ Builder XE. It uses boost. Specifically the first problem seems to be caused by ASIO and boost/system/error_code.

Anyone got a fix? Or can give me any pointers on how to go about fixing it?

I'm getting a compile error with the use of boost::enable_if in boost/system/error_code.hpp:

class error_category : public noncopyable
{

...

template<typename ErrorConditionEnum>
typename boost::enable_if<is_error_condition_enum<ErrorConditionEnum>, error_condition>::type &
operator=( ErrorConditionEnum val )
{
*this = make_error_condition(val);
return *this;
}


[BCC32 Error] enable_if.hpp(36): E2299 Cannot generate template specialization from 'enable_if_c<&value,T>'
Full parser context
...
InteractiveTerminalServer.h(14): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/asio.hpp
asio.hpp(20): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/asio/basic_datagram_socket.hpp
basic_datagram_socket.hpp(25): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/asio/basic_socket.hpp
basic_socket.hpp(24): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/asio/basic_io_object.hpp
basic_io_object.hpp(20): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/asio/io_service.hpp
io_service.hpp(26): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/system/error_code.hpp
error_code.hpp(19): #include C:\Program Files\Embarcadero\RAD Studio\8.0\include\boost_1_39\boost/utility/enable_if.hpp
enable_if.hpp(25): namespace boost
enable_if.hpp(36): decision to instantiate: enable_if<is_match_condition<regex>,void>
--- Resetting parser context for instantiation...
QC Entry 91550
compile the code below.

//exp: clean compile
//act: Error E2402 281899.cpp 9: Illegal base class type: formal type 'B<T2>' resolves to 'B<T2>'

struct A { };
template <typename T> struct B { };

template <typename T> struct S {
struct M { };
template <typename T2> struct N : B<T2> { };
};
typedef S<A>::M sam; // fails
typedef S<A>::N<A> sana; // also fails
==== original steps ====
https://forums.embarcadero.com/thread.jspa?threadID=46586

Please try to compile ASIO multicast sender sample.

...\RAD Studio\8.0\include\boost_1_39\libs\asio\example\multicast\sender.cpp
QC #: Date Reported: Area:
101183 11/21/2011 Compiler\C++
Description: Steps:
[QC Short Description]
compiling error with excel_xp_srvr.h

[QC Description]
#include <Data.SqlExpr.hpp>
#include "Excel_XP_srvr.h"

compile error declaration occurs on nullstring in Excel_XP_srvr.h

[BCC32 Error] Excel_XP.h(37480): E2040 Declaration terminated incorrectly
[BCC32 Error] Excel_XP.h(96306): E2040 Declaration terminated incorrectly
[BCC32 Error] Excel_XP.h(119190): E2040 Declaration terminated incorrectly
QC Entry 101183
create a new vcl application project insert two header files as shown below #include "Unit1.h" #include <Data.SqlExpr.hpp> #include "Excel_XP_srvr.h" compile error declaration occurs on nullstring in Excel_XP_srvr.h if <Data.SqlExpr.hpp> is omitted no error occurs
QC #: Date Reported: Area:
101705 12/10/2011 Compiler\C++\Front End\Templates
Description: Steps:
[QC Short Description]
interface_cast<> test case from QC #84218 fails

[QC Description]
The test project attached to QC #84218 doesn't pass any longer with both the latest XE and with XE2.
I updated the test project so that it runs against the interface_cast<>() of the RTL, not the one proposed in that QC report (subtle differences only). The updated project is attached. Please add it to your internal regression test suite to make sure interface_cast<> is kept functional.

The source of the problem seems to be that BCC is picking the wrong instantiation of _InterfaceCastHlpr: it picks _InterfaceCastHlpr<DESTTYPE, false> when it should pick _InterfaceCastHlpr<DESTTYPE, true> during the interface_cast<>() call in the lines marked as "offending line" in the test case. Commenting them out will make the error go away. As can be seen in the explicit instantiation in the subsequent line (which is a manually inlined call to interface_cast<>()), __is_base_of() is working correctly; it's the detour via interface_cast<>() which breaks things.
QC Entry 101705
- compile and run the attached test project with BCC (bcc32 -WCV main.cpp) Exp.: compiles, runs, prints "PASS" Act.: fails to compile and raises several errors pointing inside the definition of DelphiInterface<TMyObject> [include\windows\rtl\systobj.h] ---------- ... __fastcall ~DelphiInterface<T>() { if (intf != 0) { #if !defined(NO_DI_DISAMBIGUATE_RELEASE) // Disambiguate cases where intf has a Release(...) member // [BCC32 Error] systobj.h(188): E2031 Cannot cast from 'TMyObject *' to 'IUnknown *' static_cast<IUnknown*>(intf)->Release(); #else intf->Release(); #endif intf = 0; } } ... ----------
QC #: Date Reported: Area:
100474 10/26/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
Audit error in Vcl.Dialogs.hpp

[QC Description]
Not sure whether or not this is a fault of the clang front end, but this code has always compiled in bcc32 but raises an error when running an audit:

Sample code:

#include <Vcl.Dialogs.hpp>

int main()
{
ShowMessage( "Hi" );
return 0;
}
QC Entry 100474
Sample project attached, or: File | New | C++ Console app - no framework insert this as first line: #include <Vcl.Dialogs.hpp> View | C++ Audits Click blue go button in Autit pane Click "Start" button in Audit dialog Exp: Clean Audit Act: <Error> member access into incomplete type 'IAutoComplete' systobj.h 190 17 Audit is clean if vcl.h is included before Dialogs.hpp Including FMX.Dialogs.hpp does not raise an error on audit
QC #: Date Reported: Area:
100635 11/1/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
C++ Code Audit: _beginthreadx not recognized

[QC Description]
When using _beginthreadx() the audits can come up with two errors even when process.h is included in the file.

::_beginthreadx(): no member named _beginthreadx in the global namespace

_beginthreadx(): use of undeclared identifier _beginthreadx
QC Entry 100635
Create a VCL application add: #include <process.h> add: _beginthreadx or ::_beginthreadx run audits get errors
QC #: Date Reported: Area:
100405 10/24/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
Any use of MessageDlg causes Audit <Error>

[QC Description]
Sample Code:

#include <vcl.h>
#include <tchar.h>

int _tmain()
{
MessageDlg( "message", mtConfirmation, mbOKCancel, 0 );
return 0;
}
QC Entry 100405
File | New | C++ Console app Select VCL Framework Add a call to MessageDlg() (Sample code attached.) View | C++ Audits Click blue go button in Autit pane Click "Start" button in Audit dialog Exp: Clean Audit Act: <Error> invlid operands to binary expression ('System::Uitypes::TMsgDlgBtn' and 'int') sysset.h 152 44
QC #: Date Reported: Area:
100404 10/24/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
Audit <Error>s from System::Set insertions

[QC Description]
Insertion of a member into a System::Set raises an ambiguity error from comparison of the inserted element to a scoped enum.

I can find no work-around for this problem,

Code:

#include <vcl.h>
#include <tchar.h>
int _tmain()
{
String s( "aababcabcdabcde" );
ShowMessage( StringReplace(s, "ab", "z", TReplaceFlags() << rfReplaceAll) );
return 0;
}
QC Entry 100404
File | New | C++ Console App Select VCL Framework Add code to insert an element into a VCL Set defined as a scoped enum (Sample code in description) View | C++ Audits Click blue go button in Autit pane Click "Start" button in Audit dialog Exp: Clean Audit Act: <Error> use of overloaded operator '>=' is ambiguous (with operand types 'const System::Sysutils::System_Sysutilos__85' and 'unsigned char') sysset.h 152 14
QC #: Date Reported: Area:
100320 10/21/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
CLANG front end does not see TCHAR maps to wchar_t setting

[QC Description]
The CLANG front end does not seem to see the TCHAR maps to wchar_t setting.

Code:

#include <vcl.h>
#include <cstdio>
#include <tchar.h>

using std::FILE;
using std::fopen;
using std::_wfopen;
using std::fclose;

int _tmain()
{
FILE *f = _tfopen( String("LogFile.txt").c_str(), _T("a+") );
if ( f ) fclose( f );
return 0;
}
QC Entry 100320
Open attached project Note that TCHAR is set to map to wchar_t View | C++ Audits Click blue go button in C++ Audits pane Click Ok in dialog Exp: Clean Audit - code builds without error Act: <Error> no matching function to 'fopen' File1.cpp 12 12 Noter that it is failing to find a matching "fopen()" while it should be looking for "_wfopen()" which it would find. If a define for _UNICODE is added to the project, the Audit is clean (except for the expected checks in ustring.h).
QC #: Date Reported: Area:
100317 10/21/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
CLANG front-end does not seem to "get" public access to __property

[QC Description]
VCL properties that are declared public but use protected getter\setter functions are flagged as errors by Audits

Code:

#include <vcl.h>
#include <memory>

typedef std::auto_ptr<TStringList> const Slap;

int _tmain()
{
Slap resp( new TStringList );
return resp->Count ? resp->Strings[0].Length() : 0;
}
QC Entry 100317
File | New | C++ Console App
Select VCL Framework
Add code to access a public __property that uses a protected function - sample code in description
Save All
View | C++ Audits
Click blue go button in Audits pane
Click Start button in dialog

Exp: Clean audit - using a public __property

Act:
<Error> 'Get' is a protected member of 'System::Classes:TStringList' System.Classes.hpp 1138 2
<Error> 'GetCount' is a protected member of 'System::Classes:TStringList' System.Classes.hpp 1125 2

Note - I tested using a bare *TStringList pointer instead of auto_ptr<> and the results are the same.
QC #: Date Reported: Area:
100909 11/9/2011 Compiler\C++\CLANG\Audits and Metrics
Description: Steps:
[QC Short Description]
C++ Code Audit: ICE

[QC Description]
adding the line:

#include <regex> to a C++ and then running code audit with "Redefining an Inherited Nonvirtual function (RINF) on causes ICE in audit.
QC Entry 100909
1. Create a firemonkey HD app 2. run a code audit with Redefining an Inherited Nonvirtual function (RINF) on expected: list of errors or issues actual: list of errors or issues 3. Add #include <regex> to the .cpp file before #include "Unit1.h" 4. run a code audit with Redefining an Inherited Nonvirtual function (RINF) on expected: list of error or issues actual: <FATAL> ICE:Internal Compiler Error: c0000005 Unit1.cpp then a list of errors or issues
QC #: Date Reported: Area:
100910 11/9/2011 RTL\Delphi
Description: Steps:
[QC Short Description]
RegularExpress RTL not included for OS X

[QC Description]
The RTL regular expression are not included for OS X builds.

Added by Sysop
<<<<<
With Delphi, System.RegularExpressions unit can be used for both Windows and MacOS.

But, with C++Builder, TRegEx class can not be used via #include <RegularExpressions.hpp>.
>>>>>
QC Entry 100910
Added by Sysop <<<< For MacOS application, TRegEx class can not be used via #include <RegularExpressions.hpp>. >>>> This will probably get closed. The RTL regular expressions (since they are part of the RTL and written in C) should be included for OS X builds. This is doubly an issue due to boost::regex not building for OS X (QC100908)
QC #: Date Reported: Area:
101689 12/9/2011 RTL\C++
Description: Steps:
[QC Short Description]
wcstol() fail if a string starts with "0x" and radix is 0 or 16

[QC Description]
The result of wcstol() function is 0 if a character string starts with "0x" and the radix is 0 or 16.

//---------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
//---------------------------------------------------------------------------
int wmain(int argc, wchar_t* argv[])
{
int x = wcstol (L"0x1234", NULL, 0); // BUG here!

printf ("x = %lX", x); // Expected result: x = 1234, actual result: x = 0

return 0;
}
//---------------------------------------------------------------------------
QC Entry 101689
Compile and run the source code from the "Description" area. Check the result of wcstol() function.
QC #: Date Reported: Area:
102080 12/23/2011 RTL\C++
Description: Steps:
[QC Short Description]
[REGRESSION] Wrong AnsiString comparison

[QC Description]
Please see [Comment] of QC for more information.

Comparing AnsiStrings gives a wrong result:

AnsiString a1 = "abc";
AnsiString a2 = "ABC";
UnicodeString u1 = a1;
UnicodeString u2 = a2;
AddMsg( "A-A: abc == ABC: " + IntToStr( (int) ( a1 == a2 ) ) );
AddMsg( "U-U: abc == ABC: " + IntToStr( (int) ( u1 == u2 ) ) );
AddMsg( "A-U: abc == ABC: " + IntToStr( (int) ( a1 == u2 ) ) );
AddMsg( "U-A: abc == ABC: " + IntToStr( (int) ( u1 == a2 ) ) );

AddMsg puts a string into a ListBox.

Output:

A-A: abc == ABC: 1 <- wrong
U-U: abc == ABC: 0
A-U: abc == ABC: 1 <- wrong
U-A: abc == ABC: 0


C++Builder 2010 / XE compiler does not have this bug!

QC Entry 102080
Please see [Comment] of QC for more information. create new VCL C++ project. Add a ListBox to form. ------------------- void __fastcall TForm1::AddMsg( AnsiString s ) { ListBox1->Items->Add( s ); } void __fastcall TForm1::Button1Click(TObject *Sender) { AnsiString a1 = "abc"; AnsiString a2 = "ABC"; UnicodeString u1 = a1; UnicodeString u2 = a2; AddMsg( "A-A: abc == ABC: " + IntToStr( (int) ( a1 == a2 ) ) ); AddMsg( "U-U: abc == ABC: " + IntToStr( (int) ( u1 == u2 ) ) ); AddMsg( "A-U: abc == ABC: " + IntToStr( (int) ( a1 == u2 ) ) ); AddMsg( "U-A: abc == ABC: " + IntToStr( (int) ( u1 == a2 ) ) ); } ------------------- Output: A-A: abc == ABC: 1 <- wrong U-U: abc == ABC: 0 A-U: abc == ABC: 1 <- wrong U-A: abc == ABC: 0
QC #: Date Reported: Area:
101098 11/17/2011 Modeling\Generate Documentation
Description: Steps:
[QC Short Description]
XML Documentation Comments not working for C++

[QC Description]
in the wiki :
http://docwiki.embarcadero.com/RADStudio/XE2/en/XML_Documentation_Comments
says that this functionnality is Supported by Delphi and C++Builder.

I tried to generate XML Documentation Comments using this kind of comments :
/// <summary> Removes the specified item from the collection
/// </summary>
/// <param name="Item">The item to remove
/// </param>
/// <param name="Collection">The group containing the item
/// </param>
/// <remarks>
/// If parameter "Item" is null, an exception is raised.
/// <see cref="EArgumentNilException"/>
/// </remarks>
/// <returns>True if the specified item is successfully removed;
/// otherwise False is returned.
/// </returns>

this works with a delphi project (help insight + comments appears in generate documentation) but none of this worked with a c++ project....

but it is written in the wiki :
http://docwiki.embarcadero.com/RADStudio/XE2/en/XML_Documentation_Comments
that this functionnality is Supported by Delphi and C++Builder.
QC Entry 101098
in the wiki : http://docwiki.embarcadero.com/RADStudio/XE2/en/XML_Documentation_Comments says that this functionnality is Supported by Delphi and C++Builder. Create a new C++ builder project. Add this function with comments : /// <summary> Removes the specified item from the collection /// </summary> /// <param name="Item">The item to remove /// </param> /// <remarks> /// If parameter "Item" is null, an exception is raised. /// <see cref="EArgumentNilException"/> /// </remarks> /// <returns>True if the specified item is successfully removed; /// otherwise False is returned. /// </returns> bool RemoveItem(Item * item); { return true; } go to "view model" and right click on project to generate documentation. Comments are not present in generated documentation. Help Insight won't work either. This will work for a delphi project.
QC #: Date Reported: Area:
98334 8/30/2011 Databinding\Components
Description: Steps:
[QC Short Description]
LiveBindings for FMX::TStringGrid will not show edited ClientDataSet records

[QC Description]
Still trying to make a minimal FireMonkey app to edit .cds files in a grid, and still failing after all of my little demo app bugs have been fixed.

I can successfully display and edit the data in the .cds file now, but after saving edited data and reloading the .cds file, all of the edited records are missing.

I created a VCL app using a DBGrid as a test base and found that I can load the edited .cds file into that app and it shows all records. All of the edits made in the FMX app show in the VCL app, so it does not appear to be corrupting the file itself.

Editing records with either of the two apps causies them not to show when the file is opened in the fmx APP.

Have not yet tried creating a VCL app using a TStringGrid and LiveBindings, but this was still nearly impossible to achieve in Beta 11. Have not looked in Beta 12 yet as I wanted to get this filed as soon as possible.

Have not yet tested with other database systems.

After more testing it seems that there is a limit of 200 records read in and that my test file has 255, so the bottom is simply cut off. So I have changed this report to a design problem - it is quite difficult to figure out what is going wrong here.

The only way I can find to repair the code without leaving a hard record count limit is to read in each file twice, since changing the value after loading the file does not work.

Cds->LoadFromFile( CdsFile );
GridLink->BufferCount = Cds->RecordCount;
Cds->LoadFromFile( CdsFile );
QC Entry 98334
Open attached project group Select the BindGrid project F9 to build and run File | Open and open the CountryCode.cds file Edit the Perminute column (numeric) of the first few records - use # from Id column File | Open - yes to save and reopen same file Exp: Edited records will show at the bottom of the list (no index in use) Act: Edited records are gone Select the CdsEditV project F9 to build and run File | Open and open the CountryCode.cds file Verify that the edited records are visible here and that the edits have been saved correctly (this app displays the data ordered by Id for convenience) Backup copies of the two .cds files have been included for reference.


Published on: 2/28/2012 12:02:47 PM

Server Response from: ETNASC03

Copyright© 1994 - 2013 Embarcadero Technologies, Inc. All rights reserved.