Fix List for Embarcadero Delphi XE2 and C++Builder XE2

Transcription

Fix List for Embarcadero Delphi XE2 and C++Builder XE2
FixListforEmbarcaderoDelphiXE2andC++BuilderXE2
This includes the list of fixes in the release of Delphi XE2 and C++Builder XE2 in August 2011. Date
QC
Reported Area:
#:
:
8747
8/23/2010
4
Demos
Description:
Steps:
[QC Short
Description]
HelpInsight is not
working for source
code comments
1. Open the DbxDataPump project from
https://radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE/Delphi/Database/dbExpre
ss
2. open ..\Utils\DbxUtils.pas
3. go to the implementation of function GetValue() (around line 1154)
4. hover over the call to CreateDataSet (which has xml documentation in both its interface and implementation,)
[QC Description]
XML
Documentation for
Help Insight is not
being displayed
correctly
QC Entry 87474
//exp: the documented call to CreateDataSet()
//act: the default help insight dialog with no documentation
// Problem is bad XML in DbxUtils.pas, line 118. There is an closing "</c>" tag, but no opening "<c>" tag. The closing tag
should be removed.
QC #:
Date Reported:
Area:
96472
7/21/2011
Demos\Other
Description:
Steps:
[QC Short Description]
problems with an expert, downloaded from SVN
Samples\Delphi\VCL\ToolsAPI\Productivity\
problems with an expert, downloaded from SVN
Samples\Delphi\VCL\ToolsAPI\Productivity\ 1. write a blank function
Sample ( A, B: Integer; C: string = 'NULL' ): boolean; 2. write ///
[QC Description]
problem when adding XML comments to the function for which
between the closing bracket and the argument is blank.
example
function Sample ( A, B: Integer; C: string = 'NULL' ): boolean;
This is a serious problem, given that not all share a certain Delphi
syntax.
is solved as
// original
function ParseCPPDeclaration(const Declaration: string): string;
var
RoutineDeclaration: TRoutineDeclaration;
begin
RoutineDeclaration := ParseCPP(Declaration);
Result := RoutineDeclaration.XML;
RoutineDeclaration.Free;
end;
// change to
function ParseCPPDeclaration(const Declaration: string): string;
var
RoutineDeclaration: TRoutineDeclaration;
S: string;
begin
S := StringReplace(Declaration, ' ', '', [rfReplaceAll]);
RoutineDeclaration := ParseCPP(S);
Result := RoutineDeclaration.XML;
RoutineDeclaration.Free;
end;
DelphiParserImpl.pas
// original
function ParseDelphiDeclaration(const Declaration: string): string;
var
RoutineDeclaration: TRoutineDeclaration;
begin
RoutineDeclaration := Parse(Declaration);
Result := RoutineDeclaration.XML;
RoutineDeclaration.Free;
end;
// change to
function ParseDelphiDeclaration(const Declaration: string): string;
var
RoutineDeclaration: TRoutineDeclaration;
S: string;
begin
S := StringReplace(Declaration, ' ', '', [rfReplaceAll]);
RoutineDeclaration := Parse(S);
Result := RoutineDeclaration.XML;
RoutineDeclaration.Free;
end;
please correct example.
It would be nice if the new version of Delphi it would be a standard
feature.
QC Entry 96472
QC #:
Date Reported:
Area:
28624
4/30/2006
Demos\Other
Description:
[QC Short Description]
docking demo is broken, was ok in delphi7
Steps:
1. open ($BDS)\Demos\DelphiWin32\VCLWin32\Docking\dockex.dpr
2. click the "White" toolbutton. 3. move the "White" window to a
convenient location 4. click the "Blue" toolbutton. 5. dock the"Blue"
[QC Description]
window into the Right-hand Half of the white window. 6. click the
the docking demo behaves strangely sometimes, is broken other
"Green" toolbutton 7. dock the "Green" window into the Right-hand
times, compared to delphi7 version of the docking demo.
Half of the docked blue window. 8. click the "Lime" toolbutton 9. dock
the "Lime" window into the Right-hand Half of the docked blue
tab-sheet host:
window. Exp: All four windows will be docked together Act: The green
and lime windows jump out of the other docked group (See image
using the delphi7 demo, create a floating host with some tabs. drag a attachments 1_xxxx 2_xxxx 3_xxxx) Note that if the lime window is
new client over the tabsheets, and you get only one dock-rect allowed into either the white or the blue window results are as expected.
- drop the new client and it's added as a new page. good.
Close app and retry with tabbed docking: 1. click the "White"
toolbutton. 2. move the "White" window to a convenient location 3.
now try with the d2006 demo. when you drag the new client over, you click the "Blue" toolbutton. 4. dock the"Blue" window into the center of
get additional possibilities for dock-rects: top, bottom, left, right,
the white window to tab-dock. 5. click the "Green" toolbutton 6. dock
centre. all of those do weird stuff. the new client is not added in a
the "Green" window into the center of the tab-docked blue window to
logical way to the others. instead, the new client and one of the old
add as a tab. Exp: The green window will be added as a third tab to
ones gets combined, and kicked out as a floating pair.
the group Act: The blue and green windows jump out of the white
window and form their own tabbed duo. (See image attachments
conjoin host:
A_xxxx - D_xxxx) Tested in RAD Studio 2007 with identical results
(using the demo from BDS2006, since I don't see it in the RAD Studio
using delphi7 demo, create the following arrangement of tiles in a
distribution)
floating host: wide rectangle on top, tall rectangles underneath on the
left and on the right:
AA
BC
BC
now dock a new client into the bottom half of rectangle C, to make
this arrangement:
AA
BC
BD
works fine.
now try with the D2006 demo. when dropping D onto C, the host
ejects C, and we're left with two floating hosts, one containing A and
B, the other containing C and D.
i am very nervous about tapping into the docking provisions of the
VCL on account of these differences.
if i add docking to my app, will i need to rewrite it with each new
update of the VCL?
QC Entry 28624
QC #:
Date Reported:
Area:
88996
10/15/2010
Demos\Other
Description:
Steps:
[QC Short Description]
RichEdit demo project and ITE compatibility
Open the RichEdit sample project, and try to add a new language
using Project | Language - Add Language. It will not recognise or pick
up the existing languages in the Delphi XE edition of the sample
project. Compare this to the Delphi 2010 edition, which worked fine
and was compatible with the ITE.
[QC Description]
Why was the RichEdit sample project that ships with Delphi XE in
C:\Users\Public\Documents\RAD
Studio\8.0\Samples\Delphi\VCL\RichEdit was modified compared to
the same demo that ships with Delphi 2010 (and older versions) in
C:\Users\Public\Documents\RAD
Studio\7.0\Demos\DelphiWin32\VCLWin32\RichEdit
Previously, the demo consisted of a RichEdit project and three
resource DLL files that would produce RichEdit.DEU, RichEdit.ENU,
and RichEdit.FRA, in the same way the Integrated Language
Environment does, and quite compatible with it.
The "new" (and in my view degraded) version in Delphi XE produces
the RichEdit.exe executable, but resource DLL projects that have
been manually renamed to RichEditDEU.dll, RichEditENU.dll, and
RichEditFRA.dll. No more locale as file extention, but part of the
filename in Delphi XE. Huh? Why this change? As a consequence of
this manual renaming, someone also had to go through the trouble of
changing the implementation in the reinit.pas unit, making it
incompatible with the ITE and ETM language translation tools in
Delphi. I really do not understand why this was needed...
QC Entry 88996
QC #:
Date Reported:
Area:
42269
3/10/2007
Documentation
Description:
Steps:
[QC Short Description]
Need links to enums
Start a VCL-project Drop a Tpanel onto the form Click into combo of
DragMode property (text of dmAutomatic will be selected) press F1
mshelp://borland.bds5/delphivclwin32/ExtCtrls_TPanel_DragMode.html
will be occurred as expected. But, try to find a list of Potential Values
(dmAutomatic, dmManual) --- NO try to find a link to mshelp://borland.bds5/delphivclwin32/Controls_TDragMode.html where
this values are listed --- NO BTW, the description of effect of selecting
any of them is no on both pages, while this would be also a good
feature .
[QC Description]
TPanel.DragMode Property has no link to values
QC Entry 42269
QC #:
Date Reported:
Area:
43408
3/28/2007
Documentation
Description:
Steps:
[QC Short Description]
non stream file IO not in help
var afile : file;] astring : string; begin assignfile(afile,'c:\test');
rewrite(afile); writeln(afile,'test'); reset(afile); readln(afile,astring);
append(afile); writeln(afile,'test2'); closefile(afile); end; Actual:
highlight any of the functions Assignfile, rewrite, reset,
append,closefile (a closefile function is found under the IFileIsInUse
but thats not the one in question) expected: Many people still use this
IO method as its simple for beginners, and with no docs, its hard for
them to follow.
[QC Description]
Assignfile, rewrite, append, reset and system.closefile are not found
in help when pressing F1, they do not appear in the index either.
QC Entry 43408
QC #:
Date Reported:
Area:
76397
8/4/2009
Documentation
Description:
Steps:
[QC Short Description]
String str = "2We"; wchar_t daystr[4]; int no; // this works int
swscanf documentation missing format specifiers, esp. for wide string resultLittleS = swscanf(str.c_str(), L"%1d%2s", &no, daystr); // this
does not int resultBigS = swscanf(str.c_str(), L"%1d%2S", &no,
[QC Description]
daystr); (by providing these steps, I am not suggesting that the
The documentation page for sscanf, swscanf states "Note: For details behavior is incorrect, but rather that this is the behavior that should be
on format specifiers, see scanf.", but there is no such info on the
documented. Obviously, this is C++ code, not Delphi, but I could not
scanf page.
find a C++ Builder documentation section)
A more serious problem is that there is nothing on the swscanf page
that informs the programmer that swscanf considers the "s" (little s)
specifier to refer to a two-byte character (wchar_t), rather than
requiring the capital s or "ls" (little l, little s) to indicate that a pointer to
a two-byte character is being passed.
QC Entry 76397
QC #:
Date Reported:
Area:
86158
7/11/2010
Documentation
Description:
Steps:
[QC Short Description]
Json convert to object error
see attachments 1. define two class: TmyJsonUtils and TCustomer:
TCustomer = class// (TmyJsonUtils) private FName: string; public
property Name: string read FName write FName; end; TmyJsonUtils
[QC Description]
= class public class function ObjectToJson<T: class>(obj: T):
Added by Sysop
TJsonValue; class function JsonToObject<T: class>(json:
<<<<<<<<<<<
TJsonValue): T; end; class function
Please see comments of QC for workaround.
TmyJsonUtils.ObjectToJson<T>(obj: T): TJsonValue; var marshal:
>>>>>>>>>>>
TJsonMarshal; begin ... marshal:=
TJsonMarshal.Create(TJsonConverter.Create); try Result:=
I see a article(
marshal.Marshal(obj); finally marshal.Free; end; ... end; class function
http://www.andreanolanusse.com/blogpt/utilizando-generics-paraTmyJsonUtils.JsonToObject<T>(json: TJsonValue): T; var unmarshal:
transformacao-generica-de-objetos-em-datasnap-2010/), I write a
TJsonUnmarshal; begin ... unmarshal:= TJsonUnmarshal.Create; try
demo to test it.
Result:= T(unmarshal.Unmarshal(json)); finally unmarshal.Free; end;
end; 2. server: function TServerMethods1.getCustomer: TJsonValue;
i define the utils class: TmyJsonUtils(see steps), it used for converting var cst: TCustomer; begin cst:= TCustomer.Create; cst.Name:= 'I am
between json and object.
coming from DSServer'; cst.Age:= 15; Result:=
TmyJsonUtils.ObjectToJson<TCustomer>(cst); end; 3. clientTest:
1.if unremark the code of the btnJsonToObjectClick, then run
procedure TForm1.btnObjectToJsonClick(Sender: TObject); var
btnObjectToJsonClick and btnJsonToObjectClick, it is all ok
proxy: TServerMethods1Client; jv: TJSONValue; cst: TCustomer;
begin SQLConnection1.Open; proxy:=
2.i define the TCustomer(not inherited from TmyJsonUtils) inherited
TServerMethods1Client.Create(SQLConnection1.DBXConnection);
from TObject, when I convert jsonvalue to TCustomer, it happen
jv:= proxy.getCutomer; cst:=
error:Internal: Cannot instantiate type Customer.TCustomer.
TmyJsonUtils.JsonToObject<TCustomer>(jv); // error-->Internal:
(see steps 3.clientTest description )
Cannot instantiate type Customer.TCustomer.
showMessage(cst.ToString); cst.Free; proxy.Free; end; end;
3.I define the TCustomer inherited from TmyJsonUtils. when I run:
cst:= TmyJsonUtils.JsonToObject<TCustomer>(jv);
it is also happen error.
but I run:
cst:= TCustomer.JsonToObject<TCustomer>(jv);
it is OK.
I do not know whether is it a bug? or what should I convert it?
QC Entry 86158
QC #:
Date Reported:
Area:
90523
12/27/2010
Documentation
Description:
Steps:
[QC Short Description]
TMaskEdit Documentation
Place a TMaskEdit component on a form, place the cursor in the
Editmask property, open the property editor and press F1.
[QC Description]
Documentation on the basic TMaskEdit does not assist in creating a
custom mask. The sample masks do not include a currency mask,
and I am trying to create a simple dollars and cents mask. (I wonder if
there is a reason this common need is not included in the masks?)
The documentation contains the following, but it never actually
explains the mask.
"Define your own masks for the edit box. You can use special
character to specify the mask; for a listing of those characters, see
the Mask.TCustomMaskEdit.EditMask property."
In fact, the "listing of those characters" is not found at the location
indicated - or anywhere else that I could find.
QC Entry 90523
QC #:
Date Reported:
Area:
85170
6/6/2010
Documentation
Description:
Steps:
[QC Short Description]
Documentation of DeallocateHWND should mention threading issue
[QC Description]
The documentation of DeallocateHwnd should mention that it should
only be called from the same thread as the corresponding
AllocateHwnd call had been made.
QC Entry 85170
QC #:
Date Reported:
Area:
87827
9/6/2010
Documentation
Description:
Steps:
[QC Short Description]
help incorrect in subversion help topic re: readme file
[QC Description]
ms-help://embarcadero.rs_xe/rad/IDE_Changes_for_XE.html
"Subversion is immediately available in the IDE after you open a
project containing files that are under version control by Subversion.
You can also start by checking out a working copy of the files in a
Subversion repository. If you need to create a Subversion repository,
see instructions in the README.txt file in the /bin/Subversion
directory."
No such help exists in the readme
QC Entry 87827
QC #:
Date Reported:
Area:
87954
9/10/2010
Documentation
Description:
Steps:
[QC Short Description]
SysErrorMessage should be linked from System.GetLastError
[QC Description]
Hello,
ms-help://borland.bds5/delphivclwin32/System_GetLastError.html
should also link to SysErrorMessage so a reader can find out easily
that this will get him a proper error message the easy way.
QC Entry 87954
QC #:
Date Reported:
Area:
88029
9/13/2010
Documentatio
n
Description:
[QC Short Description]
E2528 needs to be documented
[QC Description]
The error E2528 is not documented in
"Error and Warning Messages (Delphi)"
Steps:
http://docwiki.embarcadero.com/RADStudio/XE/en/Error_and_Warning_Messages_%28Delphi%29_Index
Furthermore consider mentioning in the Parameterized Methods section
http://docwiki.embarcadero.com/RADStudio/XE/en/Declaring_Generics#Parameterized_Methods
that constructors and destructors are not supported.
Example that leads to E2528
program E2528Test;
{$APPTYPE CONSOLE}
type
TFoo<T: class> = class(TObject)
constructor CreateEx<T>;
end;
begin
end.
QC Entry 88029
QC #:
Date Reported:
Area:
88593
10/3/2010
Documentation
Description:
Steps:
[QC Short Description]
Working with lists link not working
[QC Description]
ms-help://embarcadero.rs_xe/vcl/Classes.TStringList.html
contains a link to "working with lists". At least in the german version it's not
working.
Upd.:
This is the link which doesn't work:
/VCL/XE/d/index.php?title=Rad_de:Mit_Listen_arbeiten&action=edit&redlink=1
When entering this link directly I get "This page cannot be displayed"
QC Entry 88593
QC #:
Date Reported:
Area:
89065
10/18/2010
Documentation
Description:
Steps:
[QC Short Description]
ms-help://embarcadero.rs_xe/vcl/SysUtils.TEncoding.html contains
broken link
[QC Description]
ms-help://embarcadero.rs_xe/vcl/SysUtils.TEncoding.html contains a
broken link "Verwendung von TEncoding f· Unicode-Dateien " in the
german version (didn't test the others).
Error message is rad.DE:Verwendung von TEncoding f· UnicodeDateien (page does not exist) when hovering over the link.
Can such links get auto identified? SInce this is the 2d I'm reporting
I'm not sure if reporting each of those separately makes much sense.
QC Entry 89065
QC #:
Date Reported:
Area:
90415
12/20/2010
Documentation
Description:
[QC Short Description]
German translation of System.Copy is a bit misleading
[QC Description]
The translation of this help topic:
Steps:
ms-help://borland.bds5/delphivclwin32/System_Copy.html
to German is a bit misleading in the following sentence (this applies to
the docwiki XE versio as well):
The substring or subarray is a unique copy (that is, it does not share
memory with S; if the elements of the array are pointers or objects,
these are not copied as well.)
Der Teilstring oder das Teil-Array ist eine eindeutige Kopie (d.h.,
Speicher wird nicht gemeinsam mit S genutzt, obwohl Zeiger- oder
Objektelemente des Arrays nicht kopiert werden).
Look at the text in parenthesis. I can understand the english text and
its meaning but the german one puzzled me and I'm a native German
speaker!
QC Entry 90415
QC #:
Date Reported:
Area:
34694
10/2/2006
Documentatio
n
Description:
Steps:
[QC Short Description]
ListView OwnerDraw does nothing
Create a TListView
on a form. Set
OwnerDraw to true
and "something" into
the OnDrawItem
event. "something"
will never run.
[QC Description]
ListView's property OwnerDraw seems to have no effect. The documentation claims that once it is set to true, event
OnDrawItem will be fired for drawing Items, but the event is never called no matter what happens.
SYSOP:
I actually believe this is an error in the documentation as OnDrawItem is never fired.
Sample application included
mshelp://borland.bds4/bds4win32api_win32/html/DelphiWin32_ComCtrlsTCustomListViewOnCustomDrawItemEvent.htm
ms-help://borland.bds4/bds4win32api_win32/html/DelphiWin32_ComCtrlsTCustomListViewOwnerDrawProperty.htm
QC Entry 34694
QC #:
Date Reported:
Area:
74632
6/5/2009
Documentatio
n
Description:
Steps:
[QC Short Description]
Description of argument 'CharIndex' for TEncoding.GetChars is wrong
[QC Description]
In the documentation for TEncoding.GetChars the CharIndex argument is incorrectly described as the "maximum
number of characters to store". It is really the index in 'Chars' to start writing results into.
Here is a quick link to the page in question:
mshelp://embarcadero.rs2009/delphivclwin32/SysUtils_TEncoding_GetChars@PByte@Integer@PChar@Integer.html
QC Entry 74632
QC #:
Date Reported:
Area:
98126
8/25/2011
Documentation
Description:
[QC Short Description]
MkDir doesn't say that higher leven dirs don't get created as well
[QC Description]
This help topic:
ms-help://embarcadero.rs_xe/vcl/System.MkDir.html
doesn't tell the reader that it will only create the last directory (unlike
the linked ForceDirectories). It would be good to name this limitation!
QC Entry 98126
Steps:
QC #:
Date Reported:
Area:
67539
10/4/2008
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Several linker options are undocumented
Go to Project, Options, Delphi Compiler, Linking and hit F1 and note
the missing items there
[QC Description]
Several of the Delphi options under Project Options, Linking are
undocumented. The list includes:
Set extra PE header flags
Set extra PE header optional flags
Set OS version fields in PE header
Set subsystem version fields in PE header
Set user version fields in PE header
QC Entry 67539
QC #:
Date Reported:
Area:
69657
12/6/2008
Documentation\Online Help
Description:
Steps:
[QC Short Description]
{$O+} not in the index
1. open help 2. go to index page 3. type in the search field: {$O+} 4.
wonder why nothing is found
[QC Description]
{$O+} should be in the index (as every such compiler option should)
and link to
mshelp://embarcadero.rs2009/devcommon/compdirsoptimization_xml.html
It's fine that it's listed on the list of compiler options (which should get
another column showing immediatelly the notion like {$O+/-}) but
doesn't help much when it's found in the wild.
QC Entry 69657
O
QC #:
Date Reported:
Area:
80493
12/18/2009
Documentation\Online Help
Description:
Steps:
[QC Short Description]
F1 in Build pane no longer shows help for errors or warnings
In Delphi 2010... 1) Go to File > New > VCL Forms Application Delphi 2) Place a Button on the form 3) Double-click Button1 to get to
its OnClick event handler 4) Declare the following var section: var I, J:
[QC Description]
Integer; S: String; 5) Paste or write the following code: for I := 0 to 10
In past versions of Delphi, pressing F1 in the build results window (or do if I = 3 then Inc( I ) else S := S + IntToStr( I ) + ' '; 6) Compile the
pane) used to bring up Delphi's Help showing more information about project. 7) The first message you should receive is something like
the selected error or warning. See Steps.
this: [DCC Error] Unit1.pas(33): E2081 Assignment to FOR-Loop
variable 'I' 8) Click the error and press F1. Instead of showing you
page E2081 in the help, you instead get a generic help page with the
Added by Sysop
title "DCC32.EXE, the Delphi Command Line Compiler". Nothing
<<<<<<<<<<<<<<<<
about your specific problem is highlighted. However, if you type
The help content for E2081 is missing.
E2081 in the Index page of the Help, you'll see the page exists. 9) To
E2081 Assignment to FOR-Loop variable 'I'
further illustrate this problem, delete the lines starting with "if" and
>>>>>>>>>>>>>>>>
ending in "else" so that you have one statement in the for loop. 10)
QC Entry 80493
Compile the project. 11) The first message should be something like:
[DCC Hint] Unit1.pas(28): H2164 Variable 'J' is declared but never
used in 'TForm1.Button1Click' 12) Again, click the message and
press F1 and you get the same help page, instead of the H2164 help
page. Typing H2164 in the Index tab of the help will show you the
page you really wanted to see. This is broken functionality as of
Delphi 2010. I hadn't seen it before this version. Please fix it. :)
QC #:
Date Reported:
Area:
82442
2/24/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Project page item missing in Project Menu
The item is missing on the menu.
Added by Sysop
[QC Description]
According to the Help there should be an item on the Project Menu
called Project Page.
It should open the project Page option dialog that lets you designate a
html-file that will open first when you open the project later on.
<<<<<<<<<<<<<<<<<<<
The URL in the help is
ms-help://embarcadero.rs2010/rad/Project_Page_Options.html
>>>>>>>>>>>>>>>>>>>
Added by Sysop
<<<<<<<<<<<<<<
This documentation issue is about Delphi for .NET which has been
already removed on 2009/2010.
>>>>>>>>>>>>>>
QC Entry 82442
QC #:
Date Reported:
Area:
88549
9/30/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Deploy to the Cloud - missing information
The EC2 cloud machine it just a server, and you need to define a
directory on that machine where your files will end up being deployed
to. So, if I want to deploy to a directory called "Bob", I need to make a
directory on the server, and make it shareable under the name "Bob",
and need to make sure Administrator can write to it. OK, so I've made
a directory Bob, set up sharing and made sure Administrator can
write to it. When you login to the EC2 machine, that login will connect
to the Windows Shared directory (not very secure, I know) and upload
the files. This may mean that you need to disable the firewall for a
while (in order to allow the incoming connection). From my laptop, I
could deploy quite easily to the EC2 shared folder Icreated at the
server, and my file is already up there as well now. The missing bit of
information from the on-line Help was the fact that the destination
folder on the EC2 machine should be a shared folder (so the upload
can take place).
[QC Description]
The online help page should mention that the destination folder
should be a shared folder on the remote EC2 server (I missed that
step earlier).
QC Entry 88549
QC #:
Date Reported:
Area:
90576
12/30/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Wrong mentioning of NIL for key parameter
Open mshelp://embarcadero.rs_xe/vcl/Registry.TRegistry.OpenKeyReadOnly.
html and read it. Then create a TRegistry instance in your code and
try to call OpenKeyReadOnly with NIL as parameter. Compile and
see the compiler complaining that key is a string and no pointer.
[QC Description]
mshelp://embarcadero.rs_xe/vcl/Registry.TRegistry.OpenKeyReadOnly.
html contains (at least in the german verion) the following sentence:
Wenn Key nil (Delphi) oder NULL (C++) ist, wird die Eigenschaft
CurrentKey auf den in der Eigenschaft RootKey festgelegten Schl·sel
gesetzt.
In English this means that if the key parameter of the function is set to
NIL CurrentKey will be set to RootKey.
Since key is a string it cannot be NIL in Delphi. It can only be empty!
('')
QC Entry 90576
QC #:
Date Reported:
Area:
90575
12/30/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
SysUtils.GetHomePath not documented
Open ms-help://embarcadero.rs_xe/vcl/SysUtils.GetHomePath.html
in the help viewer.
[QC Description]
ms-help://embarcadero.rs_xe/vcl/SysUtils.GetHomePath.html
doesn't contain any description about what the function does.
This is true at least for the german version.
QC Entry 90575
QC #:
Date Reported:
Area:
90761
1/9/2011
Documentation\Online Help
Description:
Steps:
[QC Short Description]
ms-help://embarcadero.rs_xe/vcl/SysUtils.EInvalidOpException.html
unclear
Read: mshelp://embarcadero.rs_xe/vcl/SysUtils.EInvalidOpException.html
[QC Description]
The following help topic:
ms-help://embarcadero.rs_xe/vcl/SysUtils.EInvalidOpException.html
contains only inherited information from its base class so it doesn't tell
the reader in which situation to expect or raise EInvalidOpException.
A single sentence explaining this would help a lot here.
This is at least true for the German version.
QC Entry 90761
QC #:
Date Reported:
Area:
96198
7/14/2011
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Help for TCustomIniFile.ReadFloat is wrong and incomplete
Open the german help with update 3 applied. Enter this URL: mshelp://embarcadero.rs_xe/vcl/IniFiles.TCustomIniFile.ReadFloat.html
Read it.
[QC Description]
At least in the german help (with help update 3 installed) the following
topic:
mshelp://embarcadero.rs_xe/vcl/IniFiles.TCustomIniFile.ReadFloat.html
is wrong because the first sentence of the description translates to
this english sentence: "Reads a boolean value from a INI-file". Float is
not boolean...
And the topic is incomplete, because it doen't tell the reader how the
decimal point is being handled. Is it fix a . (point) or is the system
setting taken? If the latter, can I override this somehow, perhaps by
assigning something to FormatSettings from SysUtils?
QC Entry 96198
QC #:
Date Reported:
Area:
80506
12/19/2009
Documentation\Online Help
Description:
Steps:
[QC Short Description]
TFormatSettings definition wrong/abbreviated
[QC Description]
The array parts of the TFormatSettings record as shown here:
ms-help://embarcadero.rs2010/vcl/SysUtils.TFormatSettings.html
are displayed the wrong way and the C++ declaration is nearly empty.
Why is it a class in C++ anyway?
This is with help update 1 applied.
QC Entry 80506
QC #:
Date Reported:
Area:
83100
3/17/2010
Documentation\Online Help
Description:
[QC Short Description]
Missing/inaccurate documentation for IBQuery.RecordCount property
[QC Description]
The property TIBQuery.RecordCount isn't documented and redirects to
Steps:
the TDataSet.RecordCount docs.
In TIBQuery, reading RecordCount returns the number of records
fetched from the database so far, which may not be what you are
expecting.
It would be nice if the behaviour was clarified in the docs.
See this discussion for further information:
https://forums.embarcadero.com/thread.jspa?threadID=34457&tstart=0
QC Entry 83100
QC #:
Date Reported:
Area:
86000
7/6/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Contents tree is inconsistent / illogical - language references under
IDE
[QC Description]
In current help (after update 3) in the contents tree the "Delphi
reference" and "C++ reference" subtrees are listed under "RAD studio
IDE" while "VCL reference" and "Code samples" are one level higher,
under "RAD studio". IMO "Delphi reference" (and C++ ref) should be
under "RAD studio" too, only "Delphi Class Explorer Topics" should
stay under "RAD studio IDE".
QC Entry 86000
QC #:
Date Reported:
Area:
89017
10/16/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
ms-help://embarcadero.rs_xe/vcl/Classes.TStrings.Encoding.html is
useless
[QC Description]
ms-help://embarcadero.rs_xe/vcl/Classes.TStrings.Encoding.html
only says that EMBT has no further information. At least in the
german version.
QC Entry 89017
QC #:
Date Reported:
Area:
89016
10/16/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
ms-help://embarcadero.rs_xe/vcl/Classes.TFileStream.html contains
invalid link
[QC Description]
ms-help://embarcadero.rs_xe/vcl/Classes.TFileStream.html
(at least in german translation) contains a invalid link in the "view
also" section. It's the first one and named "Den Antwortinhalt
festlegen" in german.
Hovering over it DExplorer says
Rad de:Den Antwortinhalt festlegen (page does not exist)
QC Entry 89016
QC #:
Date Reported:
Area:
89035
10/17/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Invalid link in help file - "Date/Time Support"
1) open delphi help (document explorer) 2) go to mshelp://embarcadero.rs_xe/vcl/System.TDateTime.html 3) click the
second link from the bottom. (Date/Time Support)
[QC Description]
ms-help://embarcadero.rs_xe/rad/Date/Time_Support.html linked
from ie. ms-help://embarcadero.rs_xe/vcl/System.TDateTime.html
shows "Cannot display page" error in window.
QC Entry 89035
QC #:
Date Reported:
Area:
83499
3/31/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Using Multiple Server Data Modules does not discuss dbExpress
DataSnap
Go to
http://docwiki.embarcadero.com/RADStudio/en/Using_Multiple_Serv
er_Data_Modules and try to find information relating to doing this
with a TDMServerContainer or TDSServerModule.
[QC Description]
The online documentation for "Using Multiple Server Data Modules"
(http://docwiki.embarcadero.com/RADStudio/en/Using_Multiple_Serve
r_Data_Modules)
does not discuss how to do this with the new dbExpress DataSnap. It
only discusses the feature
for DCOM based DataSnap.
QC Entry 83499
QC #:
Date Reported:
Area:
96105
7/12/2011
Documentation\Onlin
e Help
Description:
Steps:
[QC Short Description]
Help for automation expert incomplete
1. open a vcl application project 2. click
file/new/active x 3. select automation object
to start the wizard 4. look at the options for
the threading modell (5 options) 5. open the
help topic 6. look at how the threading
model is documented (4 options only)
[QC Description]
Added by Sysop
<<<<<
[Automation Object or ASP Object Wizard - Threading Model]
http://docwiki.embarcadero.com/RADStudio/XE/en/Automation_Object_or_ASP_Object_Wizard
>>>>>
The following help topic (at leas in its german translation):
ms-help://embarcadero.rs_xe/rad/Experte_f?_Automatisierungsobjekte.html
which is for the Automatiopn Object creation wizard lacks the description of the simple
threading model option. The other four are documented though.
QC Entry 96105
QC #:
Date Reported:
Area:
65405
8/7/2008
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Online Help is incomplete and also nearly unusable
See description
[QC Description]
TField's OnGetText event has a boolean parameter named
DisplayText. But the online help has no reference to what this
parameter is all about. With hope, when you select the link to
TFieldGetTextEvent, yes... you get:
This is type DB.TFieldGetTextEvent.
Now, the stranger thing is this;
TField.OnGetText Event description section has two paragraphs.
These two paragraphs are ,word by word, an exact duplication of,
Delphi 3's 1st and 3rd paragraphs (no typo, 1997 Delphi 3). Guess
what? The second paragraph of Delphi 3 documents all the missing
information.
From Delphi 3 help;
"The Sender parameter is the field component. The Text parameter
receives the formatted text that is used by the DisplayText or Text
property. The DisplayText parameter indicates whether the text will
be used for display purposes only, or whether the string will be used
for editing purposes."
Not being able to provide a decent documentation for a 13 years old
product, with 3 major updates after more than 1 years have passed till
its offering is one thing, crippling existing documentation is an other
thing.
Note that, this report is not about TField's OnGetText, it is about
documentation. I have refferred to Delphi 3's help countless times.
Unfortunately I do not own a more recent Delphi than the 3rd one and
it is missing lots of new technologies.
In short, I want decent documentation, and I want it with Delphi 2007,
not with a future version. Is it too much to ask for?
QC Entry 65405
QC #:
Date Reported:
Area:
77416
9/6/2009
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Class documentation missing hierarchy
Using TStringList as an example, compare these two help topic in
D2010 and D2007: mshelp://embarcadero.rs2010/vcl/Classes.TStringList.html mshelp://borland.bds5/delphivclwin32/Classes_TStringList.html
[QC Description]
In Delphi 2009 and earlier, class documentation included a hierarchy
list documenting a class' ancestors and providing links to those
ancestor classes.
In D2010 help, links to ancestors are inconsistent, and usually only
reference the parent class.
QC Entry 77416
QC #:
Date Reported:
Area:
89637
11/13/2010
Documentation\Online Help
Description:
Steps:
[QC Short Description]
Applying XE Help Update 1 deleted Windows SDK articles
1. Make sure that you have Windows SDK installed 2. Run Help
Update 1 3. After installing Windows SDK articles are no longer
available
[QC Description]
Applying XE Help Update 1 downloaded through Registered Users
Download has deleted windows SDK articles from Help.
I had to reinstall original XE Help files.
QC Entry 89637
QC #:
Date Reported:
Area:
42542
3/13/2007
Documentation\Online Help\Component
writers guide
Description:
[QC Short Description]
Creating a New Component Topic refers to .HLP
[QC Description]
mshelp://borland.bds5/devwin32/cwgcreatinganewcomponent_xml.html
Content states:
When you finish, the complete component includes the following files:
A package (.BPL) or package collection (.DPC) file
A compiled package (.DCP) file
A compiled unit (.DCU) file
A palette bitmap (.DCR) file
A Help (.HLP) file
HLP files are not supported in Delphi 2007 and must be MS HTML
Help 2 and be installed and registered differently to be added to the
overally Delphi 2007 help.
QC Entry 42542
Steps:
QC #:
Date Reported:
Area:
88991
10/15/2010
Documentation\Online
Help\Whats new
Description:
Steps:
[QC Short Description]
DocGenCLI.exe must be GenDocCLI.exe
Open Help, go to "What's New in XE"
and click on the Command Line
Documentation Generation Tool link to
see a reference to DocGenCLI.exe
[QC Description]
The documentation mentions DocGenCLI.exe (for example at mshelp://embarcadero.rs_xe/rad/Command_Line_Documentation_Generation_Tool.html or in the wiki
at
http://docwiki.embarcadero.com/RADStudio/en/Command_Line_Documentation_Generation_Tool)
but this tool is called GenDocCLI.exe as mentioned at mshelp://embarcadero.rs_xe/rad/Documentation_Generation_Facility.html and in the wiki at
http://docwiki.embarcadero.com/RADStudio/en/Documentation_Generation_Facility
GenDocCLI.exe can be found in the RAD Studio\8.0\bin directory.
QC Entry 88991
QC #:
Date Reported:
Area:
86955
8/5/2010
Documentation\Online Help\Object
Pascal
Description:
Steps:
[QC Short Description]
Spelling error in compiler directive name SCOPEDEUNMS
[QC Description]
In the topic "Scoped Enums (Delphi)"
ms-help://embarcadero.rs2010/rad/Scoped_Enums_(Delphi).html
there is a spelling error in the directive's name, on line
"Syntax {$SCOPEDEUNMS ON}, or {$SCOPEDENUMS OFF}"
it is wrongly spelled SCOPEDEunMS instead of SCOPEDEnuMS in
the "{$SCOPEDEUNMS ON}," part.
Help update 3 installed.
QC Entry 86955
QC #:
Date Reported:
Area:
54822
11/14/2007
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
VCL properties and methods are not indexed
For example I want to find the documentation of TControl.Parent.
Press F1. Go into the Index tab. Type in "Parent" in the Look for: edit.
Expected result: All references to Parent method displayed. What I
got: A bunch of useless stuff.
[QC Description]
When you press F1 and go into the index tab and search for a
method or property of a vcl component, let us say TControl for
example, you will get a bunch of useless references to Windows
documentation and other non relevant pages.
I would expect that since the VCL is the primary programming library
in Delphi, that I would be able to find all the methods and properties
of all components indexed and easily available for quick reference.
QC Entry 54822
QC #:
Date Reported:
Area:
80887
1/6/2010
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
Documentation for TGUID is not correct
Go to the help entry for System.TGUID. The following information on
the page is not correct (the structure is not right): "Delphi Information
From System.pas TGUID = packed D1: Cardinal; D2: Word; D3:
Word; end;" This information on the same page is not correct (doesn't
add up to 32 hexadecimal digits): "D1 maps to the first 8 hexadecimal
digits. D2 maps to the next 4 hexadecimal digits. D3 maps to the next
4 hexadecimal digits. D4 maps to the final 8 hexadecimal digits"
[QC Description]
The documentation in the help file for System.TGUID is not correct
QC Entry 80887
QC #:
Date Reported:
Area:
46140
5/17/2007
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
Images missing from TBrushStyle documentation
Look up the help for TBrushStyle and examine the table.
[QC Description]
In the help for TBrushStyle, there is a table listing the possible
values of TBrushStyle along with a space for the pattern that is
to be used. However, the images of the patterns are missing
making the table useless.
SYSOP:
D2007 help is at:
mshelp://borland.bds5/delphivclwin32/Graphics_TBrushStyle.html
D2006 help is at:
ms-help://borland.bds4/bds4win32api_win32/html/DelphiWin32
_GraphicsTBrushStyleType.htm
The help content is D2006 is also malformed. The D2007 help has
no real content. (nor does the 2006 content for that matter).
QC Entry 46140
QC #:
Date Reported:
Area:
13283
5/31/2005
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
No help for compents in ShellCtrls Unit
[QC Description]
The following are on the Samples Tool pallete
TShellChangeNotifier
TShellListView
TShellComboBox
TShellTreeView
and have no help or comments in the source code
QC Entry 13283
QC #:
Date Reported:
Area:
80668
12/26/2009
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
New TFieldType types not descibed
[QC Description]
There is no detail description for the new TFieldType types
ftTimeStampOffset, ftObject, ftSingle
QC Entry 80668
QC #:
Date Reported:
Area:
39886
2/3/2007
Documentation\Online Help\Main
help
Description:
Steps:
[QC Short Description]
TStringList.IndexOf docs are incorrect
1. Create a TStringList. 2. Set Sorted=True and
Duplicates=dupIgnore. 3. Add 10 duplicate strings to the list 4. Call
IndexOf() with the same string as was added to the list. The IndexOf
return value should be 0 according to the docs/Help, but it will be an
integer near the middle of the TStringList.Count, probably 5.
[QC Description]
The Help for TStringList.IndexOf states "Call IndexOf to obtain the
position of the first occurrence of a string that matches S."
But this statement is correct ONLY if TStringList.Sorted=False and/or
TStringList.Duplicates=dupIgnore or dupError.
Otherwise (when Sorted=True and Duplicates=dupAccept)
IndexOf merely returns the index of *any* string in the list which
matches the parameter S of the IndexOf() call.
Why? Because if Sorted=True, calling IndexOf() internally calls Find(),
and Find uses a binary search to locate *any* string matching the
passed string parameter. In a TStringList where
duplicates are allowed, this will not always be the *first* matching
string.
QC Entry 39886
QC #:
Date Reported:
Area:
39052
1/20/2007
Documentation\Online
Help\Main help
Description:
Steps:
[QC Short Description]
Example for AllocateHwnd and DeallocateHWND missing
[QC Description]
The examples in the D7 help for the AllocateHWnd and DeallocateHwnd routines are missing.
They should be accessible from these help pages:
mshelp://borland.bds5/bds5win32api_win32/html/DelphiWin32_ClassesAllocateHWndRoutine.htm
ms-help://borland.bds5/bds5win32api_cpp/html/CPPWin32_classesAllocateHWndRoutine.htm
mshelp://borland.bds5/bds5win32api_win32/html/DelphiWin32_ClassesDeallocateHWndRoutine.htm
ms-help://borland.bds5/bds5win32api_cpp/html/CPPWin32_classesDeallocateHWndRoutine.htm
I've added a Word document containing the missing examples as an attachment.
QC Entry 39052
[D7HELP]
QC #:
Date Reported:
Area:
75237
6/24/2009
Documentation\Online Help\Main
help
Description:
Steps:
[QC Short Description]
Inaccurate documentation on "Disabling Themes in the IDE and in
Your Application"
See description
[QC Description]
This documentation is inaccurate and/or incomplete.
The file mentioned ($(IDE)\bin\bds.exe.manifest) does not exist, at
least on my installation.
Details from "Send feedback" link on help page:
Project: RAD Studio (Common)
Topic ID: disablethemes.xml
Title: Disabling Themes in the IDE and in Your Application
QC Entry 75237
QC #:
Date Reported:
Area:
76550
8/9/2009
Documentation\Online Help\Main
help
Description:
Steps:
[QC Short Description]
VCL Reference link on Rad Studio main help page link to nonexistant page
Click on VCL Reference link and you'll be showed with a non-existant
page (which url is ms-help://embarcadero.rs2010/vcl/Main_Page)
[QC Description]
On Rad Studio Main page
ms-help://embarcadero.rs2010/rad/Main_Page.html
QC Entry 76550
QC #:
Date Reported:
Area:
76762
8/17/2009
Documentation\Online Help\Main
help
Description:
Steps:
[QC Short Description]
SO Suffix used for BPL not DCP
Search for namespace gives many matches, most seem to be about
C++Builder eg mshelp://embarcadero.rs2010/rad/Defining_A_namespace.html Search
[QC Description]
for "so suffix" does not show me anything about the Project Options
Struggling to understand and use the Namespace and SO Suffix
dialog or when to use it. Search for Project Options..... msfeatures. I honestly do not know whether this is as-designed or a bug, help://embarcadero.rs2010/rad/Setting_Project_Options.html ....
because the documentation is at the level of what to type instead of
states the obvious about the UI with no details about which options to
giving conceptual guidance.
use when..... (Rushing now so I am probably missing some things)
This page msFor me these issues are key. Perhaps not for others.
help://embarcadero.rs2010/rad/Building_Packages.html says you can
Add a package to a project - and that definitely does wierd things
1. DPK compiles and creates DCP and BPL of different names. The such as displaying the BPL file in hex in the editor window, and, still
BPL uses the SO Suffix (as I expected). The DCP does not. (Should not making the project able to find the package. That's another story.
it? Could you document that?) YES - done.
If you want to see real trouble, try renaming a package a few times,
using dots in the filename. Not sure what else to give for steps.
2. Related issue: the true difference between Default Namespace and
Namespace Prefix is unclear. I think the documentation needs some
use cases here. I can give you my use case :
We maintain some open-source code, and update it occasionally.
Use ZaphodsMap as the example. ZaphodsMap classes are used in
Rubicon and WebHub. I want to use the SO Suffix to differentiate
releases, so that we can help people avoid problems based on
interface changes. I want to use the namespace idea to differentiate
ZaphodsMap-in-Rubicn from ZaphodsMap-in-WebHub so that both
products can be installed in the IDE at once, but with different source
code (say Rubicon is released in August then ZaphodsMap changes
then WebHub is released in September).
I believe that this issue is central to massive global cooperation
among component vendors. I am probably missing something .....
and/or this area is not fully tested.
Please see screenshots and ask me if you want further details. I have
not yet posted ZaphodsMap to CC because I wanted to sort this issue
out in advance, but I can post it if anyone wants to look at specifics.
Apologies if I am just being a dumb tired user. Hopefully not.
QC Entry 76762
QC #:
Date Reported:
Area:
20347
10/20/2005
Documentation\Online Help\Main
help
Description:
Steps:
[QC Short Description]
No information on 'New IDE...' keymappings
[QC Description]
DeXter offers 'New IDE Classic' and 'New IDE EMacs' but they don't
seem to be documented anywhere.
QC Entry 20347
QC #:
Date Reported:
Area:
89226
10/25/2010
Documentation\IDE Help Contexts
Description:
Steps:
[QC Short Description]
Dialog DataBreakpoint - No help found for context 5645
Add data breakpoint, click on Help button
[QC Description]
In Dialog DataBreakpoint is Help button, but click on it produce
exception
--------------------------Error
--------------------------No help found for context 5645.
--------------------------OK Details >>
--------------------------QC Entry 89226
QC #:
Date Reported:
Area:
45300
5/1/2007
Documentation\IDE Help Contexts
Description:
Steps:
[QC Short Description]
Automated Incident Report
Press CTRL-F1 over the word 'MessageDlg'
[QC Description]
No help found for (none)
No help topic for MessageDlg
QC Entry 45300
QC #:
Date Reported:
Area:
81516
2/9/2010 11:29:24 AM
Documentation\IDE Help Contexts
Description:
Steps:
No help found for "Remove Runtime Packages" dialog
Start IDE
Create a Delphi VCL app
Project | Options
Select Packages page
Check the "Build with runtime packages" checkbox
Uncheck the "Embarcadero Ribbon Controls" in the list
Add: ";vclribbon" to the end of the runtime package list (omit the
quotes)
Click OK
Project | Options
Select Packages page
Check the "Embarcadero Ribbon Controls" in the list
Unheck the "Embarcadero Ribbon Controls" in the list
hcDRemoveRuntimePackages = 1419;
QC AIR report 81516
You get the "Remove Runtime Packages" dialog
Click Help button
EXP: Help on this dialog
ACT: No help found for context
QC #:
Date Reported:
Area:
81674
1/31/2010
Documentation\IDE Help Contexts
Description:
Steps:
[QC Short Description]
No help for E2555 Cannot capture symbol
1. Open the attached project (copied below). 2. Project | Syntax check
3. In the Messages pane, click on the line [Error]
DocBugE2555;.dpr(14): E2555 Cannot capture symbol 'Rec' 4. Press
[QC Description]
F1. //EXP: A help page about E2555, indicating that the record
Pressing F1 on "E2555 Cannot capture symbol" in the Messages
parameter can't be captured because it's const //ACT: Error: No help
pane gives an Error dialog: "No help found for cm_E2555_Delphi".
found for cm_E2555_Delphi. program DocBugE2555; {$APPTYPE
QC Entry 81674
CONSOLE} uses SysUtils, Types; procedure CallAnonProc(Proc:
TProc); begin Proc; end; procedure DoSomethingWithRec(const Rec:
Update on FT build: currently brings up topic "DCC32.EXE, the Delphi TRect); begin CallAnonProc(procedure begin WriteLn(Rec.Top);
Command Line Compiler" rather than an error.
end); end; begin DoSomethingWithRec(Rect(0, 4, 1, 1)); end.
QC #:
Date Reported:
Area:
74839
6/13/2009
Documentation\IDE Help Contexts
Description:
[QC Short Description]
W1056 not documented
[QC Description]
No help available for the error:
[DCC Warning] W1056 Warning: Duplicate resource: Type 10
(RCDATA), ID TDTMCWCSESSION; File dmCWCSession.dfm
resource kept; file
Steps:
C:\CWCWebRedesignD2009\Source\dmCWCSession.dfm resource
discarded.
QC Entry 74839
QC #:
Date Reported:
Area:
77283
9/2/2009
Documentation\Help Output
Description:
Steps:
[QC Short Description]
wrong registry key for localization
[QC Description]
In the "Using Resource DLLs" chapter of the Help a wrong registry
key for locale information is given. The key in Help is
"HKEY_CURRENT_USER\Software\Borland\Locales"
but really Delphi uses
"HKEY_CURRENT_USER\Software\CodeGear\Locales"
QC Entry 77283
QC #:
Date Reported:
Area:
86246
7/13/2010
IDE
Description:
Steps:
[QC Short Description]
Windows 7: RAD Studio has stopped working (crash on exit)
1. A fresh install is not strictly necessary.
2. Start the IDE and create a new Intraweb project (this will force
the IDE to load the intraweb runtime which may be delay loaded
after the first time the IDE is run)
3. Exit the IDE, or Component | Install Packages then uncheck the
Intraweb design package
[QC Description]
Crash when closing Delphi IDE, after clean install and doing nothing just exited.
Problem signature:
Problem Event Name: APPCRASH
Application Name: bds.exe
Application Version: 15.0.3840.32376
Application Timestamp: 4c351c08
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16559
Fault Module Timestamp: 4ba9b29c
Exception Code: c0000005
Exception Offset: 0002f94c
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 2e88
Additional Information 2: 2e8830cbe5eb6d105f8b574a00c2faf4
Additional Information 3: 89dd
Additional Information 4: 89dd89e85fc06857afd76f303f3db2bc
QC Entry 86246
[Old Steps]
VirtualBox host running on Windows 7 64-bit
Guest OS is also Windows 7 64-bit
New clean install of Fulcrum (after deleting all prior downloaded
files)
Start Fulcrum
Exit Fulcrum
Windows 7 reports: Embarcadero RAD Studio for Windows has
stopped working.
Note from Iulian Chitan: I could reproduce it on Windows Vista 64
bit. Did a clean install of the build 15.0.3846.32576.1, opened the
IDE, closed the IDE and then error received: Embarcadero RAD
Studio for Windows has stopped working (i think this happens only
the first time you do this).
Note from Iulian: other user reported the same problem. See link
https://forums.embarcadero.com/thread.jspa?threadID=40521&tstart=30 Problem signature:
Problem Event Name: APPCRASH
Application Name: bds.exe
Application Version: 15.0.3846.32576
Application Timestamp: 4c3d0522
Fault Module Name: ntdll.dll
Fault Module Version: 6.0.6002.18005
Fault Module Timestamp: 49e03824
Exception Code: c0000005
Exception Offset: 000327e2
OS Version: 6.0.6002.2.2.0.256.4
Locale ID: 1033
Additional Information 1: bfef
Additional Information 2: e8adce1c2b9e7be834b4063ac3c53863
Additional Information 3: bfef
Additional Information 4: e8adce1c2b9e7be834b4063ac3c53863
QC #:
Date Reported:
Area:
88050
9/14/2010
IDE\Dialogs\Project Options
Description:
Steps:
[QC Short Description]
With a Delphi Win32 forms application, 1. select project | options
Error when adding path(which contains spaces) to project search
paths
[QC Description]
1. Create any new build configuration that descends from an existing
build configuration.
menu 2. in first tab, select 'Search Path' editor 3. Add a path 4.
attempting to compile gets the error message [DCC error] Invalid
command line switch for "dcc". Illegal quote passed to the command
line switch "-I". The value was ["c:\rot"]
2. Open Project | Options.
3. Edit the Search Path in the descendant build configuration, disable
inheritance from the parent build configuration, and add directories
containing spaces, e.g.: ..\Common
Classes\SharedForms;..\Common Classes\Classes.
4. Save the Project Options.
5. Build the project. DCC will exit with the indicated error.
6. Open the .dproj file with an editor. Notice that " entities are included
in the XML for the DCC_SearchPath path for the new build
configuration.
QC Entry 88050
QC #:
Date Reported:
Area:
21451
10/13/2005
IDE\Dialogs\Project Options
Description:
Steps:
COM linker options are not visible by default in project options dialog
Start Delphi (test done in 1024x768)
--- QA notes that screen size doesn't appear to matter ---Make a new ActiveX library
Add in an Automation object or a COM object to the library
Go to the project options dialog
Go to the Linker page
Note at the bottom you can just see the *top* of the COM groupbox,
but nothing else
[10.0.2143.37589 : 236135]
QC #:
Date Reported:
Area:
88748
10/7/2010
IDE\Dialogs\Project Options
Description:
Steps:
[QC Short Description]
Pre- and Post-Build Macros Missing
By USc: - create a new project - open the project options - select
page Build Events - press an Edit... button on the right expected:
there are macros like BDS, DEFINES, ..., WINDIR in "...-Build event"
dialogs on the bottom in the Macros groupbox actual: there are no
macros
[QC Description]
[Regression from D2010]
In the Project Options box for my project, I click on the Build Events
node, and then I click on either of the Edit... buttons. In the ensuing
dialog box titled "Pre-Build event" or "Post-Build event", the list of
Macros in the bottom half of the form is completely empty. I have
verified that my Delphi 2010 product, installed on this same machine,
does contain a list of useful macros I can use. So, where are they in
XE? How can I get them back, as the list appears read-only?
QC Entry 88748
QC #:
Date Reported:
Area:
94899
6/8/2011
IDE\Project Management
Description:
Steps:
[QC Short Description]
Adding {$R *.res} for console app leads to IDE hung
1. Create new console app 2. Save all files to disk 3. Manually enter
or copy/paste {$R *.res} to code 4. IDE hungs after showing message
about Resource file not found. Recreating. No .RES file actually
created!
[QC Description]
Due to inability to edit versioninfo for console app we need to
manually add {$R *.res} to out code.
But this action leads to IDE hung.
QC Entry 94899
QC #:
Date Reported:
Area:
90130
12/5/2010
IDE\Project Management\Project
Manager
Description:
Steps:
[QC Short Description]
Stray *.dres "file" in project manager
1. Create new package. 2. Project/Resources and images. 3. Add any
resource of any type, close window by OK. 4. Notice your file in
"Contains" node in project manager. 5. Save all. 6. Close all. 7.
Reopen last package project. Exp: the same view. Act: in Contains
node there is a one more entry: "*.dres".
[QC Description]
Sometimes a weird "file" "*.dres" appears in project manager - see
steps to reproduce.
It seems to have no effect at all.
You can't remove it, you can't rename it.
QC Entry 90130
QC #:
Date Reported:
Area:
36006
11/1/2006
IDE\Project Management\Project
Manager
Description:
Steps:
[QC Short Description]
Highlander does not release folder
1. Create a new VCL Win32 project
2. Save All, choose a new folder which has just been created!
3. Close All
4. Change to Windows Explorer and try to delete the folder.
"cannot delete folder: it is being used by another person or program".
[QC Description]
If save a project in a newly created folder, Highlander does not
release the folder after closing the project. Trying to delete the folder
in the Windows Explorer will result in an error message: "cannot
delete folder: it is being used by another person or program".
QC Entry 36006
QC #:
Date Reported:
Area:
73249
6/11/2008
IDE\Project Management\Project
Manager
Description:
Steps:
[QC Short Description]
Project options: search path -> MSBuild "-I" and "-U" are correct, but
"-O" and "-R" are not
- start Tiburon - create a new Delphi.Win32 project - enter
"c:\MySearchPath" into "Search path" on the page for the node
"Delphi Compiler" in the project options - enter
"c:\MyNewResourcePath" into "Include file search path" on the page
for the node "Resource Compiler"\"Directories and Conditionals" (this
is just to check if this path ends up somehow in -R option -> it doesn't
and I don't expect that) - compile - switch to the "Output" tab in the
message pane - copy the "dcc32.exe" line and paste it into
notepad.exe (or any other tool where you can better read and reformat it) expected: -Ic:\MySearchPath;<library path> Oc:\MySearchPath;<library path> -Rc:\MySearchPath;<library path> Uc:\MySearchPath;<library path> actual: -Ic:\MySearchPath;<library
path> -O<library path> -R<library path> -Uc:\MySearchPath;<library
path>
[QC Description]
While using the source version of the JVCL I noticed that the IDE
does not add the search path to the -O and -R option in the MSBuild
command line. In fact of the incorrect -R option the resource files
could not
be found and I had to add the resource file path to the library path to
get it compiling.
Delphi 2007:
-I<Project search path>;<library path>
-O<Project search path>;<library path>
-R<Project search path>;<library path>
-U<Project search path>;<library path>
Tiburon:
-I<Project search path>;<library path>
-O<library path>
-R<library path>
-U<Project search path>;<library path>
QC Entry 63188
QC #:
Date Reported:
Area:
72361
3/20/2009
IDE\Project Management\Project
Source
Description:
Steps:
[QC Short Description]
Packages and Option set
1) Create Package 2) Select Project -> Options 3) In dialog select
Compiling item in tree 4) Select in compo box configuration to Debug
and change "Optimization" to false 5) Click OK to close dialog 6) Click
Project -> Configuration Manager and activate debug configuration 7)
Click Project -> View source and check OPTIMIZATION flag on dpk
file then try to debug package using some host application
[QC Description]
When I use package and try to activate Debug or Release
configuration nothing happens. IDE use the settings from Base
configuration. What I must to do to apply settings from active
configuration.
Added by Sysop
<<<<<<<<<<<
This issue still exists in Delphi XE(w/ Update1).
Please see comments of QC report and attached screenshots.
>>>>>>>>>>>
QC Entry 72361
QC #:
Date Reported:
Area:
91004
1/20/2011
IDE\Project Management\Project
Source
Description:
Steps:
[QC Short Description]
Conditional defines in projects source causes wrong changes in the
code
1) Add a ifdef conditional defines on your project source DPR file.
Your code look like this {$IFDEF MSWINDOWS} {$R *.res} {$ENDIF}
{$IFNDEF LCL} {$R RODLFILE.res} {$ENDIF} {$IFDEF WINDOWS}
{$R PetroBoxData.rc} {$ENDIF} {$IFDEF LCL} {$R
PetroBoxData.res} {$ENDIF} begin {$IFNDEF LCL}
ROService.CreateForm(TServerDataModule, ServerDataModule);
ServerDataModule.fEsServicio := True; ROService.Run; Exit;
{$ENDIF} Application.Initialize; {$IFDEF LCL}
Application.Title:='PetroBox Data Linux Server'; {$ELSE}
Application.Title:='PetroBox Data Service'; {$ENDIF}
Application.CreateForm(TServerDataModule, ServerDataModule);
Application.CreateForm(TServerForm, ServerForm); if
Assigned(ServerDataModule) then ServerDataModule.fEsServicio :=
False; Application.Run; end. 2) Add a files to your project 3) Changes
to this: {$IFDEF MSWINDOWS} {$R *.res} {$ENDIF} {$IFNDEF LCL}
{$R RODLFILE.res} {$ENDIF} {$IFDEF WINDOWS} {$R
PetroBoxData.rc} {$ENDIF} {$IFDEF LCL} {$R PetroBoxData.res}
{$ENDIF} begin {$IFNDEF LCL}
ROService.CreateForm(TServerDataModule, ServerDataModule);
ServerDataModule.fEsServicio := True; ROService.Run; Exit;
{$ENDIF} Application.Initialize; {$IFDEF LCL}
Application.Title:='PetroBox Data Linux Server'; {$ELSE}
Application.Title:='PetroBox Data Service'; {$ENDIF}
AApplication.CreateForm(TServerDataModule, ServerDataModule);
AApplication.CreateForm(TServerForm, ServerForm);
Assigned(ServerDataModule) then ServerDataModule.fEsServicio :=
False; Application.Run; end.
[QC Description]
If you have condiftional defines including IFDEFS and add a unit to
the project the code changes in a worng way.
It happens from D2007 .
Added by Sysop
<<<<<<<
Please see comments of QC for more detail.
>>>>>>>
QC Entry 91004
QC #:
Date Reported:
Area:
91095
1/25/2011
IDE\Code Editor
Description:
Steps:
[QC Short Description]
Delphi XE IDE freezes when the Welcome screen is closed
1) Start Delphi XE. 2) Choose any project from the welcome screen.
3) Perform one of the following: a) Close the welcome screen. b)
switch from form view to the code view
[QC Description]
Delphi XE IDE freezes many times a day. The most common cause is
when the welcome screen is closed without opening a file first.
Frozen IDE never recovers and needs to be shut down using Task
manager, and all unsaved work is lost.
Added by Sysop
<<<<<<
This issue seems to be similar to(related to) QC#88886.
Please see comments of QC for more detail.
>>>>>>
QC Entry 91095
QC #:
Date Reported:
Area:
2001
8/6/2002
IDE\Code Editor\Syntax
Highlighting
Description:
Steps:
There is a bug in syntax highlighting of 'L' character prior to a string
constant.
program Project1;
begin
WriteLn(L'123');
end.
Same in D6
[From QC #2001]
+ Click Tools | Editor Options | Color Tab
+ Select the String Element
+ Set it to red so that it is easier to see the issue.
+ Click OK
// Notice the 'L' in the WriteLn argument is highlighted with the color
for a string
QC #:
Date Reported:
Area:
88886
10/12/2010
IDE\Code Editor\Error Insight
Description:
Steps:
[QC Short Description]
IDE lock-up
type X = procedure(const dummy: pchar); type T = class var FA: X;
property A: X read FA; property A: X read FA; end; procedure foo; var
bar: X; begin bar('') end; begin end.
[QC Description]
1. Start the IDE, create a new console application.
2. Make sure that Error Insight is enabled.
2. Copy/paste the test program from "Steps" over the code generated
by the IDE.
QC Entry 88886
QC #:
Date Reported:
Area:
87250
8/14/2010
IDE\Code Editor\Error Insight
Description:
Steps:
[QC Short Description]
Error Insight can't distinguish between class function and class
operator of same name
Open attached file Decimals.pas in editor Exp: No Error Insight
errors. Act: Error Insight errors for Decimal.Add, Decimal.Divide,
Add.Multiply, Add.Round and Add.Subtract Steps by USc: - create a
new console app and replace it with the following program expected:
[QC Description]
no Error Insight errors in the Structure view and the editor actual:
In my Decimals unit (attached), Error Insight of XE can't distinguish
Identifier redeclared 'Decimal.Add' at line 25 (25:16) Undeclared
between
identifier 'Result' at line 27 (27:3) Identifier redeclared 'Decimal.Divide'
at line 35 (35:16) Undeclared identifier 'Result' at line 37 (37:3)
class operator Decimal.Subtract(const Left, Right: Decimal): Decimal; Identifier redeclared 'Decimal.Multiply' at line 45 (45:16) Undeclared
begin
identifier 'Result' at line 47 (47:3) Identifier redeclared
InternalSubtract(Result, Left, Right);
'Decimal.Round' at line 55 (55:16) Undeclared identifier 'Result' at line
end;
57 (57:3) Identifier redeclared 'Decimal.Subtract' at line 65 (65:16)
program QC87250; {$APPTYPE CONSOLE} type Decimal = packed
and
record public class function Add(const Left, Right: Decimal): Decimal;
static; class function Divide(const Left, Right: Decimal): Decimal;
class function Decimal.Subtract(const Left, Right: Decimal): Decimal; static; class function Multiply(const Left, Right: Decimal): Decimal;
begin
static; class function Round(const D: Decimal): Decimal; static; class
InternalSubtract(Result, Left, Right);
function Subtract(const Left, Right: Decimal): Decimal; static; class
end;
operator Add(const Left, Right: Decimal): Decimal; class operator
Divide(const Left, Right: Decimal): Decimal; class operator
I get errors:
Multiply(const Left, Right: Decimal): Decimal; class operator
Round(const D: Decimal): Decimal; class operator Subtract(const
Identifier redeclared 'Decimal.Subtract' at line 3753 (3753:16)
Left, Right: Decimal): Decimal; end; class function Decimal.Add(const
Undeclared identifier 'Result' at line 3755 (3755:20)
Left, Right: Decimal): Decimal; begin Result := Left; end; class
operator Decimal.Add(const Left, Right: Decimal): Decimal; begin
This does not happen in Delphi 2010 Update 4.
Result := Left; end; class function Decimal.Divide(const Left, Right:
Decimal): Decimal; begin Result := Left; end; class operator
Decimal.Divide(const Left, Right: Decimal): Decimal; begin Result :=
QC Entry 87250
Left; end; class function Decimal.Multiply(const Left, Right: Decimal):
Decimal; begin Result := Left; end; class operator
Decimal.Multiply(const Left, Right: Decimal): Decimal; begin Result :=
Left; end; class function Decimal.Round(const D: Decimal): Decimal;
begin Result := D; end; class operator Decimal.Round(const D:
Decimal): Decimal; begin Result := D; end; class operator
Decimal.Subtract(const Left, Right: Decimal): Decimal; begin Result
:= Left; end; class function Decimal.Subtract(const Left, Right:
Decimal): Decimal; begin Result := Left; end; begin end.
QC #:
Date Reported:
Area:
89332
10/30/2010
IDE\Code Editor\Error Insight
Description:
Steps:
[QC Short Description]
1. Create a new console application 2. Copy the following code into
AV in ErrorInsight when reference to procedure is not complete
the editor program EI_AV; {$APPTYPE CONSOLE} type TMyProc =
reference to proc begin foo bar end. 3. Wait for Error Insight to parse
[QC Description]
the code Expected: "proc", "begin", "foo" and "bar" are underlined
If the "reference to procedure" is not complete like "reference to proc" Actual: "proc" is underlined and if you attach the CLR Debugger you
and ErrorInsight parses the code it throws an
see that the parser throws an NullReferenceException.
NullReferenceException.
QC Entry 89332
QC #:
Date Reported:
Area:
87390
8/19/2010
IDE\Code Editor\Error Insight
Description:
Steps:
[QC Short Description]
Using CodeSite Units Breaks Error Insight
Install RadStudio + CodeSite File, New VCL Forms App Add
CodeSiteLogging to Unit1 uses clause The project compiles, but error
insight underlines the new unit. I assume parsing dcu-only units is not
working?
[QC Description]
Adding CodeSiteLogging to the uses clause triggers error insight
QC Entry 87390
QC #:
Date Reported:
Area:
87774
9/3/2010
IDE\Code Editor\Error Insight
Description:
Steps:
[QC Short Description]
$CodeAlign is not recognised
Create a new project, place {$CodeAlign 16} anywhere below the
program header. The directive is underlined and flagged in the
Structure window: “Invalid directive ‘codealign’”. By USc: - create a
new console app and replace it with the following program expected:
no Error Insight errors in the Structure view and the editor actual:
Invalid directive 'CODEALIGN' at line 5 (5:3) Invalid directive
'CODEALIGN' at line 6 (6:3) Invalid directive 'CODEALIGN' at line 7
(7:3) Invalid directive 'CODEALIGN' at line 8 (8:3) Invalid directive
'CODEALIGN' at line 9 (9:3) Invalid directive 'CODEALIGN' at line 10
(10:3) program QC87774; {$APPTYPE CONSOLE} {$CODEALIGN
0} {$CODEALIGN 1} {$CODEALIGN 2} {$CODEALIGN 4}
{$CODEALIGN 8} {$CODEALIGN 16} begin end.
[QC Description]
The recently introduced directive $CodeAlign is not recognised by
Error Insight.
QC Entry 87774
QC #:
Date Reported:
Area:
89984
11/27/2010
IDE\Code Editor\Help Insight
Description:
Steps:
[QC Short Description]
HelpInsight doesn't work for all units
See demo application in the attach. 1. Open application. 2. Open
Unit27. 3. Hover P method. 4. Exp.: there will be custom help
message in HelpInsight window. 5. Act.: there will be custom help
[QC Description]
message in HelpInsight window. 6. Now open Unit28. 7. Hover D
HelpInsight is only working for units, which are listed in project's uses procedure. 8. Exp.: there will be custom help message in HelpInsight
(dproj).
window. 9. Act.: default message without custom help.
This makes this feature useless for 3rd party components and code
library developers - since units of libs are not included into project.
They just listed in uses clause inside application units.
QC Entry 89984
QC #:
Date Reported:
Area:
92494
3/22/2011
IDE\Code Editor\Formatting
Description:
Steps:
[QC Short Description]
Formatter doesnt add space after generic property declaration
use a class with: property Foo: TFoo<TBar> read FFoo; Formatter
will do this: property Foo: TFoo<TBar>read FFoo; --> Rightclick>Search for declaration on TFoo wont work anymore
[QC Description]
Formatting classes with generic propertys causes a small bug that
leads to code, that is not easy to read and also breaks the jump to
deklaration feauture.
QC Entry 92494
QC #:
Date Reported:
Area:
92909
4/7/2011
IDE\Code Editor\Formatting
Description:
Steps:
[QC Short Description]
Try to format this unit: unit unTest; interface type TFoo = Integer;
Formatter fails on partial range declaration
[QC Description]
If you have some partial value range declaration like "type
TCaps='A'..'Z';" the formatter will not indent this and every following
type declaration.
QC Entry 92909
TCaps = 'A' .. 'Z'; TBar = Integer; type TFoo2 = Integer;
implementation end. Result will look similar to the one above. TCaps
and TBar not indented but TFoo and TFoo2 are. ------------ ... type
TFoo = Integer; TCaps = 'A' .. 'Z'; TBar = Integer; ... ------------
QC #:
Date Reported:
Area:
82755
3/7/2010
IDE\Code Editor\Formatting
Description:
Steps:
[QC Short Description]
Please make an option to combine the "end else if" statement on a
single line
#34199 - description.
#34200 - implementation
#34201 - tests
#34573 - properties in config
[QC Description]
The style is something i inherited from using small editor screens. By
using the statement on a single line i could see more code in the
editor..
QC Entry 82755
QC #:
Date Reported:
Area:
88896
10/12/2010
IDE\Code Editor\Formatting
Description:
Steps:
[QC Short Description]
Formatter should differentiate method names from directives
1. Set Capitalization Options Capitalization of other words - As first
occurrence Capitalization of reserved words and directives - lower
case 2. Format following code unit Unit1; interface type TMyClass =
class function Read: string; procedure Write(const s: string); end;
implementation { TMyClass } function TMyClass.Read: string; begin
end; procedure TMyClass.Write(const s: string); begin end; end.
*************************** And the result will be: unit Unit1; interface
type TMyClass = class function read: string; <------ SHOULD BE
Read procedure write(const s: string); <----- SHOULD BE Write end;
implementation { TMyClass } function TMyClass.Read: string; begin
end; procedure TMyClass.Write(const s: string); begin end; end.
[QC Description]
Methods named as some of directives are not properly capitalized.
QC Entry 88896
QC #:
Date Reported:
Area:
89198
10/24/2010
IDE\Code Editor\Formatting
Description:
Steps:
[QC Short Description]
Anonymous methods incorrectly formatted
See attached example. Module Unit.pas
[QC Description]
if EnumerateFiles(InputDir, '*.wav', faAnyFile, // !!!!
function(FileName: string; Time: integer; Size: int64): boolean
begin
if not (FileName[1] = 'A') then
begin
inc(TotalSize, Size);
inc(N);
end;
if GetTickCount - Tick > 100 then
begin
sleep(10);
Tick := GetTickCount;
end;
Result := True;
end) then
begin
if N > 0 then
begin
MessageBox(0, PChar('N: ' + inttostr(N) + #13#10 + 'TotalSize: ' +
inttostr(TotalSize)), 'Ok', MB_ICONINFORMATION);
end;
end;
This code is transformed into
if EnumerateFiles(InputDir, '*.wav', faAnyFile, // !!!!
[vk]Fixed in #35346. Formatter supportts now 2 types of anonymous
methods:
anonymous1 - in the assignment
anonymous2 - in the operator (usually in function). For example
R := function(a, t): Integer
var
i: Integer;
begin
Result := 0;
end;
and
EnumFiles(10, function(r: Integer; s: String): Integer
var
l: String;
begin
Result := 0;
end, 145);
Example file is attached ___proj1.dpr
Additional - two parameters added - "Line breaks in Anonymous
Functions assignment" and "Line breaks in Anonymous Functions
usage". Correct description if necessary
function(FileName: string; Time: integer;
Size: int64): boolean begin if not(FileName[1] = 'A')
then begin inc(TotalSize, Size); inc(N); end;
if GetTickCount - Tick > 100 then begin sleep(10); Tick :=
GetTickCount;
end; Result := True; end) then
begin
if N > 0 then
begin
MessageBox(0, PChar('N: ' + inttostr(N) + #13#10 + 'TotalSize: ' +
inttostr(TotalSize)), 'Ok', MB_ICONINFORMATION);
end;
end;
QC Entry 89198
QC #:
Date Reported:
Area:
89290
10/28/2010
IDE\Code Editor\Formatting
Description:
Steps:
[QC Short Description]
There is no space between ] and write directive
[QC Description]
If you have property that reads and writes fixed array field there is no
space between ] and write directive.
QC Entry 89290
Formating the following code results in: type TMyClass = class private
FTable: array of [0 .. 1] of string; published property Table0: string
read FTable[0]write FTable[0]; property Table1: string read
FTable[1]write FTable[1]; end; and it should be type TMyClass =
class private FTable: array of [0 .. 1] of string; published property
Table0: string read FTable[0] write FTable[0]; property Table1: string
read FTable[1] write FTable[1]; end;
QC #:
Date Reported:
Area:
90030
11/30/2010
IDE\Code Editor\
Description:
Steps:
[QC Short Description]
Misformatting of try-except under certain circumstances
Enter following text: procedure Test; begin if SomeDecision then
begin try DoSomething except on e: ESomeError do Test else raise
end; end; end; is formatted like this: procedure Test; begin if
SomeDecision then begin try DoSomething except on e: ESomeError
do Test else raise end; // << this end belongs to except - not to on else!!! end; end;
[QC Description]
Found under the following circumstances:
1. Begin - end enclosing
2. try-except with
3. else construct inside exception-handling
doesn't align the begin - end pairs correctly
regarded as rather severe problem as the error continues to work
further down the text
QC Entry 90030
QC #:
Date Reported:
Area:
91497
2/10/2011
IDE\Code Editor\
Description:
Steps:
[QC Short Description]
Load the attached formatter config file and format with the attached
Pascal Code Formatter not usable; Expressions in brackets break the pascal code. Take a look at line 417 and following. Added by Sysop
formatter.
<<<<<<<<< The following code was formatted with the settings i
meantioned above (indention is completly broken): procedure
[QC Description]
TClass.FormatAsCastWithoutSemicolon; var Obj: TObject; begin Obj
The integrated code formatter doesn't work like it should. Expressions := nil; // NG while True do (Obj as TObject).ClassName;
in brackets let the formatter fail on the code follwing. So your
Obj.ClassName; // OK if True then (Obj as TObject).ClassName;
indention is completely broken.
Obj.ClassName; if True then (Obj as TObject).ClassName else //
QC Entry 91497
B?SE Obj.ClassName; Obj.ClassName; // NG if True then (Obj as
TObject).ClassName else // NG (Obj as TObject).ClassName;
Obj.ClassName; // OK if True then begin (Obj as
TObject).ClassName; end else (Obj as TObject).ClassName;
Obj.ClassName; // ULTRA-NG if True then begin (Obj as
TObject).ClassName end else Obj.ClassName; Obj.ClassName; //
ULTRA-NG if True then begin (Obj as TObject).ClassName; end else
begin (Obj as TObject).ClassName end; Obj.ClassName;
Obj.ClassName; Obj.ClassName; Obj.ClassName; end; // Collateral
damage procedure ThisMethodBodyShouldNotBeIndented; begin
end; >>>>>>>>>
QC #:
Date Reported:
Area:
91630
2/18/2011
IDE\Code Editor\
Description:
Steps:
[QC Short Description]
Formatter dont like anonymous methods
[QC Description]
The Code Formatter don't like anonymous methods... The Code is
messed up after formatting.
QC Entry 91630
//Format this Source: program Project1; type TAnonMethod =
reference to procedure(aParam: Boolean); procedure
UseAnonMethod(AAnonMethod: TAnonMethod); begin
AAnonMethod(True); end; begin UseAnonMethod(
procedure(aParam: Boolean) begin if not aParam then Halt; end);
end. // //Formatter will formate the source above like this: // program
Project1; type TAnonMethod = reference to procedure(aParam:
Boolean); procedure UseAnonMethod(AAnonMethod: TAnonMethod);
begin AAnonMethod(True); end; begin UseAnonMethod(
procedure(aParam: Boolean)begin if not aParam then Halt; end); end.
QC #:
Date Reported:
Area:
93638
5/6/2011
IDE\Code Editor\
Description:
Steps:
[QC Short Description]
Code Formater inserts incomplete CRLF sequence
1. Select following options:
Error Insight - on
Source Options - Show Line Breaks - on
Formatter Options:
Keep user line breaks - false
Line breaks un Uses clauses - yes
[QC Description]
Under specific circumstances when formatting only the selection of
the code, formatter will eat first character of the
selected code and insert only CR at the and of the selection.
After that not having a complete CRLF sequence in source code
results in other bugs (like Error Insight and Code Completion not
working properly)
I think that Copyright character in Documentation region in
attached sample code causes misbehavior. Other international
characters cause the same misbehavior.
QC Entry 93638
2. Open attached project
3. Open - XSpace.Engine file
4. Error Insight will show red lines under - TSomething, and all line
breaks will be normal CRLF pairs
5. Select uses + Classes, XSpace.Controls, XSpace.Classes; lines
6. Press Ctrl + D to invoke formatting
7. As the result formatter will eat up "u" character from uses and add
only CR at the end of the selection
8. Error Insight will now show errors in wrong lines
I have also attached images of described behavior before.jpg shows
code before, and after.jpg after formatting.
QC #:
Date Reported:
Area:
20170
10/16/2005
IDE\Form Designer
Description:
Steps:
[QC Short Description]
Closing action editor makes BDS go behind other applications.
You must have another application running 1. Create new VCL Form
Application. 2. Add ActionList to form. 3. Double -click ActionList1. 4.
Right - click and select New Standard Action... 5. Cancel Dialog. 6.
Close Action List Editor by clicking on the X top Right. 7. The other
application is now the foreground window.
[QC Description]
I have insatlled only the C++ personality.
When closing the action editor BDS is no longer the active
appplication.
WinXP SP2 with latest MS patches.
QC Entry 20170
QC #:
Date Reported:
Area:
82194
2/16/2010
IDE\Form Designer
Description:
Steps:
[QC Short Description]
Event handlers are inserted incorrectly
NOTE: My platform is actually Windows 7 64-bit, but the platform field
in Quality Central doesn't have any options for Windows 7. Double
clicking on a control in the form designer creates and inserts the
default event handler for that control (assuming the event handler
doesn't already exist). The new event handler is not being inserted
correctly. It is breaking the code. Here is the code BEFORE the event
handler is inserted. procedure
TMainForm.jobNumberEditChange(Sender: TObject); begin ; end;
procedure TMainForm.modifiedOnDateTimePickerChange(Sender:
TObject); begin ; end; If I then double click on a control (any one will
do, so long as it creates a new event handler), I get the following error
[QC Description]
Added by Sysop
<<<<<<<<<<<<<<<<<<<<
[Steps]
Create a form with 2 buttons (First and Second) and one label
(Label1). Write event handlers for the buttons as follows:
message. Cannot find implementation of method
jobNumberLabelClick. Here is the code AFTER the event handler is
procedure TForm1.FirstEventClick(Sender: TObject);
inserted. procedure TMainForm.jobNumberEditChange(Sender:
begin
TObject); begin ; end; pprocedure
// The presence of this comment appears to be involved in the bug.
TMainForm.jobNumberLabelClick(Sender: TObject); begin end;
Label1.Caption := 'First Button';
rocedure TMainForm.modifiedOnDateTimePickerChange(Sender:
end;
TObject); begin ; end; Notice that the new event handler has actually
been inserted between the 'p' and 'r' of the reserved word 'procedure'
procedure TForm1.SecondEventClick(Sender: TObject);
at the start of the second pre-existing method. This same error occurs
begin
if I double click next to an unassigned event in the object inspector.
Label1.Caption := 'Second Button';
This is a major pain. An added problem is that the event handler is
end;
inserted in alphabetical order, so I have to go looking for it to fix it. In
my opinion new event handlers should be inserted at the end of the
Save. Switch back to the designer and double-click the label unit where I can easily find them and then put them were I want them.
procedure Label1Click is created.
At the moment I'm creating event handlers manually to avoid both the
Format the source code with Ctrl+D then save again with Ctrl+S - the insertion error and the alphabetical issue. I have just upgraded to
empty event hander for the label is deleted by the IDE.
Delphi 2010 and I'm not at all impressed by such a fundamental
Switch back to the designer and double-click the label again. The
operation failing, something that for me worked fine in Delphi 2009
error message appears and the following is inserted into the code
and Delphi 7.
editor:
procedure TForm1.FirstEventClick(Sender: TObject);
begin
// The presence of this comment appears to be involved in the bug.
Label1.Caption := 'First Button';
end;
pprocedure TForm1.Label1Click(Sender: TObject);
begin
end;
rocedure TForm1.SecondEventClick(Sender: TObject);
...
>>>>>>>>>>>>>>>>>>>>
QC Entry 82194
QC #:
Date Reported:
Area:
91928
3/3/2011
IDE\Form Designer
Description:
Steps:
[QC Short Description]
F**** explicit properties
Added by Sysop <<<<<<<<<<< Please see attached screenshot for
more deailed [Steps] to reproduce this issue. >>>>>>>>>>>
[QC Description]
Have I ever told you, what I think about the explicit properties?
Please do the following:
- Open Delphi 2010
- Create a new vcl forms application
- Put 2 buttons on the form
- Move the buttons at a bottom / right position of the form
- Now think, that the form should be smaller
- Really believe, that the form must be smaller
- Set the anchors of the buttons to [akRight, akBottom]
- Set the size of the form as small as you like
- Reset the anchors of the buttons to [akLeft, akTop]
- Wonder yourself, where the buttons have been gone.
- Now, ask yourself: How stupid are explicit properties?
QC Entry 91928
QC #:
Date Reported:
Area:
96737
7/27/2011
IDE\Form Designer
Description:
Steps:
[QC Short Description]
Ctrl +F4 does not close the form designer
Open a form attempt to close it using Ctrl+F4
[QC Description]
Ctrl +F4 does not close the form designer window. You must first
switch to code view (F12), and then Ctrl+F2 works. The local menu
for the Tab shows that Ctrl+F4 should close the tab the same as if it
was displaying the associated code unit.
QC Entry 96737
QC #:
Date Reported:
Area:
88419
9/26/2010
IDE\Form Designer
Description:
Steps:
[DE TRANSLATION issue]
- start Delphi with DE localization - open the attached project - open
InheritedForm.pas and switch to the Form Designer - try to delete
Button1 - look the shown error message expected: the message has
only one period "...werden kann." actual: the message has two
periods "...werden kann.."
[QC Short Description]
DE translation of "Selection contains a component, %s, introduced in
an ancestor and cannot be deleted." message has additional period
[QC Description]
The DE translation of the Form Designer message, that is shown
when you try to delete a component that is part of a ancestor, has an
additional period.
The message is "Die Auswahl enthaelt eine Komponente %s, die in
einem Vorfahr eingefuehrt wurde und nicht geloescht werden kann.."
(umlauts replaced with their two character non umlaut
representations)
In the US, FR and JA version the message has only one period.
-> see steps
QC Entry 88419
QC #:
Date Reported:
Area:
20784
10/25/2005
IDE\Form Designer
Description:
Steps:
use context menu or use Ctrl + X/C do not work in VCL Form
Designer
(regression)
1. File | New | Win32 VCL Application
2. drop a button
// Ctrl + X
// nothing change
3. mouse select the button
// Ctrl + X
// nothing change
WORKAROUND: switch to code and back to designer. it should now
work.
QC #:
Date Reported:
Area:
90054
12/1/2010
IDE\Form Designer
Description:
Steps:
[QC Short Description]
Automated Incident Report
Drop 2 buttons. Select both. Drag them.
[QC Description]
Access violation at address 007E4C7D in module 'designide160.bpl'.
Read of address 00000000.
Had multiple components selected on a form and then tried to drag
them all.
[DevBuild]
QC Entry 90054
QC #:
Date Reported:
Area:
89149
10/21/2010
IDE\Form Designer
Description:
[QC Short Description]
Saving a form with a ListView can kill the IDE
[QC Description]
For some visual inherited formulars with a TListView the IDE can
vanish by pressing Ctrl+S (Save). This happens when the
ListView.Handle is recreated while the
TComponentRoot.GetRootStream method is running. In that case the
output stream of the called function
Classes.ObjectResourceToText(Input, Output: TStream) is destroyed
Steps:
by a call to TComponentRoot.InstanceRemoved that is triggered by
"Columns.Clear" in "TCustomListView.CreateWnd.
QC Entry 89149
QC #:
Date Reported:
Area:
89739
11/17/2010
IDE\Object Inspector
Description:
Steps:
[QC Short Description]
Some characters can't be entered in object inspector
New project go in source edit window hit <Alt Gr> + <E> key
combination: expected €, got € go to object inspector, select Caption
property of the form hit <Alt Gr> + <E> key combination: expected €,
got -nothing- Characters from key combination that doesn't work (on a
French keyboard, French system) ~ # { [ | ` \ ^ @ ] } € ¤
[QC Description]
Using a French keyboard, on a French Windows Seven 64 bits , all
keys involving the combination <Alt Gr> + something are not
producing any character in object inspector
for instance, to access the EURO sign (€), key combination is
<Alt Gr> + <E>. In the main (pascal) editor, the combination is
working. However, in object inspector, this combination will not
operate
NOTE: The issue occur not only in object inspector, but in almost ALL
fields where text need to be entered, but the source code editor.
Example: in the commit comment of subversion, same problem ....
QC Entry 89739
QC #:
Date Reported:
Area:
90248
12/10/2010
IDE\File Handling
Description:
Steps:
[QC Short Description]
Double click on .pas file does not open in Delphi XE
double click on a .pas file from the Windows browser. I am using a
Windows Vista 64 bit, but I just saw a report on www.expertsexchange.com that indicates someone is having the issue on
Windows 7 64 bit as well.
[QC Description]
Using the windows file browser go to any .pas file and double click on
it. The best reaction I get is that it opens in the older version (Delphi
2010). I want it to open in Delphi XE. Attempts to manually correct
this have failed (right click on a .pas file, go through properties, and
hand select the executable to open it with).
QC Entry 90248
QC #:
Date Reported:
Area:
21483
4/11/2005
IDE\Toolbars
Description:
Steps:
*******************************************************
NOTE: This bug is a generic IDE issue and not specific to the HTML
designer. When verifying this bug please test using the standard IDE
toolbars as well as the HTML designer toolbars.
*******************************************************
when HTML designer is open, trying to remove html designer toolbar
button causes ..
1) File | New | Other | Web Document | HTML page
2) Rclick on HTML designer
select Toolbars | Customize
3) remove one of commang button ( for example : Font foregrand
color )
// Drag it off of a toolbar
// you will get ..
Error : List index out of bounds (14)
1) List index out of bounds
2) Av in ntdll.dll
// stack trace attached
[BCMF]
[BCS]
Repeat the same steps on the IDE main toolbars for any button that is
NOT the last button on the toolbar. If you need more info contact
Steve T. x5030
<Details ..>
<OK>
// Error : AV at 7C918FEA in ntdll.dll. Write of address 00000010
[10.0.2131.8949 (11/1) : true ] AV in ntdll.dll
[10.0.2138.21187 (11/8) : true ]
[10.0.2131.8949 (11/1) : true ] AV in ntdll.dll
+ $5B[7C918FEA]{ntdll.dll } RtlpWaitForCriticalSection + $5B
+ $0[51F36B47]{rtl100.bpl } System. (Line 9980, "system.pas" + 13) +
$0
+ $41[7C903786]{ntdll.dll } RtlConvertUlongToLargeInteger + $41
QC #:
Date Reported:
Area:
89680
11/15/2010
IDE\Performance
Description:
Steps:
[QC Short Description]
Compilation slows down slightly after each compile if project has
excluded packages
New VCL forms application Project | Options | Packages Uncheck
some or all. The more you uncheck the larger the slowdown. Click
OK. Switch to code editor, right click and "View Messages" Compile
Make message view larger so you can read "Elapsed Time" Compile
repeatedly and observe the elapsed time values.
[QC Description]
When repeatedly compiling a project which has excluded packages
the reported "elapsed times" grows after each compile.
QC Entry 89680
QC #:
Date Reported:
Area:
88730
10/7/2010
IDE\Code Completion
Description:
Steps:
[QC Short Description]
Code Completion method override wrong arg type
This was not a problem in Delphi 2010. It is a new bug.
QC Entry 88730
Step 1: Given this code: TItem = class end; TItemClass = class of
TItem; TAncestor = class public constructor Create(AItemClass:
TItemClass = nil); virtual; end; TDescendent = class(TAncestor) <----- CURSOR IS PLACED HERE end; Step 2: Hit CTRL-SPACE Step 3:
Find "Create" in the list Step 4: Hit ENTER Step 5: Observe that code
completion changed the format of the argument from the ancestor
method: TAncestor = class public constructor Create(AItemClass:
TItemClass = nil); virtual; end; TDescendent = class(TAncestor)
public // THIS IS INCORRECT constructor Create(AItemClass: class
of TObject = nil); override; end;
QC #:
Date Reported:
Area:
89331
10/30/2010
IDE\Code Completion
[QC Description]
Code completion for filling in inherited methods will fail if one of the
arguments is a class type. The wrong format of the type will be
inserted, and the resulting code will not compile.
Description:
Steps:
[QC Short Description]
Code Insight can't handle asm blocks in used units
1. Open the attached project 2. Place the caret after the comment
that tells you where to place the caret in the dpr file. 3. Press
Ctrl+Space (invoke Code Insight) Expected: The popup shows all
[QC Description]
available items Actual: No popup window is visible because Code
Code Insight stops working if there is a unit that isn't compiled yet (no Insight failed parsing the "inner" asm blocks in the used unit.
dcu file exists) and that contains asm blocks between "begin" and
"end".
QC Entry 89331
QC #:
Date Reported:
Area:
89333
10/30/2010
IDE\Code Completion
Description:
Steps:
[QC Short Description]
Code Insight can handle OleVariants with named parameter "end"
1. Open the attached project 2. Place the caret in the dpr file in the
line after "begin" 3. Press Ctrl+Space (invoke Code Insight) Expected:
The popup shows all available items Actual: No popup window is
visible because Code Insight failed to parse the "end:=" correctly.
[QC Description]
Code Insight stops working if there is a unit that isn't compiled yet (no
dcu file exists) and that contains an OleVariant dynamic call with
named parameters whos parameter is named "end"
QC Entry 89333
QC #:
Date Reported:
Area:
74857
6/14/2009
IDE\Code Completion
Description:
Steps:
[QC Short Description]
Code completion incomplete when {$SCOPEDENUMS ON}
Press Ctrl+Space where indicated in the example program Project1;
{$APPTYPE CONSOLE} uses SysUtils, IOUtils; begin try
TDirectory.GetDirectories('C:\', '*.*', // <-- CURSOR HERE except on
E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
[QC Description]
When an enum type is defined when {$SCOPEDENUMS ON} is
turned on, then the identifier will not be listed in code completion as
expected.
When trying to use code completion for TSearchOption in
TDirectory.GetDirectories, I'd expect that code completion shows
TSearchOption at the top of the list or better
TSearchOption.soTopDirectoryOnly and
TSearchOption.soAllDirectories as this is what the user needs to use
as parameter.
When the user has typed "TSearchOption.", then the available
identifiers will be visible, but this is too late.
This is more or less "just" a usability issue, but it I think it is very
confusing for those who don't know about the $SCOPEDENUMS
compiler directive or miss it in the source of IOUtils.
QC Entry 74857
QC #:
Date Reported:
Area:
89334
10/30/2010
IDE\Code Completion
Description:
Steps:
[QC Short Description]
Code Insight can handle anonymous methods correctly
1. Open the attached project 2. Place the caret in the dpr file in the
line after "begin" 3. Press Ctrl+Space (invoke Code Insight) Expected:
The popup shows all available items Actual: No popup window is
[QC Description]
visible because Code Insight failed to parse the "type foo: record
Code Insight stops working if there is a unit that isn't compiled yet (no end;" correctly.
dcu file exists) and that contains a anonymous
method.
QC Entry 89334
QC #:
Date Reported:
Area:
87185
8/12/2010
IDE\Code Browsing
Description:
Steps:
[QC Short Description]
Automated Incident Report
// Note: In a dev build, add $(TP)\Testing\Zombie\Harness to the global browsing path
(Tools/Options/Delphi Options/Library/Browsing path)
[QC Description]
Access violation at address 0AFE9D4A in module
'dcc150.dll'. Read of address 80000160.
1. Do a checkout off the following project: http://dtgsvn.embarcadero.com/svn/bdstests/trunk/zombie/tests/IDE/EDITOR/CodeFoldingOption
2. Open RAD Studio, open DelphiCodeFoldingOption.dpr
Code completion while declaring a new stream
class's constructor.
[DevBuild]
QC Entry 87185
3. Open CodeFoldingOption_U.pas in editor.
4. At line 157, Ctrl + Click on DelphiUI
5. In Delphi.pas, at opened line, Ctrl + Click on TDelphiUIModel
6. In Delphi.pas, go to line 1109 and ctrl + click on Connect. (constructor for
TDelphiUIModel class)
7. Go to the project source file, and ctrl + click on RunTests (at line 30);
8. In opened DosApp.pas, Ctrl + Click at line 258 on RunNextTest. AV appears.
QC #:
Date Reported:
Area:
29732
6/1/2006
IDE\Class Completion
Description:
Steps:
[QC Short Description]
Class Completion adds published section
1. Create the following class in a Win32 project: type TTest = class
public property X: Integer; end; 2. Press Ctrl+Shift+C The result looks
like this: type TTest = class private FX: Integer; procedure SetX(const
[QC Description]
Value: Integer); published public property X: Integer read FX write
When performing Class Completion on the class declaration shown in SetX; end; The published section is not really needed.
Steps, Class Completion will add an unnecessary published section.
QC Entry 29732
QC #:
Date Reported:
Area:
70411
1/11/2009
IDE\Class Completion
Description:
Steps:
[QC Short Description]
Code completion fails when class operator is present
type TNullable<T> = record private FValue: T; FIsNil: Boolean; public
class operator Implicit(const Value: T): TNullable<T>; class operator
Implicit(Value: Pointer): TNullable<T>; class operator Implicit(const
Value: TNullable<T>): T; property IsNil: Boolean read FIsNil; property
Value: T read FValue; end; ********************* After pressing
Ctrl+Shift+C the following error ocures: --------------------------- Project1
- CodeGear Delphi für Microsoft Windows - Unit2 --------------------------END erwartet, aber '(' gefunden in Klasse TNullable<T>. -------------------------- OK ---------------------------
[QC Description]
After installing Delphi 2009 Win32 update 2 (German Version), in the
IDE, hitting Ctrl-Shift-C inside a record definition with a class
operator, produces an error message, instead of completing the
implementation part.
See Report #: 52011 for Delphi 2007
It seems this error still exists in Delphi 2009 Update 2
QC Entry 70411
QC #:
Date Reported:
Area:
75701
7/12/2009
IDE\Class Completion
Description:
Steps:
[QC Short Description]
Extended Identifiers confuse Class Completion
unit test; interface type Foo = class type &Type = ( One, Two, Three
); procedure Bar; end; implementation end.
[QC Description]
Try to invoke Class Completion for the class Foo in the test case.
Error message: Expected END but '=' found in class Foo.
QC Entry 75701
QC #:
Date Reported:
Area:
88921
10/13/2010
IDE\Search
Description:
Steps:
[QC Short Description]
Search for Usages fails on Project Groups
[QC Description]
Sometimes Search for Usages fails when searching entire Project
Group
QC Entry 88921
1. Open attached Project Group 2. Open Unit1 in Package1 3. Click
on procedure LoadFromString 4. Right click Search for Usages Check Usages of the Element - Scope : Entire Project Group 5. Click
"Search" 6. Nothing happens (in larger project that I have window with
search progress is shown, but it dissapears when reaches 40%) If
you Select Scope : Current Project everything works fine (of course it
does not find procedure in Unit3)
QC #:
Date Reported:
Area:
95034
6/11/2011
IDE\Help
Description:
Steps:
[QC Short Description]
I just tried to start the Delphi 2009 help (F1) -> Object has not been
correctly initialized.
For example, 1. setup Vista SP1 2. install .NET Framework 4 3. install
Vista SP2 4. install Delphi 2009 5. start IDE 6. Click F1
[QC Description]
Object has not been correctly initialized.
I just tried to start the Delphi 2009 help (F1)
This is similar issue.
------https://forums.embarcadero.com/message.jspa?messageID=8149
------QC Entry 95034
QC #:
Date Reported:
Area:
88172
9/17/2010
IDE\Help
Description:
Steps:
[QC Short Description]
Date/Time Support help is missing
Open ms-help://embarcadero.rs_xe/vcl/SysUtils.DateTimeToStr.html
Click on See Also / Date-Time Support See url mshelp://embarcadero.rs_xe/rad/Date/Time_Support.html loaded //exp:
See help content //act: See "missing page" notic
[QC Description]
The Date/Time support topic in the Delphi XE help is missing
QC Entry 88172
QC #:
Date Reported:
Area:
87987
9/11/2010
IDE\Help
Description:
[QC Short Description]
No link to TFontDialogOptions members when pressing F1 in OI on
Options for a TFontDialog
[QC Description]
In D7: when pressing F1 on Options of a TFontDialog in the OI the
page provided gives you a link to see the TFontDialogOptions
Steps:
members and
their explanation
In DXE: there is no link to TFontDialogOptions, the only way to get
more info on this is by manually using the Index or Search function.
The page is still there in DXE help:
ms-help://embarcadero.rs_xe/vcl/Dialogs.TFontDialogOptions.html
There is just no link in ...
ms-help://embarcadero.rs_xe/vcl/Dialogs.TFontDialog.Options.html
... to get to that page.
Note: the links look very similar but one of them (the one opened
when pressing F1 in the OI) has a dot between TFontDialog and
Options.
QC Entry 87987
QC #:
Date Reported:
Area:
87531
8/25/2010
IDE\Refactoring\Find References
Description:
Steps:
[QC Short Description]
Find local references broken
File | New | Delphi projects | Console application Ctrl-click on SysUtils
to open that file Scroll down to line 425 Rightclick on EAbort and
choose Find | Find local references to type EAbort EXP: the Find
[QC Description]
references panel to open ACT: --------------------------- Error --------------Find local references is giving me an 'Object reference not set to valid ------------ Object reference not set to an instance of an object. ---------instance of an object' error nearly all the time.
----------------- OK Details << --------------------------[20445040]{refactoride150.bpl}
QC Entry 87531
RefactorCmds.TRefactorCommands.actnFindLocalRefsExecute (Line
373, "RefactorCmds.pas" + 0) + $C [500AF987]{rtl150.bpl }
Classes.TBasicAction.Execute (Line 12988, "Classes.pas" + 3) + $7
[5026AA1D]{vcl150.bpl } ActnList.TContainedAction.Execute (Line
448, "ActnList.pas" + 8) + $2C [5026B7F8]{vcl150.bpl }
ActnList.TCustomAction.Execute (Line 1094, "ActnList.pas" + 7) + $8
[500AF84B]{rtl150.bpl } Classes.TBasicActionLink.Execute (Line
12917, "Classes.pas" + 2) + $7 [5029E790]{vcl150.bpl }
Menus.TMenuItem.Click (Line 2525, "Menus.pas" + 17) + $7
[5029FCA3]{vcl150.bpl } Menus.TMenu.DispatchCommand (Line
3390, "Menus.pas" + 5) + $2 [502A0E82]{vcl150.bpl }
Menus.TPopupList.WndProc (Line 4496, "Menus.pas" + 4) + $E
[502A0DD1]{vcl150.bpl } Menus.TPopupList.MainWndProc (Line
4471, "Menus.pas" + 2) + $5 [500B067C]{rtl150.bpl }
Classes.StdWndProc (Line 13491, "Classes.pas" + 8) + $0
[50358AFF]{vcl150.bpl } Forms.TApplication.ProcessMessage (Line
9760, "Forms.pas" + 23) + $1 [50358B42]{vcl150.bpl }
Forms.TApplication.HandleMessage (Line 9790, "Forms.pas" + 1) +
$4 [50358E6D]{vcl150.bpl } Forms.TApplication.Run (Line 9927,
"Forms.pas" + 26) + $3 [004ACCE2]{bds.exe } bds.bds (Line 201, "" +
8) + $FFFB
QC #:
Date Reported:
Area:
73365
4/25/2009
IDE\Refactoring\Introduce Variable
Description:
Steps:
[QC Short Description]
Problems with Introduce Variable (Introduce Field)
1. Create a new VCL application 2. Create a new form and put on
button 3. add the following code (OnClick Event): procedure
TForm1.Button1Click(Sender: TObject); var x, y: integer; zz: Integer;
z: Integer; begin x:=1; y:=2; z:=x+y; zz:=x+y+1; end; 4. Add Together
Support to the project 5. Now select the "x+y" expression, and from
the Refactor menu select "Introduce Variable". 5. you get a dialog
with the title "Introduce Variable" which correctly shows the new
variable type as integer and allows entering a name. 5. Enter a name
vor the new variable, e.g. "Summe" 6. There is also a checkbox on
that dialog saying "Replace all occurrences (2 occurrences found).
Check It 7.Press OK. 8. ...nothing happens
[QC Description]
The refactoring "Introduce Variable" opens a dialog for entering the
new variable name, but nothing happens.
The same problem also exists in the "Introduce Field" dialog.
This functionality is not working under D2009,OS Vista SP1
Under D2007 and OS XP this functionality is working correct in both
variants
QC Entry 73365
QC #:
Date Reported:
Area:
88818
10/10/2010
IDE\Refactoring\Extract Superclass
Description:
Steps:
[QC Short Description]
Extract superclass fails for class that implements interface
Consider the following exampe code: type IContact = interface
procedure Contact(Msg: TMessage); end; TContact = class
abstract(TInterfacedObject, IContact) strict private FName: String;
function GetName : String; procedure SetName(val : String); public
property Name: String read GetName write SetName; procedure
Contact(Msg: TMessage);virtual; abstract; end; We can create a
TPerson super class which only contains a Name property and
GetName and SetName methods, but without the Contact method.
First, we need to select the methods or properties we want to include
in the super class. For example, select the GetName and SetName
methods, and then do Refactoring | Extract Superclass to get a
similar dialog as we saw earlier. In that dialog, we can specify the
name of the superclass and the namespace, and can also select the
specified fields (unselect them if you want less, but you cannot add
more like the Contact method), as well as specify which methods
should be made abstract in the super class. We can also specify
abstract for the Name property, but that will have no effect, of course.
Unfortunately, there is a regression in Delphi XE: the effect of this
dialog is that a new class TPerson is added, derived from
TInterfacedObject: TPerson = class(TInterfacedObject) strict
protected FName: string; procedure SetName(val: string); public
function GetName: string; property Name: string read GetName write
SetName; end; This is great, since although TPerson does not need
to implement the IContact interface (for the Contact method), it does
need to “include” the TInterfacedObject in order for it to be available
for the TContact descendent class. The problem, however, is the fact
that TContact now only implements the IContact interface, but does
not inherit from TPerson, not does it contain the previous fields and
methods that are now moved to TPerson. The definitions for IContact
and TContact are a bit empty now.
[QC Description]
If you have a class TMyClass (derived from TInterfacedObject) that
implements the IMyClass interface and you want to extra a super
class from it in TBase, then the TBase is derived from
TInterfacedObject (which is OK), but TMyClass is only implementing
IMyClass, and no longer derived from TBase.
Also, TBase is declared *after* the TMyClass and IMyClass (see QC
#88817 for another case where that happens).
QC Entry 88818
QC #:
Date Reported:
Area:
88821
10/10/2010
IDE\Refactoring\Safe Delete
Description:
Steps:
[QC Short Description]
Safe Delete refactoring option is not enabled?
[QC Description]
In previous versions of Delphi, I could select a member from a class
in the UML Designer and select the "Safe Delete" Refactoring feature.
However, in Delphi XE this option doesn't appear available: the menu
option remains "gray" and disabled at all times.
QC Entry 88821
QC #:
Date Reported:
Area:
90163
12/7/2010
IDE\Refactoring\Change Parameters
Description:
Steps:
[QC Short Description]
Refactoring "Change params" throws an expection when try to add a
new item
1) Open the test project
2) In Unit8.pas uncomment line 18
3) Attempt to refactor doShowMessage on line 19 by right click,
Refactor, Change Params
4) Once the Change Params window comes up click the Add button
[QC Description]
Feature Refactoring."Change params" throws an expection when
trying to add a new item.
exp: Add Parameter window is shown
act: The following error occurs:
Unhandled exception has occurred in a component in your
application. If you click Continue, the application will ignore this error
and attempt to continue.
QC Entry 90163
The given assembly name or codebase was invalid. (Exception from
HRESULT: 0x80131047).
QC #:
Date Reported:
Area:
89089
10/19/2010
IDE\Refactoring\Find Unit
Description:
Steps:
[QC Short Description]
Refactoring "Find Unit" often does not work any more
Steps to reproduce (I perform all the "New..." stuff using the "Tool
Palette" search). 1. Start a new instance of RAD Studio XE 2. Create
a new VCL Forms Project 3. Swithch the form view to the code editor
[QC Description]
view using F12 4. Create a new Unit (which is now Unit2) 5. Paste the
This problem is in a class "of intermittend" issues that do not always Doit method into Unit2 so the unit looks like this: unit Unit2; interface
reproduce.
implementation procedure DoIt; var S: string; begin S :=
Therefore do not close it before contacting the original author.
NullAsStringValue; end; end. 6. Put the cursor on NullAsStringValue
7. Perform a "Refactor, Find Unit" (Alt-O, U) from the menu (it should
Since Delphi XE, the "Find Unit" refactoring often does not work for
return the Variants unit) 8. Close the project 9. Create a new VCL
me any more.
Forms Project 10. Swithch the form view to the code editor view using
F12 11. Create a new Unit (which is now Unit2) 12. Paste the Doit
Delphi Refactoring in Delphi has become more stable over time, so it method into Unit2 so the unit looks like this: unit Unit2; interface
gets harder and harder to reproduce instabilities.
implementation procedure DoIt; var S: string; begin S :=
This particular feature goet less stable in the last release.
TWinControl.ClassName; end; end. 13. Put the cursor on
Therefore it might need special attention: the cause might make other TWinControl 14. Perform a "Refactor, Find Unit" (Alt-O, U) from the
features unstable as well.
menu (it should return the Controls unit, but often you now get one of
the two errors below). 15. If the "Find Unit" is asynchronous, then:
This case reproduces it only some of the times. If I find a way to
15a. Put the cursor on ClassName 15b. Perform a "Refactor, Find
reproduce it better, I will amend the steps.
Unit" (Alt-O, U) from the menu (it should not return a unit at all, but
I have a gut feeling that the problem is caused by the facts that:
often you now get one of the two errors below).
1. the "Find Unit" refactoring sometimes is asynchronous
2. if "Find Unit" is aready running, it is not disabled in the menu.
I have not found out yet the "sometimes".
After the error, the IDE becomes unstable.
You cannot copy/paste the error with Ctrl-C to the clipboard, hence
the attachment of one of the errors (so you have an idea how the
dialog looks like).
Besides RAD Studio XE, I have installed the latest GExperts and
Model Maker Code Explorer.
Even when I have disabled those two experts, the "Find Unit"
refactoring often fails.
mtError Dialog
Title=CodeGear RAD Studio
Content=System.IO.FileLoadException: The given assembly name or
codebase was invalid. (Exception from HRESULT: 0x80131047)
Buttons=[OK]
mtError Dialog
Title=CodeGear RAD Studio
Content=System.NullReferenceException: Object reference not set to
an instance of an object.
Buttons=[OK]
Steps to reproduce (I perform all the "New..." stuff using the "Tool
Palette" search).
1. Start a new instance of RAD Studio XE
2. Create a new VCL Forms Project
3. Swithch the form view to the code editor view using F12
4. Create a new Unit (which is now Unit2)
5. Paste the Doit method into Unit2 so the unit looks like this:
unit Unit2;
interface
implementation
procedure DoIt;
var
S: string;
begin
S := NullAsStringValue;
end;
end.
6. Put the cursor on NullAsStringValue
7. Perform a "Refactor, Find Unit" (Alt-O, U) from the menu (it should
return the Variants unit)
8. Close the project
9. Create a new VCL Forms Project
10. Swithch the form view to the code editor view using F12
11. Create a new Unit (which is now Unit2)
12. Paste the Doit method into Unit2 so the unit looks like this:
unit Unit2;
interface
implementation
procedure DoIt;
var
S: string;
begin
S := TWinControl.ClassName;
end;
end.
13. Put the cursor on TWinControl
14. Perform a "Refactor, Find Unit" (Alt-O, U) from the menu (it should
return the Controls unit, but often you now get one of the two errors
below).
15. If the "Find Unit" is asynchronous, then:
15a. Put the cursor on ClassName
15b. Perform a "Refactor, Find Unit" (Alt-O, U) from the menu (it
should not return a unit at all, but often you now get one of the two
errors below).
QC Entry 89089
QC #:
Date Reported:
Area:
41928
3/5/2007
IDE\Refactoring\Introduce Field
Description:
[QC Short Description]
Introduce Field with default Visibility creates extraneous code
[QC Description]
Using the Introduce Field refactoring creates extraneous code.
QC Entry 41928
Steps:
1. Create New | VCL Project
2. Drop TButton. Double-click on Button to create
TForm1.Button1Click
3. Add var section
4. Add variable Test: Integer;
5. Right-click on 'Test'
6. Select Refactoring | Introduce Field
7. Add Modeling Support, save units
8. Introduce Field dialog is shown
9. Don't change any values, use default
10. Look at generated code
//exp:
private
{ Private declarations }
Test: Integer;
public
var
{ Public declarations }
end;
//act:
private
{ Private declarations }
private
var
Test: System.Integer;
{ Public declarations }
end;
Orignal public section was replaced with private
Test has changed from Test: Integer to Test: System.Integer
-- OLD STEPS -1. Install Spacely 2617
2. Create New | VCL Project
3. Drop TButton. Double-click on Button to create
TForm1.Button1Click
4. Add var section
5. Add variable Test: Integer;
6. Right-click on 'Test'
7. Select Refactoring | Introduce Field
8. Add Modeling Support, save units
9. Introduce Field dialog is shown
10. Don't change any values, use default
11. Look at generated code
Behaviour:
exp: to see code like this:
public
strict private
FTest: Integer;
act: ended up with code like this:
public
var
strict private
Test: System.Integer;
Issues:
var section created inside of public, not needed
Test has changed from Test: Integer to Test: System.Integer
Introduce Field dialog gives no indication that strict private is the
default Visibility
[vkarjakin]
1. additional empty lines after class - submitted another request
#252603.
2. var section not needed - see #244493 too.
QC #:
Date Reported:
Area:
66352
9/2/2008
IDE\Refactoring\Introduce Field
Description:
Steps:
[QC Short Description]
Introduce Field can't work
source code:
[QC Description]
can show the dialog for new field.
but don't change anything.
QC Entry 66352
procedure TForm1.FormCreate(Sender: TObject);
var
ii: integer;
begin
end;
1. right click varible ii
2. select Refactor->Introduce Field
3. show a dialog for new field.
4. click ok on the dialog
5. nothing happend.
QC #:
Date Reported:
Area:
91690
2/22/2011
IDE\History View
Description:
Steps:
[QC Short Description]
Diff view shows differences the wrong way
Select File - New - Other - Text file (the type is not significant) add a
few empty lines and then type 'Old text' add a few empty lines and
save. Change the word 'Old' to 'New' Select History - Diff In the top
left pane you have header 'Differences From:' and beneath 'File' In
the top right pane you have header 'To:' and beneath 'Buffer' In the
main pane you see the lines + Old text - New text Note how the '+'
and '-' are the wrong way.
[QC Description]
The 'Diff' view shows the changes with '+' and '-' signs in front of the
changed lines. However, the signs are the wrong way, that '+'
indicates the removed line and '-' the added.
It's amazingly easy to make a mistake, compare with driving a car
that turns left when the steering wheel is turned right and vv.
QC Entry 91690
QC #:
Date Reported:
Area:
77204
8/31/2009
IDE\IDE Insight
Description:
Steps:
[QC Short Description]
The "IDE Insight" action has no glyph
[QC Description]
It appears the IDE's internal IDE Insight action is missing a few
properties.
Steps:
1) View, Toolbars, Customize...
2) Select Commands tab
3) Select Categories: All Commands
Topmost command in Commands list is "actnIDEInsight". Should be
"IDE Insight". Notice the
action has no glyph.
QC Entry 77204
QC #:
Date Reported:
Area:
96369
7/18/2011
IDE\Version Control\SVN
Description:
Steps:
[QC Short Description]
1) right click any file in the project manager of a project under SVN
Inadvertently invoking a 2nd SVN commit window gives an exception version control and select Commit 2) repeat 1) with a different file
error dialog
selected 3) witness error and be amazed this wasn't fixed in service
pack 1
[QC Description]
Invoking a 2nd SVN commit window produces a "A component
named SvnCommitFrame already exists'.
One would think multiple instances would be allowed, or if only a
single instance was permitted that the current instance would be
shown, instead of a lovely error dialog.
QC Entry 96369
QC #:
Date Reported:
Area:
80460
12/17/2009
Install
Description:
Steps:
[QC Short Description]
The default user name and company in the installer are Microsoft
under a clean 64-bit OS
Get a clean VM of Windows 7 (required, I believe) Install RS 2011 In
the serial # entry screen of the installer, the default user name and
company are both "Microsoft" [IIRC, Jordan Russell investigated this
in one of the last FTs and it only happens in 64-bit and is due to the
installer reading from the wrong registry key. And I think it only
happens in clean systems, since somehow the entered value is
saved/cached for future installs. My memory is fuzzy, though...]
[QC Description]
In a fresh Windows 7 VM, installing the latest build still results in the
default user name and user company in the installer being
Microsoft/Microsoft. This is on the serial number entry screen.
Jordan Russell wrote this in September 2008 in
codegear.private.fieldtest.tiburon.build-install in thread "Install
Downloads too Much, etc.":
> Erik Berry wrote:
> > Maybe instead, the location changes
> > under a 64-bit OS and IA is looking in the wrong place?
>
> Yes. 64-bit Vista doesn't correctly set the values under the 32-bit
> HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion key
(likely a bug);
> apps must read from the 64-bit key instead.
QC Entry 80460
QC #:
Date Reported:
Area:
87371
8/19/2010
Install
Description:
Steps:
[QC Short Description]
FinalBuilder registration fails with reg.codegear.com
Clean install of Delphi and C++Builder, including Final Builder Try to
start FinalBuilder from the desktop shortcut. Try to register under your
serial number.
[QC Description]
The FinalBuilder registration did not work for me.
My URL looks like this:
http://reg.codegear.com/srs6/verify_email.jsp?serial=snip+1+2719997
Suspect DNS problem or simply obsolete URL ??
QC Entry 87371
QC #:
Date Reported:
Area:
87260
8/14/2010
Install
Description:
Steps:
[QC Short Description]
Beyond Compare did not integrate into IDE
[QC Description]
On my Win7 64bit laptop I uninstalled an old build of Fulcrum, then
turned off UAC, rebooted and then installed build 3875. Beyond
Compare Lite is in the biin directory, but was not integrated into the
IDE.
QC Entry 87260
QC #:
Date Reported:
Area:
75854
7/16/2009
Install
Description:
Steps:
[QC Short Description]
CodeGear RAD Studio Icon Name
[QC Description]
Can we please get the "CodeGear RAD Studio" Icon to include the
version number.
My windows XP with the Start Menu, MRU list that appears lists
multiple "Codegear RAD Studio" Icons since the name for weaver
matches 2009.
I don't know which one I am launching.
QC Entry 75854
QC #:
Date Reported:
Area:
89305
10/28/2010
Install
Description:
Steps:
[QC Short Description]
AQTime etc. are downloaded even if you chose not to install them.
[QC Description]
Third party products (AQTime, codesite, finalbuilder) are downloaded
even if you chose not to install them. They aren't installed indeed, but
they're downloaded which takes a couple of minutes.
QC Entry 89305
QC #:
Date Reported:
Area:
77160
8/29/2009
Install\User Interface
Description:
Steps:
[QC Short Description]
Cannot paste serial when using installer Upgrade feature
1) Launch "Modify, Repair, Uninstall" from the Start menu. 2) Select
the "Upgrade" radio button and press "Next" 3) Select the first cell of
the "Serial Number" field and paste the serial number Expected:
Serial number boxes are polpulated from the clipboard Actual: Only
[QC Description]
The installer now supports copy-paste of serial numbers when
performing a new install. The Product Registration screen displayed
when an Upgrade is performed, however, does not permit pasting of
the serial number.
QC Entry 77160
the first serial number box is filled
QC #:
Date Reported:
Area:
89380
11/1/2010
Install\User Interface
Description:
Steps:
[QC Short Description]
I have got How to buy as first impression
In the past I got the same result. Now again. It's customer hostile to
show it. If You need to close the test it's better to inform us beta
testers. 3940 doesn't got dbeexpress working. I think you blocked the
testing. Get rid of this link, http://www.embarcadero.com/how-to-buy
http://www.embarcadero.com this is the right link to show!
[QC Description]
http://www.embarcadero.com/how-to-buy
is the result of running the betatest
QC Entry 89380
QC #:
Date Reported:
Area:
87009
8/8/2010
Install\User Interface
Description:
Steps:
[QC Short Description]
"Developer Productivity" and description not translated
[QC Description]
In the select feature dialog the item "Developer productivity" and its
description is not translated to German.
QC Entry 87009
QC #:
Date Reported:
Area:
87008
8/8/2010
Install\User Interface
Description:
Steps:
[QC Short Description]
Installer Description of AQTime not translated (DE)
[QC Description]
The description for AQTime in the select featore dialog is not
translated to German.
QC Entry 87008
QC #:
Date Reported:
Area:
88281
9/22/2010
Install\Uninstall
Description:
Steps:
[QC Short Description]
XE installer does not remove some IntraWeb files
1. Install RAD Studio XE with VCL for the Web option 2. Run the
installer again and choose modify 3. Remove VCL for the Web option
4. Search for IW*.* - the search result will show you a list of IW*.hpp
and IW*.res files
[QC Description]
The XE installer does not remove some IntraWeb files if you, after
installing XE, choose Modify and remove VCL for the Web from the
options.
QC Entry 88281
QC #:
Date Reported:
Area:
89251
10/26/2010
Install\Uninstall
Description:
Steps:
[QC Short Description]
Uninstall from Control Panel shows incorrect default of "Modify"
Open "Add or Remove Programs" from Control Panel Select
"Embarcadero Rad Studio XE" Click on "Remove" Exp: Install wizard
will be shown with "Remove" selected as in RS 2010 Act: Install
wizard is shown with "Modify" selected.
[QC Description]
When trying to uninstall using "Add or Remove Programs" from
Control Panel, the install wizard appears with "Modify" selected
instead of "Remove".
QC Entry 89251
QC #:
Date Reported:
Area:
87259
8/14/2010
Description:
Install\Registry settings
Steps:
[QC Short Description]
AQTime does not install in Win7 64
[QC Description]
On my Win7 64-bit laptop, I uninstalled a previous build of Fulcrum
from several weeks ago and then installed build 3875 after turning off
UAC and rebooting. AQTime did not install at all as far as I could tell.
This is also the case folr build 3881
QC Entry 87259
QC #:
Date Reported:
Area:
66461
9/6/2008
Install\Launcher
Description:
Steps:
[QC Short Description]
Critical crash of international Install
Environment Hungary Lang.: Hungary Start Install --> failure Define
as US --> sucessfull Attach: Locality which was provocate the bug:
tib_bug_hu.png Locality to succesfull install: tib_bug_us.png Result
log of Setup.exe
/l=z:\local\gyujto\dvd\Tiburon\Install\setuplog20080906.txt started
under Hungarian locailty. See, the abortation at script compilation:
setuplog20080906.txt Tested environments: Windows XP Pro English
edition with SP3 in VMware virtual machine; Windows XP Pro English
edition with SP2 in VMware virtual machine; Windows 2003 Server
just updated with automatic updater in VMware virtual machine;
VMware is installed on SUSE 9.3, Intel dual 64bit, but 32bit Windows
OS' with 1 processor in VMware Windows XP Pro English edition just
updated with automatic updater as native install on a laptop 32 bit
Intel dcore; All tested with Hungarian locality during all FTs. Because
the locality was one of the small set of same conditions in cases of
virtual and native machines (in case of XP Pro), and setup was
aborted on both, I start to tests by change this same parameters. The
locality was the one, which could inhibit the setup
[QC Description]
I could not install ANY Tiburon build during this field test, and could
not localize the root of problem at now. The first looking was a
hardvare or any system-parameter dependent cause because the
eralier Delphis were install succesfully into same virtual machine
(VMware)
During the the last days I tested VERY different system parameters
even on native Windows' on a laptop. So, I could identify the very
serious cause the installation failure. However I could not test any
build, which is a very bad situation for me, the root of the problem a
very little.
The install script could not compilable any other international
environment which langs are definitely described as environment.
__So, the installation will no succesfull in Hungary and several other
countries___
QC Entry 66461
QC #:
Date Reported:
Area:
11150
3/21/2005
Install\Files
Description:
Steps:
RW32core.dll is not delivered, when ONLY 'Delphi for Win32'
personality is installed,
1) start installation
select Delphi for Win32 personality ONLY
2) launch IDE
3) File | New | VCL Form App - Delphi for Win32
4) add rc file to the project
5) Project | Build ..
// on Build tab
BRCC Command Line
-w32 -foD:\tmp\L_P1\res5.res D:\tmp\L_P1\res5.RC
[RC Fatal Error] res5.RC(1): Unable to load RW32CORE.DLL
// unable to compile .rc file
QC #:
Date Reported:
Area:
3189
12/19/2002
Install\Files
Description:
Steps:
[QC Short Description]
SysConst.pas in wrong language
Install Delphi 7 Pro German and check SysConst.pas
[QC Description]
I have installed Delphi 7 Pro German, but the installed SysConst.pas
is in English.
The same happens with RTL SP2 for Delphi 6 Pro.
QC Entry 3189
QC #:
Date Reported:
Area:
88014
9/13/2010
Install\Files
Description:
Steps:
[QC Short Description]
WbmConst.pas is installed in $(BDS)\source\internet and
$(BDS)\source\soap
[QC Description]
WbmConst.pas is installed in $(BDS)\source\internet and
$(BDS)\source\soap (it used to be installed only in
$(BDS)\source\Win32\internet in Delphi 2010).
It is probably a mistake.
This is not a problem in English, the files are identical, but it is a
problem in French because a translated file exists in
$(BDS)\source\internet\fr but not in $(BDS)\source\soap\fr
QC Entry 88014
Added by Sysop
<<<<<<<<<<<
With 15.0.3923.34648, this issue still exists.
>>>>>>>>>>>
QC #:
Date Reported:
Area:
86268
7/14/2010
Database
Description:
Steps:
[QC Short Description]
FormatBcd result differs from FormtCurr and FormatFloat
Regression test added to database suites also at:
TDBXPulsarBugsSuite.Native.DB.Test.exe -s:TestRaid_278520
[QC Description]
The FormatBcd function does not work when used with literal
characters.
program BugFormatBcd;
{$APPTYPE CONSOLE}
For example, with '0000-0' format mask, the result shoud be '1010-1'
for the Bcd number 10101, but the result is '10101-0'.
uses
SysUtils, FmtBcd;
If the mask contains apostrophes (as the documentation says) the
result is wrong too. For the format mask '0000"-"0' the result is
'010101-"' when it should be '1010-1' too.
begin
try
WriteLn('Expected: 1010-1');
The tests has been done with Delphi 2010, Delphi 2007 and Delphi 7, WriteLn('FormatBCD: ',FormatBcd('0000-0', IntegerToBcd(10101)));
and in all versions the error is present.
WriteLn('FormatBCD: ',FormatBcd('0000"-"0', IntegerToBcd(10101)));
WriteLn('FormatCurr: ',FormatCurr('0000-0', 10101));
To reproduce the problem compile the following program and execute WriteLn('FormatCurr: ',FormatCurr('0000"-"0', 10101));
it.
WriteLn('FormatFloat: ',FormatFloat('0000-0', 10101));
QC Entry 86268
WriteLn('FormatFloat: ',FormatFloat('0000"-"0', 10101));
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
end.
QC #:
Date Reported:
Area:
88736
10/7/2010
Database
Description:
Steps:
[QC Short Description]
Problem with boolean fields, wrong translation for DE
Have a look at the file: $(BDS)\source\db\de\DBConsts.pas
STextFalse = 'Falsch' STextTrue = 'True' ----> should be 'Wahr'
[QC Description]
Using Delphi XE Tadotable with MS Access Database connected via
JetEngine Driver you get a Display for boolean Fields in the DBGRID
as TRUE / FALSCH (a mix of german and english)instead of usually
WAHR / FALSCH (German). In all previous Versions of Delphi
everything worked fine.
QC Entry 88736
QC #:
Date Reported:
Area:
91229
1/31/2011
Database
Description:
Steps:
[QC Short Description]
Wrong Translation in DBConsts.pas
[QC Description]
The is a wrong translation in DBConsts.pas
STextFalse = 'Falsch'; // OK
STextTrue = 'True'; // Wrong
Added by Sysop
<<<<<<<<<<
THIS FATAL ISSUE IS NOT FIXED 15.0.3953.35171(Update1) !!!!
PLEASE REOPEN RIAD#280757(QC#88736) !!!!
AND PLEASE RELEASE HOTFIX.
>>>>>>>>>>
in Delphi 2007 it looks like this:
STextFalse = 'Falsch';
STextTrue = 'Wahr';
I change a project from 2007 to XE an now some parts of the
program don't work.
QC Entry 91229
QC #:
Date Reported:
Area:
89590
11/11/2010
Database
Description:
Steps:
[QC Short Description]
TDataPacketWriter doesn't support FieldType ftLongWord
Out of context, but you should have no problem following this:
DataSet := TPacketDataSet.Create(Self); DSWriter :=
TDataPacketWriter.Create; with DataSet.FieldDefs.AddFieldDef do
begin Name := 'Test'; DataType := ftLongWord; end; with DSWriter do
begin PacketOptions := PacketOpts; // with grMetaData set Options
:= ProvOpts; GetDataPacket(DataSet, RecsOut, Data); // <<= the
error is raised from this call chain end; GetDataPacket ->
CheckMetaData -> InitPutProcs -> InitFieldProc -> DatbaseErrorFmt
when Field.DataType = ftLongWord.
[QC Description]
Hi,
Trying to send a dataset with TLongWordField with
TDataPacketWriter results in a:
DatabaseErrorFmt(SUnknownFieldType, [Field.FieldName]);
The ftLongWord must have slipped somehow...
See:
Provider.pas: Lines 1721... in function
TDataPacketWriter.InitPutProcs(ADataSet: TDataSet;
The missing case is in nested procedure InitFieldProc(ADataSet:
TDataSet; AField: TField;
far down in that function is:
ftSmallint, ftShortint, ftByte, ftInteger, ftWord, ftBoolean, ftFloat,
ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftAutoInc, ftLargeint,
ftBytes, ftTimeStamp, ftTimeStampOffset, ftFMTBcd,
TFieldType.ftSingle:
PutProc := PutField;
But no ftLongWord any where...
QC Entry 89590
QC #:
Date Reported:
Area:
96332
7/18/2011
Database
Description:
Steps:
[QC Short Description]
FreeOnExecute does not work as expected in
TDBXMorphicCommand
This is a code-snippet generated by DataSnap: function
TServerDatabaseClient.GetCodes: TDataSet; begin if
FGetCodesCommand = nil then begin FGetCodesCommand :=
FDBXConnection.CreateCommand; <------ This call returns a
descendent of TDBXCommand, a TDBXMorphicCommand
FGetCodesCommand.CommandType :=
TDBXCommandTypes.DSServerMethod; FGetCodesCommand.Text
:= 'TServerDatabase.GetCodes'; FGetCodesCommand.Prepare; end;
FGetCodesCommand.ExecuteUpdate; <----- here! Result :=
[QC Description]
TDBXMorphicCommand delegates it's calls to an internal
TDBXCommand. The current implementation does not free objects
which are being added by procedure FreeOnExecute(Value:
TObject); during the next execution but not before the command is
being destroyed. This leads to massive growing memory
consumption.
QC Entry 96332
TCustomSQLDataSet.Create(nil,
FGetCodesCommand.Parameters[0].Value.GetDBXReader(False),
True); Result.Open; if FInstanceOwner then
FGetCodesCommand.FreeOnExecute(Result); <---------- Result is
being added to FFreeOnCloseList of FGetCodesCommand; end;
within the implementation of TDBXCommand.ExecuteUpdate; you
notice a call to CommandExecuting; which in turn invokes
FreeOnExecuteObjects; Everything is fine. procedure
TDBXCommand.ExecuteUpdate; begin if FText = '' then
FDBXContext.Error(TDBXErrorCodes.InvalidOperation,
SNoStatementToExecute); CommandExecuting; <---------FFreeOnCloseList will be deleted here DerivedExecuteUpdate;
CommandExecuted; end; However... in the above case,
FGetCodesCommand := FDBXConnection.CreateCommand; returns
a descendent of TDBXCommand: a TDBXMorphicCommand. This
one override ExecuteUpdate; as follows: procedure
TDBXMorphicCommand.ExecuteUpdate; begin Open;
FCommand.ExecuteUpdate; end; You can see that it delegates to an
internal Command (FCommand). This internal command does not
know about the items which have been added to FFreeOnCloseList
as this list is being maintained by the "outer" Command. So nothing
gets freed and memory consumption grows.
QC #:
Date Reported:
Area:
58058
2/10/2008
Database\Data Aware
Controls\TDBNavigator
Description:
Steps:
[QC Short Description]
Vertical button layout.
[QC Description]
Please add an option or property to lay out theTDBNAvigator's
navigation buttons vertically instead of horizontally.
QC Entry 58058
QC #:
Date Reported:
Area:
91962
3/3/2011
Database\Data Aware
Controls\TDBLookupComboBox
Description:
Steps:
[QC Short Description]
TDBLookupComboBox has no "custom" parent
[QC Description]
I'm trying to create a custom lookup combo box that handles certain
details internally instead of making the programmer deal with them.
Unfortunately, since TDBLookupComboBox does not follow the
standard VCL convention of having a base class named
"TCustomWhatever" with no published properties, it's difficult to
implement this control without causing strange effects in the Object
Inspector. It would be very nice if there was a "custom" base class I
could use so I could keep these unneeded properties in a nonpublished status.
QC Entry 91962
QC #:
Date Reported:
Area:
51886
9/12/2007
Database\Data Access
Controls\TDataSet
Description:
Steps:
[QC Short Description]
Master - Detail relation fails
1. take a TSQLConnection, connect to MySQL 5.x 2. create two
MyISAM Tables with a 1:n relationship 3. use a TQuery /
TDatasetProvider / TClientDataSet / TDataSource for each table 4.
use the key field that links both tables as a parameter in both Queries
5. Link the ClientDataSets according to the relationship via
MasterSource, MasterField and IndexFieldName. 6. Create a button
an put this code at the OnCliek-Event:
sqlOne.ParamByName('idKey').AsInteger := 2;
sqlTwo.ParamByName('idKey').AsInteger := 2; cdsOne.Open;
cdsTwo.Open; Error: Cannot acces an TDBXType.Int16 as
TDBXType.Int16 (or so) Alternative reproduction: 1. Take a TQuery,
[QC Description]
A Master-Detail relation fails under these conditions:
- I have two times: TQuery - TDatasetProvider - TClientDataset
- both TQueries have one parameter each
- there is a master-detail relation between the ClientDatasets defined
via Mastersource, Masterfield and IndexFieldName.
- problem occurs with MySQL and only at runtime
QC Entry 51886
put in an SQL String with Parameter 2. open the parameter editor, 3.
set the parameter DataType to "ftInteger" 4. set the Value Type to
"integer" 5. try to open the query (in design mode) Error: Cannot
acces an TDBXType.Int16 as TDBXType.Int16 (or so)
QC #:
Date Reported:
Area:
79480
11/13/2009
Database\TField
Description:
Steps:
[QC Short Description]
TUnsignedAutoIncField does not get registered by any design-time
packages
[QC Description]
D2010 IDE fails to register the new TUnsignedAutoIncField field type
in any design-time package. The result is that any 3rd-party database
vendor who actually adds support for the fieldtype, ends up giving its
users problems. Because, when the user opens a form with such a
field, they'll get this dialog:
Class TUnsignedAutoIncField not found. Ignore the error and
Continue? NOTE:
Ignoring the error may cause components to be deleted or property
values to
be lost.
[IGNORE] [CANCEL] [IGNORE ALL]
The error also existed in D2009, but for several other fieldtypes. This
time around only TUnsignedAutoIncField appears to be missing.
QC Entry 79480
QC #:
Date Reported:
Area:
96405
7/20/2011
Database\TField\TBinaryField
Description:
Steps:
[QC Short Description]
TBinaryField.GetAsString causes Access Violation if binary data
length is odd
Len := VarArrayHighBound(Data, 1) + 1; // Len is odd, e.g. 3
...
SetLength(Result, Len div SizeOf(Char)); // Length of result will be 1
since 3 div 2
[QC Description]
function TBinaryField.GetAsString: string;
var
Len: Integer;
Data: Variant;
PData: Pointer;
begin
Data := GetAsByteArray;
if VarIsNull(Data) then
Result := ''
else
begin
Len := VarArrayHighBound(Data, 1) + 1;
PData := VarArrayLock(Data);
try
SetLength(Result, Len div SizeOf(Char));
Move(PData^, Pointer(Result)^, Len);
finally
VarArrayUnlock(Data);
end;
end;
end;
Added by Sysop
<<<<<<<<<<<<<
[Workaround from QC]
function TBinaryField.GetAsString: string;
var
Len: Integer;
Data: Variant;
PData: Pointer;
ResLen: Integer;
begin
Data := GetAsByteArray;
if VarIsNull(Data) then
Result := ''
else
begin
Len := VarArrayHighBound(Data, 1) + 1;
PData := VarArrayLock(Data);
try
ResLen := Len div SizeOf(Char);
if Len mod SizeOf(Char) > 0 then Inc(ResLen);
Here if Len is odd, e.g. 3, then Length of result will be 1 since 3 div 2. SetLength(Result, ResLen);
Then on Move Access Violation will occur.
FillChar(Result, #0, ResLen * SizeOf(Char));
QC Entry 96405
Move(PData^, Pointer(Result)^, Len);
finally
VarArrayUnlock(Data);
end;
end;
end;
>>>>>>>>>>>>>
QC #:
Date Reported:
Area:
92544
3/24/2011
Database\TField\TFieldDefs
Description:
Steps:
[QC Short Description]
Field type ftExtended not fully implemented.
1a) Create some delphi code: procedure
TfrmMain.btnTestCodeClick(Sender: TObject); var cds:
TClientDataSet; begin // cds := TClientDataSet.Create(self);
cds.FieldDefs.Add('IntVal', ftInteger); cds.FieldDefs.Add('ExtVal',
ftExtended); ShowMessage(IntToStr(cds.FieldDefs.Count));
cds.CreateDataSet(); ShowMessage(IntToStr(cds.FieldDefs.Count));
cds.Free(); end; 2a) The first message box shows "2" for the two field
definitions. 3a) The second message box shows "1" for the one field
that still exist. The ftExtended field is no more. or 1b) Add a new
TClientDataSet component to a form. 2b) Double click on the
component and choose to add 2 fields. Add one field as "IntVal" of
type Integer, and add one field as "ExtVal" of type Extended. 3b)
Close the field editor. 4b) Right click on the TClientDataSet
component and choose CREATE DATASET. 5b) An error message is
shown as "cdsForm: Field 'ExtVal' not found". My guess is that since
there where no type ftExtended in my old Delphi 2007, that when you
added the ftExtended type it was not added in all the necessary
places.
[QC Description]
New fieldtype ftExtended not fully implemented which makes it
impossible to use.
NOTE: Maybe all fields should get a checkup if they are included
everywhere necessary. We have problem with the
TUnsignedAutoIncField class/fieldtype.
QC Entry 92544
QC #:
Date Reported:
Area:
52878
10/8/2007
Database\Drivers\InterBase
Description:
Steps:
The DBX4 InterBase driver is unable to cope with the following query: TDBXHighlanderBugsSuite.Managed.exe connection=ibconnection s:oTestRaid_255708
SELECT * from test
or
where * represents 206 integer columns
TDBXHighlanderBugsSuite.Native.exe connection=ibconnection When the Active property is set to true, an error message
s:oTestRaid_255708
"unassigned code" is returned. Normally InterBase returns this when
some buffer has overflowed. The dbx driver would need to increase
or
the size of this buffer in order for the query to execute successfully.
IBConsole can successfully run this query.
1. Connect a TSQLConnection to an InterBase database of your
choice.
Also DBX3 appears to be able to successfully run this query
2. Create the following table from the create statement attached.
3. Connect up a TSQLQuery component to the TSQLConnection and
set the SQL property to:
SELECT * from test
The unassigned code error is returned.
QC #:
Date Reported:
Area:
64499
7/15/2008
Database\DBExpress
Description:
Steps:
[QC Short Description]
TParam does not take TLargeIntField value
-- Method1 procedure Testdbxpg.TestMisc2; var SQLQuery:
TSQLQuery; begin SQLQuery := TSQLQuery.Create;
SQLQuery.SQLConnection := set your connection;
[QC Description]
SQLQuery.SQL.Text := 'UPDATE test SET bi=:bi WHERE id=4';
Most database server has a data that store Int64 data, ie PostgreSQL SQLQuery.ParamByName('bi').Value := 9223372036854775807; //
has BigInt. It matches TLargeIntField.
MaxInt64 SQLQuery.ExecSQL; // Exception here! end; -- Method2
procedure Test; var P: TParam; F: TLargeintField; begin F :=
TSQLTable generate TLargeIntField for 8 Byte integer but TParam
TLargeintField.Create(nil); P := TParam.Create(nil); try
dont's supports this.
P.AssignFieldValue(F, 1); P.GetDataSize; // raise exception here
finally F.Free; P.Free; end; end;
And also TParam does not provide AsLargeInt(or AsInt64) property. If
provided it, our source can read more easely.
QC Entry 64499
QC #:
Date Reported:
Area:
69964
12/17/2008
Database\DBExpress
Description:
Steps:
[MSSQL]
TDBXPulsarBugsSuite.Native.DB.Test.exe
connection=mssqlconnection -s:TestRaid_267457
[QC Short Description]
@RETURN_VALUE desappear in dbExpress SQLDataSet and
SQLStoredProc
[QC Description]
I had a project in BDS 2006 and always use parameter
@RETURN_VALUE, but using RAD Studio 2009 this parameter
desappear. Testing with ADOConnection and ADODataSet or
ADOStoredProc this parameter comes in parameters list.
QC Entry 69964
From a comment of QC report
<<<<<<<<<<
Still NOT fixed in RAD Studio 2010!
>>>>>>>>>>
-ORinside data explorer, connect to MSSQL and using SQL Window,
execute the following:
===
CREATE PROCEDURE CheckContactCity
(@cityName CHAR(50))
AS
BEGIN
IF ((SELECT COUNT(*)
FROM dbo.Orders
WHERE ShipCity = @cityName) > 1)
RETURN 1
ELSE
RETURN 0
END
===
Create a Project
Add TSQLConnection and set ConnectionName and Parameters to a
DataBase in SQLServer
Add SQLDataSet or SQLStoredProc set Connection and set
procedure name to CheckContactCity
The parameter @RETURN_VALUE appears in BDS 2006 version but
in RAD Studio 2007 and RAD Studio 2009 doesn´t
QC #:
Date Reported:
Area:
89242
10/26/2010
Database\DBExpress
Description:
Steps:
[QC Short Description]
Access violation in dbxfb.dll
Added by Sysop <<<<<<<<<<<<< If we read TMemoField TWICE, we get AV
at second access. Both FieldValues['memo'] and
FieldByName('memo').AsBytes fail. ------------- with Query do begin if Active
[QC Description]
then Log.Lines.Add(FieldValues['memo']); end; ------------- ------------- with
I get access violation in dbxfb.dll every time I read value of an Query do begin if Active then
ftMemo field of TSQLQuery.
Log.Lines.Add(TEncoding.Default.GetString(FieldByName('memo').AsBytes));
end; ------------- >>>>>>>>>>>>>
After the query opened I can read the value but the second
attempt raises access violation every time.
I tried to use older version of dbxfb.dll (14.0.3615.26342) and
the access violation disappeared. I just replaced the dll.
I created a sample application to test it.
QC Entry 89242
QC #:
Date Reported:
Area:
67682
10/8/2008
Database\DBExpress
Description:
Steps:
[QC Short Description]
DBByteBuffer.pas missing
According to DBByteBuffer.hpp, this unit contains a simple byte buffer
class.
[QC Description]
DBByteBuffer.pas is missing from the BDX source code directory.
QC Entry 67682
QC #:
Date Reported:
Area:
3122
12/12/2002
Database\DBExpress
Description:
Steps:
[MSSQL]
Test application using Northwinds database is attached. The
application has a choice between dbExpress and ADO. It has a
choice of thread count also. This needs to be run on a multiprocessor box. Two-threads running on a two processor machine
Performance degradation in multi-processor machines with SQL
server driver. Multi-threaded application running on multi-processor
machine is very slow when result sets from queries or stored
procedures are returned. It seems like the row/field fetching is going
thru critical section and blocking other threads. So the advantage of
multi-threading is lost. The test application creates separate
connections from each thread to the database and so they should all
be independent.
QC Entry 3122
takes twice as long as one thread running on one-processor.
QC #:
Date Reported:
Area:
72473
3/25/2009
Database\DBExpress
Description:
Steps:
[QC Short Description]
Exception 'ag' raised on multiple dbexpress connections.
Create a simple one table blackfish database. Create a service which
randomly accesses the database using a BeginTransaction(
TDBXIsolations.SnapShot ) transaction (read only). Works a treat.
[QC Description]
Create an applet to signal service to alter table. 'UPDATE T1 SET F1
DbExpress connections to a blackfish database work fine in read only = 1 WHERE F1 <> 1' Exception raised: Runtime Error: Exception of
mode, but multiple connections including write operations cause
type 'ag' was thrown.
"Runtime Error: Exception of type 'ag' was thrown."
The update will succeed if ran alone without snapshot transactions.
QC Entry 72473
QC #:
Date Reported:
Area:
90115
12/4/2010
Database\DBExpress
Description:
Steps:
[QC Short Description]
Please certify the current Firebird dbExpress driver for Firebird 2.5
[QC Description]
As of my current knowledge the current Firebird dbExpress driver has
been certified for Firebird 2.1 which was current in summer when it
was released.
Meanwhile Firebird 2.5 has been released. So please do some tests
and certification for the current driver for this version of Firebird. The
tests need to be conducted anyway for the next Delphi release so
they could be conducted now already and it the driver passes those it
could be certified (without claiming support for any of the new Firebird
features, but that's ok). If the driver doesn't pass the tests state this as
well so we users do not waste out time and do the necessary
changes either for a Update 2 of Delphi XE or for the next version of
Delphi where this support should be included anyway.
QC Entry 90115
QC #:
Date Reported:
Area:
96474
7/21/2011
Database\DBExpress
Description:
Steps:
[QC Short Description]
"DBX Error: Driver could not be properly initialized" without
CoInitialize in a console application
1. Unpack the attached project 2. Compile and run. Expected
behavior: Either program works as it is written according to the help
or fails but produces a meaningful error message. Actual behavior:
Program fails and produces a meaningless error message.
[QC Description]
An attempt to open a dbXpress connection fails with the following
message:
Exception class TDBXError with message 'DBX Error: Driver could
not be
properly initialized. Client library may be missing, not installed
properly, of the wrong version, or the driver may be missing from the
system
path.'
The cause of the problem is absence of the call of the CoInitialize
function, but the error message does not provide enough information
to identify the cause of the error. It also provides false information
because the real problem is neither with client library nor its version
nor the driver.
This can happen in a console application with very high probability.
I suggest either to change the error message or update the
documentation and specify that CoInitialize is required to work with
dbXpress.
QC Entry 96474
QC #:
Date Reported:
Area:
96506
7/21/2011
Database\DBExpress\TSQLConnectio
n
Description:
Steps:
[QC Short Description]
Using DBXPool with Connect Timeout Corrupts Memory
1. Compile the desktop application 2. Stop any instances of
SQLServer that are running on the local machine 3. Run the app 4.
Click the first button (With DBXPool) a few times You will see it fail
[QC Description]
once, then it will show the 'connected' message even though it isn't
When my DataSnap service tries to connect to the a database where connected. 5. Click the second button (W/O DBXPool) a few times. It
SQLServer is not available, it times out. It then waits 5 seconds and will always show a timeout exception.
tries to connect again. The moment it calls the TSQLServer.Open
method the second time, the service process is immediately
terminates without warning. It doesn't even raise an exception in the
Delphi debugger. The process just disappears. The Windows System
Event log shows: "The ... service terminated unexpectedly" with event
id 7034.
If I do not set DelegateConnection to DBXPool, then every failed
attempt to connect to the database raises a timeout exception. This is
the behavior that I want, but I also need to use DBXPool.
I created a simple program to recreate the problem, but could not get
the simple programs to disappear like my production service does.
However, there is still something odd happening because when I use
the DBXPool as a DelegateConnection, it will timeout on the first
attempt to connect, and then on the second call it will simply succeed,
even though there is *no* database server avaialble and it would
therefore be impossible for it to be connected.
My guess is that memory is being corrupted somewhere and with my
service it just happens to kill the process, but with the simple
application it does not. In either case, it seems that the DBXPool is to
blame.
QC Entry 96506
QC #:
Date Reported:
Area:
90627
1/2/2011
Database\DBExpress\TSQLConnectio
n
Description:
Steps:
[QC Short Description]
TSQLConnection requires presence of dbxdrivers.ini
1. Create a simple dbexpress application where a working
db?connection is being used to fetch some records from a given
database. Build the application in a way that it generates a single
exe file. Build the application in such a way that it would work on a
2nd PC which doesn't have a dbxdrivers.ini 2. Ensure the application
runs properly on the development PC 3. install all necessary
database client software on a "fresh" PC 4. copy over your exe file
and the necessary dbExpress driver dll but no dbxdrivers.ini 5. run
the application on the 2nd PC and notice that it fails due to a missing
dbxdrivers.ini
[QC Description]
TSQLConnection only works properly if a dbxdrivers.ini file with the
right settings is present in either the application directory (where
according to UAC rules a settings file shouldn't be) or in one of two
locations two registry keys point to, which is problematic as well since
those settings files would then be shared between different
applications on the same computer which could lead to conflicts.
Requiring a dbxdrivers.ini file also defeats the possibility to change
parameters of a TSQLConnection isntance at runtime. It is simply bad
design and was introduced after Delphi 2006 at least without any clear
indication why this was necessary.
This issue als is discussed here:
NNTP:
forums.embarcadero.com
embarcadero.public.delphi.database.dbexpress:2078
HTTP version:
https://forums.embarcadero.com/thread.jspa?threadID=47893&tstart=0
Read especially the website linked to where Andreas Hausladen
explains more about it and that this doesn't seem to be dependand on
the used database driver.
QC Entry 90627
QC #:
Date Reported:
Area:
41186
2/22/2007
Database\DBExpress\TSQLQuery
Description:
Steps:
[QC Short Description]
LoadFromFile Method InOp
[qa update]
TDBXBugsSuite.Native.DB.Test.exe -s:oTestRaid_246230
[QC Description]
When building database from SQL scripts, using
SQLQuery.SQL.LoadFromFile. Data that component recieves is
corrupted. Method had worked in D7 Ent.
QC Entry 41186
-orBuild an app with
Button, OpenDialog, SQLQuery (dbx) and 2 Memos
In the Button's OnClick Event :
Select and Load a file into the first Memo
(Memo.Lines.LoadFromFile()
Load the same file into the TSQLQuery
(SQLQuery.SQL.LoadFromFile()
Then dump the data from SQLQuery into the second Memo
Memo2.Text := SQLQuery.SQL.Text or SQLQuery. or any other way
to review data that was loaded. The data is not the same.
QC
Date Reported:
#:
Area:
64475 7/15/2008
Database\DBExpress\TSQLQuery
Description:
Steps:
[Interbase]
TDBXWeaverBugsSuite.Managed.DB.Test.exe connection=ibconnection -s:oTestRaid_262549
[QC Short Description]
Can't insert empty BLOB field into
InterBase using DBExpress
TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_262549
[QC Description]
I use DBExpress component to
work with InterBase 2007
Source:
I have a table with BLOB NOT
NULL column. If I insert a row with
empty BLOB, the method
TSQLQuery.ExecSQL throws the
exception:
TDBXError with message
'validation error for column FDATA,
value "***null***"'
If I insert not empty BLOB - ok
==or==
// Create Connection
TSQLConnection* pCon = new TSQLConnection(NULL);
pCon->DriverName = "Interbase";
pCon->LibraryName = "dbxint30.dll";
pCon->VendorLib = "gds32.dll";
pCon->GetDriverFunc = "getSQLDriverINTERBASE";
pCon->Params>Add("Database=F:\\work\\Autobuild\\Current\\Apacs30\\exe\\db\\demodb\\APACS3000DEMORUS.IB");
pCon->Params->Add("User_Name=SYSDBA");
pCon->Params->Add("Password=masterkey");
pCon->Params->Add("ServerCharSet=WIN1251");
If I use TIBQuery for the same - ok
If I use previous (C++ Builder 6.0
Update 4 Build 10.166) with
DBExpress - ok
QC Entry 64475
pCon->KeepConnection = true;
pCon->LoginPrompt = false;
pCon->Connected = true;
TSQLQuery* pQuery = new TSQLQuery(NULL);
pQuery->SQLConnection = pCon;
pQuery->SQL->Add(AnsiString("INSERT INTO TAPCFILE (FID0, FID1, FDATA) VALUES (0, 29,
:param1)"));
TParam* pParam = pQuery->Params->FindParam("param1");
pParam->ParamType = ptInput;
// Insert BLOB with zero size
char* pBinBuf = NULL;
int nSize = 0;
pParam->DataType = ftBlob;
pParam->SetBlobData(pBinBuf, nSize);
// Throw exception
pQuery->ExecSQL(false);
TAPCFILE table metadata
CREATE TABLE "TAPCFILE"
(
"FDATA" BLOB SUB_TYPE 0 SEGMENT SIZE 80 NOT NULL,
"FID0" SMALLINT NOT NULL,
"FID1" INTEGER NOT NULL,
CONSTRAINT "PK_TAPCFILE" PRIMARY KEY ("FID0", "FID1")
);
QC #:
Date Reported:
Area:
91187
1/28/2011
Database\DBExpress\TFMTBcd
Description:
Steps:
[QC Short Description]
Assigning Null value results in Invalid Precision value
Assign NULL value to TFMTBCD field. Added by Sysop <<<<<<< Hi
Tomohiro Takahashi, as you wished here is a sample project. Hope
you can find the error. My wish is to set a decimal field in DB2 which
is mapped as fmtbcd field in Delphi explicit to NULL. Thanks Kathrin
>>>>>>>
[QC Description]
In Delphi 2009, the decimal fields are having TFMTBCDFIELD type
and a variant of type NULL cannot be set to this fields, of type
TFMTBCDFIELD as it will throw an error "invalid precision value
SQLSTATE = HY104".
We would like to assign NULL value to an TFMTBCD filed.
Added by Sysop
<<<<
Please see comments of QC for more details.
>>>>
QC Entry 91187
QC #:
Date Reported:
Area:
75063
6/18/2009
Database\DBExpress\TSqlTimeStam
p
Description:
Steps:
[QC Short Description]
Failure to add two TSQLTimeStamp variants
Added by USc: compile and execute the following console application
expected: PASS #1 PASS #2 actual: FAIL #1 FAIL #2 program
SqlTimStTest; {$APPTYPE CONSOLE} uses SysUtils, SqlTimSt; var
TimeStamp1, TimeStamp2: Variant; begin TimeStamp1 :=
VarSQLTimeStampCreate(EncodeDate(2000, 1, 1)); TimeStamp2 :=
VarSQLTimeStampCreate(EncodeDate(1, 1, 1)); TimeStamp1 :=
TimeStamp1 + TimeStamp2; if TimeStamp1 = EncodeDate(2001, 2,
2) then WriteLn('PASS #1') else WriteLn('FAIL #1'); TimeStamp1 :=
VarSQLTimeStampCreate(EncodeDate(2001, 2, 2)); TimeStamp2 :=
VarSQLTimeStampCreate(EncodeDate(1, 1, 1)); TimeStamp1 :=
TimeStamp1 - TimeStamp2; if TimeStamp1 = EncodeDate(2000, 01,
01) then WriteLn('PASS #2') else WriteLn('FAIL #2'); end.
[QC Description]
Unit SqlTimSt, methods TSQLTimeStampData.DoAdd and
DoSubtract have the similar bugs:
procedure TSQLTimeStampData.DoSubtract(const ADateTime:
TSQLTimeStampData);
begin
......
Dec(FDateTime.Hour, ADateTime.Month);
......
end;
procedure TSQLTimeStampData.DoAdd(const ADateTime:
TSQLTimeStampData);
begin
......
Inc(FDateTime.Hour, ADateTime.Month);
......
end;
There FDateTime.Hour must be replaced with FDateTime.Month.
QC Entry 75063
QC #:
Date Reported:
Area:
93243
4/19/2011
Database\dbExpressCore
Description:
Steps:
[QC Short Description]
BytesToWideStr is not enough memory in DBXPlatform.pas
This code works as expected. <<<<<< procedure
TForm4.Button2Click(Sender: TObject); var bs: TBytes; begin
SetLength(bs, 2); bs[0]:= byte('1'); bs[1]:= byte('2');
ShowMessage(TDBXPlatform.BytesToWideStr(bs)); end; >>>>>>
But, when passing invalid byte array(e.g., just 1 byte), it causes AV.
<<<<<< procedure TForm4.Button1Click(Sender: TObject); var bs:
TBytes; begin SetLength(bs, 1); bs[0]:= byte('1');
ShowMessage(TDBXPlatform.BytesToWideStr(bs)); // AV occurs
end; >>>>>> class function TDBXPlatform.BytesToWideStr(const
Value: TBytes): UnicodeString; var Count: Integer; Ch: WideChar;
ByteIndex: Integer; CharIndex: Integer; begin Count := Length(Value);
SetLength(Result, Count div 2); //<-- if Value has 1 byte, the length of
Result is 0, it should be 1. //SetLength(WideChars, Count div 2 +
Count mod 2); is ok ByteIndex := 0; CharIndex := 1; while ByteIndex <
Count do begin //------- if value has 1 byte, what is
Value[ByteIndex+1])? or what is Value[1]? ********************** Ch :=
WideChar((Integer(Value[ByteIndex+1]) shl 8) +
Integer(Value[ByteIndex])); Result[CharIndex] := Ch; if Integer(ch) = 0
then begin SetLength(Result, CharIndex-1); Exit; end; inc(CharIndex);
inc(ByteIndex, 2); end; end;
[QC Description]
in DBXPlatform.pas ,
class function TDBXPlatform.BytesToWideStr(const Value: TBytes):
UnicodeString;
var
Count: Integer;
Ch: WideChar;
ByteIndex: Integer;
CharIndex: Integer;
WideChars: TDBXWideChars;
begin
Count := Length(Value);
SetLength(WideChars, Count div 2); // error
SetLength(WideChars, Count div 2 + Count mod 2); //enough
memory
....
there are two places:
line 1655 & 1749
QC Entry 93243
QC #:
Date Reported:
Area:
89809
11/19/2010
Database\dbExpressCore
Description:
Steps:
[QC Short Description]
Runtime error using DBXClientDriver.bpl in application built with
runtime package
1. Extract the sample zip attachment 2. Build and Run in Delphi XE
Update 1 3. Press Button1 in main form ------------ procedure
TForm27.Button1Click(Sender: TObject); var P: THandle; C:
TSQLConnection; begin P :=
LoadPackage('DBXClientDriver150.bpl'); C :=
TSQLConnection.Create(nil); try C.DriverName := 'DataSnap'; finally
C.Free; end; UnloadPackage(P); end; ------------ 4. Close the main
form to terminate application 5. Wait for a while and Runtime error
prompt out
[QC Description]
I have an DBExpress application built with runtime packages. Most
packages are loaded dynamically in runtime include
DBXClientDriver.bpl.
These runtime packages may load and unload during runtime. I found
out DBXClientDriver.bpl package has problem using in load/unload
behavior. It will cause runtime error while the DBXClientDriver.bpl is
unload.
Please try the sample attachment to replay the problem I face.
QC Entry 89809
QC #:
Date Reported:
Area:
88514
9/30/2010
Database\dbExpressCor
e
Description:
Steps:
[QC Short Description]
No argument for format '%s'
[QC Description]
In DBXMetaDataWriter.pas in the function
TDBXBaseMetaDataWriter.FindDecimalTypeName there have all calls to the Format
function wrong parameters for Args. There is always needed the Product. It raises
always the error "No argument for format '%s'".
1471 if BestColumnSize < PrecisionRequired then
1472 raise TDBXMetaDataError.Create(Format(SCannotHoldWantedPrecision,
[ColumnName,BestTypeName,IntToStr(BestColumnSize),IntToStr(PrecisionRequired)]));
Added by Sysop
<<<<<<<<<<<<<<<<<
RDBMS: Firebird 2.1.3
With attached code, create a Firebird database in
the source directory with name test.fdb. Compile
the soure and start it. The error happens.
>>>>>>>>>>>>>>>>>
1471 if BestColumnSize < PrecisionRequired then
1472 raise TDBXMetaDataError.Create(Format(SCannotHoldWantedPrecision,
[ColumnName,BestTypeName,IntToStr(BestColumnSize),IntToStr(PrecisionRequired)]));
1473 if BestMaxScale < ScaleRequired then
1474 raise TDBXMetaDataError.Create(Format(SCannotHoldWantedScale,
[ColumnName,BestTypeName,IntToStr(BestMaxScale),IntToStr(ScaleRequired)]))
1475 else
1476 raise TDBXMetaDataError.Create(Format(SCannotBeUsedForAutoIncrement,
[BestTypeName,ColumnName]));
The resourcestrings:
0276 SCannotBeUsedForAutoIncrement = 'The best type match in %s for the column:
%s is %s. But is cannot be used for an auto increment column.';
0281 SCannotHoldWantedPrecision = 'The best type match in %s for the column: %s is
%s. But the max precision is: %s which is less than the specified: %s.';
0282 SCannotHoldWantedScale = 'The best type match in %s for the column: %s is %s.
But the max scale is: %s which is less than the specified: %s.';
QC Entry 88514
QC #:
Date Reported:
Area:
88657
10/5/2010
Database\dbExpressCore
Description:
Steps:
[QC Short Description]
Memoryleaks in MetaDataProvider
Firebird 2.1.3 must be installed. Compile the attachment, run it and
see the error message.
[QC Description]
There are a lot of memoryleaks in unit DBXMetaProvider,
DBXMetaDataWriter.
for example:
function TDBXMetaDataProvider.MakeCreateTableSql(const Table:
TDBXTablesTableStorage; const Columns:
TDBXColumnsTableStorage): UnicodeString;
var
Builder: TDBXStringBuffer;
Sql: UnicodeString;
begin
Builder := TDBXStringBuffer.Create;
FWriter.MakeSqlCreate(Builder, Table, Columns);
Sql := Builder.ToString;
FreeAndNil(Builder);
Result := Sql;
end;
this is right:
function TDBXMetaDataProvider.MakeCreateTableSql(const Table:
TDBXTablesTableStorage; const Columns:
TDBXColumnsTableStorage): UnicodeString;
var
Builder: TDBXStringBuffer;
Sql: UnicodeString;
begin
Builder := TDBXStringBuffer.Create;
try
FWriter.MakeSqlCreate(Builder, Table, Columns);
Sql := Builder.ToString;
finally
FreeAndNil(Builder);
end;
Result := Sql;
end;
Use try finally to alloc mem and free mem to write solid code. This
kind of code writing is over the whole units. Hey, is there a garbage
collector in Delphi?
Executing the appending code results in this errormessage:
--------------------------Unexpected Memory Leak
--------------------------An unexpected memory leak has occurred. The unexpected small
block leaks are:
13 - 20 bytes: TDBXDataSetRow x 1, TList x 11, TDBXStringBuffer x
1, UnicodeString x 1, Unknown x 1
21 - 28 bytes: EConvertError x 1, UnicodeString x 19, Unknown x 1
29 - 36 bytes: TDBXBooleanValue x 6, TDBXInt32Value x 5,
TAggregates x 1, TParams x 1, TCheckConstraints x 1, TFields x 2,
UnicodeString x 22
37 - 44 bytes: TDBXWideStringBuilderValue x 6, TFieldDef x 17,
UnicodeString x 6
53 - 60 bytes: TDBXClientDataSetTable x 1, TIndexDefs x 1,
TMasterDataLink x 1
61 - 68 bytes: TFieldDefs x 1
69 - 76 bytes: TDBXValueType x 17, UnicodeString x 1, Unknown x 2
77 - 84 bytes: TFieldList x 1, TFieldDefList x 1
173 - 188 bytes: Unknown x 3
205 - 220 bytes: Unknown x 1
237 - 252 bytes: TBooleanField x 6, TWideStringField x 6, Unknown x
2
253 - 268 bytes: TIntegerField x 5
477 - 524 bytes: Unknown x 6
733 - 796 bytes: TClientDataSet x 1
The sizes of unexpected leaked medium and large blocks are: 3372,
3372, 3372, 3372, 3372, 3372, 3372, 3372
--------------------------OK
--------------------------QC Entry 88657
QC #:
Date Reported:
Area:
91457
2/9/2011
Database\dbExpressCore
Description:
[QC Short Description]
dbExpress Does Not Work With Case Sensitive Collation In SQL
Server
Steps:
Create a new SQL Server Database and set the Collation to a case
sensitive option like Latin1_General_CS_AI or in fact any _CS (i.e.
Case Sensitive) collation and then try to access the database tables
through the Data Explorer. Errors will appear everwhere because the
[QC Description]
dbExpress code access the system table names as uppercase
THIS WAS PREVIOUSLY REPORTED AS
names even though some of them are not uppercase. The theory can
QC#80874(Internal#274345) but was closed as not reproducible.
be tested by navigating a case sensitive DB using Database Explorer
and trying to navigate to see the fields within a table (this generates a
Please, if you can't reproduce it, call me on +44 (0)1743 453146 and I "SQL State: 42S02, SQL Error Code: 208 Invalid object name
will talk you through the problem and how to replicate it!
'SYSCOMMENTS'" because it should be looking at "syscomments" in
lower case)
Using the new dbExpress drivers with XE and an MSSQL case
sensitive database (a database with a collation that is case sensitive).
As far as I can see the dbExpress code to communicate with MSSQL
is using UPPER CASE table names and column names and this only
works if the database is case insensitive. In actual fact the tables in
question SYSCOMMENTS and SYSTYPES (and all the associated
field name) should be in lowercase and the fact that it works at all is
more luck than judgement.
In previous versions of dbx for MSSQL the code used
sp_columns_rowset to get a list of column names for a table and for
some reason this has now been amended and hard coded as upper
case joins (DBXMsSqlMetaDataReader.pas)
This problem extends throughout the functionality of dbExpress
because you can then no longer look at meta data and therefore none
of the ApplyUpdates functionality works because the code cannot
determine what the primary keys are etc.
QC Entry 91457
QC #:
Date Reported:
Area:
64447
7/19/2008
Database\Data Explorer
Description:
Steps:
[QC Short Description]
Bug in DataExplorer program
TDBXTiburonBugsSuite.Native.DB.Test.exe -s:oTestRaid_262540
connection=oracleconnection
[QC Description]
I have a database in Oracle 10g and there is field of type
NUMBER(9,3) in one of the tables in the database. I displayed this
table using DataExplore.exe (located in c:\Program
Files\CodeGear\RAD Studio\5.0\bin\ directory) and the above
mentioned field was displayed without decimal point. Eg. the content
of the field was 4.12 and it was displayed as '412'.
Please see Todo comment before enabling this test.
Original steps:
------------------1. Create a table in an Oracle 10g database, that contains a field of
type NUMBER(9,3).
2. Assign a value (eg. 4.12) to the above mentioned field.
The same error also appears in my own program and because of this
I get "BCD overflow" error message when the number contains 6
3. Run the c:\Program Files\CodeGear\RAD
integer and 3 fractional digit.
Studio\5.0\bin\DataExplore.exe program and display the above
QC Entry 64630
mentioned table.
The '412' incorrect value will be displayed instead of '4.12'.
QC #:
Date Reported:
Area:
81335
1/20/2010
Database\DataSnap
Description:
Steps:
[QC Short Description]
Add DataSnap 2010 HTTPS / SSL client side support
Only TCP/IP and HTTP are available as communication protocol, not
HTTPS
[QC Description]
Please extend the communication protocol abilities of DataSnap 2010
clients with HTTPS / SSL support.
Right now we only have TCP and (new in 2010) HTTP, but we need
secured HTTPS support.
Since deployment can be done as DataSnap ISAPI server on IIS, the
server-side HTTPS / SSL support is not as important as client side
(we can let IIS do what it's good at). But for client side, we need
HTTPS support. Please.
QC Entry 81335
QC #:
Date Reported:
Area:
88217
9/20/2010
Database\DataSnap
Description:
Steps:
[QC Short Description]
TJSONMarshal.Marshal uses localized decimal separator for floats
Run Server.exe and Client.exe from the attached project group. Both
programs are set up to use the current decimal separator. If it is a dot
pressing Button1 in the Client.exe window works just fine and the
TMemo below the button is filled with the JSON string and the label is
set to the retrieved Double value. To reproduce the error in this case
use the radio buttons to use a comma in both programs.
[QC Description]
[This is a duplicate of QC 81143, because I was unable to attach a
demo project there.]
TJSONMarshal.Marshal uses the localized decimal separator for
encoding of floating point values. This leads to data that cannot be
parsed on the receiving side if the current decimal separator is a
comma. Instead a TDBXError exception is raised, containing the text
'JSON byte stream cannot be parsed correctly into a JSON value'.
QC Entry 88217
QC #:
Date Reported:
Area:
92921
4/7/2011
Database\DataSnap
Description:
Steps:
[QC Short Description]
DataSnap Client/Server multithread - Fail.
Create a std. DataSnap server application using a TDatamodule. Add
a simple method - GetMyObject - that returns a TObject descendant.
Ie TMyObject with a single property MyString of type String. Create a
simple VCL Forms client application with a TSQLConnection for the
datasnap connection. Use the unit with the shared datastructure MyObject from before. Let the client create 2 or more threads that
access the server - calling GetMyObject - via the autogenerated
proxy class. This will eventually fail! When the project fails ... it will
typically fail with an "invalid pointer operation .." in the client. Followed
by an A/V in the server. Please ajust client threads to 1 and press
start threads.... it will run forever ... add another (press the button
again) and watch it fail ...
[QC Description]
Running a datasnap server exposing a method that return a TObject
descendant fails when accessed from a multithreaded client.
QC Entry 92921
Added by Sysop
<<<<<<<<
This fatal issue is reproducible easily by launching multiple client
processes(e.g., 10 clients).
In the case, each client has just one thread(one connection).
Then please wait ten seconds, DataSnap server crashes with AV.
>>>>>>>>
QC #:
Date Reported:
Area:
92921
4/19/2011 11:10:03 AM
Database\DataSnap
Description:
Steps:
[QC Short Description]
DataSnap Client/Server multithread - Fail.
Create a std. DataSnap server application using a TDatamodule. Add
a simple method - GetMyObject - that returns a TObject descendant.
Ie TMyObject with a single property MyString of type String.
[QC Description]
Running a datasnap server exposing a method that return a TObject
descendant fails when accessed from a multithreaded client.
Added by Sysop
<<<<<<<<
This fatal issue is reproducible easily by launching multiple client
processes(e.g., 10 clients).
In the case, each client has just one thread(one connection).
Then please wait ten seconds, DataSnap server crashes with AV.
>>>>>>>>
QC Entry 92921
Create a simple VCL Forms client application with a TSQLConnection
for the datasnap connection. Use the unit with the shared
datastructure - MyObject from before. Let the client create 2 or more
threads that access the server - calling GetMyObject - via the
autogenerated proxy class.
This will eventually fail!
When the project fails ... it will typically fail with an "invalid pointer
operation .." in the client. Followed by an A/V in the server.
Please ajust client threads to 1 and press start threads.... it will run
forever ... add another (press the button again) and watch it fail ...
QC #:
Date Reported:
Area:
93561
5/4/2011
Database\DataSnap
Description:
Steps:
[QC Short Description]
TJSONObject.ToString doesn't properly handle strings with
embedded double quotes
TMyClass = class public Value : String; end; MyClass1 :=
TMyClass.Create; MyClass1.Value := 'Hello "World" !'; JSONValue1
:= Marshaler.Marshal(MyClass1); JSONString1 :=
JSONValue1.ToString; WriteLn(JSONString1); This will print:
{"type":"MarshalingTest.TMyClass","id":1,"fields":{"Value":"Hello
"World" !"}} It should be (Note the backslash before the double
quotes):
{"type":"MarshalingTest.TMyClass","id":1,"fields":{"Value":"Hello
\"World\" !"}}
[QC Description]
TJSONObject doesn't properly handle string with embedded double
quote altough ToBytes does it properly.
QC Entry 93561
QC #:
Date Reported:
Area:
91031
1/21/2011
Database\DataSnap
Description:
[QC Short Description]
TDSCustomProxyWriter IncludeClass property doesn't work
[QC Description]
Steps:
There is a problem with the proxy generator, the "include Class"
doesn't work.
Check out DSProxyWriter.pas, TDSCustomProxyWriter.InclusionTest.
There
is no way for a false condition to occur if there is a list of Includes.
Function starts out with result := true, and can only exit(true), there is
no false.
What should happen is:
function TDSCustomProxyWriter.InclusionTest
[..]
if Includes <> nil then
begin
for index := 0 to Length(Includes) - 1 do
begin
if IsMatch(Includes[Index]) then
begin
Exit(True);
end;
end;
Result := False; // Added this fail condition
end;
end;
QC Entry 91031
QC #:
Date Reported:
Area:
79136
10/31/2009
Database\DataSnap
Description:
Steps:
[QC Short Description]
DBXJSON.TJSONString.Hex() Stupid code.
[QC Description]
class function TJSONString.Hex(const Digit: Integer): Byte;
var
HexData: TBytes;
begin
SetLength(HexData,16);
HexData[0] := Ord('0');
HexData[1] := Ord('1');
HexData[2] := Ord('2');
HexData[3] := Ord('3');
HexData[4] := Ord('4');
HexData[5] := Ord('5');
HexData[6] := Ord('6');
HexData[7] := Ord('7');
HexData[8] := Ord('8');
HexData[9] := Ord('9');
HexData[10] := Ord('A');
HexData[11] := Ord('B');
HexData[12] := Ord('C');
HexData[13] := Ord('D');
HexData[14] := Ord('E');
HexData[15] := Ord('F');
Result := HexData[Digit];
end;
Stupid code. Why HexData not const?
QC Entry 79136
QC #:
Date Reported:
Area:
89301
10/28/2010
Database\DataSnap\Client
Description:
Steps:
[QC Short Description]
Build Channel Server Project, include Authentication Manager and
TDSClientCallbackChannelManager does not contain or expose User only allow certain username / password combinations. Build DBX
and Password
Client Channels and use the TDSClientCallbackChannelManager to
make a connection to the server. Since no DSAuthUser or
[QC Description]
DSAuthPassword information can be specified, none will be used for
The TDSClientCallbackChannelManager component does not contain the connection, so it will fail.
or expose the DSAuthUser and DSAuthPassword properties, which
means that if you want to make a channel callback connection to a
server that requires authentication, you are out of luck and will get an
error (access denied because the authentication manager did not
allow you access).
QC Entry 89301
QC #:
Date Reported:
Area:
85467
6/15/2010
Database\DataSnap\Client
Description:
Steps:
[QC Short Description]
Datasnap 2010 client can't connect across a proxy, no way to set one
[QC Description]
A datasnap client can't work across an HTTP proxy because there is
no way to set one.
Although it internally use a TidHTTP component which has proxy
support, a DatasnapConnection configuration does not allow to set
proxy parameters.
Probably some tricks could be used to access the private TidHTTP
instance, but this should be a standard feature of any http connection,
due to the broad use of proxy servers inside business environments
to control HTTP traffic.
QC Entry 85467
QC #:
Date Reported:
Area:
88431
9/27/2010
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
add DSAuth to uses clause of ServerMethodsUnit
Part of the new authorization functionality is the ability to mark both
server methods and/or the entire server method class with the
TRoleAuth attribute to tell which role(s) is authorised, and which
role(s) explicitly isn't. Syntax example: type {$METHODINFO ON}
TServerMethods1 = class(TComponent) private { Private declarations
} public { Public declarations } function EchoString(Value: string):
string; [TRoleAuth('admin', 'guest')] function ReverseString(Value:
string): string; end; {$METHODINFO OFF} Here, the ReverseString
function is only allowed for user 'admin' while user 'guest' is not
allowed to call it (and other users are not specified, so they will also
be able to call it, or so it seems). When adding the attribute to the
class definition, we get a compiler warning (not an error, but a
warning "unsupported language feature"). The warning is caused by
the fact that the compiler doesn't know about the TRoleAuth type at
this point (by default, the unit DSAuth is not in the uses clause), and
the actual effect is that this custom attribute is ignored, so no
authorization is done on the ReverseString, and even 'guest' can call
it now. Workaround: modify this particular warning ("Unsupported
language feature") in the Build Configuration and turn it into an error,
so people will see it as an error and not a warning. Manual Fix: add
the DSAuth unit to the uses clause. Embarcadero requested fix: add
the DSAuth unit to the uses clause of the ServerMethodsUnit
template, so it's always there... Thanks!
[QC Description]
If TRoleAuth type (from the DSAuth unit) is unknown, then the
attribute will be ignored by the compiler, producing only a
"unsupported language feature" warning.
Please add the DSAuth unit to the uses clause of the
ServerMethodsUnit template, so it's always there.
QC Entry 88431
QC #:
Date Reported:
Area:
90842
1/12/2011
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
Use the wizard to create a DataSnap REST Server application.
TWebFileDispatcher send wrogn ContentType for cached documents Compile and run as is. Open in the browser (at elast Chrome),
looking at the javaScript Console. Alll fine. Refresh the page, you
[QC Description]
start to see warnings.
When you ask a TWebFileDispatcher for the
files, if they are cached it they are returned as "NOT MODIFIED" but
you'll also get back the defautl "text/html" in the borwser.
Chrome marks this as a warning in the javascript console, but the
page works anyway.
QC Entry 90842
QC #:
Date Reported:
Area:
90841
1/12/2011
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
json-min.js causes problems with jQuery plugins
Create a DataSnap REST Application wizard generated program with
these changes: - added jquery plus a couple of addins to the JS
folder - references those in the ReverseString.html file - added one
start up line that calls the validation tool, and causes the error (you
see the error only in a JavaScript console in the browser!) - the error
goes away if you remove the json2-min.js
[QC Description]
The bug I'm experiencing is between the "json-min.js" file added by
the Delphi wizard and some of the jQuery components (but not the
core jQuery) itself.
json-min.js is a rather out-of-standard JS library, causing problems
with other JS libraries. Namely I had serious issues with jQuery and
replaced it with json2.js from
http://www.JSON.org/json2.js
I also fixed the other JS libraries in DataSnap REST accordingly.
Can attach a demo I already emailed to
Steve Axtell <Steve.Axtell@embarcadero.com>
Mathew Delong <Mathew.Delong@embarcadero.com>
who asked me to open the QC case...
Can also send the modified code with the fixes, if useful, but I'll blog
about this as well.
QC Entry 90841
QC #:
Date Reported:
Area:
66503
9/8/2008
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
Starting 2 servers using same port causes unhandled win32
exception
Create 2 different servers, both with a TDSTCPServerTransport on it,
assigned to the same port number When you start the 2nd one, it
causes an "Unhandled Win32 Execption" and kicks off whatever
debugger you have configured.
[QC Description]
Starting 2 different Datasnap servers that have the same port number
assigned causes an Unhandled Win32 execption. There should be a
more graceful way of handling this, perhaps as simple as displaying a
warning message and terminating the 2nd server.
QC Entry 66503
QC #:
Date Reported:
Area:
91030
1/21/2011
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
procedure TServerContainer.DSServer1Connect(
Datasnap: DSConnectEventObject.ChannelInfo.Info reports localIP not DSConnectEventObject: TDSConnectEventObject); var IPAddress :
RemoteIP
string; s : string; begin //To obtain the IP when a client is connecting,
you can add an OnConnect event to the TDSServer component. In
[QC Description]
the event, get the IP with this code: IPAddress :=
It seems that there is a bug in the reporting the IP address of the
DSConnectEventObject.ChannelInfo.Info; //You could then store the
conneting client.
IP address in the current session, for later use. To do this, use the
following code:
https://forums.embarcadero.com/thread.jspa?threadID=45750&tstart=0 //TDSSessionManager.GetThreadSession.PutData('RemoteIP',
IPAddress); //However, this may not be necessary, as the IP may
QC Entry 91030
already be stored in the session. //To get the IP from the session
from within a server method, call this (requiring the DSService unit):
//TDSSessionManager.GetThreadSession.GetData('RemoteIP') end;
QC #:
Date Reported:
Area:
91526
2/12/2011
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
Memory leak occurred when datasnap server exe closed
1.create datasnap server project with wizard. (Setting to use Data
Module)
2.change DSServerClass1.LifeCycle to 'Invocation',and turn on
ReportMemoryLeaksOnShutdown switch in project file.
[QC Description]
Added by Sysop
<<<<<<<<
Memory leaks are TDSProviderDataModuleAdapter instances.
>>>>>>>>
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.
I created a datasnap server project with delphi xe wizard,all set in
6.Close client program, close server program.
wizard was not changed,except DSServerClass1.LifeCycle was
7.Memory leak occurred when close server.
changed to 'Invocation'.And then ,i created a VCL client project and
Added by Sysop
added ClientClassesUnit1 unit with wizard too. In my client program ,i <<<<<<<<
simply call server method 'EchoString', it is work.But when i close
Memory leaks are TDSProviderDataModuleAdapter instances.
server program,a memory leak occurred.Of course, i turned on the
>>>>>>>>
ReportMemoryLeaksOnShutdown switch in my server project.
QC Entry 91526
QC #:
Date Reported:
Area:
69556
12/3/2008
Database\DataSnap\Server
Description:
Steps:
[QC Short Description]
DSTCPServerTransport.PoolSize has wrong default
[QC Description]
The default value of the property (10, also according to the
documentation) is not set in the constructor. Not only 10 is not th
default, but if you set it, it is not streamed (as it is declared as the
default value).
Not a big deal but annoying. Kind of a components 101 mistake <g>.
QC Entry 69556
QC #:
Date Reported:
Area:
97109
8/3/2011 11:26:55 AM
Database\Amazon
Description:
Steps:
Indy abstraction layer implementation does not correctly instantiate SSL IO Handler
open sample at
tptest\projects\database\samples\AzureAPITest\Clou
dAPITest.dpr
open the form unit and change both Azure and
Amazon components to use https protocol instead of
http
run
Note: this affects both Amzon and Azure cloud services
Comments from Andre Mussche on forums:
However, I had to use HTTP protocol, HTTPS gives error:
========================================
First chance exception at $76C5B9BC. Exception class
EIdIOHandlerPropInvalid with message 'IOHandler value is not valid'.
Process Project1.exe (3304)
on amazon tab, go into blobs, buckets, get, list
buckets
exp: lists without error
act: error message saying iohandler is invalid
IdHTTP.TIdCustomHTTP.SetHostAndPort
IdHTTP.TIdCustomHTTP.ConnectToHost($206F540,$2058A90)
on azure tab, go into blobs, blobls, list blobs
IdHTTP.TIdCustomHTTP.DoRequest(???,'https://s3.amazonaws.com',nil,$20A3460,(. exp: lists without error
..))
act: error message saying iohandler is invalid
IdHTTP.TIdCustomHTTP.Get('https://s3.amazonaws.com',???,(...))
IdHTTP.TIdCustomHTTP.Get('https://s3.amazonaws.com',???)
IndyPeerImpl.TIdHTTPPeer.DoGet('https://s3.amazonaws.com',$20A3460)
Data.Cloud.CloudAPI.TCloudHTTP.Get('https://s3.amazonaws.com',???)
Data.Cloud.CloudAPI.TCloudService.IssueGetRequest('https://s3.amazonaws.com',?
??,nil,'/',$203EE60,'')
Data.Cloud.AmazonAPI.TAmazonStorageService.ListBucketsXML($203EE60)
Data.Cloud.AmazonAPI.TAmazonStorageService.ListBuckets(???)
Unit1.TForm1.Button1Click($202E0D0)
if TextIsSame(URL.Protocol, 'HTTPS') then begin {do not localize}
// Just check can we do SSL
if not (IOHandler is TIdSSLIOHandlerSocketBase) then begin
raise EIdIOHandlerPropInvalid.Create(RSIOHandlerPropInvalid);
end;
========================================
IOHandler = nil
QC #:
Date Reported:
Area:
76302
7/24/2009 11:04:26 AM
International\Other
Description:
Steps:
[Related with RAD-881]
- install product with all language (EN, DE, FR, JA)
- $(BDS)\bin\BDSSetLang.exe /I
// ACT: caption is 'Form4'
BDS Language configuration tool ($(BDS)\bin\BDSSetLang.exe)
caption is 'Form4' (ORIGINAL), it should be more appropriate caption,
please see attached screen shot.
// see also 271462_translation_status.png
QC #:
Date Reported:
Area:
89616
11/12/2010
VCL
Description:
Steps:
[QC Short Description]
HTMLHelpViewer.pas bug in initialization finalization methods
No need. It is a random bug.
[QC Description]
Read my previous bug #78998 and try to read it this time, instead of
declaring it duplicate and then forgetting it.
http://qc.embarcadero.com/wc/qcmain.aspx?d=78998
This bug is there since you created HTMLHelpViewer.pas ...
INCREDIBLE! You also putted a comment noticing that the call fails
to set the cookie, but you never noticed that you called it wrong with
that & operator!
Please, for Delphi XE Update 1 do yourselves a favour and copy
paste my code.
QC Entry 89616
QC #:
Date Reported:
Area:
96793
7/28/2011
VCL\Additional Controls
Description:
Steps:
[QC Short Description]
TGridPanel raises EListError after column/row deletion
1. Start new VCL Forms Application project 2. Place a TGridPanel on
the form (2x2 cells by default). 3. Place two TButton controls at the
second row of gridpanel (place two buttons, and set Row property of
both controls to 1). 4. Open the RowCollection editor of gridpanel,
and delete the first row (Row0). 5. Save project, and look at the DFM.
GridPanel1.ControlCollection items still have Row=1. It's wrong. 6.
EListError exception raised with message 'List index out of bounds
(1)' when you try any of the following: a) Compile and Run b) Reopen
the form in IDE c) Select one of the button controls in IDE
[QC Description]
See steps.
QC Entry 96793
QC #:
Date Reported:
Area:
92149
3/9/2011
VCL\Additional Controls\TBitBtn
Description:
Steps:
[QC Short Description]
1.Enable Windows themes.
When changed Windows theme (Classic) at runtime while application 2.Run test.exe. (Attachments)
is running, the image of TBitBtn is vanished.
3.Disable Windows themes at runtime while test.exe is running.
(Window Classic)
[QC Description]
When changed Windows theme (Classic) at runtime while application
is running, the image of TBitBtn is vanished.
EXP:
The image is displayed.
Please see Steps.
QC Entry 92149
ACT:
The image is not displayed.
Added by Sysop
<<<<<<<<<<<
Please see comment of QC for FIX.
>>>>>>>>>>>
QC #:
Date Reported:
Area:
92385
3/18/2011
VCL\Additional
Controls\TSpeedButton
Description:
Steps:
[QC Short Description]
TSpeedButton and TBitBtn don't draw glyphs
Run attached application, then change any Windows theme to
"Windows Classic" while application is running and note disappearing
glyphs. To see glyphs again application must be re-started. Tested on
[QC Description]
Windows XP and 7.
TSpeedButton and TBitBtn don't draw glyphs after Windows theme is
changed to "Classic" when application is running.
Added by Sysop
<<<<<
This issue is same as(similar to) QC#92149.
>>>>>
QC Entry 92385
QC #:
Date Reported:
Area:
96892
7/29/2011
VCL\Additional
Controls\TDrawGrid
Description:
Steps:
[QC Short Description]
Make TCustomGrid.SelectionMoved virtual
[QC Description]
We have created a virtual grid component based on
TCustomDrawGrid for our application. In our grid you can focus
individual cells (goRowSelect is off) however the current focused row
is highlighted.
We now want to highlight the the rows which are in the selection. The
only way I can see to do this is to override
TCustomGrid.SelectionMoved so it can invalidate the rows included
in the selection.
To make this possible, could you please make the
TCustomGrid.SelectionMoved() procedure virtual and give it
protected visibility. This should not break any existing code.
QC Entry 96892
QC #:
Date Reported:
Area:
71112
2/3/2009
VCL\Core VCL Classes\TThread
Description:
[QC Short Description]
Deadlock in TThread destructor when constructor raises exception
when CreateSuspended is False
Steps:
program ThreadDeadlockApp; {$APPTYPE CONSOLE} uses
Classes, Dialogs, SysUtils; type TTestThread = class(TThread)
protected procedure Execute; override; public constructor
Create(CreateSuspended: Boolean); end; constructor
[QC Description]
TTestThread.Create(CreateSuspended: Boolean); begin inherited;
If the CreateSuspended parameter of the TThread constructor is set raise Exception.Create(''); // can be any exception end; procedure
to False, and then any derived class constructor raises an exception, TTestThread.Execute; begin end; begin try
the TThread destructor deadlocks. This problem was introduced in D6 TTestThread.Create(True); except ShowMessage('ok'); // this is
and still exists in D2009.
reached fine end; try TTestThread.Create(False); except
ShowMessage('ok'); // this is never reached end; end.
The reason for the deadlock is because the TThread destructor does
not resume the suspended OS thread when CreateSuspended is
False:
destructor TThread.Destroy;
begin
if (FThreadID <> 0) and not FFinished and not FExternalThread then
begin
Terminate;
if FCreateSuspended then // <-- here
Resume; <-- not called
WaitFor;
end;
...
end;
To fix this, the TThread constructor should be setting the
FSuspended member to True when creating a new OS thread object
(since it is always created in an suspended state), and then the
destructor needs to check the FSuspended member instead of the
FCreateSuspended member, ie:
constructor TThread.Create(CreateSuspended: Boolean);
{$IFDEF LINUX}
var
ErrCode: Integer;
{$ENDIF}
begin
inherited Create;
AddThread;
if not FExternalThread then
begin
FSuspended := True; <-- here
FCreateSuspended := CreateSuspended;
{$IFDEF MSWINDOWS}
FHandle := BeginThread(nil, 0, @ThreadProc, Pointer(Self),
CREATE_SUSPENDED, FThreadID);
if FHandle = 0 then
raise EThread.CreateResFmt(@SThreadCreateError,
[SysErrorMessage(GetLastError)]);
{$ENDIF}
{$IFDEF LINUX}
sem_init(FCreateSuspendedSem, False, 0);
ErrCode := BeginThread(nil, @ThreadProc, Pointer(Self),
FThreadID);
if ErrCode <> 0 then
raise EThread.CreateResFmt(@SThreadCreateError,
[SysErrorMessage(ErrCode)]);
{$ENDIF}
end else
begin
FSuspended := False;
FCreateSuspended := False;
{$IFDEF MSWINDOWS}
FHandle := Windows.GetCurrentThread;
FThreadId := Windows.GetCurrentThreadId;
{$ENDIF}
end;
end;
destructor TThread.Destroy;
begin
if (FThreadID <> 0) and not FFinished and not FExternalThread then
begin
Terminate;
if FSuspended then
Resume;
WaitFor;
end;
RemoveQueuedEvents(Self, nil);
{$IFDEF MSWINDOWS}
if (FHandle <> 0) and not FExternalThread then
CloseHandle(FHandle);
{$ENDIF}
{$IFDEF LINUX}
// This final check is to ensure that even if the thread was never
waited on
// its resources will be freed.
if (FThreadID <> 0) and not FExternalThread then
pthread_detach(FThreadID);
sem_destroy(FCreateSuspendedSem);
{$ENDIF}
inherited Destroy;
FFatalException.Free;
RemoveThread;
end;
QC Entry 71112
QC #:
Date Reported:
Area:
9862
12/10/2004
VCL\Core VCL Classes\TThread
Description:
[QC Short Description]
Make TThread handle naming the thread during debugging nicer
[QC Description]
Steps:
TThread uses RaiseException() to pass a name string to the
debugger for displaying per-thread names in the Threads window.
The generated code is not friendly to developers who use the
generated TThread descendant code as a base class for other
descendant classes. Those classes are not able to name themselves
properly, unless they call their own RaiseException() code manually.
The RaiseException() code can easily be abstracted away inside of
TThread itself by adding a Name property to TThread. See the
Workaround section for a possible implementation.
QC Entry 9862
QC #:
Date Reported:
Area:
4166
4/21/2003
VCL\Core VCL
Classes\TWinControl
Description:
Steps:
[QC Short Description]
Displaying JPEG file with 1 pixel height fails in Graphic.pas unit
[Reproduced on D7]
[QC Description]
There was a change in Graphics.pas between Delphi versions 4 and
6 in function TBitmap.GetScanLine. Now a JPEG file that is 1 pixel in
height will fail with an invalid scanline operation.
The problem line in the function is:
if (Row < 0) or (Row >= bmHeight) then
A possible fix (that works) is
if (Row < 0) or ((Row >= bmHeight) and (bmHeight > 1)) then
QC Entry 4166
As a quick verify 1. Build a jpg image with a 1 pixel height, width does
not matter. 2. Create a new application 3. Add jpeg to the uses clazse
4. Add an image 5. Add a button 6. Add procedure
TForm1.Button1Click(Sender: TObject); begin
Image1.Picture.LoadFromFile('c:\j1.jpg'); end; Run the app.
QC #:
Date Reported:
Area:
95115
6/14/2011
VCL\Core VCL
Classes\TWinControl
Description:
Steps:
[QC Short Description]
VCL should call BufferedPaintInit before the first call to
BeginBufferedPaint
[QC Description]
According to http://msdn.microsoft.com/enus/library/bb773257(VS.85).aspx each thread that uses
BeginBufferedPaint should also call BufferedPaintInit before the first
call to BeginBufferedPaint, because "Failure to call BufferedPaintInit
may result in degraded performance due to internal data being
initialized and destroyed for each buffered paint operation."
http://msdn.microsoft.com/en-us/library/bb773266(v=VS.85).aspx
recommends to call BufferedPaintInit when the main form is created,
and BufferedPaintUninit when the main form is destroyed.
The VCL calls BeginBufferedPaint in TWinControl.WMPaint. It never
calls BufferedPaintInit.
QC Entry 95115
QC #:
Date Reported:
Area:
88415
9/26/2010
VCL\Core VCL
Classes\TApplicationEvents
Description:
Steps:
[QC Short Description]
OnModalBegin and OnModalEnd do not function
Added by Sysop <<<<<<<<<<<<<<<<<< procedure
TMainForm.Button1Click(Sender: TObject); begin
UseLatestCommonDialogs := True; MessageDlg('Main form
dimmed!', mtInformation, [mbOK], 0, mbOK); end;
>>>>>>>>>>>>>>>>>>
[QC Description]
In Visata 64 bit no OnModalBegin and OnModalEnd event is fired
when any other Windows theme than "Windows Classic" is active
Added by Sysop
<<<<<<<<<<<
When using Common dialog box(e.g., MessageDlg) and setting
UseLatestCommonDialogs to True(this is default), OnModalBegin
and OnModalEnd are not fired.
>>>>>>>>>>>
QC Entry 88415
QC #:
Date Reported:
Area:
89435
11/4/2010
VCL\Graphics\TPNGImage
Description:
Steps:
[QC Short Description]
TPngImage performance
[QC Description]
You can speed up access to some, frequently used, TPngImage
properties. For example Pixels property. The "as" operator is used too
widely. In many cases, it can be replaced by typecasting. For
example:
function TPngImage.GetHeader: TChunkIHDR;
begin
{If there is a TChunkIHDR returns it, otherwise returns nil}
if (Chunks.Count <> 0) and (Chunks.Item[0] is TChunkIHDR) then
Result := Chunks.Item[0] as TChunkIHDR //!!!
else
begin
{No header, throw error message}
RaiseError(EPNGHeaderNotPresent, EPNGHeaderNotPresentText);
Result := nil
end
end;
Can be replaced by:
function TPngImage.GetHeader: TChunkIHDR;
begin
{If there is a TChunkIHDR returns it, otherwise returns nil}
if (Chunks.Count <> 0) and (Chunks.Item[0] is TChunkIHDR) then
Result := TChunkIHDR(Chunks.Item[0])
else
begin
{No header, throw error message}
RaiseError(EPNGHeaderNotPresent, EPNGHeaderNotPresentText);
Result := nil
end
end;
Or, better (without double calling TPNGList.GetItem):
function TPngImage.GetHeader: TChunkIHDR;
var
Chunk: TChunk;
begin
if (Chunks.Count <> 0) then
begin
Chunk := Chunks.Item[0];
if (Chunk is TChunkIHDR) then
begin
Result := TChunkIHDR(Chunk);
Exit;
end;
end;
RaiseError(EPNGHeaderNotPresent, EPNGHeaderNotPresentText);
Result := nil
end;
QC Entry 89435
QC #:
Date Reported:
Area:
89798
11/18/2010
VCL\Dialog Controls
Description:
Steps:
[QC Short Description]
TTaskDialog fails under Windows Class
Show a Vista task dialog under the Windows classic theme
[QC Description]
TCustomTaskDialog.DoExecute includes this line:
if not ThemeServices.ThemesEnabled then
raise Exception.CreateResFmt({$IFNDEF
CLR}@{$ENDIF}SXPThemesRequired, [ClassName]);
This means that it cannot work under Windows Classic. I suspect that
the code should test ThemesAvailable.
Added by Sysop
<<<<<<<<<<<
The error in the code is that the author mistakenly believes that the
Vista TaskDialog requires themes to be enabled, but Vista
TaskDialog works perfectly well when they are not, e.g. in Windows
classic theme.
>>>>>>>>>>>
QC Entry 89798
QC #:
Date Reported:
Area:
94160
5/24/2011
VCL\Dialog Controls\TOpenDialog
Description:
Steps:
[QC Short Description]
TOpenDialog fails when visual themes are disabled in compatibility
mode
1. Start a new VCL application. 2. Drop a TButton and TOpenDialog
on the form. 3. Assign the button's OnClick event handler to call
OpenDialog1.Execute 4. Compile the application. 5. Right-click the
Project1.exe file in Windows Explorer and select Properties. 6. On the
Compatibility tab in the .exe's Properties, check "disable visual
themes". 7. OK the properties window. 8. Run Project1.exe 9. Click
the button Expected: File open dialog is shown Actual: Nothing
happens
[QC Description]
If a user for some reason turns on the "disable visual themes" option
in the compatibility mode section of a Delphi XE application, then
TOpenDialog.Execute does nothing. No dialog is shown. No
exception is raised.
This occurs on Windows 7 x64. I have not tested on other versions of
Windows.
Added by Sysop
<<<<<<
This issue is related to UseLatestCommonDialogs property.
Please see comments of QC for more information.
>>>>>>
QC Entry 94160
QC #:
Date Reported:
Area:
87323
8/17/2010
VCL\Registry / INI Objects
Description:
Steps:
[QC Short Description]
TRegistry.Delete key does not work for 64bit keys
1. Use 64bit Windows (XP, Vista, Win7) 2. Create a key with MS
Registry Editor (64bit)
HKEY_LOCAL_MACHINE\SOFTWARE\TEST_THIS_QC 3. Run this
app: uses Windows, Registry; var Reg: TRegistry; begin Reg :=
TRegistry.Create(KEY_ALL_ACCESS OR KEY_WOW64_64KEY
{$100}); Reg.RootKey := HKEY_LOCAL_MACHINE; if not
Reg.DeleteKey('\SOFTWARE\TEST_THIS_QC') then
raiseLastOsError;
[QC Description]
TRegistry.DeleteKey cannot delete 64bit keys, even if
KEY_WOW64_64KEY was supplied. The reason is that DeleteKey
uses RegDeleteKey which fails on this flag with 87 (invalid
parameter). To remedy that RegDeleteKeyEx must be used which is
only available in XP 64bit and Vista (32+64bit).
This is NOT a duplicate of qc #23429
QC Entry 87323
QC #:
Date Reported:
Area:
86876
8/3/2010
VCL\Standard Controls\TMainMenu
Description:
[QC Short Description]
Incorrect painting of hot item on menu using Vista/7 themes
[QC Description]
Recent versions of Delphi do a decent job of supporting the new style
menus introduced in Vista.
Steps:
However, there is a minor flaw in the way the menu highlight is
drawn. The code in Menus.pas draws the menu highlight after
drawing the glyph. This results in the menu highlight being blended
over the top of the glyph. In fact the opposite is what is required,
namely the glyph being blended over the top of the menu highlight.
This can be seen, for example, in the RAD Studio IDE which clearly is
built from the same flawed Delphi code.
The solution is trivial. Just move the code which draws the menu
highlight (the call to DrawThemeBackground with MPI_HOT
parameter) before the code which draws the glyph.
Incidentally, you may be aware that Vista/7 themed menus can be
obtained, with glyphs, without using owner draw code. The trick is to
set MenuItemInfo.hbmpItem to be a PARGB32 bitmap in
TMenuItem.AppendTo. This would, for me, be a much preferable
approach to supported Vista/7 themed menus. The advantage is that
using system drawn menus makes your code more robust to future
releases of Windows which may change things once again. In
addition, you get the system native code for greying out menu glyphs
and thus making your app as native as possible.
QC Entry 86876
QC #:
Date Reported:
Area:
89920
11/24/2010
VCL\Standard Controls\TMainMenu
Description:
Steps:
[QC Short Description]
Vista disabled menu items drawn incorrectly
[QC Description]
This report is related to 86876. That report describes the fact that the
call to DrawThemeBackground for (MENU_POPUP_ITEM,
MPI_HOT) is drawn in wrong sequence. I have also realised that it is
a mistake always to pass MPI_HOT. When the menu item is disabled
you should pass MPI_DISABLEDHOT.
This is why disabled menu items are drawn, incorrectly, with a blue
hot highlight instead of being grey as nature intended.
As I stated in 86876, the ideal solution would be to avoid owner draw
altogether.
QC Entry 89920
QC #:
Date Reported:
Area:
63171
6/11/2008
VCL\Win 32 Controls\TImageList
Description:
Steps:
[QC Short Description]
When adding a large PNG image to an imagelist, there is no prompt
for slicing the image into smaller images
BMP Test 1. Create a new VCL application 2. Add an TImageList to
the form 3. Double click the TImageList to show the component editor
4. Select the Add button and select a BMP image that has the
dimensions of 32x32 exp: Dialog asking if I want to add this image as
4 separate images act: Dialog asking if I want to add this image as 4
separate images PNG Test 1. Create a new VCL application 2. Add
an TImageList to the form 3. Double click the TImageList to show the
component editor 4. Select the Add button and select a PNG image
that has the dimensions of 32x32 exp: Dialog asking if I want to add
this image as 4 separate images act: image added as a single image
that has been resized to fit in the image list dimensions
[QC Description]
When you select the Add button on the ImageList component editor
and choose a BMP image that is larger than the imagelists image
dimensions, a dialog is displayed asking if you want to separate the
image into separate images.
When you select the Add button on the ImageList component editor
and choose a PNG image that is larger than the image lists image
dimensions, there is no offer to separate the png into separate
images.
QC Entry 63171
QC #:
Date Reported:
Area:
92915
4/7/2011
VCL\Win 32 Controls\TImageList
Description:
Steps:
[QC Short Description]
No event OnChange
1. Throw on the form TImageList 2. Assigns an event handler
onChange 3. Perform a Move method 4. The event is not triggered.
[QC Description]
Added by Sysop
<<<<<<<
This is a regression in Delphi XE.
>>>>>>>
Does not fire event 'onChange' after the execution of the method
TImageList.Move. This error appeared only in Delphi XE, before it
worked twice.
QC Entry 92915
See attached file. Handler events ImageList1.onChange adds rows to
Memo1 (left). At the bottom of the image portrayed ImageList1.
Button on the right have different changes in ImageList1. 0. Open the
file TestImageList.dpr. 1. Compile and run the application. 2. Push the
button at the top right Move (1, 2) 3. If the application is compiled in
Delphi XE, we see that the addition of strings does not occur, ie event
does not fire. While the bottom is that the images 1 and 2 are
swapped. In earlier versions of this event is triggered twice. IMHO,
should be triggered once! 4. Trying to press other buttons to verify
proper operation. Delete and AddIcon working properly. I suggest the
developers to independently verify the correctness of the other
methods that alter ImageList1.
QC #:
Date Reported:
Area:
97696
8/16/2011
VCL\Win 32 Controls\TRichEdit
Description:
Steps:
[QC Short Description]
The attached D2009 project includes 3 HTML files reproduce the
Unwanted null characters when loadng files/streams into a TRichEdit problem. The problem still exists in later versions.
[QC Description]
When the TRichEdit.PlainText property is True, TRichEdit's
LoadFrom...() methods attempt to load data as Ansi and decode it to
Unicode. During that process, the data is read in chunks and each
chunk is decoded. In ComCtrls.StreamLoad(), a check a made to see
if a chunk ends with a #13 byte, and if so then replaces it with a #00
byte, BUT it does not adjust the chunk length accordingly, so that #00
byte gets included in the Unicode decoding, which produces a null
character. The RichEdit does not display the character, but it is
present in the TRichEdit.Text property. If the data has line breaks that
occur at even multiples of the chunk length (2045-2046 bytes), they
produce null characters. When I ran all three of the attached HTML
files through the LoadFromFile() method, the #13->#00 replacement
happens exactly once for each file.
QC Entry 97696
QC #:
Date Reported:
Area:
91236
1/31/2011
VCL\Win 32 Controls\TTreeView
Description:
Steps:
[QC Short Description]
1. save the attached test case 2. start Delphi 3. open
Regression: Node editor modifies silently the caption of the first node TreeViewNodeEditTest.dpr 4. call the node editor for the TTreeView
on the main form (editor of property Items or "Items Editor..." from the
[QC Description]
Form Designers popup menu) 5. edit the caption of the second node
The TTreeView node editor modifies silently the caption of the first
6. close the node editor with OK expected: the caption of the first
node. This is regression from Delphi 2010.
node is still "Please do not touch me!!!" actual: the caption is "Edit my
caption" Already after step 4. the caption is changed and the only
-> see steps
chance not to touch the first nodes caption seems to press Cancel.
QC Entry 91236
Interestingly there is no such problem when using
$(BDS)\source\Property Editors\NodeEdit.pas at runtime. Alternative
steps without test case: A1. create a new VCL Forms application A2.
add a TTreeView to the form A3. call the node editor A4. add two
nodes A and B A5. OK A6. call the node editor again A7. edit the
caption of second node A8. close the node editor with OK expected:
the caption of the first node is still "A" actual: the caption is "B"
Already after step A6. the caption is changed and the only chance not
to touch the first nodes caption seems to press Cancel.
QC #:
Date Reported:
Area:
91574
2/15/2011
VCL\Win 32 Controls\TListView
Description:
Steps:
[QC Short Description]
OnColumnRightClick is not called on a second monitor
The ViewStyle must be set to vsReport. Right click on a listview
column in a monitor with negative x or y value. Code to use: void
__fastcall TForm1::ListView1ColumnRightClick(TObject *Sender,
TListColumn *Column, TPoint &Point) { Application>MessageBoxW(L"Hi", L"", MB_OK); } The message will not appear
on the second monitor.
[QC Description]
The TListView event OnColumnRightClick is not called my second
monitor.
Code from ComCtrls.pas:
NM_RCLICK:
begin
P := Point(LoWord(GetMessagePos), HiWord(GetMessagePos));
From the GetMessagePos Help: "Important Do not use the LOWORD
or HIWORD macros to extract the x- and y- coordinates of the cursor
position because these macros return incorrect results on systems
with multiple monitors. Systems with multiple monitors can have
negative x- and y- coordinates, and LOWORD and HIWORD treat the
coordinates as unsigned quantities."
Solution: Since I code in C++ I used the MAKEPOINTS macro, like
this:
DWORD LPosition = GetMessagePos();
POINTS P = MAKEPOINTS(LPosition);
QC Entry 91574
QC #:
Date Reported:
Area:
90345
12/15/2010
VCL\Win 32 Controls\TStatusBar
Description:
Steps:
[QC Short Description]
[REGRESSION] StatusBar panels draw with contents of menu items
on WinXP.
Please see comments and [Attachments] of QC#83417 for more
detail. Create a new VCL forms application. Place a menu with some
items onto the main form. Place a status bar with one text panel and
one ownerdrawn panel onto the form. Make the status bar use double
buffering. Implement the panel draw method to paint the second
panel red. Compile and run on Windows XP.
[QC Description]
This issue is regression of QC#83417.
The contents of menu items get drawn into custom status bar panels.
The built executables work correctly on Windows Vista, 7 but break
on WinXP.
QC Entry 90345
QC #:
Date Reported:
Area:
87897
9/8/2010
VCL\Win 32 Controls\TCoolBar
Description:
Steps:
[QC Short Description]
TCoolBar does not work without "Runtime themes enabled"
1. Create a new VCL Forms Application project, and set the Options > Application -> Enable runtime themes to false. 2. Add a TCoolBar to
the form. 3. Add some components to the TCoolBar, like a TToolBar
or TPanel. 4. Run the application and see the failure.
[QC Description]
A TCoolBar placed in an application that does not have "Runtime
themes enabled" on the project will not paint correctly or allow
repositioning of the bands.
QC Entry 87897
Added by Sysop
<<<<<<<<<<
Please see comment for fix/workaround.
>>>>>>>>>>
QC #:
Date Reported:
Area:
93545
5/4/2011
VCL\Win 32
Controls\TComboBoxEx
Description:
Steps:
[QC Short Description]
Painting problems ComboBoxEx on PageControl
1. Place a PageControl with two pages on a form. 2. Place a
ComboBoxEx on page 1 3. Add an item (best with a transparent
Image using ImageList) 4. Place a Label on page 2 (same position as
[QC Description]
the ComboBoxEx on page 1) 4. Start project 5. Select an item in
A ComboBoxEx placed in a PageControl is not properly painted when ComboBoxEx 6. Change to PageControl page 2 7. Change back to
changing the Page.
page 1 Result: The background of ComboBoxEx ist not properly
QC Entry 93545
painted. You can see the label from page 2. I attached a simple
sample project.
QC #:
Date Reported:
Area:
86069
7/8/2010
VCL\Touch
Controls\TTouchKeyboard
Description:
[QC Short Description]
Steps:
InternalToUnicode issue
[QC Description]
These lines were added to InternalToUnicode() (KeyboardTypes.pas)
in order to fix QC 77179, 77069, 76712:
// Fix painting on Windows XP.
if not(CheckWin32Version(6, 0)) and (TempStr <> '''') then
Result := TempStr[1]
else
This isn't quite right: (TempStr <> '''') should be (TempStr <> ''), it's
purpose is to avoid TempStr[1] causing an error. This is unlikely to
ever happen, but you never know.
I think I've suggested this code. I copied it from my RTL/VCL fixing
program, where it's a string literal, hence the double quotes. I
apologize ;-)
QC Entry 86069
QC #:
Date Reported:
Area:
47465
6/13/2007
Debugger
Description:
Steps:
[QC Short Description]
Debugger asserts when remote debugger stalls
I am investigating this to see if I can reproduce the issue -Angel
[QC Description]
When remote debugging, the remote service is failing (if not
debugged, the process just disappears) and this causes the IDE to
stop responding. I then close the remote debugger using the Exit
option, and the client IDE then gives an assert:
"Debugger assertion failure: "obj" in ..\win32src\rproxy.cpp at line 517.
Continue execution?"
The only option is OK, and the IDE disappears immediately after
clicking it.
It wouldn't be so bad if the remote PC details were remembered on
the initial attach.
QC Entry 47465
QC #:
Date Reported:
Area:
79333
11/8/2009
Debugger
Description:
Steps:
[QC Short Description]
Problem with compiled exe running from shared folder
a) Create the simplest project as possible: new application, compile
and run b) Start the project1.exe from a shared folder on another
computer c) Deactivate network (remove lan-cable, wlan ...) so that
the share is unreachable d) Close the application Try the same with
D2006 and everything is ok.
[QC Description]
When a client-application (compiled with D2010) is started from a
shared folder and the network-connection is lost there's no clean
shutdown - see below.
That happens even if the share folder is reachable again at the
moment of closing (for example: temporary dropouts in WLAN ...).
The problem:
Windows Vista
- the project1.exe will not be destroyed correctly
- it's closed, means no longer visible, but still visible in taskmanager
- after a few seconds it consumes 50% of cpu
- you have to kill it in taskmanager
Win XP
- you get a windows-problem warning on closing, but the process is
correctly
removed
It doesn't happen, when the same project is compiled with D2006.
I think you can reproduce it with a few steps.
QC Entry 79333
QC #:
Date Reported:
Area:
74949
6/16/2009
Debugger
Description:
Steps:
[QC Short Description]
Debug visualizers should be "recursive"
[QC Description]
The visualizer for TDateTime is a great idea. However, after trying it
on a local variable of TDateTime, the next thing I did was try a local
variable of type "array of TDateTime". I wasn't too surprised to see an
array of "crazy numbers".
It would be very nice to make replacer visualizers "recursive". In other
words, if we've said that TDateTime should be displayed as an actual
date/time (as opposed to a float), then this should apply to all
TDateTime values, even those in arrays, records, fields, etc.
QC Entry 74949
QC #:
Date Reported:
Area:
89366
11/1/2010
Debugger\Stepping
Description:
Steps:
[QC Short Description]
Stepping oddities with TDictionary
Steps #1: - save the following program and unit or the attachment open SvnTreeTest.dpr - make sure "Use debug .dcus" is disabled put a breakpoint on line 13 in SvnTreeTest.dpr ("D := TDictionary...") run - press repeatedly F7 and see what is happening expected: lines
order 1. SvnTreeTest.dpr line 14 2. SvnTreeTest.dpr line 15 3.
SvnTreeTest.dpr line 17 actual: 1. SvnTree.pas line 14 2.
SvnTree.pas line 14 3. SvnTree.pas line 14 4. SvnTree.pas line 14 5.
SvnTreeTest.dpr line 14 6. SvnTreeTest.dpr line 15 7. SvnTree.pas
line 14 8. SvnTree.pas line 14 9. SvnTree.pas line 14 10.
SvnTreeTest.dpr line 17 Steps #2: - open SvnTreeTest.dpr - put a
breakpoint on line 14 in SvnTree.pas ("begin" of "constructor
TCustomSvnTreeItem<T>.Create") - run - press repeatedly F9 till
execution is finished expected: debugger never stops in SvnTree.pas
actual: with "Use debug .dcus" disabled debugger stops 11 times in
SvnTree.pas with "Use debug .dcus" enabled debugger stops onces
in SvnTree.pas There error goes away in both cases when
commenting out "C: TCustomSvnTreeItem<TObject>". program
SvnTreeTest; {$APPTYPE CONSOLE} uses SvnTree,
Generics.Collections; var C: TCustomSvnTreeItem<TObject>; D:
TDictionary<string, string>; Bar: string; begin D := TDictionary<string,
string>.Create; try if D.TryGetValue('Foo', Bar) then; finally D.Free;
end; end. unit SvnTree; interface type TCustomSvnTreeItem<T> =
class(TObject) public constructor Create; end; implementation
constructor TCustomSvnTreeItem<T>.Create; begin inherited Create;
end; end.
[QC Description]
There are stepping oddities with TDictionary. This issue repeats
already with D2010, but not with D2009.
-> see steps
QC Entry 89366
QC #:
Date Reported:
Area:
88473
9/28/2010
Debugger\Breakpoints
Description:
Steps:
[QC Short Description]
Automated Incident Report
1. copy the sample program below
2. when breakpoint is hit, add data breakpoint for &p[0], and close the
data breakpoint dialog
3. in the breakpoint list window, select &p[0] data breakpoint, and
press Enter, this should bring you to edit dialog for this breakpoint
4. change the address to p+3
5. at this point it should prompt you for misaligned warning, hit cancel
[QC Description]
Access violation at address 2066415C in module
'dbkdebugide150.bpl'. Write of address 00000068.
I was updating a data breakpoint to a different address. A dialog
popped up warning about about it being misaligned and I canceled it
planning to set it again to the correct address. The execption dialog
popped up after I canceled the action.
QC Entry 88473
6. two bugs here:
a. make sure the current data breakpoint does not get deleted
b. make sure not AV
7. press F9, it should hit the data breakpoint
program Project9;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
i: integer;
p: PByte;
begin
System.GetMem(p, 100);
i := 0; // add line breakpoint here
p[0] := 1;
writeln('abc'); // press F9 should stop here....
p[0] := 2;
writeln('def');
p[3] := 3;
p[4] := 4;
try
foo2();
foo;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
QC #:
Date Reported:
Area:
87444
8/22/2010
Debugger\Evaluator\Delphi
Description:
Steps:
[QC Short Description]
Evaluate / Modify fails with pointer arithmetic
The description provides everything to reproduce the issue. Additional
example by USc: - create a new Delphi console app with the following
content - put a breakpoint on line 10 ("if IntPtr <> 0 then;") - in the
Watch List add a watch for "IntPtr = Integer(@Int)" expected: Watch
List shows "IntPtr = Integer(@Int) | True" actual: Watch List shows
"IntPtr = Integer(@Int) | False" Additional notes: - same problem
when using Longword, Cardinal, Pointer and Int32 - works with Int64
program Project49; {$APPTYPE CONSOLE} var Int, IntPtr: Integer;
begin Int := 123; IntPtr := Integer(@Int); if IntPtr <> 0 then; end.
[QC Description]
program Project1;
{$APPTYPE CONSOLE}
type
TRecord = record
f1: Integer;
f2: Double;
end;
var
rRec: TRecord;
begin
Writeln(Integer(@rRec.f2) - Integer(@rRec));
end.
Put breakpoint on line with Writeln, press Ctrl+F7, type there
Integer(@rRec.f2) - Integer(@rRec), press Enter. The result is invalid
= -1214224007. The Writeln output is correct. The same in Delphi
2010 works correctly.
QC Entry 87444
QC #:
Date Reported:
Area:
22101
12/8/2005
Debugger\Call Stack
Description:
[QC Short Description]
Win32 project with packages.Call stack incomplete for errors in vcl
[QC Description]
I create a simple win32 project with runtime packages options
checked.
I have a Form, a button and in button OnClick:
Steps:
Self.Controls[3].Top := 1;
A statement that will raise an exception.
At runtime the call stack is:
kernel32.RaiseException
TList.Get+$3c
and does not contain the location in my sources where the error
located.
It should have been:
kernel32.RaiseException
TList.Get+$3c
TForm1.Button1Click
The main reason i think is that debug info is stripped of from the vcl
runtime packages. The reason is obscure to me. The sources for vcl
are available but you cannot recompile these packages with debug
info as there are no dpk projects included.
This lack of debugger support makes applications based on runtime
packages be a real pain to debug. This is true since Delphi 2 and it
was supposed to be fixed in Delphi 2005.
Sometimes the projects are developed in such a way, so there is
impossible to be compiled without runtime packages and work. In that
cases, this missing functionality is a real Show Stopper, that made my
team look for thirdparty tools. These tools rely in TD32 info for getting
the full call stack in cases when the IDE debugger fails. Why is
Borland not implementing the same functionality?
QC Entry 22101
QC #:
Date Reported:
Area:
49059
7/15/2007
Debugger\Inspector
Description:
[QC Short Description]
Allow users to create their own Debug Inspectors for objects
[QC Description]
Allow Delphi users to add in their own debug inspectors and "register"
their debug inspectors into the delphi IDE for a given class or
interface. This would allow us to make much more intelligent
inspectors to show us the data contained in our classes in a much
more intelligent way while debugging.
For example, the one that really should ship with Delphi would be a
custom inspector for IXMLNode. Instead of showing us default
debugging information about IXMLNode, we could have a custom
inspector actually show us the data contained by IXMLNode.
Looking at the sample code below, we could have a break point on
the showmessage line and we could inspect variable lNode. Instead
of showing us this:
lNode | TXMLNode($A52690) as IXMLNodeAccess
the custom inspector would show us something similar to what
XMLSpy shows us where we could drill down through the XML DOM
and actually see the data contained in the lNode. See the attached
screen shots for an example of what this could look like.
Maybe for this example, Borland could actually get with the Altova
folks to take their XML Spy browser and fold it in as a custom
inspector.
This is just one example, the real purpose of this request is to allow
delphi users the ability to add in their own custom inspectors.
procedure TForm4.Button1Click(Sender: TObject);
Steps:
var
lNode: IXMLNode;
begin
XMLDocument1.Active := true;
lNode:=XMLDocument1.Node;
showmessage(lNode.xml);
end;
QC Entry 49059
QC #:
Date Reported:
Area:
97611
8/14/2011
Debugger\CPU
Description:
Steps:
[QC Short Description]
Entire CPU screen crashes
procedure TForm1.PaintBox1Paint(Sender: TObject); var T, K, X, A,
B, AA, BB : extended80; S : string; C : tColor; begin A := EncodeDate
( 2011, 7, 3 ) + EncodeTime (22,32,0,0) +3/24; B := EncodeDate (
2012, 11, 29 ) + EncodeTime (18,0,0,0 ) +4/24; AA := 318.6; BB :=
AA - 50; X := GetUtcTimeFromSystemClock; T := X * ( secsperday /
11 ); C := RGB ( round ( 128 + 127 * sin ( t ) ), round ( 128 + 127 * sin
( t + 2*pi/3 ) ), round ( 128 + 127 * sin ( t + 4*pi/3 ) ) ); /// this is the line
that crashes the Entire CPU X := AA + ( BB - AA ) * ( X - A ) / ( B - A
); K := X * 0.45359237; S := formatfloat ( '000.00000000', x
);//floattostr ( X ); { + #13 + floattostr ( K ) + #13 + datetimetostr (
GetUtcTimeFromSystemClock ) + #13 + #13 + floattostr (( BB - AA ) /
( B - A ) /secsperday) + #13 + #13 + floattostr (0.45359237*( BB - AA
) / ( B - A ) /secsperday);} if BM = nil then BM := tBitmap . Create; BM
. Width := PaintBox1 . Width; BM . Height := Paintbox1 . Height; with
Bm, canvas do begin brush . color := clblack; rectangle ( -1, -1,
width+1, height+1 ); font . color := C;//clLime; font . name :=
'Verdana'; font . size := width div 16; textout ( ( width - textwidth ( S )
)div 2, ( height - textheight(S) )div 2, S ); end; Paintbox1 . canvas .
draw ( 0, 0, bm ); end;
[QC Description]
Build the code, set breakpoint on first line.
open entire cpu
step through one line at a time
before you get to the end, the whole IDE crashes.
Even the built-in report thing crashed
QC Entry 97611
QC #:
Date Reported:
Area:
12810
5/14/2005
Debugger\CPU
Description:
Steps:
[QC Short Description]
Disassembly pane not updated on breakpoint
1) Close all open projects. Make sure the CPU window is closed.
2) Open the project.
3) Set a breakpoint on the only line of code in the Button1 event
handler.
4) Run the project.
5) Press the button.
6) Breakpoint taken.
7) Open the CPU window.
8) You should see the highlight on the proper line in the disassembly
pane.
9) Use your mouse wheel to scroll up until the line Main.cpp 17 is
visible.
10) Click on the Main.cpp tab to view the source code.
11) Continue the app.
12) Press the button to break again.
13) Click on the CPU tab.
14) The highlighted line is still Main.cpp 16 rather than the correct line
(Main.cpp 20).
[QC Description]
If you have the CPU window open before you take a breakpoint, the
disassembly pane is not automatically synced to the current EIP.
QC Entry 12810
QC #:
Date Reported:
Area:
40421
2/12/2007
Debugger\CPU
Description:
[QC Short Description]
Sometimes debugger switches from CPU view to source code if
source code file wasn't open.
Steps:
1. Open attached project. 2. Check that breakpoint exists on line
Cls.Test2(Nil, Nil); and there is no file opened except .dpr file. 3. Run
application. 4. Switch to CPU view. You will see something like this:
Project1.dpr.11: Cls.Test2(Nil, Nil); 004050D6 33C9 xor ecx,ecx
[QC Description]
004050D8 33D2 xor edx,edx 004050DA A1E8974000 mov
In some cases when you debug something in CPU view debugger
eax,[$004097e8] 004050DF 8B18 mov ebx,[eax] 004050E1 FF530C
switches to source code.
call dword ptr [ebx+$0c] 5. Press F7 5 times and after executing line
call dword ptr [ebx+$0c] IDE will open Unit1 and highlight line #15. If
Very often it happend on interfaces when execution point jumps to file Unit1 was open IDE will not switch to Unit1 and will stay in CPU mode
which is not opened in IDE.
and show something like this: 004040E5 83C0F4 add eax,-$0c
QC Entry 40421
004040E8 E9FF000000 jmp TSomeClass.Test2 and this behaviour is
correct.
QC #:
Date Reported:
Area:
81604
1/28/2010
Debugger\Debugger UI
Description:
Steps:
[QC Short Description]
The inspector for TStrings does not take StrictDelimiter into account
aStringList: TStringList; aStringList.Delimiter := ';';
aStringList.StrictDelimiter := true; aStringList.DelimitedText :=
'FIELD_ONE;FIELD_TWO ASC'; Now, aString.Count equals 2, ok.
[QC Description]
The inspector will show: [0] FIELD_ONE [1] FIELD_TWO [2] ASC
When there is a space in one of the string in the list, it will show up as Regards, /D
the next string.
Added by Sysop
<<<<<<<<<<<<<<
This issue is about 'TStrings Visualizer'.
>>>>>>>>>>>>>>
QC Entry 81604
QC #:
Date Reported:
Area:
88905
10/13/2010
AddOn\TChart
Description:
Steps:
[QC Short Description]
Dcc error file not found tee*.dfm
1. Create a new VCL Forms application. 2. Drop a TChart and a
TButton on the form 3. Add "uses TeeEdiGene;" to the
implementation. 4. In the button's onclick event handler, call:
[QC Description]
ChartPreview (Self, Chart1); 5. Compile and run project. Expected:
On a project I am converting from Delphi 2007 to the Delphi XE, after project compiles and runs. Actual result: linker fails with the 3
adressing all the regular unicode issues, compiling failed at the linker messages mentioned above.
stage reporting
[DCC Error] E1026 File not found: 'TeeBackImage.DFM'
[DCC Error] E1026 File not found: 'TeeEmbossEditor.DFM'
[DCC Error] E1026 File not found: 'TeeMouseCursor.DFM'
These files are indeed missing from the Lib directory.
I have managed to trace this into being caused by a print preview
function for a TChart I used. This calls the ChartPreview function from
the TeeEdiGene unit. This worked fine in Delphi 2007 (with TeeChart
7.11), but does no longer now. For us, this looked like a showstopper
for converting the project to XE.
Please either provide the missing files, or at least modify the
documentation to point to the workaround (see below).
QC Entry 88905
QC #:
Date Reported:
Area:
48030
6/25/2007
AddOn\TChart
Description:
Steps:
[QC Short Description]
TeeChart issue
Tested on build 16.0.4160.39608
- add functions:
procedure TForm1.FormCreate(Sender: TObject);
begin
DBChart1.OnGetAxisLabel := DoGetAxisLabel;
end;
[QC Description]
function DBChart1GetAxisLabel(Sender:TChartAxis;
Series:TChartSeries; ValueIndex: LongInt; Var LabelText: String)
issue in Delphi2007. The LabelText I got are weird/incorrect.
However, there is no problem in Delphi7. Both the source code are
same. As I know, the TeeChart version in Delphi7 is 4.04, but in
delphi 2007 is version 7.10. How can I get the labelText correctly?
thanks
QC Entry 48030
procedure TForm1.DoGetAxisLabel( Sender:TChartAxis;
Series:TChartSeries; ValueIndex:Integer; Var LabelText:String);
var X: TDateTime;
begin
if TryStrToDateTime(LabelText,X) then
if DateUtils.TimeOf(X) = 0
then LabelText := FormatDateTime('MMM.yyyy',X)
else LabelText := FormatDateTime('hh:nn',X);
end;
- run for Win64 platform
Expected: the labels are correct
Actual: the labels look incorrect, see attachments
Note: on Win32 labels are correct
QC #:
Date Reported:
Area:
88720
10/6/2010
AddOn\TChart
Description:
Steps:
[QC Short Description]
TChart Date rendering issue
Attachments doesn't seem to work for me. Here's the code. unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes,
Graphics, Controls, Forms, Dialogs, TeEngine, Series, StdCtrls,
[QC Description]
ExtCtrls, TeeProcs, Chart, TeeGDIPlus; type TForm1 = class(TForm)
If the TChart has a single TLineSeries with a dates and a values the Chart1: TChart; Button1: TButton; Series1: TLineSeries; Button2:
Chart component renders the dates on the horizontal axis nicely.
TButton; procedure Button1Click(Sender: TObject); procedure
If a second TLineSeries is added, the horizontal axis seems to do the AddRandomLineSeries; procedure FormCreate(Sender: TObject);
drawing twice, overlapping the previous dates. The date can't be red procedure Button2Click(Sender: TObject); private { Private
properly anymore.
declarations } public { Public declarations } end; var Form1: TForm1;
implementation {$R *.dfm} procedure
Delphi 2010 doesn't have this problem and is introduced in Delphi XE. TForm1.AddRandomLineSeries; var i:integer; s: TLineSeries; begin s
:= TLineSeries.Create(Chart1); s.Clear; for i:=0 to 199 do
QC Entry 88720
s.Add(Random(500), DateToStr(Now + i)); Chart1.AddSeries(s); end;
procedure TForm1.Button1Click(Sender: TObject); begin
Chart1.RemoveAllSeries; AddRandomLineSeries; end; procedure
TForm1.Button2Click(Sender: TObject); begin
Chart1.RemoveAllSeries; AddRandomLineSeries;
AddRandomLineSeries; end; procedure TForm1.FormCreate(Sender:
TObject); begin Randomize; end; end.
QC #:
Date Reported:
Area:
88100
9/15/2010
AddOn\TChart\TChart
Description:
Steps:
[QC Short Description]
TChart default series colours have changed from previous versions
Open D2010 or earlier.
Choose new VCL Forms app.
Add a TChart to the form.
Add 3 line series. Note the colours.
[QC Description]
TChart v2010.01.10814 Win32 as included in Delphi XE Pro.
Repeat using Delphi XE. Note the colour set is no longer the same.
Up to and including D2010, TChart default colours for added Series
were red, green, yellow, blue - the
TeeChart Classic set. From Delphi XE, the colours are now white,
yellow, orange, ... (the Mac OS set).
Interestingly, I can see these different named sets of colours from a
drop down when you add a series
to a TChart at design time. Making a different choice here changes
the chart colours at design time, but
not when the program runs.
(can also be reproduced programmatically).
------------------------------When adding a line series make sure that TeeChart is selected in the
drop down menu
The colors of the line series are different at runtime than design time
Please revert the default colours to the previous set or provide a
single property to set the TChart colour
set. Our customers have got very used the series being in particular
colours.
QC Entry 88100
QC #:
Date Reported:
Area:
87756
9/3/2010
AddOn\IntraWeb
Description:
[QC Short Description]
Chinese(big5/UTF-8) problem with RAD Studio/Delphi 2010 &
IntraWeb 10.0.23
[QC Description]
This report is related to #77696.
I'm now running IW 10.0.23 (upgraded from IW 10.0.17 which came
with RAD Studio 2010). The following scenario happened: At design
time I put a TIWLabel on the main form and gave it a caption: "????:"
- 4 Traditional Chinese characters plus a colon. However at run time it
came out to be: "???:" - 3 Traditional Chinese characters plus a colon
- i.e. 1 Traditional Chinese character missing. I've attached the code
sample which would reproduce the error. Would really appreciate it if
anyone could help!
Steps:
Added by Sysop
<<<<<<<<<<<
This issue seems to be same as RAID#278837.
InraWeb 10.0.23 has this bug...
We need to release update version of IntraWeb 10.
>>>>>>>>>>>
Added by Sysop
<<<<<<<<<<<
This issue also occurs with Japanese string, if a Unicode
character(WideChar/UTF-16) contains 0x20, 0x0D or 0x0A.
InraWeb 10.0.23 has this bug...
>>>>>>>>>>>
Best regards
QC Entry 87756
QC #:
Date Reported:
Area:
83879
4/15/2010
AddOn\RAVE
Description:
Steps:
[QC Short Description]
See the attached demo project. Compile the project with Delphi 2010
Rave AV when trying to print images using a TRvDataSetConnection and press the print button.
[QC Description]
When trying to print images (bitmaps) with rave 7.7 BE, the
application crashes when transferring the image data to the report
engine using a TRvDataSetConnection (the same error occurs when
using a TRvCustomConnection).
QC Entry 83879
QC #:
Date Reported:
Area:
70407
1/10/2009
AddOn\RAVE
Description:
Steps:
[QC Short Description]
Rave and Memo with/without RTF
1. Create TDataset with Memo/or WideMemo 2. Load valid RTF and
Plain-Text into dataset 3. Create a report and assign the data to
Datamemo component. 4. Run Report
[QC Description]
Display of Memo (assigned to TMemoField or TWideMemofield) with
RTF or Plaintext is wrong.
The text in Memofields contains any character or graphics like
rectangles at the end.
QC Entry 70407
QC #:
Date Reported:
Area:
75724
7/13/2009
AddOn\RAVE
Description:
Steps:
[QC Short Description]
D2009 with Rave 7.6.2 MemoLinesLeft Out of Memory/Infinite Loop
Error
See sample app and click the button.
[QC Description]
I am converting an application from Delphi 7 to Delphi 2009. My
application used Rave BEX 5.1.3. I am converting things over to the
bundled version 7.6.2.
Some reports are running into Out of Memory errors during calls to
TMemoBuf.MemoLinesLeft. The reports worked fine in Delphi 7 and
BEX 5.1.3.
I have attached a small sample app the replicates the problem.
QC Entry 75724
QC #:
Date Reported:
Area:
75368
6/29/2009
AddOn\RAVE
Description:
Steps:
[QC Short Description]
Problem with RvSystem.SystemPrinter.Copies
Added a RvSystem component to my form. Set the
RvSystem.SystemPrinter.Copies = 2 In my RvProject I set my Engine
property to point to the RvSystem that I added. Execute the RvProject
[QC Description]
I recently upgraded from Delphi 2006 with Rave 6.5 BE to RAD
Studio 2009 with Rave 7.5 BE.
I have upgraded one of my old applications to compile and run under
2009.
The problem I have is that some of my reports have to print duplicate
copies. The way I have done this is as follows:
Added a RvSystem component to my form.
Set the RvSystem.SystemPrinter.Copies = 2
In my RvProject I set my Engine property to point to the RvSystem
that I added.
This work fine in the older version.
In the new version it only prints 1 copy of the report.
Please could you help me ASAP?
QC Entry 75368
QC #:
Date Reported:
Area:
72710
4/3/2009
AddOn\RAVE
Description:
Steps:
[QC Short Description]
TRvRenderPreview - Memory Leak
1. Create a VCL form application. 2. Put the TRvRenderPreview
component on that form. 3. Set the ReportMemoryLeakOnShutdown
before the Application.Initialize; line 4. Run the applaction. 5. Close
the application. Result (Malfunction): --------------------------Unexpected Memory Leak --------------------------- An unexpected
memory leak has occurred. The unexpected small block leaks are: 21
- 28 bytes: TBrush x 1 29 - 36 bytes: TPen x 1, Unknown x 2 37 - 44
bytes: TFont x 1 61 - 68 bytes: TBitmap x 1 101 - 108 bytes:
TBitmapCanvas x 1 117 - 124 bytes: TBitmapImage x 1 149 - 156
bytes: Unknown x 1 --------------------------- OK ---------------------------
[QC Description]
When adding a Rave TRvRenderPreview component on an empty
form. Closing that form, means Freeing the components, results in a
memory leak.
QC Entry 72710
QC #:
Date Reported:
Area:
82093
2/12/2010
AddOn\RAVE
Description:
Steps:
[QC Short Description]
Exception occur when Rave Events are using.
Press Button1 in the attachment project.
See CalcText1_OnGetText in Project1.rav.
[QC Description]
Exception occur when StrToInt, IntToStr and so on are using in Rave ===
Events.
still reproducible on 16.0.4223.41907, rave build 100610
QC Entry 82093
- click the button and the report in Preview
Result:
Access violation at address 00407B04 in module 'Project1.exe'. Read
of address 00000025.
QC #:
Date Reported:
Area:
86474
7/21/2010
AddOn\RAVE
Description:
Steps:
[QC Short Description]
Replace Nevrona Rave Report with Fast Report
Rave and FastReports are included together in Pulsar
[QC Description]
Replace Rave Report with the more modern and actual Fast Report:
http://fast-report.com/en/products/report-generator-for-delphifastreport-4.html
QC Entry 86474
QC #:
Date Reported:
Area:
89645
11/13/2010
AddOn\AQTime
Description:
[QC Short Description]
Delphi XE hangs when loading AQtime7BDS8
[QC Description]
Platform Windows 7
Delphi XE (and RAD Studio XE) hangs when loading AQtime7BDS8.
This problem has appeared recently, when first installed it worked ok.
Reinstalled RAD Studio but that didn't resolve the problem.
Steps:
The copy on my laptop continues to work without problem.
The only significant change I've made to my system is the installation
of Microsoft Office 2010. (My laptop stills run Microsoft Office 2007).
QC Entry 89645
QC #:
Date Reported:
Area:
73179
4/21/2009
Internet
Description:
Steps:
[QC Short Description]
HTMLEncode in HTTPApp.pas does not work
Try to encode a string containing a '&' for example.
[QC Description]
The HTMLEncode(...) function in HttpApp.pas fails in Delphi 2009
because it does not handle unicode strings properly. #0#0 characters
are inserted in the encoding string and the result is erronous.
Added by Sysop
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Here is the function I created which solves the problem. I call it
HTMLEncode also,
so the unit it's in must be last in your uses clause to use this version.
Or, you could just put it in the unit that needs it.
QC Entry 73179
Added by Sysop
<<<<<<<<<<
From a comment of QC
--Not fixed in Delphi 2010.
-->>>>>>>>>>
function HTMLEncode( const Input: String ): String;
var
I: Integer;
Output: String;
begin
Output := Input;
I := 1;
while I <= Length( Output ) do
if Output[ I ] = '"' then
begin
Delete( Output, I, 1 );
Insert( '"', Output, I );
Inc( I, 5 );
end
else if Output[ I ] = '<' then
begin
Delete( Output, I, 1 );
Insert( '<', Output, I );
Inc( I, 4 );
end
else if Output[ I ] = '>' then
begin
Delete( Output, I, 1 );
Insert( '>', Output, I );
Inc( I, 4 );
end
else if Output[ I ] = '&' then
begin
Insert( 'amp;', Output, I + 1 );
Inc( I, 4 );
end
else
Inc( I );
Result := Output;
end;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
QC #:
Date Reported:
Area:
87435
8/22/2010
Internet
Description:
Steps:
[QC Short Description]
HTTPApp.HTMLDecode() does not support surrogate pair.
uses
..., HTTPApp;
[QC Description]
HTTPApp.HTMLDecode() does not support surrogate pair.
Numeric character reference is not correctly converted with surrogate
pair.
QC Entry 87435
var
Src, Dst: String;
begin
Src := '𠮷'; // U+20BB7 (#$D842 #$DFB7)
Dst := HTTPApp.HTMLDecode(Src);
ShowMessage(Format('%s #$%x #$%x', [Src, Word(Dst[1]),
Word(Dst[2])]));
end;
EXP:
𠮷 #$D842 #$DFB7
ACT:
𠮷 #$BB7 #$0
Added by Sysop
<<<<<<<<<
Another example,
str := HTTPApp.HTMLDecode('𦿶');
fails to convert the entity to support surrogate pair(16bit x2).
>>>>>>>>>
QC #:
Date Reported:
Area:
94495
5/30/2011
Compatibility\Previous -> Current
Description:
Steps:
[QC Short Description]
Strings in Variants are not COM-compatible.
Execute the following code: program Project3; {$APPTYPE
CONSOLE} uses SysUtils, ComObj; var WS, V: Variant; begin
CoInitializeEx(nil,0); try WS := CreateOleObject('WScript.Shell');
WS.popup('!!!'); V := '!!!'; WS.popup(V); except on E: Exception do
Writeln(E.ClassName, ': ', E.Message); end; end. The 1st popup
works fine, the 2nd raises an exception. If we change (V:='!!!') to
(V:=ansistring('!!!')), or change V's type to OleVariant, the code works.
[QC Description]
Let us have a variable V: Variant, V := 'string', and have a variable
VObj: Variant containing a COM object.
Now if we try to invoke VObj.SomeMethod(V), we get an exception
telling us that V contains a non OLE-compatible value (to be specific,
it's a varUString value).
Note that with varString in V, such an invocation works well, just like
in Delphi 2007. So this ruins "string"-based code when migrating in
Delphi XE :(
I have a suspicion that this could be related to parsing varStrArg
parameters in ComObj.DispatchInvoke() and in Variants.pas, as there
is no additional processing for varUString there. But it's just an idea.
QC Entry 94495
QC #:
Date Reported:
Area:
5975
9/17/2003
ActiveX
Description:
Steps:
[QC Short Description]
Indexed properties not handled correct in component wrapper
- Create the following property for an interface:
[QC Description]
When creating a property that has an additional parameter as index,
the component wrapper generates wrong code to set the property.
(ok, it generates a warning too)
QC Entry 5975
HRESULT _stdcall Testprop([in] long Index1,
[in] long Index2, [out, retval] BSTR * Value );
[
propput,
id(0x000000CA)
]
HRESULT _stdcall Testprop([in] long Index1,
[in] long Index2,
[in] BSTR Value );
- create a new project and import the type lib
into this project, choose the option to generate
a component wrapper
the generated code for this property looks
like this:
procedure TTestServerProperties.Set_Testprop(Index1: Integer;
Index2: Integer;
const Value: WideString);
{ Warning: The property Testprop has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Testprop := Value;
end;
This code should be:
InterfaceVariant := DefaultInterface;
InterfaceVariant.Testprop[Index1, Index2] := Value;
-----------------------------------------------------------------------------------------------------------------The problem also occurs in the case of one index and a value:
Property definition:
[propget, id(0x00000065)]
HRESULT _stdcall TestProp([in] long Index1, [out, retval] BSTR*
Value);
[propput, id(0x00000065)]
HRESULT _stdcall TestProp([in] long Index1, [in] BSTR Value);
Generated code :
function TPropTest.Set_TestProp(Index1: Integer; const Value:
WideString): HResult;
{ Warning: The property TestProp has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. } var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.TestProp := Value;
Result := S_OK;
end;
QC #:
Date Reported:
Area:
4404
5/13/2003
ActiveX
Description:
Steps:
[QC Short Description]
Wrong imports of some OleLoadPicture functions
- Create a VCL Form App.
- Add ActiveX to the 'uses' clause
- Add a Button and in the Click event add the following code:
[QC Description]
There are a bunch of imports declared in ActiveX, which are
obviously wrong. Although the MS Platform SDK documents it the
same way, the following functions are NOT exported from the
OLEPRO32.DLL:
OleLoadPictureEx
OleLoadPictureFile
OleLoadPictureFileEx
OleLoadPicturePath
OleSavePicture
Instead, they are exported from OLEAUT32.DLL, as you can easily
verify with depends.exe.
JensG
QC Entry 4404
procedure TestOleFuncs(ACall: Boolean);
var
op: TOCPFIParams;
c: Cardinal;
fd: tagFONTDESC;
pd: tagPICTDESC;
v: OleVariant;
id: IDispatch;
p: Pointer;
begin
if ACall then
begin
OleCreatePropertyFrame(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
OleCreatePropertyFrameIndirect(op);
OleTranslateColor(0, 0, c);
OleCreateFontIndirect(fd, GUID_NULL, c);
OleCreatePictureIndirect(pd, GUID_NULL, True, c);
OleLoadPicture(nil, 0, True, GUID_NULL, c);
OleLoadPicturePath(0, nil, 0, 0, GUID_NULL, p);
OleLoadPictureFile(v, id);
OleSavePictureFile(id, nil);
end;
end;
procedure TForm7.Button3Click(Sender: TObject);
begin
TestOleFuncs(False);
end;
- Build and Run
exp: Can successfully run the application.
act: Errors at runtime about being unable to find certain entry-points
in olepro32.dll
QC #:
Date Reported:
Area:
61255
4/22/2008
ActiveX
Description:
Steps:
[QC Short Description]
Import Type Library generated code corrupts EmptyParam
How to check that EmptyParam is changed: 1. Start Delphi 2007. 2.
Create a new application "File->New->VCL Forms Application Delphi for Win32". 3. Drop a TWebBrowser on the form in Unit1. 4.
[QC Description]
Add an OnCreate-event to the form that initializes the web-browser,
Delphi code generated when importing type libraries with optional out e.g.: procedure TForm1.FormCreate(Sender: TObject); begin
parameters
WebBrowser1.Navigate( 'http://www.google.com' ); end; 5. Add a
contains serious errors that corrupts the global EmptyParam, which in button and in it's OnClick-event put the following: procedure
turn can
TForm1.Button1Click(Sender: TObject); begin if not
cause strange and unpredictable errors when it is used e.g. in ADO
VarIsEmptyParam(Variants.EmptyParam) then
database
ShowMessage('EmptyParam initial check failed!');
connections.
WebBrowser1.ExecWB(OLECMDID_COPY, 0); if not
VarIsEmptyParam(Variants.EmptyParam) then
In TWebBrowser these three ExecWB procedures are defined (can
ShowMessage('EmptyParam changed by ExecWB!'); end; 6. Run the
be autoprogram and wait for the web page to load. 7. Press the button.
generated by importing Microsoft Internet Controls):
Expected: Code executed without any message shown. Experienced:
The message "EmptyParam changed by ExecWB!" is shown, i.e. the
procedure ExecWB(cmdID: OLECMDID; cmdexecopt:
EmptyParam is no longer empty!. How to generate the illegal type
OLECMDEXECOPT); overload;
library code: 1. Start Delphi 2007 2. Select the menu item
procedure ExecWB(cmdID: OLECMDID; cmdexecopt:
Component->Import Component... 3. On the first page ("Type of
OLECMDEXECOPT; var pvaIn:
Component") of the "Import Component" window choose "Import
OleVariant); overload;
Type Library" and press Next. 4. On the "Registered Type Libraries"
procedure ExecWB(cmdID: OLECMDID; cmdexecopt:
page select the type library containing Microsoft Internet Controls and
OLECMDEXECOPT; var pvaIn:
click Next. On my 64-bit Vista with IE7 it's named "Microsoft Browser
OleVariant; var pvaOut: OleVariant); overload;
Helpers" and found in the file C:\Windows\SysWOW64\ieframe.dll,
but if you have an older IE-installed it might be in SHDocVw.dll. 5.
The implementation of the first one looks like this:
Click Finish to genereate the unit SHDocVw_TLB. 6. Locate the three
implementations for TCppWebBrowser.ExecWB: procedure
procedure TWebBrowser.ExecWB(cmdID: OLECMDID; cmdexecopt: TCppWebBrowser.ExecWB(cmdID: OLECMDID; cmdexecopt:
OLECMDEXECOPT);
OLECMDEXECOPT); procedure TCppWebBrowser.ExecWB(cmdID:
begin
OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn:
DefaultInterface.ExecWB(cmdID, cmdexecopt, EmptyParam,
OleVariant); procedure TCppWebBrowser.ExecWB(cmdID:
EmptyParam);
OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn:
end;
OleVariant; var pvaOut: OleVariant); Examine the one taking only two
parameters: procedure TCppWebBrowser.ExecWB(cmdID:
The flaw is that EmptyParam is passed directly as pvaOut. When the OLECMDID; cmdexecopt: OLECMDEXECOPT); begin
call returns,
DefaultInterface.ExecWB(cmdID, cmdexecopt, EmptyParam,
EmptyParam no longer has the special value it was initialized to and EmptyParam); end; The procedure calls DefaultInterface.ExecWB
therefore no
and directly sends the global EmptyParam as parameters for the two
longer is empty.
extra parameters. These are however var- parameters (one is named
pvaIn, the other ovaOut), which means that value of EmptyParam
In our case the changed EmptyParam caused a column to be
might be (and in reality also is) changed, which causes serious
updated in the DB to
problems in other code using COM.
NULL although a real value was given as a parameter, when using
ADO. Other
queries failed with strange errors of mismatching types etc.
At least any parameter defined as an out (or var) parameter should
get a local
variable in the function that is initialized to EmptyParam before it's
passed on.
Another peculiarity is that there are two EmptyParam declared. One
in Variants.pas
and one in OleCtrl.pas. The one in OleCltr.pas is assigned from the
Variants.pas
version during initialization, but thereafter lives it's own life.
TWebBrowser uses the
EmptyParam defined in Variants.pas.
QC Entry 61255
QC #:
Date Reported:
Area:
73326
4/24/2009
Description:
ActiveX
Steps:
[QC Short Description]
Registered Type Libraries viewer usability improvements
[QC Description]
A few usability improvements could make the Registered Type
Libraries viewer much more useful:
- Context menu entries "Copy filename" and "Copy GUID" (and, of
course, "Unregister")
- On double-click, open the selected type library in the TLB viewer
(i.e. do what happens when the DLL or TLB file is dragged to the IDE)
QC Entry 73326
QC #:
Date Reported:
Area:
2670
10/16/2002
ActiveX\Framework
Description:
Steps:
TAutoIntfObject.InterfaceSupportsErrorInfo compares the passed
GUID against DispIID which is read-only, private and NEVER
initialized by TAutoIntfObject. As such InterfaceSupportsErrorInfo
always returns False which prevents D6 from returning IErrorInfo
object back to VC client.
this is from the QC "workaround" page:
As a workaround you must create a complete copy of the
TAutoIntfObject class because the FDispIID variable is declare as
private. Copy the TAutoIntfObject class declaration and all of the
implementing code form ComObj.pas, giving your version of the class
an appropriate name. The code below came from D6 Update #2. You
should make your copy from your own comobj.pas.
This existed in D5 and exists in D7 as well.
QC Entry 2670
In the constructor add the line:
FDispIID := DispIntf;
TSKAutoIntfObject = class(TInterfacedObject, IDispatch,
ISupportErrorInfo)
private
FDispTypeInfo: ITypeInfo;
FDispIntfEntry: PInterfaceEntry;
FDispIID: TGUID;
protected
{ IDispatch }
function GetIDsOfNames(const IID: TGUID; Names: Pointer;
NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall;
function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo):
HResult; stdcall;
function GetTypeInfoCount(out Count: Integer): HResult; stdcall;
function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer):
HResult; stdcall;
{ ISupportErrorInfo }
function InterfaceSupportsErrorInfo(const iid: TIID): HResult; stdcall;
public
constructor Create(const TypeLib: ITypeLib; const DispIntf: TGUID);
{$IFDEF MSWINDOWS}
function SafeCallException(ExceptObject: TObject;
ExceptAddr: Pointer): HResult; override;
{$ENDIF}
property DispIntfEntry: PInterfaceEntry read FDispIntfEntry;
property DispTypeInfo: ITypeInfo read FDispTypeInfo;
property DispIID: TGUID read FDispIID;
end;
{ TSKAutoIntfObject }
constructor TSKAutoIntfObject.Create(const TypeLib: ITypeLib;
const DispIntf: TGUID);
begin
inherited Create;
OleCheck(TypeLib.GetTypeInfoOfGuid(DispIntf, FDispTypeInfo));
FDispIntfEntry := GetInterfaceEntry(DispIntf);
FDispIID := DispIntf; // Fix for QC bug # 2670
end;
QC #:
Date Reported:
Area:
45088
4/26/2007
ActiveX\Framework
Description:
Steps:
[QC Short Description]
TOleControl incorrectly calculates position rectangle, and it's
descendants may become invisible
1. Create new VCL application, drop a TWebBrowser component on
a form and position it so that it's Left > Width, or Top > Height (or
both). Move it to the form's right bottom corner, for instance. 2. Now
resize TWebBrowser object - decrease it's width or height a little, with
mouse or from Object Inspector, doesn't matter. It disappears from
the screen! Even when you select it explicitly from Object Browser,
you can't see the control anymore.
[QC Description]
Now that's a good bug...
TOleControl.SetBounds method incorrectly calculates rectangle for
passing it as a parameter to SetObjectRects method of it's ActiveX
control IOleInplaceObject interface. This is the code from
OleCtrls.pas:
if FOleInplaceObject <> nil then
begin
LRect := Rect(Left, Top, AWidth, AHeight);
FOleInplaceObject.SetObjectRects(LRect, LRect);
end;
But Rect function expects it's two last parameters to be Right and
Bottom, not Width and Height! Those, LRect is calculated totally
incorrectly. As long as resulting LRect is not empty, control resizes
and positions correctly anyway, because in TOleControl.SetBounds
it's bounds are corrected later by a call to inherited
TWinControl.SetBounds. But if Left >= AWidth, or Top >= AHeight,
then resulting LRect is treated as empty, and SetObjectRects can
make control's window invisible (at least this is what Web Browser
control does), and this is not corrected already. The control
disappears from the screen.
This problem affects both design and run time.
I've found this bug when using TWebBrowser, but it should affect
other descendants of TOleControl, too. In Delphi 7, there is no such
problem, because there TOleControl.SetBounds didn't contain a call
to IOleInplaceObject.SetObjectRects at all.
Also, note that in current OleCtrls.pas code, bounds parameters
passed to Rect function are a mixture of old ones - Left, Top, and new
ones - AWidth, AHeight. This can be a bug, too, yet I'm not sure.
Even if the code is corrected (by, say, replacing a call to Rect function
with similar call to Bounds function), it still will produce incorrect
bounds rectangle when we both resize and move control in one call to
SetBounds. So I would also replace Left and Top with ALeft and
ATop.
QC Entry 45088
QC #:
Date Reported:
Area:
29179
5/17/2006
ActiveX\Framework
Description:
Steps:
[QC Short Description]
Incorrect import of CoGetObject
The import declaration of CoGetObject is wrong. In the original
header files, the first parameter szName is a LPCWSTR, which
translates into PWideChar, not PWideString. WORKAROUND: Use
the following import instead of the one in unit ActiveX: function
CoGetObject( pszName: PWideChar; pBindOptions: PBindOpts;
const iid: TIID; ppv: Pointer): HResult; stdcall; external 'ole32.dll'
name 'CoGetObject';
[QC Description]
SYMPTOM:
the usage of the CoGetObject function fails in all cases with
MK_E_SYNTAX, although the syntax seems to be correct.
CAUSE:
The import declaration of CoGetObject is wrong. In the original
header files, the first parameter szName is a LPCWSTR, which
translates into PWideChar, not PWideString.
WORKAROUND:
Use the following import instead of the one in unit ActiveX:
function CoGetObject( pszName: PWideChar; pBindOptions:
PBindOpts;
const iid: TIID; ppv: Pointer): HResult; stdcall;
external 'ole32.dll' name 'CoGetObject';
QC Entry 29179
QC #:
Date Reported:
Area:
69057
11/18/2008
ActiveX\Framework\Variants
Description:
Steps:
[QC Short Description]
ComObj unit doesn't support varUString
[QC Description]
The ComObj unit has two references to the varString type (converting
AnsiString to WideString). However, it does not have *any*
references to varUString (for converting UnicodeString to
WideString). Thus, when attempting to use a dispatch interface, one
must explicitly cast string/UnicodeString arguments to WideString (or
to OleVariant) because ComObj won't do it for you. Clearly, it should.
QC Entry 69057
QC #:
Date Reported:
Area:
86712
7/29/2010
ActiveX\Framework\Variants\Varian
t
Description:
[QC Short Description]
UnicodeString always passed to _DispInvoke() by value
[QC Description]
Look at the codegen for an exemplary late-binding call like this one:
// ----var
V: Variant;
S: String;
W: WideString;
begin
V.Connect (S, W);
end;
// ----Delphi 2006:
// ----Unit1.pas.32: V.Connect (S, W);
0046FB51 8D45F8 lea eax,[ebp-$08]
0046FB54 50 push eax
0046FB55 8D45FC lea eax,[ebp-$04]
0046FB58 50 push eax
0046FB59 68A0FB4600 push $0046fba0
0046FB5E 8D45E8 lea eax,[ebp-$18]
0046FB61 50 push eax
0046FB62 6A00 push $00
0046FB64 E86F10FAFF call @DispInvoke
0046FB69 83C414 add esp,$14
// ----Delphi 2010:
// ----Unit2.pas.32: V.Connect (S, W);
004A3C7E 8D45F8 lea eax,[ebp-$08]
004A3C81 50 push eax
004A3C82 8D45E4 lea eax,[ebp-$1c]
004A3C85 8B55FC mov edx,[ebp-$04]
004A3C88 E8DB2DF6FF call @WStrFromUStr
004A3C8D 8B45E4 mov eax,[ebp-$1c]
004A3C90 50 push eax
Steps:
004A3C91 68E03C4A00 push $004a3ce0
004A3C96 8D45E8 lea eax,[ebp-$18]
004A3C99 50 push eax
004A3C9A 6A00 push $00
004A3C9C E8FB73F7FF call @DispInvoke
004A3CA1 83C414 add esp,$14
// -----
In Delphi 2006, the argument types passed to _DispInvoke()
(TCallDesc.ArgTypes[]) are "varStrArg or $80, varOleStr or $80" or
"$C8, $88"; the $80 indicates "by reference", and varStrArg is a
special string type defined in ComObj.pas. ComObj.DispatchInvoke()
handles varStrArg arguments specially in that it silently converts them
back and forth.
In Delphi 2010, the argument types are "varOleStr, varOleStr or $80";
as you can see in the disassembly the UnicodeString is passed by
value. There's neither a special flag nor special handling for
UnicodeString types in ComObj.
This could be fixed by adding a new special string type flag for
UnicodeString, handling it in ComObj.pas and adjusting the compiler
codegen a bit.
QC Entry 86712
QC #:
Date Reported:
Area:
52398
9/22/2007
ActiveX\IDE\Import ActiveX
Control/Type Library
Description:
Steps:
[QC Short Description]
On Vista Microsoft Script Control ActiveX component cannot be
imported
0. Windows Vista
1. Select Component/Import Component
[QC Description]
2. Select Import ActiveX Control as the component type
If you try to import this component, it wll result in an Error loading type
library/DLL
3. Select Microsoft Script Control 1.0
This also happens under Delphi 7.
QC Entry 52398
4. Click Next
This will result in Error loading type library/DLL.
[cbf: for this ocx (only) the FileName in the import list is wrapped in
double-quotes
(see attached .bmp). If I "Add" the ocx it is not wrapped in doublequotes and there
is no load error when importing]
QC #:
Date Reported:
Area:
88763
10/7/2010
ActiveX\IDE\Wizards\COM Object
Description:
Steps:
[QC Short Description]
The COM Object Wizard crashes
I went to
File > New > Other...
[QC Description]
Access violation at address 5003A118 in module 'rtl150.bpl'. Read of
address D11011AE.
and select
Delphi Projects > ActiveX > COM Object
The COM Object Wizard crashes when clicking OK if I have opted to
create a COM object that implements an existing Interface.
Added by Sysop
<<<<<<<<<<<
Please see comment of QC report for more details.
And, this issue is related to QC#87322(InternalTracking#280792).
>>>>>>>>>>>
QC Entry 88763
(Note that I did have a saved, empty ActiveX library that I was
intending to add the COM object to).
I filled out the COM Object Wizard, but I clicked the ellipses to find
another interface to implement. When the search finished, I typed in
the Search bar the first part of the interface I wanted to find. I found it,
clicked OK, and it brought me back to the COM Object Wizard.
Satifisfied with my choices,
I clicked OK and got this error.
I have repeated this process two other times with the same result,
selecting different interfaces each time.
QC #:
Date Reported:
Area:
72637
4/1/2009
ActiveX\Type Library Editor
Description:
Steps:
[QC Short Description]
SafeCall function mapping does not work
1. Go to Tools->Options->Environment Options->Delphi Options>Type Library and set Set SafeCallfunction mapping to "All v-table
interfaces" 2. Restart the IDE 3. Create new Delphi project "ActiveX
Library" 4. Create new interface IUnknown 5. Create new method. 6.
Save using the default names. 6. Look at the generated
"Project1_tlb.pas" file
[QC Description]
When upgrading a project from Delphi 2007 to Delphi 2009 the
generated pas file for the type library does not seem to follow the
safecall calling convension. The previous version of Delphi used to
generate procedures with safecall and this version generates
functions with result of type HResult; stdcall;.
SafeCall function mapping is set to "All V-table interfaces" and I've
restarted the project(and the Delphi application(IDE)).
To generate the safecall code It takes some indeterminate sequence
like this: change the option to somehing other than "All V-table
interfaces". Restart the IDE. Open Project. Generate _tlb.pas file.
Close project. Change option to "All V-table interfaces". Restart Ide.
Start project. Generate "_tlb.pas" file.
QC Entry 72637
QC #:
Date Reported:
Area:
7725
3/25/2004
ActiveX\Type Library Editor
Description:
Steps:
[QC Short Description]
Type library editor does not accept optional parameters in properties
The Steps to reproduce are as follows.
1) Create a new Type Library
[QC Description]
For example this is from the Microsoft Web Components Type Library 2) Add an Interface
(similar to the Excel one) for the Interface "Range"
3) Add a Read/Write Property of any type
function _Default(optionalin Row, Column: OleVariant): OleVariant
[propget, dispid $00000000, helpcontext $06006001']; safecall;
4) Add two parameters to the property of type OleVariant
procedure _Default(optionalin Row, Column: OleVariant; var:
OleVariant) [propput, dispid $00000000, helpcontext $06006001'];
5) Set the modifier of these two parameters to optionalin
safecall;
6) Try to save the type library and the error message about "Invalid
The Type Library editor complains about I"Invalid Flag Combination", Modifiers" flashes at the StatusBar of the Type Library Editor
whilst this is valid. At worst the Editor should ignore but preserve the
flags. These flags make it possible to write in VBA:
Set R = Range("A1")
R=5
Also if you remove the parameter flags the Editor, accepts the
definition, but does recognise the property as "default", despite the
dispid being 0. Is this a separate bug??
QC Entry 7725
QC #:
Date Reported:
Area:
69078
11/18/2008
ActiveX\Type Library Editor
Description:
Steps:
[QC Short Description]
Type Library Auto Expand
1. Create a new ActiveX Object (Automation Object is fine)
2. Add some methods to the interface
[QC Description]
Can this be turned off?
I have 50 ActiveForms in my ActiveX Library and finding an interface
is extremely hard
QC Entry 69078
NOTE: THE TLE Automatically expands (Opens) all nodes of the
Tree. This should be customizable.
QC #:
Date Reported:
Area:
87502
8/24/2010
ActiveX\Type Library Editor
Description:
Steps:
[QC Short Description]
safecall options missing
[QC Description]
Tools/Options
Delphi Options/Type Library
The options to control the generation of safecall vs. stdcall in the
_tlb.pas have been removed.
This is to control the equivalent of the -pT+ command-line option of
gentlb.exe
QC Entry 87502
QC #:
Date Reported:
Area:
88995
10/15/2010
ActiveX\Type Library Editor
Description:
[QC Short Description]
SafeCall function mapping not honored
[QC Description]
This issue addresses QC reports 68286 and 72637. Both have been
closed, when in reality they have not been fixed. This is now version
XE (2011). The last time this really worked was Delphi 2007. COM
programmers have been getting headaches with Delphi 2009, 2010,
and XE. That's a lot of versions for this functionality to not work when
it actually used to. Also, the workarounds suggested in those QC
reports don't work for me.
In Tools > Options > Environment Options > Delphi Options > Type
Library, there is a "SafeCall function mapping" group box. There are
three values: All v-table interfaces, Only dual interfaces, and Do not
map. The point behind the "All v-table interfaces" options is explained
here:
Objects in COM implement Interfaces. Those interfaces can declare
methods (procedures which don't return anything), functions (which
return COM types or other interfaces), and properties (which allow
you to get/set COM types or other interfaces). Ideally, when we
program with COM objects and interfaces in Delphi, we want the code
to look familiar. Therefore, if we set a property on an interface, we
expect the property to be on the left side of an assignment operator (
:= ). Likewise, if we call an interface function, we have the result of
that function being assigned on the left side of an assignment
operator. If we want the value of a property, then we just use that
property's name in code. That is the purpose of the safecall option
above. It declares all members of object interfaces with the safecall
function and those members can be used how we expect them with
normal Delphi syntax.
But Delphi 2009, 2010, and XE seem to ignore the setting. If you
import a type library with using Delphi 2007 or earlier (not 8), and that
type library declares an IEnvelope interface, it will declare a
Get_Width function that returns a Double, a Set_Width procedure that
takes a Double, and a Width property that you can get or set with a
Double.
But these versions of Delphi don't generate _TLB files like that. They
will import the same interface with a Get_Width function with an OUT
parameter of type Double, and the function itself returns an
HRESULT. The Set_Width method is ALSO declared as a function
that takes a Double and returns an HRESULT. And the Width
property itself, is nowhere to be found. Can you see the difference in
resulting coding styles?
Steps:
With SafeCall mapping successfully used in Delphi:
pEnvelope.Width := pEnvelope.Width * 2
Without SafeCall mapping successfully used in Delphi:
var
dWidth: Double;
begin
pEnvelope.Get_Width( dWidth );
pEnvelope.Set_Width( dWidth * 2 );
Now, this issue can be overcome somewhat by using the type library
importer (tlibimp) with the -Pt switch set to +. But the Type Library
Editor doesn't honor this setting. If you create a new object (or like
me, load one that was working in 2007) and you Refresh or create
new objects that implement interfaces, then the resulting methods in
your object are Get_ and Set_ functions that return HRESULTS,
despite the setting in the Tools > Options dialog. And this is just bad. I
don't like it, and I'll keep using Delphi 2007 for my COM development
until this gets good and fixed! Whether or not the QCs on this matter
are closed or not, I'll use XE for COM when it's actually fixed. If
Embarcadero is intentionally trying to throw me on .NET bandwagon,
it won't work.
Signed,
Disappointed Delphi fan
"Roj"
So many other things are great about Delphi that I wouldn't switch.
But to break something that worked before just makes me whine.
Notice that it stopped breaking in the very version of Delphi that
introduced the .ridl format. I sincerely don't know if that's a
coincidence.
QC Entry 88995
QC #:
Date Reported:
Area:
87322
8/17/2010
ActiveX\Type Library Editor\Uses
page
Description:
Steps:
[QC Short Description]
Type Library Editor cannot display type libs registered with hex (nondigit) version number
This type lib will not be displayed in the TLB Editor Uses list:
[HKEY_CLASSES_ROOT\TypeLib\{40499F24-596F-45D2-ACE1A251E2990017}\a.0\0\win32] @="C:\\Program
Files\\ArcGIS\\Desktop10.0\\com\\esriArcMapUI.olb" Add this key,
however, and it will display fine:
[HKEY_CLASSES_ROOT\TypeLib\{40499F24-596F-45D2-ACE1A251E2990017}\1.0\0\win32] @="C:\\Program
Files\\ArcGIS\\Desktop10.0\\com\\esriArcMapUI.olb"
[QC Description]
Occurs in at least 3 versions of Delphi - tested in D6, D2006, and
D2010
The ESRI ArcGIS 10 type libs are registered in the registry with
version number a.0
The TLB Editor Uses page will not display these type libs, unless you
add/change the version number key in the registry
to 1.0 (or some other numeric value).
The Import Type Library wizard, in contrast, lists these TLBs with no
problem.
The TLB Editor needs to recognise a.0 as a valid version number.
QC Entry 87322
QC #:
Date Reported:
Area:
87292
8/16/2010
Midas\TClientDataSet
Description:
Steps:
[QC Short Description]
Aggregate Returns Summing Errors
TDBXFulcrumBugsSuite.Native.Db.Test.exe -s:TestRaid_279838
-OR-
[QC Description]
Using an aggreate in a TClientDataSet at times returns an error for
Since this appears to be a dynamic problem see attached example.
summed values, in my case did not check other aggregates.
For example in a cds with 4 values, each value represents an Index,
the sum of a field will return a sum of 2 index entries.
The aggregate appears to not always follow the Index. Hence some
index values appear to be linked, however not all.
If you Filter the dataset on the Index, it will return the correct value.
If turn off the aggregates, switch the index, restore the index then set
the aggregates to active, it will then (from initial study) return the
correct value.
If you close and the open the CDS, you get the correct value.
This appears to be a dynamic problem, were the index used by the
aggregate does not follow the index used for selecting and sorting the
data
QC Entry 87292
1)Build and run example then
2)Click Start and 8 records will be processed, each entery has 2
records
3) Examine the results
The upper grid is hooked to the data in a second CDS via a provider
and yields the correct results
The lower grid is hooked to the main CDS notice that the AggFT_Amt
does not match FT_Amt of all entries and AggAdd doesn't match
LFMJ_Added.
4) If you press Reset check 'Reset Index After Post' you will get the
correct results. The Reset Index does
1) Turn Off aggregates
2) Switch Index
3) Restore Index
4) Turn On Aggregates
I also found will building this, the cross linked values have other
triggers
if you uncheck 'Post Alternate Amount' this will not fail
If you check 'Post Secondary Values' the cross linking is different.
QC #:
Date Reported:
Area:
88012
9/13/2010
Midas\TClientDataSet
Description:
Steps:
[QC Short Description]
Assignment to XMLData results in Buffer Overflow
Run the following program. program midasBug; uses Classes, Forms,
DB, DBClient, midaslib; var cds: TClientDataSet; s: string; begin
Application.Initialize; cds := TClientDataSet.Create(nil);
[QC Description]
cds.FieldDefs.Add('TEST', ftMemo); cds.CreateDataSet;
Assignment to XMLData may cause a Buffer Overflow.
cds.AppendRecord([stringOfChar(AnsiChar('?'), 250)]); // more than
128 Characters, some Non-ASCII characters s := cds.XMLData;
DSXML_W::ReadStr (dsxmlfld.cpp) does not count Non-ASCII chars. cds.XMLData := s; // Buffer Overflow end.
As a result the allocated buffer is too small and a buffer overflow
occurs.
Line 588-590:
if ((mbcsLength != 0) && pStr)
for (int Ind = 0; Ind < mbcsLength; Ind++)
pStr[j++] = mbcsBuf[Ind];
j must be incremented even if pStr is NULL.
QC Entry 88012
QC #:
Date Reported:
Area:
89902
11/23/2010
Midas\TClientDataSet
Description:
Steps:
[QC Short Description]
Aggregate Field functions failure with TWideStringField
Please see the attached demo.
[QC Description]
Min, Max do not work with TAggregateField when the aggregate is
done on TWideStringField. I do not know what else does not work but
could you guys run all your unit test for TStringField on
TWideStringField.
QC Entry 89902
QC #:
Date Reported:
Area:
89530
11/9/2010
Midas\TSocketConnection
Description:
Steps:
[QC Short Description]
SocketConnection message "Object not available"
Create and register datasnap server /regserver Then I launch
scktsrvr.exe, which XE includes then in the client project I fill in
property address and port in SocketConnection component, after this
I want to pick the name of my registered server, but dropdown list is
empty in property ServerName of SocketConnection component.
[QC Description]
I can’t create classic DataSnap project, based on COM technologies
in Builder XE. After /regserver my server the ServerName dropdown
list is empty in SocketConnection component. I have tried to fill in
ServerName and ServerGuid on my own, getting data from registry. I
try to do Connected=true in SocketConnection component, I get a
message "Object not available".
QC Entry 89530
QC #:
Date Reported:
Area:
93003
4/12/2011
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Internal error T801 when working with enum size 4
This fails to compile with the internal error T801 program
InternalErrorT801; {$APPTYPE CONSOLE} {$MINENUMSIZE 4} type
TMyEnum = (One, Two, Three); {$MINENUMSIZE 1} type TInterval =
[QC Description]
One .. Two; var lEnum : TMyEnum; begin lEnum := Low(TInterval);
I have ported some C++ code that requires that enumeration size is 4 WriteLn('PASS'); // on compile end.
({$MINENUMSIZE 4}).
The compiler fails to compile with an internal error T801 if I try to use
low (TInterval) or high (TInterval) if TInterval is an interval of values
from the enumeration.
Michel
QC Entry 93003
QC #:
Date Reported:
Area:
90344
12/15/2010
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Compiling a simple class helper failed with Internal Error C10343
0. Open Delphi XE (Update 1, 15.0.3953.35171) 1. Create a new VCL
Forms application 2. Add new unit (unit2.pas), enter the following
code: ---------------- unit Unit2; interface uses Unit3, // Internal Error
[QC Description]
disappears if you remove Unit3 from uses list Classes; type
See steps or open the test case project I attached and try to compile. TMyStream = class(TStream) end; implementation end. ---------------QC Entry 90344
3. Add new unit (unit3.pas), enter the following code: ---------------- unit
Unit3; interface uses SysUtils, Classes; type TMyHelper = class
helper for TStream public // Try different parameter types: Integer is
OK, but Int64 or Currency causes Internal Error C10343 procedure
MyMethod(C: Int64); end; implementation procedure
TMyHelper.MyMethod(C: Int64); begin Write(C, 0); // Internal Error
disappears if you remove this line end; end. ---------------- 4. Try to
compile. 5. Compiler failed with Internal Error C10343
QC #:
Date Reported:
Area:
62083
5/13/2008
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Inlining of nested/local procedures
function Inline1(i:integer):integer; inline; begin result := i + 1; end;
function Test; function Inline2(i:integer):integer; inline; begin result := i
+ 1; end; var x:integer; begin x := 0; x := Inline1(x); x := Inline2(x);
end; -- The call to Inline1 is inlined but not the call to Inline2
[QC Description]
Even though local/nested procedures can be marked as inline the
code is not inlined
QC Entry 62083
QC #:
Date Reported:
Area:
93814
5/12/2011
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Internal Error: URW6448
1. Create new VCL forms application. 2. Double click on form's
OnCreate event. 3. Replace your form's unit code by following: unit
Unit1; interface uses Windows, Messages, SysUtils, Variants,
[QC Description]
Classes, Graphics, Controls, Forms, Dialogs; type TFuncTest =
In the declaration of "reference to function" default function parameter reference to function(Some: integer = 1): TObject; TTestClass = class
value accepted but it causes internal error on second time compiling public TestFuncRef: TFuncTest; end; TForm1 = class(TForm)
project (I mean using command "Make" or "CTRL+F9"). If you will
procedure FormCreate(Sender: TObject); private { Private
clean and build again this error will disappear until next compilation.
declarations } public MyObj: TTestClass; function TestFunc(Some:
integer = 1): TObject; end; var Form1: TForm1; implementation {$R
In Delphi XE compiler shows following:
*.dfm} procedure TForm1.FormCreate(Sender: TObject); begin
[DCC Fatal Error] Project1.dpr(5): F2084 Internal Error: URW6448
MyObj := TTestClass.Create; MyObj.TestFuncRef := TestFunc; end;
function TForm1.TestFunc(Some: integer): TObject; begin Result :=
In Delphi 2010 compiler shows following:
nil; end; end. 4. Build project. 5. Try now just compile using Make
[DCC Fatal Error] Project1.dpr(5): F2084 Internal Error: URW6099
command or key combination CTRL+F9. Compiler will show fatal
QC Entry 93814
internal error on first or second compilation attempt.
QC #:
Date Reported:
Area:
96432
7/20/2011
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Inline function in DPR unit gets an AV after program closing
1.Call an inline function from Delphi project file (DPR). 2.Close an
application. Added by Sysop <<<<<<<< [Project1 .dpr] ---------------- ...
... begin Application.Initialize; Application.MainFormOnTaskbar :=
[QC Description]
True; // {$o-} S := Unit2.Encrypt('EXPIRED', 47349);
When you call an Inline function from begin..end block in the DPR
Unit2.GetEnvVar(S, 47349); Application.CreateForm(TForm1,
unit you will get an AV after program closing. In the attached project Form1); Application.Run; end. ---------------- [Unit2.pas] ---------------- ...
this function named as GetEnvVar(). If you remove "inline" word from function GetEnvVar(const AName: AnsiString; AKey: Word): string;
the declaration of this function, AV does not occur.
inline; ... >>>>>>>>
See Unit2.pas:
function GetEnvVar(const AName: AnsiString; AKey: Word): string;
inline;
QC Entry 96432
QC #:
Date Reported:
Area:
91067
1/24/2011
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Internal error(s) + IDE restart required when too many included files
($I)
Create a file with a lot of included files. eg. You could require a lot of
included files if you decided to put the calling convention for a library
into a separate file: // OpenGL header (1000+ procedural types)
PFNGLUNIFORM1FPROC = procedure(location: GLint; v0: GLfloat);
{$I GLConv.inc} PFNGLUNIFORM2FPROC = procedure(location:
GLint; v0: GLfloat; v1: GLfloat); {$I GLConv.inc}
PFNGLUNIFORM3FPROC = procedure(location: GLint; v0: GLfloat;
v1: GLfloat; v2: GLfloat); {$I GLConv.inc} PFNGLUNIFORM4FPROC
= procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3:
GLfloat); {$I GLConv.inc} ... // GLConv.inc {$IFDEF MSWINDOWS}
stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
[QC Description]
When you have too many included files in a unit, compilation fails +
you have to restart the IDE to be able to compile anything further.
The first time you compile you get error:
[DCC Fatal Error] Unit2.pas(1020): F2084 Internal Error:
AV0701B16C-W636E692E-1
And then attempting to compile anything further without closing down
the IDE gives:
[DCC Fatal Error] Exception EAccessViolation: Access violation at
address 0701B16C in module 'dcc140.dll'. Write of address 00000000
[DCC Error] Catastrophic failure (Exception from HRESULT:
0x8000FFFF (E_UNEXPECTED))
QC Entry 91067
Added by Sysop
<<<<<<<<<<
This issue still occurs on Delphi XE(w/ Update1).
>>>>>>>>>>
QC #:
Date Reported:
Area:
93633
5/6/2011
Compiler\Delphi
Description:
Steps:
[QC Short Description]
Same address to two fields in the same object
Just run the attached program and the error will show.
[QC Description]
When creating an object two fields gets the same address. One field
is defined in a baseclass and the other field is defined in an inherited
class.
QC Entry 93633
Added by Sysop
<<<<<<
This is a regression.
With Delphi 2009, this code works fine.
>>>>>>
...
...
type
TStructItem = class( TObject );
TStructList<T: class> = class( TObjectList<T> )
private
FModer: TStructItem;
procedure SetModer(const Value: TStructItem);
public
constructor Create( EttItem: TStructItem ); reintroduce;
property Moder: TStructItem read FModer write SetModer;
end;
TProdukt = class(TStructItem);
TProduktList = class( TStructList<TProdukt> )
private
FAktuell: integer;
procedure SetAktuell(const Value: integer);
public
property Aktuell: Integer read FAktuell write SetAktuell;
end;
TOffertOrder = class( TStructItem )
public
Produkt: TProduktList;
constructor Create; reintroduce;
end;
...
...
constructor TOffertOrder.Create;
var
adr1, adr2: pointer;
begin
Produkt := TProduktList.Create( Self );
adr1 := @Produkt.FModer;
adr2 := @Produkt.FAktuell;
if adr1 = adr2 then
MessageDlg('The adress to Produkt.FModer and Produkt.FAktuell are
the same!!!???',
mtInformation, [mbOK], 0);
end;
...
...
QC #:
Date Reported:
Area:
87615
8/29/2010
Compiler\Delphi\BASM
Description:
Steps:
[QC Short Description]
PCLMULQDQ instruction not supported
Instructions like the below should compile but don't: asm pclmulqdq
xmm1, xmm2, 00010001b pclmulqdq xmm0, [eax], 00010001b
pclmulqdq xmm1, [esi+ecx*4], 00010001b end;
[QC Description]
BASM does not support the PCLMULQDQ instruction.
This instruction is defined as
PCLMULQDQ xmm1, xmm2/m128, imm8
66 0F 3A 44 /r ib
Reference:
Intel? 64 and IA-32 Architectures
Software Developer? Manual Volume 2B:
Instruction Set Reference, N-Z
June 2010
QC Entry 87615
QC #:
Date Reported:
Area:
93021
4/12/2011
Compiler\Delphi\BASM
Description:
Steps:
[QC Short Description]
Incorrect choice of NEAR jump with .align 16 directive
program Project4; {$APPTYPE CONSOLE} uses SysUtils;
{$CODEALIGN 16} procedure DoNothingAsm(v: integer); asm nop
nop nop nop nop cmp v, 0 jg @good_jump jmp @miss_jump // EB82
<- incorrectly coded as near jump -126 // a bunch of $7C NOP, just to
simulate an offset that should be < $80, // but .align 16 directive will
add extra 13 bytes of code that will cause // the near jump to overflow
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db
$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
db $90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90 .align 16
[QC Description]
When a jump is coded in BASM, if offset is in the range [-$80..$7F] a
near jump is used.
However in some case if in between the jump there is a .align 16
directive that will cause extra addition of code, an overflow may
occur.
See steps for detailed code sample reproducing the issue.
QC Entry 93021
[PulsarBeta]
@good_jump: nop nop @miss_jump: end; begin try
DoNothingAsm(0); // Expected behaviour : do nothing, actual : crash !
except on E: Exception do Writeln(E.ClassName, ': ', E.Message);
end; end.
QC #:
Date Reported:
Area:
4530
5/22/2003
Compiler\Delphi\BASM
Description:
Steps:
I'd like the ability to specify alignment inside blocks of asm code, and
I'd like the implementation to mimic the way TASM allows code
alignment, that being, via the ALIGN keyword. The BASM already
supports DB, DW and DD, as well as some other keywords that have
a history with TASM (TYPE returning the size of a specified type, for
example), so this seems more logical than using a compiler directive,
especially for BASM code. An example of how this might look in the
'Steps'. The place to note the difference is in the line before '@@1:'.
The syntax for ALIGN would be--
{ Just an example of some code with an ALIGN used inside the
assembly } function PosChar(Ch: AnsiChar; const S: AnsiString):
integer; register; asm { -> AL Ch } { EDX S } { <- EAX Result } OR
EDX, EDX JZ @@Error MOV ECX, EDX // save original pointer
ALIGN 16 // align label on 16 byte boundary @@1: CMP BYTE PTR
[EDX], 0 JE @@Error CMP BYTE PTR [EDX], AL JE @@2 INC EDX
JMP @@1 @@2: MOV EAX, EDX SUB EAX, ECX INC EAX RET
@@Error2: SUB EAX, EAX @@Error: end;
ALIGN [boundary]
Where [boundary] is an optional power of two address boundary (2, 4,
8, etc). If no address boundary is given, then a default is used
(perhaps the record field alignment specified in the project options?).
If this is implemented, it'd be nice if the EVEN keyword were also
implemented (I believe EVEN essentially maps to ALIGN 2).
QC Entry 4530
QC #:
Date Reported:
Area:
73745
5/8/2009
Compiler\Delphi\BASM
Description:
Steps:
[QC Short Description]
Request for a .ALIGN directive is BASM
this piece of assembler code represent what is needed: asm MOV
ECX, $1000 .ALIGN 16 <--- Currently unsupported in BASM
@loop_start: MOV EAX, [EBX + (ECX*4)] <---- Better performance if
[QC Description]
this opcode start on a 16 bytes boundary IMUL EAX, [EDX +
To write optimized assembler code with BASM,
(ECX*4)] SUB EAX, [ESI + (ECX*4)] MOV [EDX + (ECX*4)], EAX
It is very important to have a .ALIGN 16 directive in Delphi, capable to DEC ECX JNZ @loop_start end; please note that .ALIGN16 directive
align CODE/DATA on a 16 bytes boundary
either insert NOP, or 2,3,4 bytes opcodes equivalent to NOP, such as
OR EAX, EAX, or event insert if needed a JMP @loop_start - which is
This is true for both 32 and 64 bits mode, and even mandatory in
imho not a good idea.
some case for 64 bits.
Quote extracted from
Intel® 64 and IA-32 Architectures Optimization Reference Manual
"
Assembly/Compiler Coding Rule 12. (M impact, H generality) All
branch
targets should be 16-byte aligned.
"
This imply the necessity of a .ALIGN directive in BASM
See Steps for a sample
QC Entry 73745
QC #:
Date Reported:
Area:
87616
8/29/2010
Compiler\Delphi\BASM
Description:
Steps:
[QC Short Description]
AES assembly instructions are not supported
If AES instructions were supported, code like the following would be
expected to compile: asm aesenc xmm0, xmm1 aesenc xmm0,
[esi+ecx*4] aesenc xmm0, [eax] aesenclast xmm0, xmm1 aesenclast
xmm0, [esi+ecx*4] aesenclast xmm1, [eax] aesdec xmm0, xmm1
aesdec xmm0, [esi+ecx*4] aesdec xmm1, [eax] aesdeclast xmm0,
xmm1 aesdeclast xmm0, [esi+ecx*4] aesdeclast xmm3, [edx] aesimc
xmm0, xmm1 aesimc xmm0, [esi+ecx*4] aesimc xmm1, [eax]
aeskeygenassist xmm0, xmm1, 8 aeskeygenassist xmm0,
[QC Description]
BASM does not support the AES instructions:
AESENC
AESENCLAST
AESDEC
AESDECLAST
AESIMC
AESKEYGENASSIST
[esi+ecx*4], 8 aeskeygenassist xmm1, [eax], 8 end;
These instructions are described here:
Intel? 64 and IA-32 Architectures Software Developer? Manual
Volume 2A: Instruction Set Reference, A-M
June 2010
QC Entry 87616
QC #:
Date Reported:
Area:
29663
5/30/2006
Compiler\Delphi\TD Debug Info
Description:
Steps:
[QC Short Description]
DBG1553 when "Include TD32 debug info" checked
- It appears that as soon as anything is placed in the ToSet procedure
this error is generated. I suspect it has something to do with the
untyped var AValue
[QC Description]
- This same code generates [Fatal Error] Internal Error DBG1384 in
When Include TD32 debug info is checked in Project, Options, Linker Delphi 6.03
page, "[Pascal Fatal Error] F2084 Internal Error: DBG1553" occurs.
QC Entry 29663
program prj1384;
{$APPTYPE CONSOLE}
uses
SysUtils,
TypInfo;
type
TMyType = (tOne, tTwo, tThree);
TMySet = set of TMyType;
var
setTmp : TMySet;
procedure ToSet(const AString : WideString; const ASetType :
PTypeInfo; var AValue);
const
WHITESPACE = [WideChar(#0)..WideChar(' ')]; //DBG1384 caused
as soon as we declare a const
begin
end;
begin
ToSet('[tOne]', TypeInfo(TMySet), setTmp);
end.
QC #:
Date Reported:
Area:
90984
1/20/2011
Compiler\Delphi\Code
Generation/Optimization
Description:
Steps:
[QC Short Description]
Steps by USc: - save the following program - dcc32 QC90984.dpr
Compiler freezes on correct code with some try, except, finally blocks. expected: compilation finish in a few seconds actual: compilation
"never" finishs Removing the inline directive or compiling with inline
[QC Description]
off (dcc32 QC90984.dpr --inline:off) makes it compiling. program
By USc: Using inline in connection with Exit may cause an endless
QC90984; {$APPTYPE CONSOLE} //Delphi XE's SysUtils.DeleteFile
loop in the compiler. The issue exists at least since D2007, but affects does use Exit on Windows // in contrast to prior versions function
the QC reporter first with DXE, because between D2010 and DXE a DeleteFile(const FileName: string): Boolean; inline; begin Result :=
call to Exit has been added in SysUtils.DeleteFile.
False; if not Result then Exit; end; function
TransformDatabase(ASource, ADestination: string): Boolean; var
-> see steps
Temp: string; begin // some code try Result := False; Temp :=
QC Entry 90984
'Tempfile.dat'; // some code try // some code try // some code except
Exit; end; finally DeleteFile(Temp); end; Result := True; finally // some
code end; end; begin WriteLn('PASS'); // on compile end. Original
Steps: 1. Create new Delphi application with one form TForm1. 2.
Insert function TransformDatabase into this form. function
TForm1.TransformDatabase(ASource, ADestination: string): Boolean;
var Temp: string; begin // some code try Result := False; Temp :=
'Tempfile.dat'; // some code try // some code try // some code except
on E: Exception do begin // some code Exit; end else raise; end;
finally DeleteFile(Temp); end; Result := True; finally // some code
end; end; 3. Press F9 and wait. Compiler stops working after few
lines of code and Delphi has to be terminated. Compiler is successful,
if line with function DeleteFile is commented. The same code can be
compiled without any problem in Delphi 2007.
QC #:
Date Reported:
Area:
26999
4/5/2006
Compiler\Delphi\Code
Generation/Optimization
Description:
Steps:
[QC Short Description]
Add operator inlining
Load the attached program into the IDE.
Set a breakpoint on the line that reads "Value := 'Hello';"
[QC Description]
Currently, operator methods can not be inlined, despite the "inline"
Run the program until the breakpoint is reached.
directive being accepted.
I feel it would be useful to add such support. For example in this type: Launch the CPU view and see that references to the implicit
operators are not inlined but rather are calls.
type TIPv4Address = {$IF
RECORDS_WITH_METHODS}record{$ELSE}object{$IFEND}
program BTS242167;
private
Data: UInt32;
{$APPTYPE CONSOLE}
FBytes: TIPv4Bytes;
procedure UpdateData; inline;
procedure UpdateBytes; inline;
type
procedure SetData(const I: UInt32); inline;
TIPv4Address = record
procedure SetBytes(const B: TIPv4Bytes); inline;
function IsRoutable: Boolean; {$IFOPT D-}inline;{$ENDIF}
private
function GetAddrType: TIPv4AddressType; {$IFOPT DData: Cardinal;
}inline;{$ENDIF}
public
public
class operator Implicit(const S: AnsiString): TIPv4Address; inline;//<{$IF OPERATOR_OVERLOADS}
doesn't really work
class operator Implicit(const S: AnsiString): TIPv4Address; inline;//<- class operator Implicit(const I: Cardinal): TIPv4Address; inline;
doesn't really work
procedure FromString(S: AnsiString);
class operator Implicit(const I: UInt32): TIPv4Address; inline;
property AsInteger: Cardinal read Data write Data; //SetData;
class operator Inc(const A: TIPv4Address): TIPv4Address; inline;
end;
class operator Dec(const A: TIPv4Address): TIPv4Address; inline;
{$IFEND}
procedure TIPv4Address.FromString(S: AnsiString);
procedure FromString(S: AnsiString);
begin
function ToString: AnsiString; inline;
end;
property AsInteger: UInt32 read Data write SetData;
property Bytes: TIPv4Bytes read FBytes write SetBytes;
class operator TIPv4Address.Implicit(const S: AnsiString):
property Routable: Boolean read IsRoutable;
TIPv4Address;
property AddressType: TIPv4AddressType read GetAddrType;
begin
procedure Assign(const A: TIPv4Address);
Result.FromString(S);
end;
end;
class operator TIPv4Address.Implicit(const S: AnsiString):
TIPv4Address;
begin
Result.FromString(S);
end;
class operator TIPv4Address.Implicit(const I: Cardinal):
TIPv4Address;
begin
Result.AsInteger := I;
end;
class operator TIPv4Address.Implicit(const I: UInt32): TIPv4Address;
begin
Result.AsInteger := I;
end;
QC Entry 26999
procedure Use(var Value);
begin
end;
var
Value: TIPv4Address;
begin
Value := 'Hello';
Value := 42;
Use(Value);
end.
QC #:
Date Reported:
Area:
91586
2/16/2011
Compiler\Delphi\Code
Generation/Optimization
Description:
Steps:
[QC Short Description]
Bug in code optimization
QC Entry 91586
This is a strange behaviour in Delphi 2010 that was different in Delphi
7: Example: I have a class 'TestClass'. This TestClass has three
public methods: Method a, b and c. Method a uses an external
function defined in a.dll. Method b uses an external function defined
in b.dll. Method c uses an external function defined in c.dll. Now i
create a new project that uses my TestClass, but it only uses Method
a. Now the strange thing: Using Delphi 7: I only have to provide a.dll
together with my application because Methods b and c are removed
due to optimization. Using Delphi 2010: I must provide a.dll, b.dll and
c.dll, although Methods b and c are never used. This compiler does
not remove the unused methods b and c. I did not find any setting to
change this so i suppose this to be a bug.
QC #:
Date Reported:
Area:
91327
2/4/2011
Compiler\Delphi\Errors - Warnings
Description:
Steps:
REGRESSION FROM D2007
Create simple project. program F2048; uses Classes, StreamEnh;
type TTest = class(TStream) end; begin end. Create unit StreamEnh.
[QC Short Description]
unit StreamEnh; interface uses SysUtils, Classes; type
F2084 Internal Error: C10343 error triggered in completely valid code TGpStreamEnhancer = class helper for TStream public procedure
that works with Delphi 2007
BE_WriteDWord(const dw: cardinal); procedure BE_WriteHuge(const
h: Int64); end; implementation procedure
[QC Description]
TGpStreamEnhancer.BE_WriteDWord(const dw: cardinal); begin
Trying to compile a valid program results in internal error. Delphi
end; procedure TGpStreamEnhancer.BE_WriteHuge(const h: Int64);
compiler than stays in a weird state that will not compile any code at begin BE_WriteDWord(Int64Rec(h).Hi);
all.
BE_WriteDWord(Int64Rec(h).Lo); end; end. Rebuild. (Shift-F9)
QC Entry 91327
Expected: Program should compile. Reality: [DCC Fatal Error]
F2048.dpr(1): F2084 Internal Error: C10343 Funny things happen if
you don’t restart the Delphi. Try recompiling: [DCC Fatal Error]
F2048.dpr(9): F2084 Internal Error: O826
QC #:
Date Reported:
Area:
76845
8/19/2009
Compiler\Delphi\Language
Description:
Steps:
[QC Short Description]
Scoped enums cannot be used for subset declarations
Compile the attached application below.
See the following unexpected compile-time error messages indicating
[QC Description]
failure.
The following code should be compilable, but DCC fails with an error:
// ----BTS272560.dpr(10) Error: E2029 ';' expected but '.' found
program test;
BTS272560.dpr(10) Error: E2029 ';' expected but '.' found
{$SCOPEDENUMS ON}
program BTS272560;
type
TSomeOrdinal = (One, Two, Three);
{ Scoped enums cannot be used for subset declarations }
TSomeOrdinals = set of TSomeOrdinal.One..TSomeOrdinal.Two; // <- expected ';' but found '.'
{$APPTYPE CONSOLE}
begin
end.
// ----QC Entry 76845
{$SCOPEDENUMS ON}
type
TSomeOrdinal = (One, Two, Three);
TSomeOrdinals = set of TSomeOrdinal.One..TSomeOrdinal.Two;
//#1//
// ^^^ expected ';' but found '.'
begin
WriteLn('PASS'); //PASS on compile//
end.
QC #:
Date Reported:
Area:
87821
9/6/2010
Compiler\Delphi\Language
Description:
Steps:
[QC Short Description]
packed object not supported
type tobj = packed object f1: byte; f2: byte; end; [DCC Error]
Unit1.pas(21): E2006 PACKED not allowed here (reproduced in
D2010 also, but in D2009 was supported) Why? If you want to kill
OBJECT, you must make an adequate substitute, for example
improve RECORD for inheritance. I can't refuse of use OBJECT and I
QC Entry 87821
need PACKED feature.
Added by Sysop
<<<<<<<<<<
> In D7(build 4.453) it works fine.
>>>>>>>>>>
QC #:
Date Reported:
Area:
6610
12/11/2003
Compiler\Delphi\Language
Description:
Steps:
[QC Short Description]
Allow procedure/function declarations to specify their entry point code
alignment
[QC Description]
This report requests that a new procedure/function directive be added
that allows the developer to specify the alignment of the
procedure/function. The new directive would be "align", and this
directive would accept an integer value following the directive that
specifies how to align the procedure/function. For example-procedure AlignTest(A, B, C: integer); align 32;
begin
// code
end;
Would align AlignTest on a 32-byte boundary, while-procedure AlignTest2(A, B, C: integer); align 512;
begin
// code
end;
Would align AlignTest2 on a 512-byte boundary. The value following
should conceivably always be a power of 2 (but I do not believe it
should be necessary to require this). If a calling convention is
specified, this new directive would behave similar to the varargs
directive in that no semi-colon would be used to seperate it from the
calling convention. E.g. procedure AlignTest3(A, B, C: integer); cdecl align 64;
begin
// code
end;
Would be correct.
QC Entry 6610
QC #:
Date Reported:
Area:
67693
10/8/2008
Compiler\Delphi\Language\Variants
Description:
Steps:
Constant values of type Int64 are not handled properly when passed
to dispatch methods of variants.
Compile and run the attached application below.
See that the following program output is generated.
1024
18540119686382592
1024 is output for the first call to srvr.test(i64) and is the expected
output.
However, the the second call involving srvr.test(Int64(1024)) does not
produce this result.
Var
srvr : Variant;
i64 : Int64;
begin
try
srvr := IDispatch(TDispItem.Create);
i64 := 1024;
srvr.test(i64);
srvr.test(Int64(1024));
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
end.
QC #:
Date Reported:
Area:
88807
10/9/2010
Compiler\Delphi\Language\Variants
Description:
Steps:
[QC Short Description]
VarClear Memory Error on app shutdown.
Just run this application (it will work at D2007):
See that a memory error is raised upon application shutdown.
[QC Description]
VarClear incorrect works with specific size variant array
QC Entry 88807
program varArrayBug;
{$APPTYPE CONSOLE}
uses
SysUtils, variants;
procedure Test;
var
v1: Variant;
begin
v1 := VarArrayCreate([0,-1,0,1], varVariant);
end;
begin
Test;
end.
QC #:
Date Reported:
Area:
73610
5/4/2009
Compiler\Delphi\Language\Variants
Description:
Steps:
[QC Short Description]
Variant and int64 typecasting doesn't compile
[QC Description]
Example:
function Test(const Value: Variant): Int64;
begin
Result := Int64(Value);
end;
Expected:
Successful compilation
Result:
E2089 Invalid typecast
QC Entry 73610
QC #:
Date Reported:
Area:
91074
1/24/2011
Compiler\Delphi\Language\Overloadin
g
Description:
Steps:
[QC Short Description]
Slice function causes E2193
Please see the Comment from me.
[QC Description]
Delphi XE Compiler reports E2193(Slice standard function only
allowed as open array argument)
when it compiles the code below.
Delphi 7 Compiler can compile this code without errors.
uses Math;
type
IntegerArray = array [1..10] OF Double;
Added by Sysop
<<<<<<<<<<<<<
I confirmed that QC#4058 is not fixed with your code and
last Japanese version of Delphi 7(Delphi 7.1 update1).
The confusing point of problrm is:
Sum and Mean of Delphi 7 RTL are not overloaded but
Sum and Mean of Delphi XE RTL are overloaded.
QC#91074 may be duplicated and QC#4058 must be re-opened !
>>>>>>>>>>>>>
var
SliceMe : array [1..200] OF Double;
procedure TForm4.Button1Click(Sender: TObject);
begin
mean(SLICE(SliceMe, 5));
end;
After the problem occurred, I copied the source code of "means" from
runtime source file into the
code above, the error disappeared.
QC Entry 91074
QC #:
Date Reported:
Area:
87298
8/16/2010
Compiler\Delphi\Language\Overloading\Globa
l
Description:
Steps:
[QC Short Description]
REGRESSION: Ambiguous overload error with Math.Sum breaks
existing code
Compile the attached application below.
[QC Description]
The following code used to compile under D2010 but breaks under
the FT.
QC Entry 87298
Error: E2251 Ambiguous overloaded call to 'Sum'
+ Math.pas(3305) Related method: function Sum(const array of Single):
Single;
+ Math.pas(3351) Related method: function Sum(const array of Double):
Double;
+ Math.pas(3397) Related method: function Sum(const array of
Extended): Extended;
See the following compile-time errors indicating failure.
program BTS279826;
{ Ambiguous overload error with Math.Sum breaks existing code }
{$APPTYPE CONSOLE}
uses
Math;
function DoSum(var data: array of Byte): integer;
begin
Sum([data[0], data[1], data[2]]);
end;
begin
try
WriteLn('PASS'); //PASS on compile//
except
on E: TObject do
Writeln('FAIL - ', E.ClassName);
end;
end.
QC #:
Date Reported:
Area:
82677
3/4/2010
Compiler\Delphi\Other Compiler
Description:
Steps:
[QC Short Description]
write / writeln does not work with array of char
var a : array [0..1] of AnsiChar; c : array [0..1] of char; begin a := 'AA';
c := 'CC'; writeln (a); {compiles} writeln (c); {does not compile, E2054}
writeln (string (c)); {work around} end.
[QC Description]
When you supply an array of char (or WideChar) as parameter to a
write or writeln statement, a compiler error E2054 results. Using an
array of AnsiChar instead compiles just fine.
QC Entry 82677
QC #:
Date Reported:
Area:
92737
3/31/2011
Compiler\Delphi\Other Compiler
Description:
Steps:
[QC Short Description]
Generate XML Documentation. F2084 Internal Error: AV221BDF22R00000000-0
1. Create a simple project. 2. Includes an option to Generate XML
Documentation 3. Add a comment. 4. Compile 5. If we remove the
symbols (* and *) in any line, when compiling an error. unit Unit1;
interface uses Windows, Controls; type {$REGION 'A description of
[QC Description]
the class'} /// <summary>Adescription ofthe class</summary>
If we are trying to create documentation for inherited property, the
{$ENDREGION} TSpeedButtonCep = class(TGraphicControl) private
compiler gives this error F2084 Internal Error: AV221BDF22FMyProperty: integer; procedure SetMyProperty(const Value:
R00000000-0 (address can be different). After that, even if you
integer); published {$REGION 'Description for some of my properties'}
remove the problematic comment, the error remains. Need to restart /// <summary>Description for some of my properties</summary> ///
IDE.
<seealso cref="Windows.SelectObject">This link is working
properly</seealso> /// <seealso cref="SelectObject">This link is
The same thing happens, and Delphi 2009-2010. Others not tested.
working properly</seealso> (* /// <seealso
The same error is obtained using the compiler command line (dcc32) cref="Unit1.TSpeedButtonCep.Color">But the link leads to an error
QC Entry 92737
[DCC Fatal Error] Unit1.pas (40): F2084 Internal Error: AV221BDF22R00000000-0</seealso>*) (* /// <seealso
cref="TSpeedButtonCep.Color">But the link leads to an error [DCC
Fatal Error] Unit1.pas (40): F2084 Internal Error: AV221BDF22R00000000-0</seealso>*) (* /// <seealso cref="Color">But the link
leads to an error [DCC Fatal Error] Unit1.pas (40): F2084 Internal
Error: AV221BDF22-R00000000-0</seealso>*) {$ENDREGION}
property MyProperty: integer read FMyProperty write SetMyProperty;
{$REGION 'Description for some inherited properties'} ///
<summary>Description for some inherited properties</summary> ///
<seealso cref="MyProperty">This link is working properly</seealso>
{$ENDREGION} property Color; end; implementation {
TSpeedButtonCep } procedure
TSpeedButtonCep.SetMyProperty(const Value: integer); begin
FMyProperty := Value; end; end.
QC #:
Date Reported:
Area:
75462
7/2/2009
Compiler\Delphi\Execution
Description:
Steps:
[QC Short Description]
F2048 Internal Error: URW1104
Compile the attached application below with the following commandline.
[QC Description]
REGRESSION FROM D2007
dcc32 -b BTS270692
See the following compiler output indicating failure.
Involving an inlined function into record can cause Internal URW1104
during a project build.
WrSymRef sym has no index: s003FE228 t003FE250 TEvent
Allocated in unit 003FD0F0 uBTS270692a
QC Entry 75462
Writing unit 003FC0F0 uBTS270692b
uBTS270692b.pas(20) Fatal: F2084 Internal Error: URW1104
If the inline modifier is removed from the line marked #1 in
uBTS270692, the program builds without error.
unit uBTS270692a;
interface
type TEvent = record
strict private
function GetID: integer; inline; //#1//
public
property ID: integer read GetID;
end;
PEvent = ^TEvent;
implementation
{ TEvent }
function TEvent.GetID: integer;
begin
end;
end.
unit uBTS270692b;
interface
implementation
uses
uBTS270692a;
procedure X;
var
p: PEvent;
i: integer;
begin
if p.ID <> i then
end;
end. // <-- F2048 Internal Error: URW1104
program BTS270692;
{ F2048 Internal Error: URW1104 }
{$APPTYPE CONSOLE}
uses
uBTS270692a,
uBTS270692b;
begin
WriteLn('PASS'); { PASS on compile }
end.
QC #:
Date Reported:
Area:
77913
9/22/2009
Compiler\Delphi\Execution
Description:
Steps:
[QC Short Description]
F2084 Internal Error: AV0045D1BE-R00000014-0 with a class
destructor with parenthesis.
Steps by USc:
- save the following file as Test_22092009Simplified.dpr
- dcc32 Test_22092009Simplified.dpr
[QC Description]
Using parenthesis in the class destructor implementation leads to an
internal error.
("...Destroy;" -> does work, but "...Destroy();" -> AV)
expected: it compiles
actual: Test_22092009Simplified.dpr(11) Fatal: F2084 Internal Error:
AV0045D1BE-R00000014-0
- remove the parenthesis pair after "...Destroy" in line 11
- compile again and see it does compile
-> see steps
Original descriptions:
F2084 Internal Error: AV03CD372A-R00000014-0 when using class
constructor and destructor
program Test_22092009Simplified;
{$APPTYPE CONSOLE}
Try to compile attached project.
QC Entry 77913
type
TEventArgs = class(TObject)
public
class destructor Destroy();
end;
class destructor TEventArgs.Destroy();
begin
end;
begin
Writeln('PASS');
end.
QC #:
Date Reported:
Area:
89789
11/18/2010
Compiler\Delphi\Execution
Description:
Steps:
[QC Short Description]
Internal Error T987
[QC Description]
Open array parameters can generate internal error T987.
The bug seems to occur only if sizeof(TWrapper) > SizeOf(Pointer),
as the following modification make the code compile :
- changing the record to a class
- changing a : int64 into a : integer
program BTS281235;
{ Open array parameters can generate internal error T987.
The bug seems to occur only if sizeof(TWrapper) > SizeOf(Pointer),
as the following modification make the code compile :
- changing the record to a class
- changing a : int64 into a : integer
...
}
QC Entry 89789
{$APPTYPE CONSOLE}
uses
types;
type
TWrapper = record
a : int64;
function items : TCardinalDynArray;
end;
function TWrapper.items: TCardinalDynArray;
begin
end;
function f : TWrapper;
begin
end;
procedure Simple (const AList : array of cardinal);
begin
end;
procedure InternalError;
begin
Simple(f.items);
end;
begin
WriteLn('PASS'); // PASS on compile //
end.
QC #:
Date Reported:
Area:
93806
5/12/2011
Compiler\Delphi\Execution
Description:
Steps:
[QC Short Description]
Compiler hangs on code with inlined function call in try..finally
Try to compile the attached project. See that both the IDE and the
command line compiler hang.
[QC Description]
Compiler hangs on code with a combination of try..finally, an inlined
function call and try..except constructs. See the attached project.
QC Entry 93806
QC #:
Date Reported:
Area:
86567
7/24/2010
Compiler\Delphi\Packages
Description:
Steps:
[QC Short Description]
Initialization sections not running for some units upon package
loading when moved between packages.
Install JCL and JVCL component libraries. You may encounter an
error with the JCL install while checking HPP headers. If so, disable
the HPP file options in the JEDI install.
[QC Description]
When a package is loaded, it's supposed to run the initialization for
each unit. This isn't happening.
QC Entry 86567
For Fulcrum, the JEDI team had the following svn project, though with
the release the normal download may apply now.
http://svn.obones.com:443/fulcrum/trunk/
For read access only use this account:
Login = Fu1crum
Password = Cr055X
Unzip the contents of the attached ZIP file to c:\turbu
Launch the IDE.
Install the following component packages into the IDE.
C:\TURBU\components\PascalScript\PascalScript_Core_D12.dpk
C:\TURBU\components\TURBU\sdlframe.dpk
C:\TURBU\components\TURBU\turbu_components.dpk
Close All files.
Load the project group file, "c:\turbu\turbu\turbu.groupproj" into the
IDE.
In the package, map_default_design.bpl, bring up these source files
and set breakpoints in their initialization sections.
C:\TURBU\turbu\turbu format\design\EB
Editors\Messages\MessageEdit.pas
C:\TURBU\turbu\turbu format\design\EB
Editors\Messages\MessageOptions.pas
C:\TURBU\turbu\turbu format\design\EB
Editors\Messages\PortraitEdit.pas
Have the project, "turbu.exe", be the current project in the Project
Manager, compile and run.
See that each breakpoint is encountered as expected. The program
will produce an exception at runtime, namely "Project Turbu.exe
raised
exception class EBadHandle with message 'glTexImage2d():
GLINVALID_ENUM"
To see the problem.
Remove MessageEdit.pas from the project for
"map_default_design.bpl" via the Project Manager.
Add "C:\TURBU\turbu\turbu format\design\EB
Editors\Messages\MessageEdit.pas" to the project for
"default_format_design.bpl"
Recompile the project, "turbu.exe", and run.
See that the breakpoints for "MessageOptions.pas" and
"PortraitEdit.pas" are encountered as expected but not that of
"MessageEdit.pas" as
occurred when it was part of "map_default_design.bpl".
Launch the Modules View and see that "map_default_design.bpl" is
present.
QC #:
Date Reported:
Area:
44634
4/18/2007
Compiler\Delphi\Finalization
Description:
Steps:
[QC Short Description]
Compiler finalizes record incorrectly
Save the attachments (or see below for detailed steps). Open and run
the project. Expected: should run without errors and show "Press
ENTER". Actual: pops up a FastMM error dialog showing that an
interface was used after it was freed (see attached screenshot). ------- To repro the problem from scratch: 1. Create a new Win32 console
app. Save it somewhere. 2. Download the FastMM4 distribution from
http://fastmm.sourceforge.net/. Copy the following files from the
FastMM zip into the same directory as your project file: FastMM4.pas - FastMM4Messages.pas - FastMM4Options.inc FullDebugMode DLL\Precompiled\FastMM_FullDebugMode.dll 3.
Make the following changes to FastMM4Options.inc: - Define
FullDebugMode. (remove the "." before the "$define") - Define
CatchUseOfFreedInterfaces. (remove the "." before the "$define") 4.
Add the below code to your project file. 5. Save all, compile, and run.
-------- program Project2; {$APPTYPE CONSOLE} uses FastMM4,
[QC Description]
When you have
(a) a record that contains an interface reference and one or more
methods,
(b) a function that returns that record, and
(c) code that chains a call to that function with a call to a method on
the record (e.g. MyFunction.DoSomething),
the compiler incorrectly finalizes the interface refcount too many
times, causing the interfaced object to be freed even though there's
still a live reference to it. This results in heap problems and sporadic
(though sometimes reproducible) AVs.
However, the problem can be verified easily using the FastMM4
memory manager in full debug mode. See Steps.
The problem line is marked "<--- compiler incorrectly releases
refcount too many times"; if this line is omitted, or the statement is
broken into two statements by using a temporary variable, the
problem does not occur.
QC Entry 44634
SysUtils; type TRecord = record public Value: IInterface; procedure
Foo; end; TTester = class strict private FFoo: TRecord; function
Value: TRecord; public procedure Test; end; { TRecord } procedure
TRecord.Foo; begin end; { TTester } procedure TTester.Test; begin
FFoo.Value := TInterfacedObject.Create; Value.Foo; // <--- compiler
incorrectly releases refcount too many times FFoo.Value := nil; // <--error: use of already-freed interface end; function TTester.Value:
TRecord; begin Result := FFoo; end; var Tester: TTester; begin
Tester := TTester.Create; try try Tester.Test; except on E: Exception
do WriteLn(E.ClassName + ': ' + E.Message); end; finally
FreeAndNil(Tester); end; WriteLn('Press ENTER:'); ReadLn; end.
QC #:
Date Reported:
Area:
90864
1/13/2011
Compiler\Delphi\Interaction with UI
Description:
Steps:
[QC Short Description]
Delphi IDE deadlock during background compiler operation
I have not been able to find reproducible steps, but from the recent
newsgroup thread in e.p.d.non-technical entitled "Delphi XE hangs
with Update 1" it appears that several other users also experience
this problem from time to time.
[QC Description]
From time to time the Delphi XE Update 1 IDE appears to deadlock
with a background compiler operation. The only way I have found to
break the deadlock is to delete all DCU files in the project folders.
The last time such a deadlock occurred I inspected the BDS.EXE
process using Process Monitor: It seems the background compiler
gets stuck in a loop opening dcu files associated with the project.
Since it looks in the wrong folders most of the time, most of these file
open calls fail. However, even after successfully opening a dcu file in
the correct folder it does not exit the loop, instead restarting the
search from the beginning.
new steps...
the IMPORTANT thing to NOTE is that the CodeInsight MUST be
switched ON to see the problem.
1) Extract the attached archive to the root of the C: drive.
2) Start Delphi XE
3) Copy and paste the library paths in "Delphi XE Library Path.txt" into
the library path settings of Delphi XE
4) Open the Project1.dproj in the c:\projects\CIMSO\TestApp1 folder
5) Compile it with Ctrl+F9
I am fairly confident that this is a new problem in XE Update 1, since I 6) Open the Project1.dproj in the c:\projects\CIMSO\TestApp2 folder
do not recall ever experiencing this problem in any prior version.
7) Compile it with Ctrl+F9
QC Entry 90864
8) Open Unit1.pas (pressing F12 should do the job) and view the
source
9) Ctrl+click on PSDForm in the "uses" list to open up PSDForm.pas
10) Modify the PSDForm.pas (adding a blank line anywhere will
suffice)
11) Select File -> Reopen and select
c:\projects\CIMSO\TestApp1\Project1.dproj
12) Delphi will prompt to save PSDForm.pas - Click "yes"
13) Open Unit1.pas and view the source
14) Ctrl+click on PSDForm in the "uses" list to open up PSDForm.pas
15) Modify the PSDForm.pas (adding a blank line anywhere will
suffice)
16) Select File -> Reopen and select
c:\projects\CIMSO\TestApp2\Project1.dproj
17) Delphi will prompt to save PSDForm.pas - Click "yes"
The Delphi XE IDE will hang somewhere between steps 13 and 17. If
it doesn't happen the first time, repeat steps 13 through 17,
alternating between the two test projects.
Workaround: Run clean.bat (deleting all dcu files) when it hangs and
the IDE will become responsive again.
Comment: the dcc150.dll seems to be culprit.
QC #:
Date Reported:
Area:
88031
9/13/2010
Compiler\Delphi\Generics
Description:
[QC Short Description]
F2084 Internal Error: URW1136 with nested array of record type with
type parameter
Steps:
- save the following program and unit - dcc32 -B
GenericRecordURW.dpr expected: it compiles actual:
GenericRecordURWUnit.pas(19) Fatal: F2084 Internal Error:
URW1136 //--- GenericRecordURW.dpr --- program
[QC Description]
GenericRecordURW; {$APPTYPE CONSOLE} uses
An nested array of record type with type parameter leads to F2084
GenericRecordURWUnit in 'GenericRecordURWUnit.pas'; var Foo:
Internal Error: URW1136.
TFoo<Integer>; begin WriteLn('PASS'); // on compile end. //--GenericRecordURWUnit.pas --- unit GenericRecordURWUnit;
This is regression from D2009 that happened already in D2010 RTM. interface type TFoo<T> = record type TData = array [0..1] of record
Value: T; end; var Data: TData; end; implementation end.
-> see steps
QC Entry 88031
QC #:
Date Reported:
Area:
89952
11/25/2010
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
AV accessing TList<TPair<Byte, Byte>>
Compile and run the attached project.
[QC Description]
Accessing a TList<TPair<Byte, Byte>> causes an AV. The problem
seems to be in the function
{code}
function TMyList<TKey, TValue>.get_Items(const AIndex: Integer):
TPair<TKey, TValue>;
begin
Result := FList[AIndex];
end;
{code}
The AV occurs only if TKey and TValue are a Byte or a Word.
The same code works with D2010. The issue is a regression from
D2010.
QC Entry 89952
Expected: output is PASS
Actual: output is
FAIL - Exception Error
ClassName=EAccessViolation
Message=Access violation at address 00410AC7 in module
'PairM.exe'. Write of address 00000303
[bjk] Reduced test case:
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TPair<TKey,TValue> = record
Key: TKey;
Value: TValue;
end;
TObj<TKey, TValue> = class
function GetPair(AIndex: Integer): TPair<TKey, TValue>;
end;
function TObj<TKey, TValue>.GetPair(AIndex: Integer): TPair<TKey,
TValue>;
begin
Result := Default(TPair<TKey,TValue>);
end;
procedure Reset(a, b, c: Integer);
begin
end;
procedure Go;
var
x: TObj<Byte,Byte>;
begin
x := TObj<Byte,Byte>.Create;
Reset(0, 0, 0);
x.GetPair(0);
end;
begin
Go;
end.
QC #:
Date Reported:
Area:
96865
7/29/2011
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Copy raises AV
- save the following files - dcc32 QC96865.dpr - execute QC96865
expected: output is PASS actual: FAIL - Exception Error
ClassName=EAccessViolation Message=Access violation at address
00406D90 in module 'QC96865.exe'. Read of address 00110001 //--QC96865.dpr --- program QC96865; {$APPTYPE CONSOLE} uses
SysUtils, QC96865Unit; var Test: TTest; begin try Test :=
TTest.Create; try if Test.Execute then WriteLn('PASS') else
WriteLn('FAIL'); finally Test.Free; end; except on E: Exception do
begin Writeln('FAIL - Exception Error'); WriteLn(' ClassName=',
E.ClassName); WriteLn(' Message=', E.Message); end; end; end. //--QC96865Unit.pas --- unit QC96865Unit; interface type TList<T> =
class private FItems: TArray<Integer>; public constructor Create;
[QC Description]
There are several conditions for this to happen. There must be a
generic class with a TArray field (generic parameter of the class can
be different from type used in the TArray field). The instance of this
class must be global variable or a field inside another class.
QC Entry 96865
function ToArray: TArray<Integer>; end; TTest = class private FList:
TList<Integer>; public function Execute: Boolean; end;
implementation constructor TList<T>.Create; begin
SetLength(FItems, 1); end; function TList<T>.ToArray:
TArray<Integer>; begin Result := Copy(FItems, 0, Length(FItems));
end; function TTest.Execute: Boolean; begin FList :=
TList<Integer>.Create; try Result := Length(FList.ToArray) = 1; finally
FList.Free; end; end; end.
QC #:
Date Reported:
Area:
90016
11/29/2010
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Delphi XE Generics AccessViolation on Free,
program DLG20101129; {$APPTYPE CONSOLE} uses SysUtils; //--> Generics.Collections simplified type TCollectionNotifyEvent<T> =
procedure of object; TList<T> = class(TObject) private FOnNotify:
TCollectionNotifyEvent<T>; end; TObjectList<T: class> =
class(TList<T>) private FOwnsObjects: Boolean; end; //<--Generics.Collections simplified type TDataType = ( typeOne,
typeTwo); TData = class(TObject) end; TDataTwo = class(TData)
end; TDataList<T: TData> = class(TObjectList<T>) private
FDataType: TDataType; public constructor Create(ADataType:
TDataType); end; TDataListTwo = class(TDataList<TData>) public
constructor Create; end; { TDataList<T> } constructor
TDataList<T>.Create(ADataType: TDataType); begin inherited
Create; FDataType := ADataType; end; { TDataListTwo } constructor
TDataListTwo.Create; begin inherited Create(typeTwo); end; var
FData: TDataListTwo; begin try FData := TDataListTwo.Create; // Any
code here FData.Free; WriteLn('PASS'); except on E: Exception do
begin Writeln('FAIL - Exception Error'); WriteLn(' ClassName=',
E.ClassName); WriteLn(' Message=', E.Message); end; end; end.
[QC Description]
Receive Access Violation when trying to Free Generic class object
with redefined constructor.
Sample test case in steps.
QC Entry 90016
QC #:
Date Reported:
Area:
82944
3/12/2010
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
No compiler Error although there is a syntax-Error in the Code
Compile the attached application below.
[QC Description]
If you are using a generic-Base-Type you can write code that has a
wrong syntax but the compiler compiles withtout an error.
QC Entry 82944
See that it compiles without expected errors as the parameters and
result types in the type declaration of TGenericBaseType do not
match those given where they are implemented.
program BTS275476;
{ No compiler Error although there is a syntax-Error in the Code }
{$APPTYPE CONSOLE}
type
TEnumerable<T> = class(TObject);
TGenericBaseType<T> = class
public
function GetSomeStuffWrongTypeParameter: TEnumerable<TGuid>;
function GetSomeStuffWrongResultType: TEnumerable<TGuid>;
end;
function TGenericBaseType<T>.GetSomeStuffWrongTypeParameter:
TEnumerable<TObject>;
begin
Result := nil;
end;
function TGenericBaseType<T>.GetSomeStuffWrongResultType:
TGenericBaseType<TGuid>;
begin
Result := nil;
end;
begin
WriteLn('FAIL - Compile-time expected');
end.
QC #:
Date Reported:
Area:
85968
7/5/2010
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Implicit operator won't compile if generic has constraint
program Project1; {$APPTYPE CONSOLE} uses SysUtils; type //
TGenRec<T> = record TGenRec<T : record> = record InternalValue :
T; class operator Implicit(value: T): TGenRec<T>; class operator
Implicit(value: TGenRec<T>): T; end; { TGenRec<T> } class operator
TGenRec<T>.Implicit(value: T): TGenRec<T>; begin
Result.InternalValue := value; end; class operator
TGenRec<T>.Implicit(value: TGenRec<T>): T; begin Result :=
value.InternalValue; end; var foo : TGenRec<Integer>; bar : integer;
begin bar := 42; foo := bar; assert(foo.InternalValue = bar); end.
[QC Description]
Test code in 'Steps'
Code causes compilation to fail with
[DCC Error] Project1.dpr(12): E2522 Operator 'Implicit' can not
convert to/from ancestor type
Changing to unconstrained declaration
// TGenRec<T> = record
allows compilation but is not type safe
QC Entry 85968
[FT]
QC #:
Date Reported:
Area:
88267
9/21/2010
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Generics Memory Problem
Compile the attached project in Embarcadero? Delphi? XE Version
15.0.3890.34076
[QC Description]
In the attached sample app setting a boolean in a class causes a
memory corruption for an unrelated variable.
Click the button
It appears the compiler is incorrectly mapping the variables in
memory.
QC Entry 88267
I could not attach the files so here is the main code.
If a dialog is shown then there is an error.
TOnChanged = procedure() of object;
TOnChangedList = class(TList<TOnChanged>);
// Generic object list that had register changes
TNotifiedObjectList<T: class> = class(TObjectList<T>)
protected
m_OnChanged : TOnChangedList;
public
constructor Create(); virtual;
destructor Destroy; override;
end;
// Generic object list that had register changes
TNotifiedObject = class(TObject)
protected
m_OnChanged : TOnChangedList;
public
constructor Create(); virtual;
destructor Destroy; override;
end;
TProvider = class(TNotifiedObject);
TProviders = class(TNotifiedObjectList<TProvider>)
private
m_bInitialised : Boolean;
public
procedure Initialise();
end;
procedure TForm5.Button1Click(Sender: TObject);
begin
m_Providers := TProviders.Create();
m_Providers.Initialise;
end;
procedure TProviders.Initialise;
begin
if assigned(m_OnChanged) then
showmessage('Not Nil');
m_bInitialised := True; // ERROR HERE - THIS LINE CAUSE
m_OnChanged variable to be changed
if assigned(m_OnChanged) then
showmessage('m_OnChanged Not Nil after setting unrelated
boolean');
end;
QC #:
Date Reported:
Area:
90767
1/9/2011
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Regression: E2010 with multiple default properties in a generic type
- save the following program or the attachment - dcc32
GenericsMultipleDefaultPropertiesTest.dpr expected: it compiles
actual: GenericsMultipleDefaultPropertiesTest.dpr(47) Error: E2010
[QC Description]
Incompatible types: 'Integer' and 'string'
Using multiple default properties in a generic type fails with E2010
GenericsMultipleDefaultPropertiesTest.dpr(48) Error: E2010
when not using the first specified property.
Incompatible types: 'Integer' and 'string' When changing the order of
the Value properties to this property Value[const AName: string]: T
This is regression from D2009 that happened already in D2010 RTM. read GetNamedValue write SetNamedValue; default; property
Value[AIndex: Integer]: T read GetValue write SetValue; default; then
-> see steps
only one error is raised for line 48 ("if A[0] = A['123'] then;") When
QC Entry 90767
turning the generic type into a classic type then it compiles. program
GenericsMultipleDefaultPropertiesTest; {$APPTYPE CONSOLE} type
TAssocArray<T> = record private function GetNamedValue(const
AName: string): T; function GetValue(AIndex: Integer): T; procedure
SetNamedValue(const AName: string; const AValue: T); procedure
SetValue(AIndex: Integer; const AValue: T); public property
Value[AIndex: Integer]: T read GetValue write SetValue; default;
property Value[const AName: string]: T read GetNamedValue write
SetNamedValue; default; end; { TAssocArray<T> } function
TAssocArray<T>.GetNamedValue(const AName: string): T; begin
Result := Default(T); end; function TAssocArray<T>.GetValue(AIndex:
Integer): T; begin Result := Default(T); end; procedure
TAssocArray<T>.SetNamedValue(const AName: string; const
AValue: T); begin // end; procedure
TAssocArray<T>.SetValue(AIndex: Integer; const AValue: T); begin //
end; type TStringAssocArray = TAssocArray<string>; procedure Test;
var A: TStringAssocArray; begin A['123'] := 'abc'; if A[0] = A['123']
then; end; begin WriteLn('PASS'); // on compile end.
QC #:
Date Reported:
Area:
91714
2/23/2011
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Regression: Delphi2010 shows error URW1111 and DelphiXE
freezes
By USc: - save the attachment - dcc32 GenericTest.dpr (or "dcc32
unit1.pas" with the code from the steps) expected: it compiles actual:
compilation "never" finishs Repeats also with this simplified version of
Generics.Collections. Removing the Foo method makes it compile.
unit Generics.Collections; interface type TList<T> = class(TObject)
procedure Foo; end; implementation procedure TList<T>.Foo; begin
end; end. Original Steps: There are two units: ////unit1//// unit unit1;
interface uses Generics.Collections; type TGenericClass<T> = class
public function DoSomething:TList<TObject>; end; implementation
uses unit2; { TGenericClass<T> } function
TGenericClass<T>.DoSomething: TList<TObject>; begin result := nil;
end; end. ////unit2//// unit unit2; interface uses unit1,
Generics.Collections; type TProblem =
class(TGenericClass<TObject>) end; implementation end.
[QC Description]
USc: This is REGRESSION from Delphi XE RTM. (Test case
compiles with D2009, D2010 and DXE RTM)
The IDE freezes when two units reference each other, and you try to
compile.
See also QC-Report: 78295
That issue where fixed, but this is slightly different.
If you try to compile the project with Delphi2010 it brings the internal
error URW1111. In DelphiXE the whole IDE freezes.
QC Entry 91714
QC #:
Date Reported:
Area:
93281
4/21/2011
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
Internal error using two TDelegatedComparer
[QC Description]
Declaring two TDelegatedComparer gives an interlan error
AV0BD09392-R0000000C-0
QC Entry 93281
Compile this and you have a AV0BD09392-R0000000C-0 internal
error program TDelegatedComparerCrash; {$APPTYPE CONSOLE}
uses Generics.Defaults, SysUtils; function _comparefunc(const Left,
Right: STRING): Integer; begin Result := 1; end; var LComparer:
IComparer<STRING>; begin try IF 1=1 THEN BEGIN LComparer :=
TDelegatedComparer<STRING>.Create( _comparefunc); END ELSE
BEGIN LComparer := TDelegatedComparer<STRING>.Create(
_comparefunc); END; { TODO -oUser -cConsole Main : Insérer du
code ici } except on E: Exception do Writeln(E.ClassName, ': ',
E.Message); end; end.
QC #:
Date Reported:
Area:
71097
2/3/2009
Compiler\Delphi\Generics
Description:
Steps:
[QC Short Description]
TDictionary<> is too slow on adding
Simple test: procedure TForm3.FormCreate(Sender: TObject); var M:
TDictionary<Integer, Integer>; I: Integer; begin M :=
TDictionary<Integer, Integer>.Create(); for I := 0 to 1000 do M.Add(I,
I); end;
[QC Description]
Adding 1000 elements in a Int/Int dictionary take TOO MUCH time.
It's very slow.
Consider rewriting it completely. The implementation is quite hacky
and is bound to be slow.
QC Entry 71097
QC #:
Date Reported:
Area:
90191
12/8/2010
Compiler\Delphi\Anonymous
Methods
Description:
Steps:
[QC Short Description]
Capturing array of const (TVarRec) gets corrupted
Compile and run the attached application below.
See the following program output indicating failure.
[QC Description]
Hi,
When capturing a array of const argument with a anonymous
procedure, that argument is corrupt later when the anonymous
function is called.
FAIL #1
I=0
Args[I].VType=40
vtInteger=0
vtUnicodeString=17
FAIL
See attached sample project.
program BTS281397;
I notice that if I change the argument to a const Args: array of const,
the compiler complains that it can not capture Args.
{ Capturing array of const (TVarRec) gets corrupted when involved
with an anonymous method }
I think this may be true also for the case where Args is not marked as
const, but then the compiler doesn't complain at all.
{$APPTYPE CONSOLE}
QC Entry 90191
uses
SysUtils,
Math;
var
Expected: Integer = 0;
Counter: Integer = 0;
procedure CallMyProc(Proc: TProc);
begin
Proc;
end;
procedure MakeCall(Fmt: String; Args: array of const);
begin
CallMyProc(
procedure
var
I: Integer;
begin
Expected := High(Args) + 1;
for I := 0 to High(Args) do
if not InRange(Args[I].VType, vtInteger, vtUnicodeString) then
begin
WriteLn('FAIL #1');
WriteLn(' I=', I);
WriteLn(' Args[I].VType=', Args[I].VType);
WriteLn(' vtInteger=', vtInteger);
WriteLn(' vtUnicodeString=', vtUnicodeString);
end
else
Inc(Counter);
end);
end;
procedure DoTest;
var
Obj: TObject;
S: String;
begin
Obj := TObject.Create;
try
S := Obj.ToString;
MakeCall('%s: test %s', [S, 'Value2']);
finally
Obj.Free;
end;
end;
begin
try
Dotest;
if Expected = Counter then
WriteLn('PASS')
else
WriteLn('FAIL');
except
on E: TObject do
WriteLn('FAIL - Exception=', E.ClassName);
end;
end.
I've seen a few different errors, it all depends on where the instruction
pointer ends up after this call:
SysUtils.pas:10751 JMP @CvtVector.Pointer[EDX*4]
Where EDX is initialized a few lines earlier:
10743: MOVZX EDX,[ESI].Byte[4] // TVarRec.VType
So, a bad TVarRec will cause a arbitrary jump when passed to the
Format function (or more specifically, to WideFormatBuf).
QC #:
Date Reported:
Area:
93646
5/6/2011
Compiler\Delphi\RTTI
Description:
[QC Short Description]
TRttiMethod fails to invoke method with large record parameter
Steps:
See the attachment for more details. ----------- ... type ...
TLargeRecord = record A: Cardinal; B: Cardinal; end; IMyInterface =
interface(IInvokable) ['{75551820-50D2-46D0-A6A9[QC Description]
AED63940664B}'] procedure TestSmall(const Value: TSmallRecord);
When using the Rtti unit to call a method, the method call will fail (with stdcall; procedure TestMedium(const Value: TMediumRecord);
access violation in most cases) if the method has a large (>4 byte)
stdcall; procedure TestLarge(const Value: TLargeRecord); stdcall;
record parameter, the parameter is a const parameter, and the calling end; TMyImplementation = class(TInterfacedObject, IMyInterface)
convention is stdcall.
public procedure TestSmall(const Value: TSmallRecord); stdcall;
QC Entry 93646
procedure TestMedium(const Value: TMediumRecord); stdcall;
procedure TestLarge(const Value: TLargeRecord); stdcall; end;
procedure TMyImplementation.TestLarge(const Value:
TLargeRecord); begin WriteLn(Format('Large(%d, %d)', [Value.A,
Value.B])); end; procedure TMyImplementation.TestMedium(const
Value: TMediumRecord); begin WriteLn(Format('Medium(%d, %d)',
[Value.A, Value.B])); end; procedure
TMyImplementation.TestSmall(const Value: TSmallRecord); begin
WriteLn(Format('Small(%d, %d)', [Value.A, Value.B])); end; procedure
TryRtti; var Obj: IMyInterface; Ctx: TRttiContext; Intf:
TRttiInterfaceType; Meth: TRttiMethod; S: TSmallRecord; M:
TMediumRecord; L: TLargeRecord; begin Obj :=
TMyImplementation.Create; Ctx := TRttiContext.Create; try Intf :=
Ctx.GetType(TypeInfo(IMyInterface)) as TRttiInterfaceType; ... ... //
large L.A := 1; L.B := 2; Obj.TestLarge(L);
Intf.GetMethod('TestLarge').Invoke(TValue.From<IMyInterface>(Obj),
[TValue.From<TLargeRecord>(L)]); finally Ctx.Free; end; ... -----------
QC #:
Date Reported:
Area:
84627
5/15/2010
Compiler\Delphi\RTTI
Description:
Steps:
[QC Short Description]
TRttiRecordType should override GetDeclaredFields and not
GetFields
- Compile and run this code (dcc32 qc84627.pas): // ----- program
qc84627; {$APPTYPE CONSOLE} uses Rtti; type TMyClass = class
FMyField: String; end; TMyRecord = record FMyField: String; end;
procedure PrintFields (AType: TRttiType); var Field: TRttiField; begin
[QC Description]
Writeln (AType.Name + ' declared fields:'); for Field in
TRttiType.GetDeclaredFields() is meant to return all fields which are AType.GetDeclaredFields do Writeln (' ' + Field.ToString); end; var
explicitly declared (i.e.: not inherited) for the type in question,
Context: TRttiContext; begin PrintFields (Context.GetType
whereas TRttiType.GetFields() merely collects and concatenates all
(TMyClass)); PrintFields (Context.GetType (TypeInfo (TMyRecord)));
ancestor fields. However, for some reason TRttiRecordType
end. // ----- Expected printout: TMyClass fields: FMyField: string @ 04
overloads GetFields() and not GetDeclaredFields(), which implies that TMyRecord fields: FMyField: string @ 00 Actual printout: Expected
you won't see the record fields if you call GetDeclaredFields().
printout: TMyClass fields: FMyField: string @ 04 TMyRecord fields:
The fix is trivial: rename TRttiRecordType.GetFields() to
TRttiRecordType.GetDeclaredFields().
QC Entry 84627
QC #:
Date Reported:
Area:
90337
12/15/2010
Compiler\Delphi\RTTI
Description:
Steps:
[QC Short Description]
TValue.AsVariant fails if contains interface as value
var I: IInterface; Val: TValue; V: Variant; begin I :=
TInterfacedObject.Create; Val := TValue.From<IInterface>(I); V :=
Val.AsVariant; // exception here end;
[QC Description]
When TValue contains an interface value, AsVariant will raise
EInvalidCast exception instead of returning a variant with VarType =
varUnknown.
QC Entry 90337
QC #:
Date Reported:
Area:
85704
7/23/2010 2:53:59 PM
Compiler\Delphi\RTTI\Custom
attributes
Description:
Steps:
[QC Short Description]
Attributes and TGUID
Declare the following types. When compiling you will get a internal
error TI2531
[QC Description]
When defining a attribute which takes a TGUID as an constructor
Parameter its impossible to use it with an interface.
QC Entry 85704
program QC85704;
{ When defining a attribute which takes a TGUID as an constructor
Parameter its
impossible to use it with an interface.
RAID 277635
}
type
IMyInterface = interface
['{EED5046C-AD96-41D7-AD3C-4C9E901681D1}']
end;
MyAttr = class(TCustomAttribute)
public
constructor Create(aGUID: TGUID);
end;
[MyAttr(IMyInterface)]
MyObj = class
end;
begin
WriteLn('PASS'); //PASS on compile//
end.
AMP: The initial report is RAID 277635. It cannot be reproduced
anymore ( see build 15.0.3855.32878).
QC #:
Date Reported:
Area:
89515
11/8/2010
RTL
Description:
Steps:
[QC Short Description]
UnicodeToUTF8 not Null Terminating
===== This case was previously lodged as number 89402 and closed
without a resolution. While the comments about nulls in memo
controls was valid, the use of the memo control shows that there are
[QC Description]
no nulls! That's the point. Please see the attachements to this case
Ref: case 87709 and 89402
for screen snapshots that show the problem clearly Thanks =====
UnicodeToUTF8 is still not null terminating the output in build
The following code when run in Delphi 2010 will show that the final
15.0.3890.34076 as stated in case 87709.
value of 's' has the null terminator. When run in Delphi XE version
QC Entry 89515
15.0.3890.34076 there is no null termination. procedure
TfrmMain.pbGoClick(Sender: TObject); const SOME_STRINGS :
array [0..9] of string = ('String 1', 'String 2', 'String 3 is longer than
Added by Sysop
string 2', 'String 4 is even longer than string 3', 'String 5 is shorter that
<<<<<<<<<<<<
4', 'Str 6', 'String 7', 'String 8 is a bit longer', 'String 9 is the longest
According to documentation,
string of all of these', 'String 10'); MAX_DEST_BYTES = 1024; var
[System.UnicodeToUtf8]
StrIdx : integer; i : integer; AChars : array [0..MAX_DEST_BYTES - 1]
http://docwiki.embarcadero.com/VCL/en/System.UnicodeToUtf8
of AnsiChar; UChars : array [0..MAX_DEST_BYTES - 1] of Char;
says
SrcChCnt : cardinal; CallChCnt : cardinal; s : string; begin
------mmLog.Clear; FillMemory (@AChars, MAX_DEST_BYTES, Ord
Call UnicodeToUtf8 to convert a Unicode string to a null-terminated
('X')); for StrIdx := low (SOME_STRINGS) to high (SOME_STRINGS)
sequence of UTF-8 characters.
do begin s := SOME_STRINGS [StrIdx]; StrPCopy (@UChars, s);
...
CallChCnt := UnicodeToUtf8 (@AChars, MAX_DEST_BYTES,
Dest receives the resulting null-terminated array of UTF-8 characters. @UChars, Length (s)); for i := 0 to Length (s) + 4 do s := Format ('%s
------%s:%.2x', [s, AChars [i], integer (byte (AChars [i]))]);
>>>>>>>>>>>>
mmLog.Lines.Add (s); end; end;
QC #:
Date Reported:
Area:
54801
11/13/2007
RTL
Description:
Steps:
[QC Short Description]
Variant conversion failure for published property
Compile and run the attached program below.
See the following program output indicating failure.
[QC Description]
Delphi still cannot do variant conversions to or from a WordArray
published property on a class that uses getter/setter methods.
QC Entry 54801
FAIL #1 Exception-EVariantTypeCastError: Invalid variant type
conversion
FAIL #2 Exception-EVariantTypeCastError: Invalid variant type
conversion
(JJS): In .NET, the following compile time errors are seen.
Error: E2010 Incompatible types: 'TBytes' and 'WordArray'
Error: E2010 Incompatible types: 'TBytes' and 'WordArray'
Error: E2010 Incompatible types: 'WordArray' and 'TBytes'
program bts256694;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
WordArray = array of Word;
TWordClass = class
protected
FArray: WordArray;
function GetArray: WordArray;
procedure SetArray(const Value: WordArray);
published
property ArrayValue: WordArray read GetArray write SetArray;
end;
{ TWordClass }
function TWordClass.GetArray: WordArray;
begin
result := FArray
end;
procedure TWordClass.SetArray(const Value: WordArray);
begin
FArray := Value
end;
var v: variant;
w: TWordClass;
i: integer;
Counter: Integer = 0;
const ct = 5;
begin
w := TWordClass.Create;
try
SetLength(w.FArray, ct);
for i := 0 to ct - 1 do
w.FArray[i] := i;
v := w.ArrayValue;
Inc(Counter);
except
on E:Exception do
Writeln('FAIL #1 Exception-', E.Classname, ': ', E.Message);
end;
try
v := w.FArray;
w.ArrayValue := v;
Inc(Counter);
except on E: Exception do
Writeln('FAIL #2 Exception-', E.Classname, ': ', E.Message);
end;
if Counter = 2 then
WriteLn('PASS');
w.Free;
end.
QC #:
Date Reported:
Area:
93744
5/10/2011
RTL\Delphi
Description:
Steps:
[QC Short Description]
TComparer<Pointer>.Default gives bad result
program BTS283080;
{$APPTYPE CONSOLE}
[QC Description]
TComparer<Pointer>.Default uses signed integer comparison instead
of unsigned. Thus, for example,
TComparer<Pointer>.Default.Compare(nil, Pointer($FFFFFFFF))
returns 1 instead of -1.
QC Entry 93744
uses
SysUtils,
Generics.Defaults;
var
C : Integer;
begin
try
C := TComparer<Pointer>.Default.Compare(nil,
Pointer($FFFFFFFF));
if(-1 = C) then
writeln('PASS')
else
writeln('FAIL');
except
on E: Exception do
writeln('FAIL -', E.ClassName, ' ', E.Message);
end;
end.
QC #:
Date Reported:
Area:
63854
6/28/2008
RTL\Delphi
Description:
Steps:
[QC Short Description]
TList<T>: "RemoveAt" method should be named "Delete"
var A: TList; B: TInterfaceList; C: TCollection; D: TList<Pointer>;
begin A.Delete(0); B.Delete(0); C.Delete(0); D.RemoveAt(0); // why?
end;
[QC Description]
On TList<T>, the "RemoveAt" method should be named "Delete" for
consistency with existing list classes (TList, TInterfaceList,
TCollection, etc.).
QC Entry 63854
QC #:
Date Reported:
Area:
87092
8/10/2010
RTL\Delphi
Description:
Steps:
(JJS: Reopened with Update 1)
Using the attached program below and the attached data file.
program FMTBCD_InvalidCalculations;
[QC Short Description]
Invalid summaries are calculated based on FMTBCD values
[QC Description]
Summing up elements of an array containing FMTBCD values
produces different results when enumerating the array from the
beginning to the end and vice versa.
note: This bug can be reproduced in all IDEs starting from RAD 2007,
but cannot be reproduced in Delphi 7. Our customers consider this
bug critical when using FMTBCD fields for summary calculations.
Please fix it.
QC Entry 87092
{$APPTYPE CONSOLE}
uses
Classes,
Variants,
fmtBCD,
SysUtils;
procedure DoTest;
var
I, J: Integer;
B: TBCD;
// Data: array of Variant;
Stream: TFileStream;
Sum1, Sum2: Variant;
L: Integer;
Data: Variant;
V: Variant;
begin
Stream := TFileStream.Create('bcd_data.dat', fmOpenRead or
fmShareDenyNone);
L := Stream.Size div SizeOf(TBCD);
WriteLn('#0 L=', L);
// SetLength(Data, L);
Data := VarArrayCreate([0, L-1], varVariant);
for I := 0 to L - 1 do
begin
Stream.ReadBuffer(B, SizeOf(TBCD));
// VarFMTBcdCreate(Data[I], B);
VarFMTBcdCreate(V, B);
Data[I] := V;
end;
Stream.Free;
// calculate summaries of FMTBCD values
Sum1 := 0;
Sum2 := 0;
J := L; //Length(Data);
// for I := 0 to Length(Data) - 1 do
for I := 0 to L-1 do
begin
Dec(J);
WriteLn('#1 I=', I, ' J=', J);
WriteLn('#2 Sum1=', Sum1, ' Sum2=', Sum2);
WriteLn('#3 Data[I]=', Data[I], ' Data[J]=', Data[J]);
WriteLn;
WriteLn('#4');
Sum1 := Sum1 + Data[I];
WriteLn('#5');
Sum2 := Sum2 + Data[J];
WriteLn('#6');
end;
if Sum1 <> Sum2 then
raise EVariantError.CreateFmt('Invalid fmtBCD calculations' +
' DirectSum = %s, ReverseSum = %s', [VarToStr(Sum1),
VarToStr(Sum2)]);
end;
begin
try
DoTest;
except
on E: TObject do
WriteLn('FAIL - Exception=', E.ClassName);
end;
end.
QC #:
Date Reported:
Area:
90424
12/20/2010
RTL\Delphi
Description:
Steps:
[QC Short Description]
Search for RegOpenKey in DataBkr.pas, MConnect.pas,
RegOpenKey is a 16 bit compatiblity function and should not be used ScktMain.pas, SConnect.pas, ActiveScriptCat.pas, ComObj.pas
[QC Description]
RegOpenKey is still used in OleAuto.pas even though it is for
compatibility with 16-bit versions of Windows only. Please use
RegOpenKeyEx instead.
QC Entry 90424
QC #:
Date Reported:
Area:
76028
7/23/2009
RTL\Delphi
Description:
[QC Short Description]
please export additional zlib functions / structures
Steps:
Additional info: gz_header = packed record text : integer; //* true if
compressed data believed to be text */ time : Cardinal; //* modification
time */ xflags : integer; //* extra flags (not used when writing a gzip
[QC Description]
file) */ os : integer; //* operating system */ extra : PByte; //* pointer to
there are LOTS of projects which require zlib (png, graphicex, indy...) extra field or Z_NULL if none */ extra_len : Cardinal; //* extra field
each of them needs to recompile zlib and ends with lot of duplicated length (valid if extra != Z_NULL) */ extra_max : Cardinal; //* space at
code...
extra (only when reading header) */ name : PAnsiChar; //* pointer to
zero-terminated file name or Z_NULL */ name_max : Cardinal; //*
Simply modify / recompile is not an easy task for everyone, because space at name (only when reading header) */ comment : PAnsiChar;
of c obj linking problem.
//* pointer to zero-terminated comment or Z_NULL */ comm_max :
Cardinal; //* space at comment (only when reading header) */ hcrc :
I suggest to export all potential functions from zlib pas; there is
integer; //* true if there was or will be a header crc */ done : integer; //*
nothing else but simple declarations to put in interface and mark as
true when done reading gzip header (not used when writing a gzip
external in implementation.
file) */ end; function deflateSetHeader(var strm: TZStreamRec; var
It was already done for what was necessary in png, why not benefit
head: gz_header): integer; external; function inflateGetHeader(var
all other projects?
strm: TZStreamRec; var head: gz_header): integer; external;
Quick list (in NO WAY complete)
- crc32
- internal wrappers: InflateInit/2, DeflateInit/2, ZCompressCheck...
- inflateReset, deflateReset, inflateSync, deflateParams
- gzheader !! (see steps)
- deflateSetHeader
- inflateGetHeader
See also my gzip extension
http://cc.embarcadero.com/Item/23490
BTW: is zlib really compiled with PWCHAR?? see inflateInit_
QC Entry 76028
QC #:
Date Reported:
Area:
90419
12/20/2010
RTL\Delphi
Description:
Steps:
[QC Short Description]
RegSetValue in OleAuto.pas is a 16 bit compatibility function
Take a look at OleAuto.pas: procedure CreateRegKey(const Key,
Value: string); begin RegSetValue(HKEY_CLASSES_ROOT,
PChar(Key), REG_SZ, PChar(Value), Length(Value)); end;
[QC Description]
RegSetValue is still used in OleAuto.pas even though it is for
compatibility with 16-bit versions of Windows only. Please use
RegSetValueEx and keep in mind that both functions expect the size
of the buffer in bytes according to the Windows SDK. Currently it is
called with the number of characters.
QC Entry 90419
QC #:
Date Reported:
Area:
91195
1/28/2011
RTL\Delphi
Description:
Steps:
[QC Short Description]
Hiro is not fathom (do not localize)
EXP: Ja\RTLConsts.pas SFathomsDescription = '????'; // Japanese
katakana "fazomu" ACT: Ja\RTLConsts.pas SFathomsDescription =
'?'; // <- Kanji 'Hiro'
[QC Description]
Hiro is not fathom (do not localize).
[Definition of fathom]
1 feet = 0.3048 m (International foot)
1 fathom = 6 feet = 1.8288 m
[Definition of Hiro]
1 Shaku (Japanese) = 10 / 33 m
1 Hiro (Japanese) = 6 Shaku = 1.818 m
QC Entry 91195
QC #:
Date Reported:
Area:
82588
3/1/2010
RTL\Delphi
Description:
Steps:
[QC Short Description]
Winsock.pas needs to be updated to Winsock 2.2
[QC Description]
The header, Winsock.pas should be updated for the Winsock 2.2
specifications as well as some additional functions that Microsoft has
included in their stack.
The Winsock.pas file is still based on Winsock 1.1 which is over 16
years old. Winsock 2.2 was introduced in 1996 and was included in
Windows NT 4.0, as an optional addon for WIndows 95, and has
been included since then. Winsock 2.2 supports some things that
were not included in the Winsock 1.1 specification and supports
things such as layered service providers (LSP's), namespaces, IPv6
addresses, and various other stuff.
The only way that the Winsock 1.1 spefication file header works is
that there's a WInsock 1.1 compatability shim, and you are only using
the Winsock 1.1 subset of functions.
QC Entry 82588
QC #:
Date Reported:
Area:
83172
3/19/2010
RTL\Delphi
Description:
[QC Short Description]
Update zlib to version 1.2.4
[QC Description]
Steps:
http://www.zlib.net/
Current release: zlib 1.2.4, March 14, 2010
QC Entry 83172
Added by Sysop
<<<<<<<<<<<<<
zlib 1.2.5 has been released.
>>>>>>>>>>>>>
QC #:
Date Reported:
Area:
93741
5/10/2011
RTL\Delphi
Description:
Steps:
[QC Short Description]
TComparer<Variant> and TEqualityComparer<Variant> gives bad
result
... uses ... Generics.Defaults, Variants, ...; ... procedure Test; var C:
IComparer<Variant>; V1, V2: Variant; C1, C2: Integer; begin C :=
TComparer<Variant>.Default; V1 := $FFFFFFFF;
TVarData(V1).VType := varNull; C1 := C.Compare(V1, Null); C2 :=
C.Compare(2.1, 100); Assert((C1 = 0) and (C2 < 0)); end;
[QC Description]
TComparer<Variant> and TEqualityComparer<Variant> both use
some fundamentally wrong comparison technique: (this was copied
from Generics.Defaults)
function Compare_Variant(Inst: PSimpleInstance; Left, Right:
Pointer): Integer;
var
l, r: string;
begin
try
l := PVariant(Left)^;
r := PVariant(Right)^;
Result := Compare_UString(nil, l, r);
except
Result := BinaryCompare(Left, Right, SizeOf(Variant));
end;
end;
#1 When Left or Right is Null, first an exception is raised (stopping the
debugging of course), then it compares the two values binary, which
gives random result (since being Null means VType = varNull, and
the rest is to be ignored).
#2 When Left and Right are numbers, this comparison gives an
alphabetical ordering, which is totally wrong for numbers.
#3 When Left or Right contains a variant array, first the result is still
random, since the array data is at the location referenced by the
VArray field.
Please, correct this by calling VarCmp or some other working variant
comparison!
QC Entry 93741
QC #:
Date Reported:
Area:
88711
10/6/2010
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
ShLwApi StrFormatByteSize and StrFormatByteSize64 declared
wrong
program TestFormatByteSize; {$APPTYPE CONSOLE} uses
SysUtils, ShLwApi; function FormatByteSize(S: Int64): string; var Buf:
Array[0..100] of Char; begin FillChar(Buf, SizeOf(Buf), #0); Result :=
StrFormatByteSize(S, Buf, Length(Buf)); end; var tmp: string; begin
try tmp := FormatByteSize(1000); if AnsiSameText(tmp, '1000 bytes')
then Writeln('PASS') else Writeln('FAIL; tmp = ', tmp, ' but should be
1000 bytes'); except on E: Exception do Writeln(E.ClassName, ': ',
E.Message); end; end.
[QC Description]
StrFormatByteSize maps to the Ansi function and uses a paramater
mix of the Ansi and Wide function.
ShLwAp.pas:
function StrFormatByteSize(dw: DWORD; szBuf: PChar; uiBufSize:
UINT): PChar; stdcall;
function StrFormatByteSize; external shlwapi32 name
'StrFormatByteSizeA';
should be
function StrFormatByteSize(qdw: LONGLONG; szBuf: PWideChar;
uiBufSize: UINT): PWideChar; stdcall;
function StrFormatByteSize; external shlwapi32 name
'StrFormatByteSizeW';
Please note that the first parameter of the Ansi function needs a
DWORD, the first paramter of the Wide function needs a
LONGLONG.
Also the import of StrFormatByteSize64 looks really weird. The import
name with a % does not exist.
function StrFormatByteSize64; external shlwapi32 name
'StrFormatByteSize64(%)';
function StrFormatByteSize64A; external shlwapi32 name
'StrFormatByteSize64(%)';
function StrFormatByteSize64W; external shlwapi32 name
'StrFormatByteSize64(%)';
QC Entry 88711
QC #:
Date Reported:
Area:
76638
8/12/2009
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
Unit WinSvc out of date
Open WinSvc.pas with your favorite editor.
[QC Description]
Newer features such as:
Constants
SERVICE_CONTROL_PARAMCHANGE
SERVICE_CONTROL_NETBINDADD
SERVICE_CONTROL_NETBINDREMOVE
SERVICE_CONTROL_NETBINDENABLE
SERVICE_CONTROL_HARDWAREPROFILECHANGE
SERVICE_CONTROL_POWEREVENT
SERVICE_CONTROL_SESSIONCHANGE
Types
SERVICE_STATUS_PROCESS
ENUM_SERVICE_STATUS_PROCESS
Functions
EnumServicesStatusEx
RegisterServiceCtrlHandlerEx
are simply missing from unit WinSvc.
The copyright notice says 1985-1999. 1999 was ten years ago, and it
shows.
QC Entry 76638
QC #:
Date Reported:
Area:
89209
10/25/2010
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
Add SetFilePointerEx declaration
[QC Description]
It would be nice to have SetFilePointerEx function declared because
SetFilePointer is a headache when you're working with >4Gb files.
QC Entry 89209
Added by Sysop
<<<<<<<<<<<
For myself I created following declaration:
function SetFilePointerEx(hFile: THandle; liDistanceToMove: Int64;
var lpNewFilePointer: Int64; dwMoveMethod: DWORD): Boolean;
stdcall; external kernel32 name 'SetFilePointerEx';
>>>>>>>>>>>
QC #:
Date Reported:
Area:
92217
3/11/2011
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
Run this code: {$O-} procedure Test(const BitmapHandle: HBITMAP;
Wrong record alignment in Delphi headers cause WinAPI functions to Value: Boolean); var BitmapInfo: Windows.TBitmap; begin if not
fail
Value then Exit; FillChar(BitmapInfo, SizeOf(BitmapInfo), 0); if
Windows.GetObject(BitmapHandle, SizeOf(BitmapInfo),
[QC Description]
@BitmapInfo) = 0 then ShowMessage('FAIL'); // ... end; Assuming
See wingdi.h file:
BitmapHandle is valid handle and Value is True. Expected: this code
should run OK. Actual: this code will FAIL. See also attached file.
#ifndef _WINGDI_
Note: verified to fail on WinXP x32. Code works fine on Win7 x64
#pragma option push -b -a8 -pc -A- -w-pun /*P_O_Push*/
because of WOW64 layer.
#define _WINGDI_
...
/* Bitmap Header Definition */
typedef struct tagBITMAP
{
LONG bmType;
LONG bmWidth;
LONG bmHeight;
LONG bmWidthBytes;
WORD bmPlanes;
WORD bmBitsPixel;
LPVOID bmBits;
} BITMAP, *PBITMAP, NEAR *NPBITMAP, FAR *LPBITMAP;
This means 8 byte alignment for tagBitmap record.
See Windows.pas:
{$ALIGN ON} // <- same as {$A8}
{$MINENUMSIZE 4}
...
{ Bitmap Header Definition }
PBitmap = ^TBitmap;
{$EXTERNALSYM tagBITMAP}
tagBITMAP = packed record
bmType: Longint;
bmWidth: Longint;
bmHeight: Longint;
bmWidthBytes: Longint;
bmPlanes: Word;
bmBitsPixel: Word;
bmBits: Pointer;
end;
TBitmap = tagBITMAP;
{$EXTERNALSYM BITMAP}
BITMAP = tagBITMAP;
This means 1 byte alignment for TBitmap/tagBitmap because of
"packed" specificator.
It's wrong. The "packed" should be removed - making alignment of
this record to be 8 bytes, as indicated in Windows headers.
QC Entry 92217
QC #:
Date Reported:
Area:
94226
5/25/2011
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
wrong declaration: MessageBoxIndirect
function MsgBox(Title, Text: string; IconType: UInt8; uType: UInt16):
UInt8; var MBox: MsgBoxParams; begin with MBox do begin
hwndOwner := Application.Handle; lpszCaption := PWideChar(Title);
lpszText := PWideChar(Text); dwStyle := MB_USERICON +uType;
HInstance := hRes; case IconType of MB_ICONINFORMATION:
[QC Description]
i was suggested to report this as a bug
https://forums.embarcadero.com/message.jspa?messageID=355938
i tried to create custom messagebox using MessageBoxIndirect
function. but i can't get the right return value since delphi declare the
return value as bool not integer. so i can only create custom
messagebox, but i don't know which button the user press
lpszIcon := MakeIntResource('MB_Info'); MB_ICONQUESTION:
lpszIcon := MakeIntResource('MB_Question'); MB_ICONWARNING:
lpszIcon := MakeIntResource('MB_Warning'); MB_ICONERROR:
lpszIcon := MakeIntResource('MB_Error'); else dwStyle := uType;
end; end; Result := MessageBoxIndirect(MBox); end; this is my
custom msgbox function. i get an error when i compile it. coz return
value MessageBoxIndirect (in delphi) declared as bool while it should
be integer
thank you
QC Entry 94226
QC #:
Date Reported:
Area:
93215
4/19/2011
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
Wrong definition ICustomDestinationList.AppendCategory
[QC Description]
shlobj.pas line 7953:
function AppendCategory(pszCategory: LPCWSTR;
var poa: IObjectArray): HRESULT; stdcall;
Added by Sysop
<<<<<<<<
Please see attached project to verify this issue.
>>>>>>>>
I think that the definition below:
function AppendCategory(pszCategory: LPCWSTR;
const poa: IObjectArray): HRESULT; stdcall;
QC Entry 93215
QC #:
Date Reported:
Area:
94846
6/7/2011
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
DwmSetIconicLivePreviewBitmap not declared correctly
Added by Sysop <<<<<< [DwmApi.pas] function
DwmSetIconicLivePreviewBitmap(hwnd: HWND; hbmp: HBITMAP;
var pptClient: TPoint; dwSITFlags: DWORD): HResult; stdcall;
>>>>>>
[QC Description]
The function DwmSetIconicLivePreviewBitmap has a parameter
pptClient. MSDN says this is optional, but the pascal translation uses
a var parameter.
The general rule for optional parameters is to use a pointer instead of
var,
so a PPoint (pointer to TPoint) would be the more correct translation.
QC Entry 94846
QC #:
Date Reported:
Area:
21043
11/5/2005
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
Convert shlwapi.h to pascal
[QC Description]
The include file shlwapi.h is not translated to pascal. It contains many
functions to access file systems, internet, registry and more...
QC Entry 21043
QC #:
Date Reported:
Area:
54503
11/7/2007
RTL\Delphi\WinAPI
Description:
[QC Short Description]
SHLGUID.h translation MIA
[QC Description]
I needed these two in my latest project:
SID_STopLevelBrowser: TGUID = '{4C96BE40-915C-11CF-99D300AA004AE837}';
SID_SWebBrowserApp: TGUID = '{0002DF05-0000-0000-C000000000000046}';
Steps:
I had to add them manually because noone has bothered converting
SHLGUID.h!
Without these declared, you won't get very far writing an IE plugin.
(not that it matters much, without Delphi.x64 you're dead in the water
as far as plugins for 64-bit IE are concerned anyway)
QC Entry 54503
QC #:
Date Reported:
Area:
84050
4/22/2010
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
Please update WinSock.pas or add WinSock2.pas
[QC Description]
Please add to RTL WinSock 2 functions such as WSASocket or
WSASend (defined in WinSock2.h in the SDK).
Classes in ScktComp.pas could encapsulate those functions instead
of WinSock 1 functions.
Note that TWinSocketStream.Read / Write use ReadFile and
WriteFile that is not considered as a good thing, see
http://support.microsoft.com/kb/192800/en-us
Michel
Added by Sysop
<<<<<<<<<<<
This issue is related to RAID#250977(QC#46527), which was closed
as 'Fixed'.
>>>>>>>>>>>
QC Entry 84050
QC #:
Date Reported:
Area:
90549
12/28/2010
RTL\Delphi\WinAPI
Description:
Steps:
[QC Short Description]
ShLwApi. Wrong declarations
[QC Description]
stdcall directive missing in the declaration of following functions:
StrCmpIW
StrCmpI
StrCpyW
StrCpy
StrCpyNW
StrCpyN
QC Entry 90549
QC #:
Date Reported:
Area:
7618
3/17/2004
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
Delphi 7 MaxSingle is not a single
The potential for error is illustrated below.
program Test;
[QC Description]
The delphi help states under " MaxSingle constant" that
"The maximum value of the single precision floating point type."
... "is const MaxSingle: Single = 3.4e+38;"
This is incorrect, the actual code is "const MaxSingle = 3.4e+38;"
which means it is typed as an extended (I think).
3.4e+38, when stored in a single, gets rounded to 3.3999...e+38
Thus, the value of MaxSingle cannot actually be stored in a single at
all. It is also not the largest number you can store in a single, that is
3.40282346638528859811704183484516925440e38
{$APPTYPE CONSOLE}
uses
Math;
var
s: Single;
begin
s := MaxSingle; // rounding occurs here
if (s = MaxSingle) then
WriteLn('PASS')
else
QC Entry 7618
WriteLn('FAIL');
end.
QC #:
Date Reported:
Area:
89696
11/16/2010
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
NormalizeBcd return incorrect result if BCD's precision is 64
Run the following test cases: procedure TTestCase_Bcd.Test1; const
B: TBcd = (Precision: 64; SignSpecialPlaces: 136; fraction: (0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 149,
[QC Description]
131, 128, 87)); var B1: TBcd; begin NormalizeBcd(B, B1, 18, 8);
I have 2 test cases that fail the NormalizeBcd in unit FmtBcd.pas (see CheckEquals('-76.95838057', BcdToStr(B1)); end; procedure
"Steps to Reproduce").
TTestCase_Bcd.Test2; const B: TBcd = (Precision: 18;
SignSpecialPlaces: 136; fraction: (0, 0, 0, 0, 118, 149, 131, 128, 87,
NormalizeBcd will return incorrect result if the BCD value's precision 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); var B1:
is 64.
TBcd; S: string; begin NormalizeBcd(B, B1, 64, 8); CheckEquals('76.95838057', BcdToStr(B1)); end;
Added By Sysop
<<<<<<<<
Please see [Comments] and [Workaround] for more detail.
>>>>>>>>
QC Entry 89696
QC #:
Date Reported:
Area:
90083
12/2/2010
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
fmtbcd.StrToBCD returns '123-' as '123='
procedure TForm9.Button1Click(Sender: TObject); var B : TBCD; s:
string; begin S := '123-' B := StrToBcd(S); S := BcdToStr(B);
Showmessage(S); // Displays '123=' end;
[QC Description]
When our users enter an invalid numeric value in a TFMTBCD field
such as '123-', the StrToBCD function returns '123=' because the
internal InvalidBCDString function allows '+' or '-' to be in any position,
but later code expect those characters to only be in the first position.
Under workaround is the Delphi source that I modified to change this
behavior,.
QC Entry 90083
QC #:
Date Reported:
Area:
90371
12/17/2010
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
TCharacter.ToLower failure
Create an application that converts a string with TCharacter.ToLower.
Compile it with DelphiXE(SP1) Executing it under Win2000 causes
failure Added by Sysop <<<<<<<<<<<<<< procedure
TForm2.Button1Click(Sender: TObject); var str: string; begin str :=
TCharacter.ToUpper(Edit1.Text); // or
TCharacter.ToLower(Edit1.Text); ShowMessage(str); end;
>>>>>>>>>>>>>>
[QC Description]
The TCharacter.ToLower class-method
fails only under Win2000SP4.
Works fine with WinXP/Win7.
( Systemerror Code:87: wrong parameter )
This Error did not occur using Delphi2009.
Added by Sysop
<<<<<<<<<<<<<<
TCharacter.ToLower and TCharacter.ToUpper cause error when
passing string parameter on Windows 2000 SP4.
>>>>>>>>>>>>>>
QC Entry 90371
QC #:
Date Reported:
Area:
93360
4/25/2011
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
TInterlocked.Exchange bug
Program syncobjs_tinterlocked_exchange_bug; {$APPTYPE
CONSOLE} Uses SyncObjs; Var d1, d2 : Double; Begin d1 := PI; d2
:= PI * PI; WriteLn('d1 = ', d1); WriteLn('d2 = ', d2);
WriteLn('TInterlocked.Exchange(d1, d2); must return initial value of
d1 (', d1, '), but...'); WriteLn('...returned value is ',
TInterlocked.Exchange(d1, d2), ', value of d2'); ReadLn; End.
[QC Description]
SyncObjs.TInterlocked.Exchange() with Double type parameters has
a bug with returned value. See "Steps"
QC Entry 93360
QC #:
Date Reported:
Area:
94322
5/27/2011
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
RTTI.TValue doesn't handle ordinal negative values well
Compile and run the attached application below.
See the following program output indicating failure.
[QC Description]
When creating a TValue.From<OrdinalType> with a negative value,
for a type less than Int64, it loose its sign when extracted using a
bigger type, such as the one used when accessing the data with
TValue.AsOrdinal.
See attached test project.
QC Entry 94322
FAIL #2 - RetVal=4294967295
FAIL #3 - RetVal=255
FAIL #4 - RetVal=65535
FAIL=1/4
program BTS283420;
{$APPTYPE CONSOLE}
uses
RTTI;
var
Expected: Integer = 0;
Counter: Integer = 0;
procedure DoTest;
var
RetVal: Int64;
begin
Inc(Expected, 4);
RetVal := TValue.From(Int64(-1)).AsOrdinal;
if RetVal = -1 then
Inc(Counter)
else
WriteLn('FAIL #1 - RetVal=', RetVal);
RetVal := TValue.From(Longint(-1)).AsOrdinal;
if RetVal = -1 then
Inc(Counter)
else
WriteLn('FAIL #2 - RetVal=', RetVal);
RetVal := TValue.From(Shortint(-1)).AsOrdinal;
if RetVal = -1 then
Inc(Counter)
else
WriteLn('FAIL #3 - RetVal=', RetVal);
RetVal := TValue.From(SmallInt(-1)).AsOrdinal;
if RetVal = -1 then
Inc(Counter)
else
WriteLn('FAIL #4 - RetVal=', RetVal);
end;
begin
try
DoTest;
if Counter = Expected then
WriteLn('PASS=', Counter)
else
WriteLn('FAIL=', Counter, '/', Expected);
except
on E: TObject do
WriteLn('FAIL - Exception=', E.ClassName);
end;
end.
QC #:
Date Reported:
Area:
80947
1/7/2010
RTL\Delphi\Other RTL
Description:
Steps:
[AMP]
[QC Short Description]
TDictionary.ExtractPair Fails and creates memory leak
Download the attached test project and run it. It will report the errors.
It has two configurations - Standard and Fixed. In the Fixed
configuration the Dictionary is modified to work as I think it should.
[QC Description]
The documentation is a bit lacking on this function, but it seems
reasonable to assume that ExtractPair should reteurn the Key/Value
pair for the supplied Key.
Incidentally, the fix relies on access to private members of
TDictionary which should not work- so i think that is another minor
compiler bug.
Calling it with a valid key causes the key/value pair to be hidden from
the list, but does not return the values to the user. Furthermore, if the
dictionary is a TObjectDictionary set to own the Objects, the
reference to the object is lost, but the object is not freed so we get a
memory leak.
///////////////////////////////////////////////////////
Although the bug was reported only on Vista, it also reproduces on
Windows. However, the Fixed configuration does not work on
Windows.
[AMP]
/////////////////////////////////////////////////////
QC Entry 80947
[PulsarBeta]
QC #:
Date Reported:
Area:
82487
2/25/2010
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
Rtti.ConvStr2Str is wrong (when cast a unicode string to widestring)
Compile and run the attached application below.
See the following program output indicating failure.
[QC Description]
see steps
QC Entry 82487
// Rtti.pas function ConvStr2Str
tkWString: TValue.Make(@asWide, ATarget, AResult); // Wrong
FAIL #1 - v.AsString=()
FAIL - Expectation Failure (0/1)
program BTS275223;
{$APPTYPE CONSOLE}
uses
RTTI;
var
Expected: Integer = 0;
Counter: Integer = 0;
procedure RAID275223;
var
s: string;
v: TValue;
RetVal: String;
begin
Inc(Expected);
s := 'Name';
v := s;
v := v.Cast<WideString>;
RetVal := v.AsString;
if v.AsString = s then // !!!WRONG!!! Here v.AsString is empty;
Inc(Counter)
else
WriteLn('FAIL #1 - v.AsString=(',RetVal, ')');
end;
begin
try
RAID275223;
if Counter = Expected then
WriteLn('PASS')
else
WriteLn('FAIL - Expectation Failure (', Counter, '/', Expected, ')');
except
on E: TObject do
WriteLn('FAIL - Exception (', E.ClassName, ')');
end;
end.
QC #:
Date Reported:
Area:
91276
2/2/2011
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
ObjAuto.ObjectInvoke casts varBoolean to integer
Added by Sysop <<<<<<<<<< program Sample; {$APPTYPE
CONSOLE} uses SysUtils , ObjComAuto , Variants; type
{$methodinfo on} TSample = class( TObjectDispatch ) private type
[QC Description]
TGuessType = class( TObject ) published function guessType( avar :
When the function ObjAuto.ObjectInvoke attempts to cast the
OleVariant ): Integer; end; public constructor Create; reintroduce;
parameter data to the proper data types for the dispatch method
end; {$methodinfo off} function AsString( vt: Integer ): String; begin
being called, it is casting VarTypes of varBoolean to an integer. This case vt of varOleStr: Result := 'String'; varInteger: Result := 'Integer';
occurs when the ConvertKindOf returns ckNone. In the case where
varBoolean: Result := 'Boolean'; else Result := 'Unknown'; end; end;
the dispatch method being called accepts a variant type, the VarType procedure RunSample; var o: OleVariant; vt: Integer; begin o :=
of the value passed to the parameter is now identified as varInteger. TSample.Create as IDispatch; vt := o.guessType( 'string' ); if vt =
varOleStr then writeln( Format( '%s - Correct', [ AsString( varOleStr ) ]
According to the comments in the code it looks as though an intended ) ) else writeln( Format( '%s - Incorrect...Expected %s', [ AsString( vt
step is missing:
), AsString( varOleStr ) ] ) ); vt := o.guessType( 5 ); if vt = varInteger
// Convert Boolean/LongBool params to integer via hardcast to
then writeln( Format( '%s - Correct', [ AsString( varInteger ) ] ) ) else
Boolean
writeln( Format( '%s - Incorrect...Expected %s', [ AsString( vt ),
// ensuring that _VarToBool is called to fix a bit clearing issue.
AsString( varInteger ) ] ) ); vt := o.guessType( true ); if vt =
varBoolean then writeln( Format( '%s - Correct', [ AsString(
The code does not ensure the call to _VarToBool is made:
varBoolean ) ] ) ) else writeln( Format( '%s - Incorrect...Expected %s',
[ AsString( vt ), AsString( varBoolean ) ] ) ); end; { TSample }
if (VarType = varBoolean) then
constructor TSample.Create; begin inherited Create(
begin
TGuessType.Create, true ); end; { TSample.TGuessType } function
Temps[I] := Integer(Boolean(Params[I]));
TSample.TGuessType.guessType(avar: OleVariant): Integer; begin
ParamVarData := @Temps[I];
Result := VarType( avar ); end; begin try RunSample; readln; except
end;
on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
>>>>>>>>>>
The code is only converting the Boolean to an Integer.
QC Entry 91276
QC #:
Date Reported:
Area:
92869
4/5/2011
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
NormalizeBCD return incorrect result if precision/scale is changed
Run the following Test Case in Delphi XE: procedure
TTestCase_Bcd.Test_NormalizeBcd; const B: TBcd = (Precision: 19;
SignSpecialPlaces: 2; Fraction: (0, 0, 0, 0, 0, 0, 0, 1, 21, 80, 80, 1, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 159, 194, 3, 80, 192, 98, 146, 4, 2)); var C:
TBcd; begin NormalizeBcd(B, C, 18, 8); ShowMessage(BcdToStr(C));
//CheckEquals(StrToLocaleDecimal('11.55'), BcdToStr(C)); end; Act:
11.55050505 Exp: 11.55
[QC Description]
A BCD value of 11.55 (precision 19, scale 2) after normalize to
precision 18 and scale 8 return a new BCD that has more decimal
point.
QC Entry 92869
QC #:
Date Reported:
Area:
96851
7/29/2011
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
AV in TVirtualMethodInterceptor
{$APPTYPE CONSOLE}
[QC Description]
TVirtualMethodInterceptor causes Access Violation with some
functions
{$R *.res}
uses
----...
//and this causes Access Violation
obj := LTest.BadFunc(10.10, dbl); //access violation at 0x00404798:
read of address 0x33333333
...
----QC Entry 96851
System.Classes,
System.SysUtils,
System.Rtti;
type
TTest = class
function GoodFunc(Arg1: Integer; var Arg2: Double): TObject; virtual;
function BadFunc(Arg1: Double; var Arg2: Double): TObject; virtual;
end;
function TTest.BadFunc(Arg1: Double; var Arg2: Double): TObject;
begin
Result := nil;
end;
function TTest.GoodFunc(Arg1: Integer; var Arg2: Double): TObject;
begin
Result := nil;
end;
procedure DoTest;
var
vmi: TVirtualMethodInterceptor;
obj: TObject;
dbl: Double;
LTest: TTest;
begin
vmi := TVirtualMethodInterceptor.Create(TTest);
vmi.OnBefore :=
procedure(Instance: TObject; Method: TRttiMethod;
const Args: TArray<TValue>; out DoInvoke: Boolean; out Result:
TValue)
begin
if (Method.Name = 'BadFunc') or (Method.Name = 'GoodFunc') then
begin
Result := TPersistent.Create;
DoInvoke := False;
end;
end;
LTest := TTest.Create;
vmi.Proxify(LTest);
dbl := 10.10;
//This is OK
obj := LTest.GoodFunc(10, dbl);
Writeln ( obj.ClassName );
dbl := 10.10;
// and this causes Access Violation
obj := LTest.BadFunc(10.10, dbl); //access violation at 0x00404798:
read of address 0x33333333
Writeln ( obj.ClassName );
end;
begin
try
DoTest;
{ TODO -oUser -cConsole Main : Insert code here }
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
QC #:
Date Reported:
Area:
73629
5/5/2009
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
CreateMethodPointer doesn't work when one of the parameters is a
unit Unit1; interface uses Windows, Messages, SysUtils, Variants,
Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ObjAuto; type
set
[QC Description]
in ObjAuto
function CreateMethodPointer(const ADynamicInvokeEvent:
TDynamicInvokeEvent; TypeData: PTypeData): TMethod; overload;
CreateMethodPointer fails when one of the parameters passed in
typedata is a set, the problem is in ObjAuto function
GetTypeSize(TypeInfo: PTypeInfo): Integer which doesen't take care
of tkSet
QC Entry 73629
TForm1 = class(TForm) btnTypeInfo: TButton; procedure
btnTypeInfoClick(Sender: TObject); private procedure
InternalInvoke(Params: PParameters; StackSize: Integer); end; var
Form1: TForm1; implementation uses TypInfo; {$R *.dfm} procedure
TForm1.btnTypeInfoClick(Sender: TObject); var MethInfo: PTypeInfo;
TypeData: PTypeData; begin MethInfo := TypeInfo(TKeyEvent);
TypeData := GetTypeData(MethInfo);
CreateMethodPointer(InternalInvoke, TypeData) end; end.
QC #:
Date Reported:
Area:
85206
6/7/2010
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
filesearch not correct
clear Added by Sysop <<<<<<<<<<<< simply try a filesearch for
"user32.dll": if you are before that search in c:\temp (or somewhere
alse), you get "c:\windows\system32\user32.dll" (full path). If you
[QC Description]
execute chdir('c:\windows\system32') before the fileserach, you get
VCL: Delhphi 6, Delphi7 ... Delphi 2010
only "user32.dll". In the help ist said, that you allways will get the
filename with full path. Regards MM p.s.: c:\windows\system32 ist the
in the implementation of sysutils.filesearch there is a bug: if the file to place, where user32.dll usually resides, you can make the same with
be searched exists in the "actual directory", then filesearch returns the you own files... >>>>>>>>>>>>
filename without the path, no means, wether the "actual path" is in the
directorylist, passed to "filesearch" or not.
QC Entry 85206
QC #:
Date Reported:
Area:
95290
6/17/2011
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
Character.pas ToLower/ToUpper system error with
LOCALE_INVARIANT
1. Create new VCL forms application. 2. Add Character module to
uses secton. 3. Double click on form's OnCreate event. 4. Add
following code to FormCreate procedure. Caption :=
ToLower(Application.Title); 5. Build application. 6. Launch, MS
Windows 2000. 7. Copy your application's exe file to any folder of
Windows 2000 and run exe. 8. You will see exception message box
"EOSError. System error code 87: wrong parameter". That's how
Delphi XE broke our application for Windows 2000 based corporate
network.
[QC Description]
From Delphi XE version TCharacter.ToLower/ToUpper functions use
LOCALE_INVARIANT, but this locale type is NOT supported in
Windows 2000! This causes application crash with "EOSError,
system error code 87" after launching it.
More about LOCALE_INVARIANT:
http://msdn.microsoft.com/en-us/library/dd373795
You can see that it is supported starting from Windows XP.
There is "GetThreadLocale" function must be returned back like it was
in Delphi 2010.
QC Entry 95290
QC #:
Date Reported:
Area:
50097
8/6/2007
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
ObjAuto AV on XEON
Locate the following method in ObjAuto.pas
[QC Description]
When using interface TMethodHandlerInstance.RegisterStub from
ObjAuto.pas line 784 "JMP ECX" raises AV on DEP-enabled cpu (ex.
XEON).
QC Entry 50097
procedure TMethodHandlerInstance.RegisterStub;
asm
PUSH EAX
PUSH ECX
PUSH EDX
MOV EDX,ESP
CALL Handler
// Pop EDX and ECX off the stack while preserving all registers.
MOV [ESP+4],EAX
POP EAX
POP EAX
POP ECX // Self
LEA ECX,[ECX].TMethodHandlerInstance.Return
// Jump to the actual return instruction since it is most likely not just a
RET
JMP ECX
end;
The final asm command "JMP ECX" causes the DEP failure.
QC #:
Date Reported:
Area:
70510
1/14/2009
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
ActiveX.CoInitializeSecurity() seventh parameter is no longer
reserved and can be set
Check http://msdn.microsoft.com/enus/library/ms693736(VS.85).aspx and CoInitializeSecurity()
declaration.
[QC Description]
ActiveX.CoInitializeSecurity() seventh parameter is still called
pReserved2. Since Windows 2000 that parameter became named
pAuthList, a pointer to a
SOLE_AUTHENTICATION_LIST structure.
SYSOP:
http://msdn.microsoft.com/en-us/library/ms693736(VS.85).aspx
QC Entry 70510
QC #:
Date Reported:
Area:
77366
9/4/2009
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
AV using new RTTI on enum fields with explicit values
Compile and run the attached application below.
See the following program output indicating failure.
[QC Description]
When you have an enum declaration like this (with a specific value
assignment):
type
TMyEnum = (Value1 = 10, Value2, Value3);
IntField: 123
EnumField1: Value2
FAIL - Exception Error
ClassName=EAccessViolation
Message=Access violation at address 00447C14 in module
'BTS272768.exe'. Read of address 00000004
you get an AV when using TRttiField.GetValue on a field of this type.
program BTS272768;
When the enum does NOT contain explicit assignments like this:
{$APPTYPE CONSOLE}
type
TMyEnum = (Value1, Value2, Value3);
then there is no problem.
See steps and attachment for details.
QC Entry 77366
uses
Rtti,
SysUtils;
type
TMyEnum1 = (Value1, Value2, Value3);
TMyEnum2 = (Value4 = 10, Value5, Value6);
TMyObject = class
public
IntField: Integer;
EnumField1: TMyEnum1;
EnumField2: TMyEnum2;
end;
procedure DoTest;
var
MyObject: TMyObject;
RttiContext: TRttiContext;
ObjType: TRttiType;
Field: TRttiField;
Value: TValue;
begin
MyObject := TMyObject.Create;
try
MyObject.IntField := 123;
MyObject.EnumField1 := Value2;
MyObject.EnumField2 := Value6;
ObjType := RttiContext.GetType(MyObject.ClassInfo);
Assert(Assigned(ObjType));
{ Read fields }
for Field in ObjType.GetFields do
begin
Value := Field.GetValue(MyObject); { <-- AV here when accessing
EnumField2 }
WriteLn(Field.Name, ': ', Value.ToString);
end;
WriteLn('PASS');
finally
MyObject.Free;
end;
end;
begin
try
DoTest;
except
on E: Exception do
begin
WriteLn('FAIL - Exception Error');
WriteLn(' ClassName=', E.ClassName);
WriteLn(' Message=', E.Message);
end;
end;
end.
QC #:
Date Reported:
Area:
78808
10/20/2009
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
System.TObject.GetInterface bug.
For check we can request any faked interface ({CEDF24DE-00000000-8C75-EB871DC121FD} for example).
[QC Description]
line 9646 has code: "if (Int64(ObjCastGUID.D1) = Int64(IID.D1)) and
(Int64(ObjCastGUID.D4) = Int64(IID.D4)) then." for check of request
of object instance from interface type variable. But first part of
condition has bug -- fields D2 and D3 of TGUID record not verify (type
casting to Int64 is unnecessary).
QC Entry 78808
QC #:
Date Reported:
Area:
67587
10/6/2008
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
TRect type should have Height/Width properties
[QC Description]
Please add Height and Width to TRect.
I currently use record helpers to achieve this, but it would be nice if
they were in the standard RTL as well. (easier for code insight...)
Suggested implementation detail: Setting Width should set Right to
Left + Width.
The advantages of having Height and Width are tremendous. It
simplifies a lot of the code I have written recently.
QC Entry 67587
QC #:
Date Reported:
Area:
83817
4/13/2010
RTL\Delphi\Other RTL
Description:
[QC Short Description]
Steps:
Posix sysinfo() and sysctl() missing
[QC Description]
The Posix sysinfo() and sysctl() functions are missing. They can be
used to find the amount of system RAM, for example.
QC Entry 83817
QC #:
Date Reported:
Area:
87428
8/21/2010
RTL\Delphi\Other RTL
Description:
Steps:
[QC Short Description]
Original authors of RegularExpressionsCore and
RegularExpressionsAPI
[QC Description]
My name is misspelled in the original author comment in the
RegularExpressionsCore unit. It should be Jan Goyvaerts.
My name is missing from the original authors of the
RegularExpressionsAPI unit. Embarcadero's version of this unit
includes changes that I made to the pcre.pas unit from the JCL library
to make it work with TPerlRegEx. E.g. pcre_dispose does not exist in
the JCL version.
The RegularExpressionsAPI unit does not use the C++ wrapper
mentioned in the PCRE license statement.
QC Entry 87428
QC #:
Date Reported:
Area:
91072
1/24/2011
RTL\Delphi\Date - Time
Description:
Steps:
[QC Short Description]
SysUtils.FormatDateTime() may cause an access violation
program Project1; // Demonstrates that FormatDateTime can cause
an access violation // when called with valid arguments. {$APPTYPE
CONSOLE} uses Windows, SysUtils; // Output: "Test0 length=256"
[QC Description]
procedure Test0; var dt: TDateTime; begin dt :=
The FormatDateTime function that accepts a TFormatSettings
EncodeDate(2011,01,01); LongMonthNames[1] := StringOfChar('X',
parameter may cause an access violation when called with valid
130); Write('Test0 length='); WriteLn(length(FormatDateTime('MMMM
arguments.
MMMM', dt))); end; // Output: "Test1 length=256" procedure Test1;
var dt: TDateTime; Format: string; begin dt :=
Under similar circumstances, the other FormatDateTime function (the EncodeDate(2011,01,01); Format := 'YYYY "' + StringOfChar('X', 255)
one that accepts only 2 parameters) produces no Access violation
+ '"'; Write('Test1 length='); WriteLn(Length(FormatDateTime(Format,
and works as intended.
dt))); end; // Causes an access violation procedure Test2; var dt:
TDateTime; FormatSettings: TFormatSettings; begin dt :=
See the reproduction code.
EncodeDate(2011,01,01); // Choosing a much longer string corrupts
the stack to the extent that // exception handling becomes impossible
Doing a textual diff of both DateTimeToString functions (including all FormatSettings.LongMonthNames[1] := StringOfChar('X', 130);
nested functions) shows the cause of the AV: SizeOf(buffer) should
Write('Test2 length='); WriteLn(Length(FormatDateTime('MMMM
be Length(Buffer).
MMMM', dt, FormatSettings))); end; // Causes an access violation
QC Entry 91072
procedure Test3; var dt: TDateTime; Format: string; FormatSettings:
TFormatSettings; begin dt := EncodeDate(2011,01,01);
GetLocaleFormatSettings(GetThreadLocale, FormatSettings); //
Choosing a much longer string corrupts the stack to the extent that //
exception handling becomes impossible Format := 'YYYY "' +
StringOfChar('X', 255) + '"'; Write('Test3 length=');
WriteLn(Length(FormatDateTime(Format, dt, FormatSettings))); end;
begin Test0; Test1; try Test2; except on E: Exception do
Writeln(E.ClassName, ': ', E.Message); end; try Test3; except on E:
Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
QC #:
Date Reported:
Area:
89784
11/18/2010
RTL\Delphi\File Management
Description:
Steps:
[QC Short Description]
DirectoryExists return value Error when using invalid NET PATH
it's easy to reproduce: if DirectoryExists('\\xxxxxx\yyyyyy\') then
Caption := 'Yes' else Caption := 'No'; (Note: \\xxxxxx\yyyyyy\ is
invalide invalid NET PATH)
[QC Description]
DirectoryExists function return True when the directory(e.g., invalid
NET PATH) does not really exists.
QC Entry 89784
QC #:
Date Reported:
Area:
92517
3/23/2011
RTL\Delphi\File Management
Description:
Steps:
[QC Short Description]
ChangeFileExt doesn't check for trailing path delimiter
ChangeFileExt('c:\foo\bar\', '.newext') we'll get 'c:\foo\bar\.newext'
what is senseless.
[QC Description]
ChangeFileExt function doesn't check for trailing path delimiter.
QC Entry 92517
QC #:
Date Reported:
Area:
79820
11/26/2009
RTL\Delphi\Format + Float
Description:
Steps:
[QC Short Description]
Bug in FormatBcd() function
Compile and run the attached application below.
See the following program output indicating failure.
[QC Description]
FormatBcd() function outputs wrong result when the number on input FAIL #1 - Expected=1.90 Actual=1.9
is rounded up by the function and the the right padding with 0's is
FAIL #2 - Expected=2.00 Actual=2
requested by the format used.
The result of the function is not right-padded with zeroes as
compared to FormatFloat() function using the same number and
format.
program BTS273810;
{$APPTYPE CONSOLE}
Added by Sysop
uses
<<<<<<<<<
SysUtils, FMTBcd;
I should have used DoubleToBcd() function instead of CurrToBcd() in
the demo of course, but it doesn't matter, the resut is the same.
procedure DoTest;
const
And, This issue similar to QC#42792.
Format = '0.00';
>>>>>>>>>
var
QC Entry 79820
AFloat: Double;
ABcd: TBcd;
Expected, Actual: String;
Counter: Integer;
begin
Counter := 0;
// Expected result: '1.90'//
AFloat := 1.895;
CurrToBCD(AFloat, ABcd, MaxBcdPrecision, MaxBcdScale);
Expected := FormatFloat(Format, AFloat); // output: '1.90'
Actual := FormatBcd(Format, ABcd); // output: '1.9'
if Expected = Actual then
Inc(Counter)
else
WriteLn('FAIL #1 - Expected=', Expected, ' Actual=', Actual);
// Expected result: '2.00'//
AFloat := 1.995;
CurrToBCD(AFloat, ABcd, MaxBcdPrecision, MaxBcdScale);
Expected := FormatFloat(Format, AFloat); // output: '2.00'//
Actual := FormatBcd(Format, ABcd); // output: '2'//
if Expected = Actual then
Inc(Counter)
else
WriteLn('FAIL #2 - Expected=', Expected, ' Actual=', Actual);
if Counter = 2 then
WriteLn('PASS');
end;
begin
try
DoTest;
except
on E: Exception do
begin
WriteLn('FAIL - Exception Error');
WriteLn(' ClassName=', E.ClassName);
WriteLn(' Message=', E.Message);
end;
end;
end.
QC #:
Date Reported:
Area:
93782
5/11/2011
RTL\Delphi\Format + Float
Description:
Steps:
[QC Short Description]
Delphi XE does not honour regional settings
Create a New VCL Forms Application. Place a Speedbutton on the
form. Place a Label on the form. In the on click event of the
SpeedButton place the following code: Label1.Caption :=
FormatSettings.CurrencyString; Compile and run the application. On
my computer it should show 'R', but it shows '$' Other programs on
the PC honour these settings.
[QC Description]
Background: Win 7 Ultimate 64 Bit. Regional settings: Format:
English South Africa. Currency Symbol = 'R'. Other programs
installed honour these regional settings. Delphi XE Professional,
however reverts to the $ for currency.
Locale: English South Africa.
I actually did attach an image of the Locale settings.
QC Entry 93782
QC #:
Date Reported:
Area:
96844
7/29/2011
RTL\Delphi\Format + Float
Description:
Steps:
[QC Short Description]
Steps-to-reproduce for Windows 7 Enterprise: 1. Go to the Windows
TFormatSettings.TranslateDateFormat returns an incorrect result with "Start" menu. 2. Evoke the "Control Panel" window. 3. Choose the
Delphi XE.
"Clock, Language, and Region" option. 4. Choose "Change the date,
time, or number format". This will evoke the "Region and Language"
[QC Description]
dialog. 5. Click the "Additional Settings..." button. 6. Go to the "Date"
The TFormatSettings.TranslateDateFormat function does not take
tab. 7. Change the Short Date value in the Date formats group to the
into account that the Date Format can contain quoted date separators following: M.d.yyyy 'y.' 8. Apply changes. 9. Run the attached project.
that are simply added to the date.
The last character in the Form's caption is '/' instead of '.'
[Code]
----procedure TForm1.FormCreate(Sender: TObject);
begin
Self.Caption := DateToStr(Now);
end;
----[Result]
M.d.yyyy 'y.' --> 7.29.2011 y/
QC Entry 96844
QC #:
90244
Date Reported:
Area:
12/10/2010
RTL\Delph
i\Memory,
Pointer,
Address
Description:
[QC Short Description]
"Invalid floating point operation" when using Move and FillChar
Steps:
Run the attached
project: program
FPError;
[QC Description]
{$APPTYPE
We have been getting numerous reports from customers getting "Invalid floating point operation" exceptions in our code CONSOLE} uses
in places where Move or FillChar is called. We have never been able to reproduce this, and it only seems to happen in Windows, SysUtils,
certain situations.
Variants; type
TMyVariantClass =
With the help of this thread:
class(TCustomVari
antType) public
http://groups.google.com/group/borland.public.delphi.language.basm/browse_thread/thread/2697a84c1805e41b/58735 procedure Clear(var
a6c4cd2e566?q=EInvalidOp+in+Delphi+2007+FillChar+%26+Move#58735a6c4cd2e566
V: TVarData);
override; procedure
we have been able to create a small test project that reproduces this exception every time (we have tested it on
Copy(var Dest:
different machines with different versions of Windows too).
TVarData; const
Source: TVarData;
The test application may seem a bit contrived, but it demonstrates a situation where Move fails with a Floating Point
exception. It only fails if the X variable has the two values shown in the sample app. For other values of X, we were able
to get a Floating Point exception in the FillChar routine. There could be numerous other (less contrived) situations
leading to the same FPU state and exception.
Thanks to Pierre Le Riche for pointing us in the right direction.
QC Entry 90244
QC #:
Date Reported:
Area:
71267
2/8/2009
RTL\Delphi\Memory, Pointer,
Address
Description:
[QC Short Description]
PNativeInt missing
Steps:
const Indirect:
Boolean); override;
end; var
MyVarType:
TMyVariantClass;
DummyData:
String; X: Integer; {
TMyVariantClass }
procedure
TMyVariantClass.Cl
ear(var V:
TVarData); begin {
SetLength will call
Move. This call will
fail on the second
run. }
SetLength(Dummy
Data, X); { With
other values of X,
the Floating Point
exception occurs
when using
FillChar: } //
FillChar(DummyDat
a[1],
Length(DummyDat
a), 0); end;
procedure
TMyVariantClass.C
opy(var Dest:
TVarData; const
Source: TVarData;
const Indirect:
Boolean); begin
end; procedure
Test; var TestVar1,
TestVar2: Variant;
MyInt: Integer;
MyDouble: Double;
begin MyInt := 1;
MyDouble := 1;
{This works} X :=
27;
TVarData(TestVar1
).VType :=
MyVarType.VarTyp
e; TestVar1 :=
MyInt; {This doesn't
work} X := 63;
TVarData(TestVar2
).VType :=
MyVarType.VarTyp
e; TestVar2 :=
MyDouble; end;
begin MyVarType
:=
TMyVariantClass.C
reate; try Test;
except on E:
Exception do
Writeln(E.Message)
; end;
WriteLn('Done');
ReadLn; end.
[QC Description]
Please add PNativeInt and PNativeUInt to System.pas.
QC Entry 71267
QC #:
Date Reported:
Area:
91246
2/1/2011
RTL\Delphi\Thread support
Description:
Steps:
[QC Short Description]
TThreadedQueue fails with multiple consumers
Attached is a simple example to reproduce the error.
[QC Description]
Trying to use the TThreadedQueue (Generics.Collections) in a single
producer multiple consumer scheme.
The idea is to push objects into a queue and let several worker
threads draining the queue.
It does not work as expected, though. When two or more worker
threads are calling PopItem, access violations are thrown from the
TThreadedQueue.
If the call to PopItem is serialized with a critical section, all is fine.
The problem seems to be related to TMonitor in TThreadedQueue.
QC Entry 91246
QC #:
Date Reported:
Area:
78415
10/7/2009
RTL\Delphi\Thread support
Description:
Steps:
[QC Short Description]
AV in TInternalConditionVariable.RemoveWaiter
See attached project archive.
[QC Description]
When synchronizing two threads using a TConditionVariableCS
access violations may occur in the method
TInternalConditionVariable.RemoveWaiter in SyncObjs.pas (966):
Walker := Walker.Next;
where Walker is nil.
QC Entry 78415
[top10]
Added by Sysop
<<<<<<<<<<<<<<<
This is a comment from QC
---I've attached a new project which reliably crashes under Windows
versions prior to Vista.
----
(JJS: The attached app doesn't reproduce for me. However, here are
Christian's comments from the original QC report.)
I have modified the code to call ReadLn at the end but to no avail.
The AV occurs only when running the process within the IDE
debugger. If I start the process outside the IDE everything runs fine.
That's the problem with racing conditions, I suppose. Perhaps the fact
that I develop on a Quad Core CPU has an inpact on the runtime
behaviour.
It seems there is a bug (actually two bugs) in
TInternalConditionVariable.RemoveWaiter.
Suppose the linked list of waiting threads contains the three entries
T1, T2 and T3 which have been added in this order. The linked list
looks like this:
H -> T3 -> T2 -> T1 -> T3
'H' stands for the pointer to the head of the queue (FWaitQueue field).
Please see 'qc78415.patch' attached.
>>>>>>>>>>>>>>>
Bug 1: Removing the second item of the wait queue is not possible.
Cause: When removing a thread, the walker pointer actually starts at
the third entry (T1 in this case). Iteration stops however as soon as
the walker reaches the head of the queue (T3), which leaves T2
undetected.
Bug 2: The first item of the queue cannot be removed.
Cause: In case the first item is to be removed, just the pointer to the
head item is moved without updating the links. Hence the resulting
queue looks like this:
H -> T1 -> T3 -> T2 -> T1
Furthermore the head points to T1 while it should actually point to T2
since that item followed T3 in the original list.
I have attached a patch which can be applied to SyncObjs.pas that
corrects both of these issues.
1. Iteration now starts at the second item (T2) and stops at the first
(T3).
2. If the first item is removed, the new list now looks like this:
H -> T2 -> T1 -> T2
QC #:
Date Reported:
Area:
6394
11/10/2003
RTL\Delphi\Math Unit
Description:
Steps:
[QC Short Description]
Implementation of Variance, TotalVariance, StdDev sucks
procedure TForm1.Button1Click(Sender: TObject); begin
Edit1.text:=floatToStr(Variance([4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2]));
end; // Exp: 0 // Act: -1,26161707343768E-18
[QC Description]
The result of the following Variance should obviously be
zero:
Variance([4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2,4.2])
The current implementation gives
-1,26161707343768E-18
that is StdDev results with EInvalidOp.
QC Entry 6394
QC #:
Date Reported:
Area:
56524
1/2/2008
RTL\Delphi\Math Unit
Description:
Steps:
[QC Short Description]
Tanh fails with "Floating Point Overflow" instead of returning 1 on big
values
Compile and run the attached program below.
See the following program output indicating failure.
[QC Description]
FAIL - Exception Error
In Delphi RTL Tanh is calculated as sinh/tanh, which is mathmatically ClassName: EOverflow
right, but it fails on big numbers, for example:
Message: Floating point overflow
tanh(11990.045913)
Recompiling and rerunning with the .NET compiler produces the
expected result, namely PASS.
because sinh(11990.045913) is BIG. But tanh here just equals to 1.
program BTS257019;
Resolution:
If value is big (more than some constant), routine should just return 1. {$APPTYPE CONSOLE}
QC Entry 56524
uses
SysUtils,
Math;
begin
try
if Tanh(11990.045913) = 1 then
WriteLn('PASS')
else
WriteLn('FAIL - Unexpected result');
except
on E: Exception do
begin
Writeln('FAIL - Exception Error');
Writeln(' ClassName: ', E.ClassName);
WriteLn(' Message: ', E.Message);
end;
end;
end.
QC #:
Date Reported:
Area:
81203
1/15/2010
RTL\Delphi\Math Unit
Description:
Steps:
[QC Short Description]
RoundTo inappropriately clears the fpu exception mask
Compile and run the attached application below.
See the following program output indicating failure.
[QC Description]
Bug in RoundTo function
it crashes if FPU exceptions are disabled by Set8087CW($133F);
error is in line
fldcw word ptr [CW8087X] - it clears fpu exception mask flags
#1
#2
FAIL #2 - Exception (EZeroDivide)
FAIL - Expectation failure (1/2)
program BTS274504;
to set fpu controls flags you shoud use code like that in function Trunc
in system.pas
FNSTCW [ESP].Word // save
FNSTCW [ESP+2].Word // scratch
FWAIT
OR [ESP+2].Word, $0F00 // trunc toward zero, full precision
FLDCW [ESP+2].Word
QC Entry 81203
{$APPTYPE CONSOLE}
uses
SysConst,
SysUtils,
Math;
var
Counter: Integer = 0;
Expected: Integer = 0;
procedure DoTest;
var
x, y: Double;
OldValue: Cardinal;
begin
OldValue := Get8087CW;
try
WriteLn('#1');
Inc(Expected);
Set8087CW($133F);
x := 0.0;
y := 5 / x;
Inc(Counter);
try
WriteLn('#2');
Inc(Expected);
if y <> -100 then
RoundTo(1.23, -1); //#A//
Inc(Counter);
except
on E: TObject do
WriteLn('FAIL #2 - Exception (', E.ClassName, ')');
end;
finally
Set8087CW(OldValue);
end;
end;
begin
try
DoTest;
if Counter = Expected then
WriteLn('PASS')
else
WriteLn('FAIL - Expectation failure (', Counter, '/', Expected, ')');
except
on E: TObject do
WriteLn('FAIL - Exception Error (', E.ClassName, ')');
end;
end.
QC #:
Date Reported:
Area:
85278
6/8/2010
RTL\Delphi\Math Unit
Description:
Steps:
[QC Short Description]
SimpleRoundTo produces Floatingpoint Exception
Try to execute: simpleroundto(10000.01,-15)
[QC Description]
Try to run that:
simpleroundto(10000.01,-15)
Result ist a Floatingpoint Exception
QC Entry 85278
QC #:
Date Reported:
Area:
36965
11/24/2006
RTL\Delphi\Math Unit
Description:
Steps:
[QC Short Description]
Inexact floating-point constants in Math
program FloatConstBug; uses Math; const // decimal approximations
// exact values SmallSingle = 1.4012984643248170709e-45; // 2^(149) LargeSingle = 3.402823466385288598e38 + 1e19; // 2^128 [QC Description]
2^104 SmallDouble = 4.9406564584124654418e-324; // 2^(-1074)
One should expect that definitions
LargeDouble = 1.79769313486231570815e308; // 2^1024 - 2^971
SmallExtended = 4e-4951; // 2^(-16445) LargeExtended =
const { Ranges of the IEEE floating point types, including denormals } 1.18973149535723e4932 + 176502e4912; // 2^16384 - 2^16320
MinSingle = 1.5e-45;
begin Randomize; // let's play Russian roulette case Random (6) of //
MaxSingle = 3.4e+38;
(unfortunately 6 bullets have been loaded) 0: assert (MinSingle <=
MinDouble = 5.0e-324;
SmallSingle); // fails 1: assert (MaxSingle >= LargeSingle); // fails 2:
MaxDouble = 1.7e+308;
assert (MinDouble <= SmallDouble); // fails 3: assert (MaxDouble >=
MinExtended = 3.4e-4932;
LargeDouble); // fails 4: assert (MinExtended <= SmallExtended); //
MaxExtended = 1.1e+4932;
fails 5: assert (MaxExtended >= LargeExtended); // fails end; end.
just from the beginning of unit Math would ensure that any finite,
positive Single value would fall in range MinSingle through
MaxSingle, and same for types Double and Extended.
See Details on how to get numbers smaller than the pretended
minimums and larger than the maximums shown above.
Of course, there is a gigantic number of other floating point values
that fall outside unit Math's Min-Max ranges. My examples just show
the most extreme ones, i.e., these are the actual minimums and
maximums.
Since floating-point constants in Delphi always are Extended, the
definitions for Single and Double values need 20 significant digits (not
just 6, 14, or 18) in order to get the exact Extended equivalent of the
extreme Single and Double values. In a typed constant definition one
could do with fewer digits. However, typed constants are no constant
expressions to the compiler.
QC Entry 36965
QC #:
Date Reported:
Area:
37997
12/21/2006
RTL\Delphi\Math Unit
Description:
Steps:
[QC Short Description]
Remove register directive
mshelp://borland.bds4/bds4ref/html/ProceduresAndFunctionsOV.htm#SecondSubtopic1Title
[QC Description]
Since register is the default calling convention in
Delphi, please remove the not necessary register
directive from Math unit.
QC Entry 37997
QC #:
Date Reported:
Area:
82657
3/3/2010
RTL\Delphi\Math Unit
Description:
[QC Short Description]
Tanh() implementation
[QC Description]
Currently Tanh() is implemented using the SinH() and CosH()
function.
The same result can be calculated more efficiently using the following
expression:
Tanh(X) = (Exp(2 * X) - 1) / (Exp(2 * X) + 1);
Steps:
even if Exp(2 * X) isn't precalculated this turns out to be by far faster.
QC Entry 82657
QC #:
Date Reported:
Area:
89681
11/15/2010
RTL\Delphi\DateUtils
Description:
Steps:
[QC Short Description]
TTimeZone Returns Incorrect UtcOffset
Compare results of the following two functions. Before 11/14/2010,
the GetTimeZoneBias functions returns -240 and the
GetTimeZoneBiasD2007 function returns -300 in the US Eastern time
zone. The transition to EST occurred on 11/7/2010, not 11/14/2010.
function GetTimeZoneBias: Integer; var TimeZone: TTimeZone; begin
TimeZone := TTimeZone.Local; Result :=
Trunc(TimeZone.UtcOffset.Negate.TotalMinutes); end; function
GetTimeZoneBiasD2007: Integer; var TimeZoneInfo:
TTimeZoneInformation; begin case
GetTimeZoneInformation(TimeZoneInfo) of
TIME_ZONE_ID_UNKNOWN: Result := TimeZoneInfo.Bias;
TIME_ZONE_ID_STANDARD: Result := TimeZoneInfo.Bias +
TimeZoneInfo.StandardBias; TIME_ZONE_ID_DAYLIGHT: Result :=
TimeZoneInfo.Bias + TimeZoneInfo.DaylightBias; else Result := 0;
end; end;
[QC Description]
Under certain conditions the new TTimeZone object returns the
wrong UtcOffset. After switching from EDT to EST on 11/7/2010 the
TimeZone object still returns the -4 offset rather than -5. After
stepping through the code it looks like the existing code in DateUtils
will work correctly after 11/14/2010. D2007 and D2010 did not have
this problem.
QC Entry 89681
QC #:
Date Reported:
Area:
92281
3/14/2011
RTL\Delphi\DateUtils
Description:
Steps:
[QC Short Description]
TTimeZone::IsDaylightTime is using wrong start and end dates for
daylight saving time for GMT-06.
// Is today in daylight saving time? TTimeZone * tz =
TTimeZone::Local; TDateTime TestDate = TDateTime(2011, 3, 14); if
(tz->IsDaylightTime(Now())) { // SHOULD execute this block
MessageDlg("Today we are in Daylight Saving Time", mtInformation,
[QC Description]
TMsgDlgButtons() << mbOK, 0); } else { // ACTUALLY executing this
For the GMT-06 (Central time zone in the U.S.) the
block MessageDlg("Today we are NOT in Daylight Saving Time",
TTimeZone::IsDaylightTime function is using the wrong date for the
mtInformation, TMsgDlgButtons() << mbOK, 0); } // When does
start and end of daylight saving time. Daylight saving time actually
daylight saving time start? TestDate = TDateTime(2011, 1, 1); while
started yesterd, March 13, 2011, but IsDaylightTime is returning false. (!tz->IsDaylightTime(TestDate)) { TestDate += 1; } // My tests find
The first day it returns true is March 21, 2011.
March 21, 2011 as the first day, but should be March 14, 2011
QC Entry 92281
MessageDlg("First day of Daylight Saving Time is " +
TestDate.DateString(), mtInformation, TMsgDlgButtons() << mbOK,
0); // When does daylight saving time start? while (tz>IsDaylightTime(TestDate)) { TestDate += 1; } // My tests find Nov 14,
2011 as the first day of standard time, but should be Nov 6, 2011
MessageDlg("First day of Standard Time is " + TestDate.DateString(),
mtInformation, TMsgDlgButtons() << mbOK, 0);
QC #:
Date Reported:
Area:
90815
1/11/2011
RTL\Delphi\Other
Classes\TEncoding
Description:
[QC Short Description]
TMBCSEncoding.GetPreamble() should return a BOM for select
codepages
Steps:
A UTF-8 BOM is not written to the file using this code: var Strings:
TStringList; InputEnc, OutputEnc: TEncoding; FileName: String; begin
FileName := 'Some FileName here'; Strings := TStringList.Create; try
InputEnc := TEncoding.GetEncoding(SomeInputCodePage); try
[QC Description]
OutputEnc := TEncoding.GetEncoding(65001); try
Currently, TMBCSEncoding.GetPreamble() does not return any BOM Strings.LoadFromFile(FileName, InputEnc);
at all:
Strings.SaveToFile(FileName, OutputEnc); finally OutputEnc.Free;
end; finally InputEnc.Free; end; finally Strings.Free; end; end;
function TMBCSEncoding.GetPreamble: TBytes;
However, a BOM is written to the file using this code: var Strings:
begin
TStringList; InputEnc: TEncoding; FileName: String; begin FileName
SetLength(Result, 0);
:= 'Some FileName here'; Strings := TStringList.Create; try InputEnc
end;
:= TEncoding.GetEncoding(SomeInputCodePage); try
Strings.LoadFromFile(FileName, InputEnc);
TMBCSEncoding.GetPreamble() should be updated to detect select Strings.SaveToFile(FileName, TEncoding.UTF8); finally
codepages, in particular UTF-8 and UTF-16, and return a BOM for
InputEnc.Free; end; finally Strings.Free; end; end;
them, just as TCharSetEncoding under Posix already does:
function TCharSetEncoding.GetPreamble: TBytes;
begin
case CodePage of // must use property CodePage not FCodePage!
1200: Result := TBytes.Create($FF, $FE);
1201: Result := TBytes.Create($FE, $FF);
CP_UTF8: Result := TBytes.Create($EF, $BB, $BF);
else
SetLength(Result, 0);
end;
end;
QC Entry 90815
QC #:
Date Reported:
Area:
96375
7/18/2011
RTL\Delphi\Other
Classes\TStreamReader/TStreamWriter
Description:
Steps:
[QC Short Description]
TStreamReader corrupt Shift-JIS data
procedure TForm1.Button1Click(Sender: TObject); var SR:
TStreamReader; SW: TStreamWriter; Enc: TEncoding; begin Enc :=
TEncoding.GetEncoding(932); SR := TStreamReader.Create('test.txt',
Enc, False, 128); SW := TStreamWriter.Create('test2.txt', false, Enc);
while Not SR.EndOfStream do SW.WriteLine(SR.ReadLine);
FreeAndNil(SW); FreeAndNil(SR); FreeAndNil(Enc); end; Exp test.txt,
test2.txt same data Act test.txt, test2.txt not same
[QC Description]
TStreamReader corrupt Shift-JIS data
Added by Sysop
<<<<<<<<
On Windows XP SP3, if 3rd parameter is set to smaller value,
TStreamReader fails to read line which contains multi-byte
characters(e.g., Japanese Kaniji Characters).
SR := TStreamReader.Create('test.txt', Enc, False, 128);
>>>>>>>>
QC Entry 96375
QC #:
Date Reported:
Area:
95942
7/8/2011
RTL\Delphi\Other
Classes\TStreamReader/TStreamWriter
Description:
Steps:
[QC Short Description]
TStreamReader may hung the thread
1. Create some file in UTF8 encoding of arbitary content with size ~1
MB 2. Substitude one of the first characters in file with U+0080U+00FF (in my case U+0096) 3. Try to execute next code procedure
[QC Description]
RunReader() var reader: TStreamReader; isEnd: Boolean; begin
Private procedure FillBuffer of TStreamReader contains a bug that
reader := TStreamReader.Create('1mb_corrupted_file.txt'); // or
leads to hungs even with 1 MB files.
reader := TStreamReader.Create('1mb_corrupted_file.txt',
Unicode is multibyte encoding. Reader reads some amount of data
TEncoding.UTF8, false, 1024); isEnd := reader.EndOfStream; end;
into byte array. Then it runs loop in which try to convert this bytes to
Added by Sysop <<<<<<<< Even If overloaded consructor is used,
Unicode from UTF8. If it was unsuccessful it suppose that last byte in this issue also occur. Please see comments of QC for more details.
that array was insufficient to form a character. Than it increases
constructor Create(const Filename: string; Encoding: TEncoding;
length of array by 1 byte, reads it from file, and tries again (continuing DetectBOM: Boolean = False; BufferSize: Integer = 1024); overload;
the loop). The problem is that loop may reallocate this buffer array
>>>>>>>>
until the file entirely fits into this buffer (1 MB file ~ 1million of
SetLength(array, Length(array) + 1) and other API calls). Such
situation occurs when file contain inappropriate byte sequence for
given encoding (is corrupted or user selected from dropdown list
wrong encoding). This bug is present at list in Delphi XE Update 1
QC Entry 95942
QC #:
Date Reported:
Area:
92498
3/22/2011
RTL\Delphi\Regular Expressions
Description:
Steps:
[QC Short Description]
TGroupCollection says "index out of bounds" instead of "named
group does not exist"
1. Run attached project Expected: Some kind of exception saying
'thisgroupdoesnotexist' is not a valid group name Actual: Exception
saying -7 is not a valid group number
[QC Description]
Attempting to get the text matched by a named group that does not
exist raises a very confusing "index out of bounds (-7)" exception
instead of a more accurate "named group does not exist" exception.
When TGroupCollection.GetItem in RegularExpressions.pas calls
FRegEx.NamedGroup it should check whether the result is -7 or
PCRE_ERROR_NOSUBSTRING. If it is, it should raise an exception
saying the named group does not exist rather than try to use -7 as a
group index.
The -7 value of the PCRE_ERROR_NOSUBSTRING constant is an
implementation detail of the RegularExpressionsAPI unit that should
not be exposed to the users of the RegularExpressions unit.
QC Entry 92498
QC #:
Date Reported:
Area:
92349
3/17/2011
RTL\Delphi\Regular Expressions
Description:
Steps:
[QC Short Description]
Regex named capture groups incorrect
Compile and run the attached app below.
See the following output indicating failure.
[QC Description]
The behaviour when using RegEx.Match.Groups['name'] is erratic.
FAIL #3 - Exception=ERegularExpressionError
Both description and discussions around this problem can be found at FAIL=3/4
http://stackoverflow.com/questions/5322825/regex-named-capturegroups-in-delphi-xe
program BTS282293;
{$APPTYPE CONSOLE}
The problem appears both when using TRegEx and TPerlRegEx in
RegularExpressions and RegularExpressionsCore.
uses
RegularExpressions;
The most essential stuff from Stack Overflow is what Mikael Eriksson
wrote:
var
Expected: Integer = 0;
"When pcre_get_stringnumber does not find the name,
Counter: Integer = 0;
PCRE_ERROR_NOSUBSTRING is returned.
procedure Test1;
PCRE_ERROR_NOSUBSTRING is defined in
var
RegularExpressionsAPI as PCRE_ERROR_NOSUBSTRING = -7.
Regex: TRegEx;
M: TMatch;
Some testing shows that pcre_get_stringnumber returns
RetVal: Integer;
PCRE_ERROR_NOSUBSTRING for every name that has the first
S: String;
letter in the range of k to z and that range is dependent of the first
begin
letter in judge. Changing judge to something else changes the range. try
Inc(Expected);
As i see it there is at lest two bugs involved here. One in
Regex :=
pcre_get_stringnumber and one in TGroupCollection.GetItem that
TRegEx.Create('(?P<time>\d{1,2}:\d{1,2})(?P<judge>.{1,3})');
needs to raise a proper exception instead of
M := Regex.Match('00:00 X1 90 55KENNY BENNY');
SRegExIndexOutOfBounds"
RetVal := M.Groups.Count;
QC Entry 92349
if RetVal = 3 then
Inc(Counter)
else
WriteLn('FAIL #1 - Test1 - RetVal=', RetVal);
Inc(Expected);
S := M.Groups['time'].Value;
if S = '00:00' then
Inc(Counter)
else
WriteLn('FAIL #2 - Test1 - S=', S);
except
on E: TObject do
WriteLn('FAIL #3 - Exception=', E.ClassName);
end;
end;
// But the following does. First group is now named "atime"
procedure Test2;
var
Regex: TRegEx;
M: TMatch;
RetVal: Integer;
S: String;
begin
try
Inc(Expected);
Regex :=
TRegEx.Create('(?P<atime>\d{1,2}:\d{1,2})(?P<judge>.{1,3})');
M := Regex.Match('00:00 X1 90 55KENNY BENNY');
RetVal := M.Groups.Count;
if RetVal = 3 then
Inc(Counter)
else
WriteLn('FAIL #4 - Test2 - RetVal=', RetVal);
Inc(Expected);
S := M.Groups['atime'].Value;
if S = '00:00' then
Inc(Counter)
else
WriteLn('FAIL #5 - Test2 - S=', S);
except
on E: TObject do
WriteLn('FAIL #6 - Exception=', E.ClassName);
end;
end;
begin
try
Test1;
Test2;
if Expected = Counter then
WriteLn('PASS=', Counter)
else
WriteLn('FAIL=', Counter, '/', Expected);
except
on E: TObject do
WriteLn('FAIL - Exception=', E.ClassName);
end;
end.
QC #:
Date Reported:
Area:
87752
9/2/2010
RTL\Delphi\Regular Expressions
Description:
Steps:
[QC Short Description]
TRegEx frees FRegEx while TMatch et al still have a reference to it
1. Start a new VCL application 2. Turn on debug DCUs in project
options 3. Add RegularExpressions to the uses clause of Unit1 4. Add
a TButton with this event handler: procedure
[QC Description]
TForm1.Button1Click(Sender: TObject); begin Button1.Caption :=
The TRegEx record allocates a TPerlRegEx instance that it stores in TRegEx.Match('one two', '\w+').NextMatch.Value; end; 5. Open the
the FRegEx field. It uses TScopeExitNotifier to free the TPerlRegEx
RegularExpressionsCore unit 6. Place breakpoints in
instance when the TRegEx record goes out of scope. It's a nifty trick, TPerlRegEx.Create, TPerlRegEx.Destroy, and
but it fails spectacularly because TMatch and TGroupCollection copy TPerlRegEx.MatchAgain 7. Run the application Expected:
the reference to the TPerlRegEx instance but not the
breakpoints stop at Create, MatchAgain, and Destroy in that order,
TScopeExitNotifier.
and the button's caption shows "two". Actual: breakpoints stop at
Create, Destroy, and MatchAgain in that order, showing that
An FNotifier field must be added to TMatch and TGroupCollection.
MatchAgain is called on a TPerlRegEx instance that has already
TRegEx.FNotifier must be assigned to TMatch.FNotifier and
been destroyed. In my tests the button caption goes blank, but in real
TGroupCollection.FNotifier whenever TRegEx.FRegEx is assigned to world code the program may very well crash with an access violation.
TMatch.FRegEx and TGroupCollection.FRegEx.
QC Entry 87752
QC #:
Date Reported:
Area:
40327
2/12/2007
SOAP
Description:
Steps:
[QC Short Description]
lots of widestrings passed by value and more...
I didn't look at SOAP source until recently, but I was surprised. I
wanted to use XMLTimeToDateTime function (I had my own wrapper
since a long time), and I almost got lost in tracing the calls. * My first
complain is about the widestring parameters which are passed by
value several levels deep. Because widestring is not (yet) reference
counted, lots of unnecessary copies are made... Quick list (in
xsbuiltins) - TXSDateTime.XSToNative - GetBaseDateTime (and
other similar) - TXSBaseTime.XSToNative Other: * SoapStrToFloat
and SoapFloatToStr use substitution (therefore search), instead of
much simpler/faster approach of using a properly initialized
TFormatSettings variable * And look at this; what's the purpose of
try/finaly (around a widestring assign)??? procedure
TXSDateTime.XSToNative(Value: WideString); var BaseDate:
TXSBaseDateTime; begin BaseDate := GetBaseDateTime(Value); try
[QC Description]
Read description.
I have serious questions about the overall quality when looking at
them.
And sorry, I do not have time to post one entry for each individual
request.
QC Entry 40327
FDateTime := Value; finally BaseDate.Free; end; end;
QC #:
Date Reported:
Area:
49030
7/13/2007
SOAP
Description:
Steps:
[QC Short Description]
soap array elements need namespace
Create a simple web service in VS2005 that simply returns the array
received back to the client. Enable logging of the SOAP packets. A
client that will permit editing the SOAPRequest in the
[QC Description]
HTTPRIO.OnBeforeExecute Send an array to the web service
Using Delphi 7 with the SOAP/WSDL update 24535 to pass an array unedited. The web service will fail to echo the packet. Send the array
to a web service written with Visual Studio 2005.
again editing the SOAP Request to include the namespace on the
array elements. The web service will echo the packet. Checking the
The D7 client does not include the namespace on the array elements. web service log show that it does receive the soap packet with the
The web service fails to deserialize the array when the namespace is array but it is unable to deserialize it without the ns.
not
included.
QC Entry 49030
QC #:
Date Reported:
Area:
89906
11/23/2010
SOAP
Description:
Steps:
[QC Short Description]
Access Violation in SOAP WebServExp.GenerateXMLSchema
[QC Description]
We've recently setup out own webservice using SOAP and it all works
like a charm. Because the service is only used from within our own
applications, I usually don't allow for a WSDL to be generated.
Today i started some tests with SoapUI and needed a WSDL of our
own service. So I enabled the Default action of the
TWSDLHTMLPublish component and tried to get the WSDL
exported. All I got was an access violaton in
WebServExp.GenerateXMLSchema, line 1636:
if (ParentInfo = nil) and ((GetTypeData(ATypeInfo).ParentInfo)^ <>
nil) then
Debugging this, reveiled that
GetTypeData(ATypeInfo).ParentInforeturned a nil, so of course using
^ on nil raises an access violation.
QC Entry 89906
QC #:
Date Reported:
Area:
90026
11/30/2010
SOAP\WSDL Importer
Description:
Steps:
[QC Short Description]
Cannot compile WsdlImp any more
[QC Description]
Whe used to compile a customized version of WsdlImp from
$(BDS)\source\soap\wsdlimporter
but the sources provided with Delphi XE cannot compile.
- unknown type
- object that does not implement the interface it is supposed to
implement
Note that the project is a Delphi 2010 project (version 12.0) and not a
Delphi XE project (version 12.3)
Michel Terrisse
QC Entry 90026
QC #:
Date Reported:
Area:
44552
4/17/2007
SOAP\Server Applications
Description:
Steps:
[QC Short Description]
SOAP-Attachments not beeing freed
Create a soap-server-app with any procedure having
TSOAPAttachment-parameters. e.g. ILicensing =
interface(IInvokable) ['{D8DD5A8E-1E2E-4F65-BB43[QC Description]
BB3C745B8EA8}'] function RequestLicense(Key: String; Request:
Soap-Attachments temporarily extracted to Windows\Temp do not get TSOAPAttachment): Boolean; stdcall; end; and implement this
freed properly by the soap-runtime(BorlandSoapAttachmentxxx-files Interface. According to the documentation the soap-runtime should
live forever).
free the received TSOAPAttachments (and its corresponding
The problem lies in InvokeRegistry.pas - procedure
BorlandSoapAttachmentXYZ-files in Windows\Temp), however the
TSOAPAttachment.SOAPToObject, line DataContext := Nil;
wrong code in InvokeRegistry.pas - procedure
TSOAPAttachment.SOAPToObject prevents this from happening.
This line SHOULD read
Even from the comments in the TSOAPAttachment.SOAPToObject()
AttachFound.DataContext := Nil;
source it's clear that this is an error in the code, however it doesn't
lead to a compile-time-error because unfortunately AttachFound as
The bug is present at least since D7
well as Self are of the samte type (TSOAPAttachment). { Transfer
QC Entry 44552
ownership } AttachFound.Ownership := soReference; { Make sure
SOAP Runtime does not delete this object } DataContext := Nil;
obviously the comment in the second-last line means, that the
AttachFound should not be destroyed by the runtime, however
DataContext := Nil; prevents the current soap-attachment-object from
getting freed...
QC #:
Date Reported:
Area:
32105
9/12/2006
SOAP\Server Applications
Description:
Steps:
The WSDL generated by Delphi contains a mistake: The <input> and
<output> elements for an operation within the <binding> section
contains the message attribute. It's invalid to have the message
attribute there.
1. Build any WebService in Delphi
2. Look at the WSDL
3. Go to the '<binding name="xxxx" type="xxxx"> section and look at
the <input> node following each operation. You'll see something like
this:
[NOTE:
Because of this one cannot import the WSDL of a Delphi Service
using Axis (Java) WSDL2JAVA utlity).
<binding name="InteropTestPortTypebinding"
type="tns:InteropTestPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="echoString">
<soap:operation soapAction="http://soapinterop.org/" style="rpc"/>
<input message="tns:echoString0Request"> <<<===== "This is
wrong"
An example of this can be seen at the following URL:
http://hirondelle.inprise.com/WebServices/Interop/cgibin/InteropService.exe/wsdl/InteropTestPortType
Now, do the same on a Java/AXIS or .NET Service. For example, you
can view a .NET service at:
http://corbeau.inprise.com/webservices/sampleservice.asmx?WSDL=wsdl1
You'll see:
<wsdl:binding name="InteropTestPortTypebinding"
type="tns:InteropTestPortTypebinding">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echoString">
<soap:operation soapAction="http://soapinterop.org/" style="rpc"/>
<wsdl:input> <<<<<===== "No 'message' attribute !!
QC #:
Date Reported:
Area:
91730
2/23/2011
Modeling\Class Diagram
Description:
Steps:
[QC Short Description]
Modeling Surface fails to update Generic References
1. Open the diagram editor on the following code ----------------- unit
Unit1; interface uses Generics.Collections; type TMyObject = class
end; TMyObjectList = class(TList<TMyObject>) end; implementation
end. ----------------- 2. Rename TMyObject to TNewObject via 'Object
Inspector' // Expected: all Reference to TMyObject to be renamed //
QC Entry 91730
Actual: Only the base class is renamed the generic reference remains
unchanged. Resulting Code ----------------- unit Unit1; interface uses
Generics.Collections; type TNewObject = class end; TMyObjectList =
class(TList<TMyObject>) end; implementation end. -----------------
QC #:
Date Reported:
Area:
87681
8/31/2010
Modeling\Printing
Description:
Steps:
[QC Short Description]
Can't directly Print a Kiviat Chart
1. Run metrics for a project 2. Select a metric result 3. Right click on
the result and select Kiviat Chart exp: Chart opens in IDE exp: File |
Print... command is enabled act: File | Print... is disabled
[QC Description]
Once I've opened a Kiviat Chart in the editor I should be able to go to
File | Print... and print this chart to a printer of my choosing.
QC Entry 87681
QC #:
Date Reported:
Area:
93457
4/29/2011
Modeling\Audits
Description:
Steps:
[QC Short Description]
Wrong IL "Infinite loop" detection
Added by Sysop <<<<<< With sample code block, for i:=0 to 15 do //
<-- IL: Infinite loop has been reported. >>>>>>
[QC Description]
The following source generates a IL report:
function WordToBin(aWord:word):String;
function BitSet(w:word; indx:Byte):boolean;
var
maske:word;
begin
maske:=$0001 shl indx;
w:=(w and Maske);
if w=0 then result:=false else result:=true;
end;
var
bin:String;
i:Byte;
begin
bin:='xxxxxxxxxxxxxxxx';
for i:=0 to 15 do
if BitSet(aWord,i) then bin[16-i]:='1' else bin[16-i]:='0';
result:=bin;
end;
It says the for loop could be a endless loop. But a simple for loop like
this can never be a endless loop.
QC Entry 93457
QC #:
Date Reported:
Area:
93461
4/29/2011
Modeling\Audits
Description:
Steps:
[QC Short Description]
Wrong MNU warning
Added by Sysop <<<<<< With sample code block, ... private fserialno
:AnsiString; // MNU: Field 'fserialno' is not used
fdescription:AnsiString; // MNU: Field 'fdescription' is not used fbusID
:Integer; // MNU: Field 'fbusID' is not used public ... >>>>>>
[QC Description]
The following code snippet:
TDeviceInfo = class(TObject)
private
fserialno :AnsiString;
fdescription:AnsiString;
fbusID :Integer;
public
property serialno :AnsiString
read fserialno
write fserialno;
property description:AnsiString
read fdescription
write fdescription;
property busID :Integer
read fbusID write fbusID;
end;
leads to a wrong MNU warning for fdescription not to be used. I could
understand this if description would also be listed as not being used,
but since it isn't the warning is wrong in my eyes.
QC Entry 93461
QC #:
Date Reported:
Area:
93462
4/29/2011
Modeling\Audits
Description:
Steps:
[QC Short Description]
Wrong RIEWS warning for string comparison cascade
[QC Description]
The following code:
function Tdm.GetParityFromString(pts: String): Integer;
begin
pts:=UpperCase(pts);
if (pts = 'NONE') then
begin
result:=PARITY_NONE;
end
else
if (pts = 'ODD') then
begin
result:=PARITY_ODD;
end
else
if (pts = 'EVEN') then
begin
result:=PARITY_EVEN;
end
else
if (pts = 'MARK') then
begin
result:=PARITY_MARK;
end
else
if (pts = 'SPACE') then
begin
result:=PARITY_SPACE;
end
else
result:=PARITY_NONE;
end;
generates a RIEWS warning because audit thinks one can use a
case here. But case statements are only supported for ordinal values
which string is not.
QC Entry 93462
QC #:
Date Reported:
Area:
66231
8/29/2008
Documentation
Description:
[QC Short Description]
BDN.HTML refers to Borland.com
[QC Description]
File BDN.HTML deployed at \Program Files\CodeGear\RAD
Studio\6.0 says :
"Connecting to the Borland Developer Network at www.borland.com",
when opening but it correctly redirects to
http://dn.codegear.com/
Steps:
QC Entry 66231
QC #:
Date Reported:
Area:
69783
12/10/2008
Documentation
Description:
Steps:
[QC Short Description]
C++-specific help is invalid C++
[QC Description]
Several of the C++-specific portions of the help don't give valid C++.
For example:
* TNotifyEvent is incorrectly listed as "(Sender: TObject) (
TNotifyEvent)();".
Should be "typedef void __fastcall (__closure
*TNotifyEvent)(System::TObject* Sender);"
* TNotifyList::AddNotify is listed without a return type. (Should be
void.)
* TAutoCompleteOptions has this rather meaningless definition:
"TAutoCompleteOption TAutoCompleteOptions;"
I currently have to browse the header files if I need detailed and
correct information; the help should provide this for me.
QC Entry 69783
QC #:
Date Reported:
Area:
12812
5/14/2005
Documentation
Description:
Steps:
[QC Short Description]
Map file documentation
N/A
[QC Description]
Please document all of the elements of the map file. I understand
what the major symbols mean, but there are several things that I can't
find any information on. For example:
Detailed map of segments
0001:00002030 0000014F C=CODE S=_TEXT G=(none)
M=F:\BORLAND\BCB6\LIB\C0W32.OBJ ACBP=A9
What does ACPB=A9 mean? What could it be equal to other than
A9? I assume G= is group and M= is module? Why do I have to
guess?
0001:00611A0C Buttons::_16401
What is _16401? Why is it here and, most importantly, how can I find
it in the source code?
0001:0016712C Cellformats::TColumnFormat::
What does this indicate? The address is lower than any of the
TColumnFormat method addresses.
0002:00029220 __ectbl__ __fastcall
TFormMain::DisplayDataSetChart(int)
(this method lives at 0001:000721FC)
Why do I find things like this in the data segment? What is __ectbl__?
What do the other __?__ symbols mean?
0002:00043A4C __indStub:117126
What are __indStubs? I find not such symbol in the BCB soruce
directory.
0013:00000000 __fastcall System::VarClear(System::Variant&)
What is segment 13?
QC Entry 12812
QC #:
Date Reported:
Area:
70112
12/24/2008
Documentation
Description:
Steps:
[QC Short Description]
No help on sysmac.h
2 - Help -> Search
3 - Search for: sysmac.h
exp: help regarding sysmac.h appears
act: no help regarding the file.
[QC Description]
Help has no information about sysmac.h (opposed to BCB5 help).
The file contains important definitions like BEGIN_MESSAGE_MAP,
__interface, __safecall, etc.
QC Entry 70112
QC #:
Date Reported:
Area:
82020
2/10/2010
Documentation
Description:
Steps:
[QC Short Description]
Help / Wiki
[QC Description]
No one answers at 'documentation@embarcadero.com'
QC Entry 82020
QC #:
Date Reported:
Area:
27296
4/13/2006
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
Wrong documentation for the calling conventions.
Open any VCL member function in the BCB 2006 help. They are
documented without the __fastcall modifier. BCB 2006 appears to
have the worse and the most incorrect help from all the BCB
products, including BCB 1.0!
[QC Description]
The C++ Builder functions are documented without the __fascall
modifier. As result it is impossible to write components overriding
virtual methods by using the help.
QC Entry 27296
For example:
<mshelp://borland.bds5/delphivclwin32/Classes_TThread_Execute1.html>
Syntax
C++
virtual Execute() = 0;
should read:
[C++] virtual void __fastcall Execute() = 0;
Cogswell is actually worse than DeXter, because it omits the "void"
part of the declaration as well.
QC #:
Date Reported:
Area:
2536
9/27/2002
Documentation\Online Help\VCL
Description:
Steps:
[QC Short Description]
Undocumented Capability of Using TIndexOptions::ixUnique with
TClientDataSet::AddIndex
1) Create a TClientDataSet. 2) Activate it. 3) Call its AddIndex
method, setting the Options parameter to "TIndexOptions() <<
ixUnique". 4) Observe that no exception is thrown, and the unique
index is enforced. This method of indexing the TClientDataSet, by the
way, is handy for catching key violations locally, rather than letting the
DB catch them after calling TClientDataSet::ApplyUpdates. The
attached project should adequately demonstrate that this does work.
[QC Description]
The documentation for TClientDataSet::AddIndex states:
"Options is a (potentially empty) set that can include up to two
TIndexOptions values. The valid members for that set include
ixDescending...and ixCaseInsensitive.
Warning: AddIndex throws an exception if you attempt to create an
index that includes any other TIndexOptions values."
In "Understanding ClientDataSet Indexes" by Cary Jensen on the
Borland Community Site
(http://community.borland.com/article/0,1410,29056,00.html), it
states:
"The second [parameter] is the semicolon-separated list of the index
fields...Note, however, that only the ixCaseInsensitive, ixDescending,
and ixUnique TIndexOptions are valid when you invoke AddIndex.
Using any of the other TIndexOptions flags raises an exception. "
Indeed, ixUnique *can* be specified for Options without generating an
exception, and the TClientDataSet behaves as expected (a key value
exception is thrown by the TClientDataSet if a duplicate key value is
inserted).
QC Entry 2536
QC
#:
Date Reported:
Area:
58677
2/25/2008
Documentation\Help Output
Description:
Steps:
[QC Short Description]
TListColumn help page is incomplete
Go to this help link mshelp://borland.bds5/delphivclwin32/!!MEMBERTYPE_Properties_ComCtrls_TListColumn.html
Note that WidthType, ImageIndex, MaxWidth, MinWidth, and Tag descriptions are missing.
[QC Description]
The Properties page for TListColumn is
missing some descriptions.
QC Entry 58677
QC #:
Date Reported:
Area:
91597
2/16/2011
IDE
Description:
Steps:
[QC Short Description]
QA Metrics
[QC Description]
Are the QA Metrics and Audits options supposed to be available in
C++ Builder XE.
The marketing spiel indicates that this is functionality available for
both Delphi & C++ but there are no menu options available to run this
under the Project Menu.
I did have an empty metrics window show up in one of my projects
but it has since disappeared.
QC Entry 91597
QC #:
Date Reported:
Area:
31750
3/30/2005
IDE\Dialogs\Environment Options
Description:
Steps:
Background compilation option is not implemented
1) Tools | Options | Environment options
in Compiling and Run groupbox
// no background compilation option exist
QC #:
Date Reported:
Area:
88342
9/23/2010
IDE\Dialogs\PreComp. Header
Wizard
Description:
Steps:
[QC Short Description]
precompiled header wizard breaks when Indy components included
Create a VCL Application Drop a TIdTCPClient on the form. run the
precompiled header wizard.
[QC Description]
When dropping a TIDTCPClient onto a form and then running the
precompiled header wizard, the wizard fails with a:
Examining project...
Reading "Project1.cpp"
Reading "Unit1.cpp"
Embarcadero C++ Win32 Preprocessor 6.30 Copyright (c) 1993-2010
Embarcadero Technologies, Inc.
Unit1.cpp:
Warning W8017 c:\program files\embarcadero\rad
studio\8.0\include\windows\rtl\IdGlobal.hpp 397: Redefinition of
'sLineBreak' is not identical
Please correct errors before re-running the wizard, or select "Load
from cache" on the previous page.
sLineBreak is defined in Indy as L"\r\n"
sLineBreak is defined in System.hpp as "\r\n"
QC Entry 88342
QC #:
Date Reported:
Area:
18072
9/29/2005
IDE\Project Management
Description:
Steps:
[QC Short Description]
BCB6 projects are not always converted correctly
I have a BCB6 project with a RESFILES section of the .bpk looks like
this; <RESFILES value="CCUTL60.res "c:\program
files\borland\cbuilder6\lib\obj\trayicon.dcr"cttrayicon.res
ButtonBarImages.res"/> When opened in DeXter, and converted to
version 10, the resfiles section looks like this; <property
category="win32.*.win32b.ilink32" name="param.resfiles.1"
value="CCUTL60.res"/> <property category="win32.*.win32b.ilink32"
name="param.resfiles.2" value="c:\program"/> <property
category="win32.*.win32b.ilink32" name="param.resfiles.3"
value="files\borland\cbuilder6\lib\obj\trayicon.dcr"/> <property
category="win32.*.win32b.ilink32" name="param.resfiles.4" value="
"/> <property category="win32.*.win32b.ilink32"
name="param.resfiles.5" value="cttrayicon.res"/> <property
category="win32.*.win32b.ilink32" name="param.resfiles.6"
value="ButtonBarImages.res"/> <property
category="win32.*.win32b.ilink32" name="param.resfiles.merge"
value="1"/> As you can see, I think .2, .3, and .4 should be one line.
[QC Description]
The RESFILES section of a BCB6 .bpk file are not always being
parsed correclty.
QC Entry 18072
QC #:
Date Reported:
Area:
77914
9/22/2009
IDE\Project Management\Project
Options
Description:
Steps:
[QC Short Description]
Unable to clear a boolean option from an option-set in CB2010
- Create option set
- Set any boolean value to true or false
- Try to clear that setting
[QC Description]
Sometimes it is necessary to clear a boolean option from a set which
means I don't want to change the value of the boolean option in any
way.
In CB2009 you could just press "Backspace" and the override would
be removed from the option set. In CB2010 "Backspace" does
nothing. In CB2010 you can only set the value to "false" or "true", but
you can't change it to 'no change'.
It seems there is no way to remove a "boolean" option from an option
set in CB2010.
QC Entry 77914
QC #:
Date Reported:
Area:
15455
8/25/2005
IDE\Project Management\Build Options
Explorer
Description:
Steps:
Bringing up the Install Packages dialog while a C++ project is open -Launch the IDE
results in an access violation bcbide100.bpl
-File | New | Other... | C++ Projects | VCL Forms Application
-Component | Install Packages...
--------------------------Error
--------------------------Access violation at address 22AA697A in module 'bcbide100.bpl'. Read
of address 00000010.
--------------------------OK Details >>
--------------------------+ $19[22AA697A]{bcbide100.bpl}
BOEProjOpts.BOEProjOpts.TProjectOptions.GetAllConfigurations (Line
1780, "BOEProjOpts.pas" + 2) + $19
+ $0[51EB698F]{rtl100.bpl } System.System.@HandleAnyException
(Line 9912, "system.pas" + 13) + $0
+ $41[7C903786]{ntdll.dll } RtlConvertUlongToLargeInteger + $41
+ $9[7C90EAF5]{ntdll.dll } KiUserExceptionDispatcher + $9
+ $4[22A72E55]{bcbide100.bpl}
BOEProjOptsDlg.BOEProjOptsDlg.TBOEProjectOptionsDlg.FormShow
(Line 258, "BOEProjOptsDlg.pas" + 4) + $4
<snip>
+ $C[51FE6A22]{vcl100.bpl } Controls.Controls.TControl.SetVisible
(Line 4124, "Controls.pas" + 5) + $C
+ $11[22AA4F1D]{bcbide100.bpl}
BOEProjOpts.BOEProjOpts.TProjectOptions.InternalEdit (Line 1307,
"BOEProjOpts.pas" + 39) + $11
+ $3[22A75EC3]{bcbide100.bpl}
NewCppProjOpts.NewCppProjOpts.TBorlandCppProjectOptions.GetInst
QC #:
Date Reported:
Area:
43649
4/2/2007
IDE\Project Management\Virtual
Folders
Description:
Steps:
[QC Short Description]
Add capability to set compiler options at a virtual folder level
1. Open a C++ project 2. Create a virtual folder 3. Add source files to
the virtual folder 4. Righ click on the virtual folder. 5. Observe that
there is no option to apply an option set.
[QC Description]
It would be extremely useful if an option set could be applied at a
virtual folder level. This way a bunch of files can be grouped by
needed compiler switches and a set of such switches can be applied
once.
QC Entry 43649
QC #:
Date Reported:
Area:
20785
10/28/2005
IDE\Code Editor
Description:
Steps:
[QC Short Description]
Edit SQL in Code editor pops up 3 error dialogs
you1. New C++ Builder VCL Application
2. Drop a TSQLQuery, TQuery or TADOQuery on the form
3. Click the ... on the SQL
4. Click Code Editor
[QC Description]
Trying to edit SQL in the Code editor with any of the following
TADOQuery - dbGo
TQuery - bde
TSQLQuery - dbexpres
Gets 3 "Illegal Characters in Path" dialogs when clicking the
"Code Editor" button on a SQL statement.
QC Entry 20785
--------------+ $24[226D0E49]{dotnetcoreide100.bpl}
ToolsAPIWrapper.ToolsAPIWrapper.TDotNetGauntletHandler.AttachHandler
(Line 2946, "ToolsAPIWrapper.pas" + 1) + $24
+ $0[51F3A2A1]{rtl100.bpl } System.System.@CheckAutoResult (Line
18061, "system.pas" + 6) + $0
+ $0[20C10169]{coreide100.bpl}
DocModul.DocModul.TModuleHandlerGauntlet.Add (Line 2976,
"DocModul.pas" + 2) + $0
+ $51[20C0BBEE]{coreide100.bpl}
DocModul.DocModul.TDocModule.Destroy (Line 867, "DocModul.pas" + 19)
+ $51
+ $5[51F369CD]{rtl100.bpl } System.System.@AfterConstruction (Line 9537,
"system.pas" + 2) + $5
+ $21[20B8E1F4]{coreide100.bpl}
SourceModule.SourceModule.TSourceModule.Create (Line 402,
"SourceModule.pas" + 27) + $21
+ $8[20C5B1D1]{coreide100.bpl}
IDEServices.IDEServices.TIDEServices.DoCreateModule (Line 1529,
"IDEServices.pas" + 7) + $8
+ $4[20C5C2B8]{coreide100.bpl}
IDEServices.IDEServices.TIDEServices.TerminateServices (Line 1826,
"IDEServices.pas" + 0) + $4
+ $2B[20F69CE7]{designide100.bpl} StrEdit.StrEdit.TStringListProperty.Edit
(Line 309, "stredit.pas" + 29) + $2B
+ $2[20CA4B4E]{coreide100.bpl}
PropInsp.PropInsp.TPropertyInspector.PropListHelp (Line 799,
"PropInsp.pas" + 3) + $2
+ $0[2100D8A9]{vclide100.bpl}
IDEInspListBox.IDEInspListBox.TInspListBox.DoEditDblClick (Line 980,
"ideinsplistbox.pas" + 1) + $0
+ $6[5206C924]{vcl100.bpl } Controls.Controls.TWinControl.WndProc (Line
7241, "Controls.pas" + 100) + $6
+ $6[5206C0EC]{vcl100.bpl } Controls.Controls.TWinControl.MainWndProc
(Line 7021, "Controls.pas" + 3) + $6
+ $8[51F710EC]{rtl100.bpl }
Classes.Classes.TDataModule.WriteVerticalOffset (Line 11520,
"classes.pas" + 0) + $8
+ $6A[77D48731]{USER32.dll } GetDC + $6A
+ $14A[77D48811]{USER32.dll } GetDC + $14A
+ $122[77D489C8]{USER32.dll } GetWindowLongW + $122
+ $A[77D48A0B]{USER32.dll } DispatchMessageW + $A
QC #:
Date Reported:
Area:
91637
2/18/2011
IDE\Code Editor\
Description:
Steps:
[QC Short Description]
Code formatter does wrong with 'u' as Unicode prefix in strings
Type in a valid place (for example into a for constructor: String
hello=u"Hello World"; It compiles ok. Type Ctrl-D to format the code.
The line converts in String hello = u "Hello World"; (note the space
between 'u' and "Hello World") Compile. Compiler gives "Undefined
symbol 'u'" error because 'u' has been separated from the string.
[QC Description]
For example.
You write:
String hello=u"Hello World";
That AFAIK is a valid Unicode string in C++Builder and compiles ok.
Press Ctrl-D and the line converts in:
String hello = u "Hello World";
(note the space between 'u' and "Hello World")
After formatting this, compiler refuses compile giving "Undefined
symbol
'u'" error.
Prefixing an 'L' code formatter does not separate the L from the
string.
QC Entry 91637
QC #:
Date Reported:
Area:
91316
2/3/2011
IDE\Code Editor\
Description:
Steps:
[QC Short Description]
code formatter breaks if indentation with preprocessor
1 Use a new VCL program. 2 enter into the TForm1 constructor:
#ifdef __BORLANDC__ if ( 1 == 0 ) #else if ( 0 == 1 ) #endif { } 3
Press control-D expected: no change actual: #ifdef __BORLANDC__
if ( 1 == 0 ) #else if ( 0 == 1 ) #endif { } I have attached the exported
formatter file.
[QC Description]
Using the attached formatter file the formatting if statements breaks.
It looks like the formatter does not use know about the preprocessor
QC Entry 91316
QC #:
Date Reported:
Area:
26006
3/13/2006
IDE\Form Designer
Description:
Steps:
[QC Short Description]
Cannot Apply/Store Value List Editor Changes
In Windows Display Properties go to Advanced and set font size to
Large- You will need to restart Windows after this Insert a Value List
Editor component onto a form In the Object Inspector double click the
Strings property This will bring up a Value List Editor dialog. There is
no way to store anything in this dialog as the only way to close it
down is to click on the Window Close [X] icon which discards
changes
QC Entry 26006
QC #:
Date Reported:
Area:
92455
3/15/2011 3:42:22 PM
IDE\Message View
Description:
Steps:
The XE IDE crashes when to many tool messages are generated for
the message view to handle. This becomes an issue with large C++
projects where large amount of warnings or if extended error info is
switched on, and if you have a large amount of projects in a project
group and large amount files per project, this can blow the limit of the
tools message away and it causes a IDE to AV.
1) Compile and attached package in the IDE and install....
2) it will hang while the messages are pushed into the message pane
3) then it will crash with an AV
The number of messages that are causing the problem should look
very familiar.
>>>>[32767] Test(1): test message<<<<
This seems a problem only with tool messages if you use
"AddTitleMessage(const MessageStr: string);" instead of"
AddToolMessage(...)" you can add lots more messages. Also worth
noting is that the package code that brings down XE runs without a
problem in CB2007! So there has been some regression...
--------------------------Error
--------------------------Registration procedure, Unit1.Register in package C:\Documents and
Settings\All Users.WINDOZE\Documents\RAD
Studio\8.0\Bpl\Package1.bpl raised exception class
EAccessViolation: Access violation at address 20984368 in module
'coreide150.bpl'. Write of address 7FDF0012.
--------------------------OK
--------------------------Then when you try and close down you get:
[209BE6C7]{coreide150.bpl} MsgLinesIntf.TLine.GetChild (Line 141,
"MsgLinesIntf.pas" + 1) + $5
[209BD12D]{coreide150.bpl}
MsgLines.TLineBuffer.NotifyLinesRemoved (Line 1023,
"MsgLines.pas" + 0) + $9
[209BD2A0]{coreide150.bpl} MsgLines.TLineBuffer.Clear (Line 1075,
"MsgLines.pas" + 7) + $5
[208412C3]{coreide150.bpl}
ProjectModule.TBaseProject.BeforeDestruction (Line 1017,
"ProjectModule.pas" + 24) + $16
[21B13075]{delphicoreide150.bpl}
BaseDelphiProject.TBaseDelphiProject.BeforeDestruction (Line 1521,
"BaseDelphiProject.pas" + 4) + $2
[5003A7FD]{rtl150.bpl } System.@BeforeDestruction (Line 12216,
"System.pas" + 10) + $0
[21B1034A]{delphicoreide150.bpl}
BaseDelphiProject.TBaseDelphiProject.Destroy (Line 784,
"BaseDelphiProject.pas" + 0) + $A
[5003A118]{rtl150.bpl } System.TObject.Free (Line 11069,
"System.pas" + 1) + $4
QC #:
Date Reported:
Area:
38921
1/18/2007
IDE\Performance
Description:
Steps:
[QC Short Description]
Attached is Andreas Plugin with my mod to track the stats per
IDE Compiler searching & opening the same file multiple times during compile 1. Load BDS 110 project, Install plugin 2. Run->Load
compiling
Process 3. Choose BDS.exe and run 4. Open the WPM sample
application located in ($BDS)\Demos\CPP\Apps\Wpm 5. Project ->
[QC Description]
Options 6. Disable ALL pre-compiled headers (otherwise your
This is Technically a duplicate of QC: 13775 but with everything
numbers are not correct) -> OK 7. Project -> Build WPM 8. Switch to
together in a cohesive whole with the reasons why it occurs. Asked
BDS where you are debugging IDE and you should have on your
for by David Dean.
eventlog: File In Known: 308, In Missed: 655, Total: 1174 Date In
Cache: 140, Total: 279 8. Switch back to BDS, and click in the source
When BDS 10/11 compiles a project the internal compiler re-searches 9. Hit CTRL-Space, to activate one of the Code Insight features. File
for header (and source) files mulitple times down the entire include
In Known: 86, In Missed: 294, Total: 591 Date In Cache: 139, Total:
path; even though it should know where it found it last time -- this is
139 Now these numbers grow exponentionally (yes, exponentionally)
waisting a lot of time duplicating efforts that it should already know
each additional unit you add to a project, so on this small aplication
about. All of Code Insight features also uses the internal compiler
with one form (two CPP files); you have that many file hits. Please
which then causes CI to be a lot slower than it can be.
QC Entry 38921
note the stats/cache are reset for EVERY compile. The statisics are:
Number of files that the plugin cached as already knowing didn't exist
in that location from a prior request Number of files that the plugin
cached as already knowing existed from a prior request Total number
of file requests. If you subtract the two cache counts from the Total,
that will leave you with the total number of _unique_ valid file
requests (Using the above numbers a total of 211). Second stats that
is the number of requests for the date/time of a file, and how many
were requests for dates that _weren't_ cached. If you subtract the two
numbers, then result is the number of date/times that were cached
that BDS should already have had since it asked for it before. (Sorry
the Output say "In Cache" but it sould actually be "Added to Cache".
Using the above build numbers meaning a 140 unique file/date
requests and a total of 139 duplicate file date requests.
QC #:
Date Reported:
Area:
44927
1/3/2002
IDE\Code Completion
Description:
Steps:
Suggest that Code Completion come up to assist with types when
making global declarations
-File | New Application
-Somewhere in global space place edit caret and
hit Ctrl+Spacebar
e.g. start to declare another global after Form1:
TForm1 *Form1;
<Ctrl+Spacebar here>
//res:
Error
Unable to invoke Code Completion due to errors in source code
//exp:
Code Completion list with available types
QC #:
Date Reported:
Area:
87974
9/10/2010
IDE\
Description:
Steps:
[QC Short Description]
Header file of unit opens separately from cpp file
- Create a C++Builder VCL Forms Application - Switch to the header
file of the form (Unit1.h) - Add something that generates a warning
(eg. #warning This is a warning) - Save the project, close the unit [QC Description]
Compile - Double-click on on the warning in Build messages window It is possible for the header file of a unit to become opened separately Note that the header has been loaded ("Code" and "History" tabs
from its associated cpp and/or dfm files. This can lead to having the
exist at the bottom of the code editor window) - Open the unit any
header loaded into the code editor in two different tabs. When this
way you'd like (eg. CTRL+F6, double click in project manager, etc) happens it is possible to make changes to one tab that are not
Now there will be two "Unit1" tabs ... "Unit1.h" and "Unit1.cpp" - Close
reflected in the other tab. It's also possible for the IDE to crash when and reopen the project - There will be one "Unit1" tab - Click on the
the correctly loaded unit is closed prior to the incorrectly loaded
tab (now shows "Code", "Design", and "History" tabs at the bottom) header file. View steps to see how that is accomplished.
Open the unit (CTRL+F6, etc) - Two "Unit1" tabs exist again - Close
the project Access violation at address 5003A116 in module
This is a regression for a bug that used to exist in BCB6. It works fine 'rtl150.bpl'. Read of address 00000058. followed by a never ending:
in CB2009 and was broken in CB2010 and still exists in CBXE.
Access violation at address 209DA44F in module 'coreide150.bpl'.
Read of address 00000014.
The attached project's .dsk file is already in the state to show the two
units open at the same time.
QC Entry 87974
QC #:
Date Reported:
Area:
87965
9/10/2010
IDE\Packages\Installin
g Components
Description:
[QC Short Description]
IDE crash when rebuilding installed package
Steps:
- Launch RSXE (fresh install
or otherwise) - Create a new
C++Builder package (no
[QC Description]
coding required) - Install the
**NOTE ** This really is a Windows 7 problem but it is not available in the list of platforms in my QC client. My package - Close and restart
system is Windows 7 Pro 64-bit. I have attempted to recreate this issue on Win2008 Server 64-bit and it
RSXE - Rebuild the package
never fails. This leads me to my belief that this is a Win7 issue.
exp: The package should be
momentarily unloaded from
If a C++Builder personality package is empty or contains any other code in the Register() function aside from the IDE, rebuilt, and then
RegisterComponents() then the IDE will crash when attempting to rebuild, clean, or uninstall the package.
reloaded into the IDE act: The
The IDE displays an AV with a stack dump (shown below). If instead of an empty package I register one or
IDE displays an AV, CPU use
more components then the IDE will not crash. However, if I then add another single line of code to Register()
such as Beep(), or __typeinfo(), etc then the IDE crashes again.
For me, this problem happens in RS2010 as well. It does not happen in RS2009.
Stack Dump:
(0EAC121A){bds.exe } [0EAC221A]
[21751FE1]{vclactnband150.bpl} UxTheme.uxtheme.dll + $5
[217824FC]{vclactnband150.bpl} ThemedActnCtrls.TThemedMenuButton.DoDrawText (Line 493,
"ThemedActnCtrls.pas" + 23) + $68
[21782610]{vclactnband150.bpl} ThemedActnCtrls.TThemedMenuButton.DrawText (Line 522,
"ThemedActnCtrls.pas" + 9) + $15
[2176B5EA]{vclactnband150.bpl} ActnMan.TCustomActionControl.Paint (Line 6125, "ActnMan.pas" + 37) +
$18
[21758024]{vclactnband150.bpl} ActnCtrls.TCustomButtonControl.Paint (Line 526, "ActnCtrls.pas" + 1) + $2
[5025E82E]{vcl150.bpl } Graphics.TCanvas.SetPenPos (Line 4118, "Graphics.pas" + 1) + $9
[2177975C]{vclactnband150.bpl} ActnMenus.TCustomMenuButton.Paint (Line 4123, "ActnMenus.pas" + 4) +
$2
[502878ED]{vcl150.bpl } Controls.TGraphicControl.WMPaint (Line 13195, "Controls.pas" + 7) + $5
[5027DF74]{vcl150.bpl } Controls.TControl.WndProc (Line 7074, "Controls.pas" + 91) + $6
[502DC8B2]{vcl150.bpl } ExtCtrls.TCustomControlBar.WMEraseBkgnd (Line 7971, "ExtCtrls.pas" + 28) + $6
[50292F77]{vcl150.bpl } Themes.TThemeServices.DrawElement (Line 707, "Themes.pas" + 1) + $22
[5027DF74]{vcl150.bpl } Controls.TControl.WndProc (Line 7074, "Controls.pas" + 91) + $6
[502DBD77]{vcl150.bpl } ExtCtrls.TCustomControlBar.PaintControlFrame (Line 7559, "ExtCtrls.pas" + 49) +
$16
[5027DB98]{vcl150.bpl } Controls.TControl.Perform (Line 6852, "Controls.pas" + 10) + $8
[50282CD2]{vcl150.bpl } Controls.TWinControl.PaintControls (Line 9989, "Controls.pas" + 27) + $D
[50282ACD]{vcl150.bpl } Controls.TWinControl.PaintHandler (Line 9935, "Controls.pas" + 24) + $8
[50286CBF]{vcl150.bpl } Controls.TWinControl.WMPrintClient (Line 12757, "Controls.pas" + 14) + $6
[5027DF74]{vcl150.bpl } Controls.TControl.WndProc (Line 7074, "Controls.pas" + 91) + $6
[50282838]{vcl150.bpl } Controls.TWinControl.WndProc (Line 9831, "Controls.pas" + 144) + $6
[21774E72]{vclactnband150.bpl} ActnMenus.TCustomActionMenuBar.WndProc (Line 1876, "ActnMenus.pas"
+ 25) + $4
[5027DB98]{vcl150.bpl } Controls.TControl.Perform (Line 6852, "Controls.pas" + 10) + $8
[50283253]{vcl150.bpl } Controls.TWinControl.WMPaint (Line 10128, "Controls.pas" + 18) + $D
[21769D53]{vclactnband150.bpl} ActnMan.TCustomActionBar.WMPaint (Line 5497, "ActnMan.pas" + 4) + $4
[5027DF74]{vcl150.bpl } Controls.TControl.WndProc (Line 7074, "Controls.pas" + 91) + $6
[50282838]{vcl150.bpl } Controls.TWinControl.WndProc (Line 9831, "Controls.pas" + 144) + $6
[21774E72]{vclactnband150.bpl} ActnMenus.TCustomActionMenuBar.WndProc (Line 1876, "ActnMenus.pas"
+ 25) + $4
[50281ED8]{vcl150.bpl } Controls.TWinControl.MainWndProc (Line 9552, "Controls.pas" + 3) + $6
[500B067C]{rtl150.bpl } Classes.StdWndProc (Line 13491, "Classes.pas" + 8) + $0
[50278AAE]{vcl150.bpl } Controls.FindControl (Line 3378, "Controls.pas" + 6) + $9
[50358AFF]{vcl150.bpl } Forms.TApplication.ProcessMessage (Line 9760, "Forms.pas" + 23) + $1
[50358B2A]{vcl150.bpl } Forms.TApplication.ProcessMessages (Line 9782, "Forms.pas" + 1) + $4
[20847976]{coreide150.bpl} ComPrgrs.TProgressForm.DoUpdate (Line 238, "ComPrgrs.pas" + 12) + $7
[208481DE]{coreide150.bpl} ComPrgrs.TProgressMonitor.MainThreadUpdate (Line 451, "ComPrgrs.pas" + 5)
+ $A
[500ADF64]{rtl150.bpl } Classes.TThread.Synchronize (Line 11800, "Classes.pas" + 4) + $6
[500AE1D8]{rtl150.bpl } Classes.TThread.Synchronize (Line 11868, "Classes.pas" + 9) + $A
[208480F8]{coreide150.bpl} ComPrgrs.TProgressMonitor.DoOnUpdate (Line 385, "ComPrgrs.pas" + 4) + $D
[208480C3]{coreide150.bpl} ComPrgrs.TProgressMonitor.DoUpdate (Line 376, "ComPrgrs.pas" + 2) + $2
[207EAC22]{coreide150.bpl} ProjectGroupBuilder.TProjectGroupBuilder.MakeThingsHappen (Line 243,
"ProjectGroupBuilder.pas" + 51) + $B
[5013B6B9]{rtl150.bpl } Rtti.RawInvoke (Line 5538, "Rtti.pas" + 46) + $0
[5013BA1E]{rtl150.bpl } Rtti.Invoke (Line 5729, "Rtti.pas" + 38) + $6
[50134809]{rtl150.bpl } Rtti.TRttiInstanceMethodClassic.GetCallingConvention (Line 4103, "Rtti.pas" + 1) + $2
[501351AF]{rtl150.bpl } Rtti.TRttiInstanceMethodEx.DispatchInvoke (Line 4408, "Rtti.pas" + 130) + $17
[5013BE84]{rtl150.bpl } Rtti.TRttiMethod.Invoke (Line 5859, "Rtti.pas" + 1) + $11
[207EA959]{coreide150.bpl} ProjectGroupBuilder.TProjectGroupBuilder.DoBuild (Line 179,
"ProjectGroupBuilder.pas" + 2) + $28
[207DD66D]{coreide150.bpl} BuildHost.TBuildHost.Perform (Line 362, "BuildHost.pas" + 19) + $8
[208476A2]{coreide150.bpl} ComPrgrs.TProgressForm.StartCompile (Line 188, "ComPrgrs.pas" + 8) + $C
[20847D4A]{coreide150.bpl} ComPrgrs.TProgressForm.HandleCompileMessage (Line 310, "ComPrgrs.pas"
+ 0) + $2
[5027DF74]{vcl150.bpl } Controls.TControl.WndProc (Line 7074, "Controls.pas" + 91) + $6
[50282838]{vcl150.bpl } Controls.TWinControl.WndProc (Line 9831, "Controls.pas" + 144) + $6
[5034FB30]{vcl150.bpl } Forms.TCustomForm.WndProc (Line 3961, "Forms.pas" + 191) + $5
[50281ED8]{vcl150.bpl } Controls.TWinControl.MainWndProc (Line 9552, "Controls.pas" + 3) + $6
[500B067C]{rtl150.bpl } Classes.StdWndProc (Line 13491, "Classes.pas" + 8) + $0
[50278AAE]{vcl150.bpl } Controls.FindControl (Line 3378, "Controls.pas" + 6) + $9
[50358AFF]{vcl150.bpl } Forms.TApplication.ProcessMessage (Line 9760, "Forms.pas" + 23) + $1
[50358B42]{vcl150.bpl } Forms.TApplication.HandleMessage (Line 9790, "Forms.pas" + 1) + $4
[503544A1]{vcl150.bpl } Forms.TCustomForm.ShowModal (Line 6648, "Forms.pas" + 33) + $5
goes to 100% on a core, the
main menu items disappear
from the toolbar, the IDE must
be killed with Task Manager.
[207DD0C6]{coreide150.bpl} BuildHost.TBuildHost.Build (Line 226, "BuildHost.pas" + 50) + $9
[207DCCB0]{coreide150.bpl} BuildHost.Build (Line 136, "BuildHost.pas" + 4) + $A
[207EA769]{coreide150.bpl} ProjectGroupBuilder.BuildProjects (Line 139, "ProjectGroupBuilder.pas" + 1) +
$17
[2081A6AB]{coreide150.bpl} ProjectGroup.TProjectGroup.CompileProjects (Line 847, "ProjectGroup.pas" +
1) + $23
[2081A34D]{coreide150.bpl} ProjectGroup.TProjectGroup.CompileActive (Line 695, "ProjectGroup.pas" + 4) +
$10
[20820F4D]{coreide150.bpl} ProjectGroup.TProjectGroupWrapper.CompileActive (Line 2792,
"ProjectGroup.pas" + 0) + $5
[0041F2F2]{bds.exe }
Sanctuary.Util..{Generics.Collections}TList<Sanctuary.Util.TPair<System.string,System.string>> (Line 13,
"Sanctuary.Util.pas" + 0) + $25B2
[0041E9DB]{bds.exe }
Sanctuary.Util..{Generics.Collections}TList<Sanctuary.Util.TPair<System.string,System.string>>.TEnumerator
(Line 13, "Sanctuary.Util.pas" + 0) + $1C9B
[500AF987]{rtl150.bpl } Classes.TBasicAction.Execute (Line 12988, "Classes.pas" + 3) + $7
[5026AA1D]{vcl150.bpl } ActnList.TContainedAction.Execute (Line 448, "ActnList.pas" + 8) + $2C
[5026B7F8]{vcl150.bpl } ActnList.TCustomAction.Execute (Line 1094, "ActnList.pas" + 7) + $8
[500AF84B]{rtl150.bpl } Classes.TBasicActionLink.Execute (Line 12917, "Classes.pas" + 2) + $7
[21773505]{vclactnband150.bpl} ActnMenus.TCustomActionMenuBar.ExecAction (Line 1071,
"ActnMenus.pas" + 6) + $D
[21774D5C]{vclactnband150.bpl} ActnMenus.TCustomActionMenuBar.TrackMenu (Line 1837,
"ActnMenus.pas" + 19) + $15
[21778386]{vclactnband150.bpl} ActnMenus.TCustomActionMainMenuBar.TrackMenu (Line 3574,
"ActnMenus.pas" + 5) + $3
[21773109]{vclactnband150.bpl} ActnMenus.TCustomActionMenuBar.CMItemKeyed (Line 984,
"ActnMenus.pas" + 3) + $4
[5027DF74]{vcl150.bpl } Controls.TControl.WndProc (Line 7074, "Controls.pas" + 91) + $6
[50281ED8]{vcl150.bpl } Controls.TWinControl.MainWndProc (Line 9552, "Controls.pas" + 3) + $6
[50282838]{vcl150.bpl } Controls.TWinControl.WndProc (Line 9831, "Controls.pas" + 144) + $6
[21774E72]{vclactnband150.bpl} ActnMenus.TCustomActionMenuBar.WndProc (Line 1876, "ActnMenus.pas"
+ 25) + $4
[50281ED8]{vcl150.bpl } Controls.TWinControl.MainWndProc (Line 9552, "Controls.pas" + 3) + $6
[500B067C]{rtl150.bpl } Classes.StdWndProc (Line 13491, "Classes.pas" + 8) + $0
[50278AAE]{vcl150.bpl } Controls.FindControl (Line 3378, "Controls.pas" + 6) + $9
[50358AFF]{vcl150.bpl } Forms.TApplication.ProcessMessage (Line 9760, "Forms.pas" + 23) + $1
[50358B42]{vcl150.bpl } Forms.TApplication.HandleMessage (Line 9790, "Forms.pas" + 1) + $4
[50358E6D]{vcl150.bpl } Forms.TApplication.Run (Line 9927, "Forms.pas" + 26) + $3
[004ACCE2]{bds.exe } bds.bds (Line 201, "" + 8) + $FFFB
QC Entry 87965
QC #:
Date Reported:
Area:
1124
9/9/2002
IDE\Translation Tools
Description:
Steps:
I can't port existing BCB5 translated applications. AFAICT there are
several faults in the resulting BPRs including:
1.Choose a VCL project with several forms.
2.\File\New\ and select Resource DLL Wizard
3.Click to the language selection page and enable a foreign
language.
4.Click on to finish and allow the IDE to recompile and create the new
project.
UNITNAME is always "Form"
CONTAINERID is always empty (though this may be correct).
In addition "#pragma resource" has been changed so that you need
double '\\'s to represent a single '\'.
You will find the new project has only one form (probably the first
listed in your original project) and that double clicking the form in the
Having fixed these issues I can get the project to Build and Make but I Project Manager only opens the file in the text editor. The pop-up
get EResourceNotFound on running and when I try to open the form menu has 'View as form' greyed out.
for viewing/designing I just get taken to the DFM in the edit window.
If you attempt to compile this project it will fail at a #pragma directive.
--------If you fix this by replacing '\' with '\\' it will compile and link but the
I tried recreating the project from scratch but after running the
resulting DLL fails when you try and run it and is obviously deficient.
Resource DLL Wizard the translation project only had the first form
listed. Aside from that it appeared to have the same BPR defects as // ADDITIONAL EXAMPLE OF 'BROKEN ITE' //////////////////////////////////
the upgraded BPR.
The 'RichEdit' example project shows some aspects of how broken
the ITE is. Each international project does at least have two forms
-------but:
None of the ITE menu items appear in the IDE although it is listed as
an available package.
1.They're both called "Form" in the Project Manager
2.You can't view/edit them as forms..only as DFMs.
FWIW if you build the project it does work but obviously in its current
state it would be a PITA to maintain.
QC #:
Date Reported:
Area:
2456
9/23/2002
IDE\Translation Tools
Description:
Steps:
[QC Short Description]
Translation manager
[QC Description]
The Translation Manager shows and translates no strings directly
coded in the sourcecode. (xy->Caption = "text";) It would be helpful to
get this translated without working with resource string tables and
constants to address them (and change thousands of lines of old,
untranslated, but running program code).
QC Entry 2456
QC #:
Date Reported:
Area:
2412
9/19/2002
IDE\Translation Tools
Description:
Steps:
[QC Short Description]
Translation manager errors and missing usability
[QC Description]
Viewing forms in the TM is nearly unusable. In the source view you
can never see hidden components. Additionally in the translated view
you can't see different pages of a TPageControl! Only translated
view: Clicking on the components sometimes move them
accidentally. Sometimes the TM moves components automatically,
when their alignment is set to alBottom, because it seems to change
the original create order.
See also Report#2451 to 2456.
QC Entry 2412
QC #:
Date Reported:
Area:
35461
10/19/2006
IDE\Build Tools
Description:
Steps:
[QC Short Description]
IDE build processes include path incorrectly
Tools | Options | Environment Options | Show command line checked open attached project click on run button on toolbar lots of
errors compiling Main.cpp copy echoed command line from the
[QC Description]
message window remove line breaks and unnecessary spaces and
For the attached project, the compiler produces number of errors like: add the file name Main.cpp open console window and cd to the
directory with this project type bcc32 and paste in the completed
[C++ Error] Sysconst.hpp(24): E2316 'ResourceString' is not a
command line file compiles without error (linker error is irrelevant)
member of 'System'
[C++ Error] Sysconst.hpp(24): E2040 Declaration terminated
incorrectly
[C++ Error] Sysconst.hpp(26): E2316 'ResourceString' is not a
member of 'System'
[C++ Error] Sysconst.hpp(26): E2040 Declaration terminated
incorrectly
when attempting to compile Main.cpp in a build from the IDE.
If the include path is changed to place the current directory below the
BDS include directory, then the project compiles correctly in the IDE.
The cause of the problem is the file "Search.h" with is in the project
directory (and included in Main.cpp). There is a "search.h" file in the
BDS\include directory which is called by other BDS header files, but
apparently the IDE uses the "Search.h" file from the project directory
instead of the one in the BDS\include directory.
QC Entry 35461
QC #:
Date Reported:
Area:
92027
3/6/2011
IDE\Structure Pane
Description:
Steps:
[QC Short Description]
a) expand the attache project into a folder b) open the project group
Structure Window is not functional (XE Starter)
[QC Description]
Classes not cooperating with VCL could not be inspected in the XE
Starter edition.
within the subfolder "BDS" c) expand the project "Sammler.lib" d)
open the file "Src\Chess\Board.cpp" e) you will see no structure at all,
a complete disfunctionality
This will take from that piece of software nearly any benefit if already
having a C++ Builder 2010 like me for development tasks. I am very
disappointed.
QC Entry 92027
QC
Date Reported:
#:
Area:
43201 4/16/2007
IDE\Unit Testing
Description:
Steps:
Several DUnit sources were missing
for Spacely. It seems that any new
files of DUnit was not delivered.
Here's a list of files that were missing:
$(TP)\source\dunit\readme-9.3.txt
$(TP)\source\dunit\readme-fastmm.txt
$(TP)\source\dunit\Contrib\DUnitWizard\README.rtf
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_project.bmp
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_project16.ico
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_project256.ico
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_testclass.bmp
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_testmodule.bmp
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_testmodule16.ico
$(TP)\source\dunit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit_testmodule256.ico
$(TP)\source\dunit\doc\DUNIT.CNT
$(TP)\source\dunit\doc\DUNIT.HLP
$(TP)\source\dunit\doc\tutorial.doc
$(TP)\source\dunit\doc\images\xtao.cdr
$(TP)\source\dunit\examples\ChecklessTests\FailChecklessTestsDemo.dpr
$(TP)\source\dunit\examples\ChecklessTests\TestFailChecklessTests.pas
$(TP)\source\dunit\examples\HaltRepeating\DemoHaltOnError.dpr
$(TP)\source\dunit\examples\HaltRepeating\DemoHaltRepeatingOnError.pas
$(TP)\source\dunit\examples\MemLeakDetect\LeakTestDemo.dpr
$(TP)\source\dunit\examples\MemLeakDetect\UnitTestLeak.pas
$(TP)\source\dunit\examples\MemLeakDetect\UnitTestSetup.pas
$(TP)\source\dunit\src\DUnit4Net.bdsgroup
$(TP)\source\dunit\src\DUnitW32.bdsgroup
$(TP)\source\dunit\src\DUnitW32.bdsproj
$(TP)\source\dunit\src\DUnitW32.dpr
$(TP)\source\dunit\src\DUnitW32.res
$(TP)\source\dunit\src\FastMMMemLeakMonitor.pas
$(TP)\source\dunit\tests\DUnitTestLibW32.bdsproj
$(TP)\source\dunit\tests\DUnitTestLibW32.dpr
$(TP)\source\dunit\tests\DUnitTestLibW32.res
$(TP)\source\dunit\tests\FastMMMonitorTest.pas
I'm also attaching a complete list of the DUnit distributable.
QC #:
Date Reported:
Area:
87379
8/19/2010
Install
Description:
Steps:
[QC Short Description]
AQtime 7 not installed
[QC Description]
After downloading the new Setup and checking AQTime 7 to install,
the tools isn´t installed. I use the German release
QC Entry 87379
QC #:
Date Reported:
Area:
90217
12/9/2010
Install\Files
Description:
Steps:
[QC Short Description]
'CPPStructurePane.inc' is not installed - Warning: Unable to locate
Structure PreInclude File
1. I downloaded the trial version and installed only C++Builder XE
2. I did not install all features. The features that were NOT installed
are:
[QC Description]
After building a C++ project I get the warning Unable to locate
Structure PreInclude File 'c:\program files\embarcadero\rad
studio\8.0\ObjRepos\CPPStructurePane.inc'.
Tried a repair install, but to no avail.
QC Entry 90217
- All database features
- HTML WYSIWYG
- Web Development Controls
- VCL for the Web
- integrated Translation Environment
- Microsoft(R) Office controls
- Rave Report Database ...
- Ribbon Controls
- DUnit Unit testing frameworks
- Shared Files
- XML Mapper.
After the above install the 'CPPStructurePane.inc' file was not
present.
This is still an issue in Pulsar...
QC #:
Date Reported:
Area:
9592
11/23/2004
VCL\System Controls\TPaintBox
Description:
Steps:
[QC Short Description]
GDI + Not working
Create a VCL application put that in #define STRICT #include
<windows.h> #include <algorithm> using std::min; using std::max;
#include <gdiplus.h> and it won't compile
[QC Description]
When i tried to include guiplus.h i get the following errors:
[C++ Warning] GdiplusHeaders.h(681): W8022 'Bitmap::Clone(const
Rect &,int)' hides virtual function 'Image::Clone()'
[C++ Error] GdiplusGraphics.h(37): E2015 Ambiguity between
'Gdiplus::Graphics::Graphics(void *)' and
'Gdiplus::Graphics::Graphics(void *,int)'
QC Entry 9592
QC #:
Date Reported:
Area:
72879
4/10/2009
VCL\Printing
Description:
Steps:
[QC Short Description]
TPrinterOrientation unusable, at compile time
new forms project, in constructor, type TPrinterOrientation
OldOrientation=Printer()->Orientation;
[QC Description]
this line of code
TPrinterOrientation OldOrientation=Printer()->Orientation;
cannot be compiled, E2015 Ambiguity betwwen TPrinterOrientation
and Printers;;TPrinterOrientation
If I type Printer()-> in the code, he tells me Orientation is also of type
TPrinterOrientation. So where is the ambiguity?
QC Entry 72879
QC #:
Date Reported:
Area:
90773
1/9/2011
VCL\
Description:
Steps:
[QC Short Description]
__delphirtti changes RTTI
Create a VCL console application with the following code: #include
<vcl.h> #pragma hdrstop #include <Rtti.hpp> #include <iostream> int
wmain() { // TTypeInfo *TypeInfo = __delphirtti(TStream);
TRttiContext Context; TRttiType *Type =
Context.GetType(__classid(TMemoryStream));
DynamicArray<TRttiProperty*> Properties = Type->GetProperties();
std::cout << Properties.Length << std::endl; return 0; } It is important
to disable "Build with runtime packages". When you run the
application it writes "3" in the console as TMemoryStream has 3
properties. Now try to remove the comment in front of the line with
__delphirtti(TStream). Now when you run the application it writes "1"
in the console. The properties Position and Size have disappeared.
[QC Description]
__delphirtti() on a class may remove access to some properties on
the same class through RTTI.
__delphirtti(TStream) anywhere in the application will remove
TStream::Position and TStream::Size from RTTI.
__delphirtti(TComponent) anywhere in the application will remove
TComponent::Owner from RTTI.
QC Entry 90773
QC #:
Date Reported:
Area:
77428
9/7/2009
VCL\
Description:
Steps:
[QC Short Description]
Generic member functions of TValue do not link
Create a new VCL application and include Rtti.hpp Make sure "Build
with runtime packages" is enabled. Add the following code
somewhere: TValue Value2 = TValue::From(5); The linker says:
[ILINK32 Error] Error: Unresolved external 'Rtti::TValue __fastcall
Rtti::TValue::From<int>(const const int)' referenced from UNIT7.OBJ
[QC Description]
When "Build with runtime packages" is enabled, the generic member
functions of TValue cannot link.
QC Entry 77428
QC #:
Date Reported:
Area:
77427
9/6/2009
VCL\
Description:
Steps:
[QC Short Description]
No default constructor for TValue
Create a new VCL application, include Rtti.hpp, and add the following
code somewhere: TValue Value; This is especially annoying when
used with TRttiMethod::Invoke(), which takes an array of TValue as
argument. It makes code like this difficult: TValue Values[3];
if(something) Values[0] = get_a_value(); else
retrieve_value(&Values[0])
[QC Description]
The TValue class cannot be default constructed. This can make it
awkward to use.
QC Entry 77427
QC #:
Date Reported:
Area:
86675
7/28/2010
VCL\Emulation Classes
Description:
Steps:
[QC Short Description]
OPENARRAY() and ARRAYOFCONST() evaluate arguments twice
- Build (bcc32 -WCV qc86675.cpp) and run the following code: // ----#include <SysUtils.hpp> #include <cstdio> int main (void) { int i = 0;
Format (L"%d", ARRAYOFCONST ((i++))); std::printf (i == 1 ?
"PASS" : "FAIL"); } // ----- Exp.: prints "PASS" Act.: prints "FAIL"
[QC Description]
In order to get the argument count, both OPENARRAY() and
ARRAYOFCONST() pass all arguments to a special template class
(OpenArrayCount<>). This implies that all arguments passed to
OPENARRAY() and ARRAYOFCONST() are evaluated twice. Here's
an example:
// ----#include <SysUtils.hpp>
#include <cstdio>
int main (void)
{
int i = 0;
Format (L"%d", ARRAYOFCONST ((i++)));
std::printf (i == 1 ? "PASS" : "FAIL");
}
// ----It's possible to circumvent this by adequate usage of sizeof() (which
probably wasn't possible back in the days of C++Builder 1); I've
attached a possible fix.
QC Entry 86675
QC #: Date Reported:
Area:
77436
VCL\Emulation Classes
9/7/2009
Description:
Steps:
[QC Short Description]
AV when a Delphi record containing managed
data types is used as a function Result
======================================================================
This code is a simplified example of the same crash that occurs in QC #77431:
======================================================================
[QC Description]
When a Delphi record type containing
managed data types, such as interfaces or
strings, is used as a return type for a Delphi
function, an AV occurs if the function is called
in C++.
[MORE INFORMATION]
--- RecIntfCrash.pas --unit RecIntfCrash;
interface
type
TCrashRec = record
As in C++, a Delphi function returning a record
receives a hidden parameter with the address
of the destination. However, the Delphi function
assumes that the destination memory has been
initialized/cleared. Delphi does this via a call to
__InitializeRecord when a record variable is
declared. C++ does no initialization/clearing in
a statement like this:
PasRec r= GetRec();
Instead C++ relies on the fact that the callee
will copy [via the copy ctr] the results directly
into the hidden address passed [or, with RVO,
just construct the return object @ the hidden
address].
The Delphi function returning a record instead
invokes the _CopyRecord helper to copy the
source into the hidden address. This crashes
because _CopyRecord attempts to clear the
managed fields as they have non-zero values.
[WORKAROUND]
A possible workaround would be for the C++
side to use this instead:
PasRec r;
r = GetRec();
Data: IInterface;
Str: String;
class function Create: TCrashRec; static;
end;
implementation
class function TCrashRec.Create: TCrashRec;
begin
Result.Data := nil; // AV in _IntfClear() because Data is not initially zero
Result.Str := ''; // AV in UStrLAsg() because Str is not initially zero
end;
end.
--- Test.cpp --#include "RecIntfCrash.hpp"
{
TCrashRec r = TCrashRec::Create(); // AV because r is not initialized before jumping into
Create()
}
===========================================================
Another example is from the duplicate 272796 RAID:
===========================================================
/--------------------------------------------------------------------------#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#include <tchar.h>
#include <Rtti.hpp>
//---------------------------------------------------------------------------
QC Entry 77436
#pragma argsused
WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR
lpCmdLine, int nCmdShow)
{
TRttiContext ctx = TRttiContext::Create(); // <- AV
ctx.Free();
return 0;
}
//---------------------------------------------------------------------------
===========================================================
Another example is from the duplicate 272770 RAID:
===========================================================
TValue::_op_Implicit(5);
QC #:
Date Reported:
Area:
93966
5/17/2011
VCL\Emulation Classes
Description:
Steps:
[QC Short Description]
Variant loses it's value on auto-assignments
int foo = 1; Variant bar = foo; bar = bar; if (bar!=foo)
ShowMessage("fail");
[QC Description]
"No matter if you try to assign variant to itself (i.e. v=v) it always clears
destination first"
Further discussion on
https://forums.embarcadero.com/message.jspa?messageID=353312#353312
QC Entry 93966
QC #:
Date Reported:
Area:
93971
5/17/2011
VCL\Emulation Classes
Description:
Steps:
[QC Short Description]
Variant assignment operators have several flaws
- downlad the attachment, compile and run self_assignment.cpp ------------- #include <cstdio> #include <vcl.h> #pragma hdrstop #include
<tchar.h> int _tmain(void) { Variant v1, v2 = "foo"; v1 = v2; v2 = v2;
std::printf ((v1 == v2) ? "PASS" : "FAIL"); } -------------- Expected
output: "PASS" Actual output: "FAIL"
[QC Description]
There is a number of problems with the assignment operators in the
EMUVCL Variant classes:
- they are not exception-safe, i.e. the data in the object being
assigned to is lost if the assigment fails
- they do not check for self-assignment, which means that selfassignment results in data loss
- they duplicate all the code in the constructor overloads. And sure
enough, there are several cases where the assignment operator and
the copy constructor are misaligned.
- the Variant classes usually don't check the result of the
::VariantCopy() and ::VariantChangeType()
My proposition is to solve all these problems at once by introducing
swap() methods and use the "copy & swap" idiom to implement the
assignment operator overloads.
The attachment contains a test case for the second problem (selfassignment) and a set of patches for sysvari.h, utilcls.h and
variant.cpp which address all of the problems listed above.
The self-assignment problem has also been mentioned in QC
#93966.
QC Entry 93971
QC #:
Date Reported:
Area:
93699
5/8/2011
VCL\Ribbon Controls
Description:
Steps:
[QC Short Description]
occurred access-violation with QAT when selecting 'Show Quick
Access Toolbar Below the Ribbon'
1) Run a sample program.
2) QAT, and click the right mouse
3) Click 'Show Quick Access Toolbar Below the Ribbon'
4) An access violation occurs.
[QC Description]
If shown QAT below a ribbon.
occurred access-violation
Source:
Samples\CPP\VCL\RibbonDemos\RibbonDemo
Access violation at address 005873FE in module 'RibbonDemo.exe'.
Read of address 00000000
:7685b727 KERNELBASE.RaiseException + 0x58
:0046b474 System::_17044 + 0x1C
:76fa6a8b ; ntdll.dll
:76f70143 ntdll.KiUserExceptionDispatcher + 0xf
:00583b04 ; Ribbon::TCustomRibbon::Resize
:004fd8e1 ; Controls::TWinControl::WndProc
:004fcf7f Controls::TWinControl::MainWndProc + 0x2F
:0042c7ce Classes::_17544 + 0x16
:75cd62fa ; C:\Windows\syswow64\user32.dll
:75cd6d3a user32.GetThreadDesktop + 0xd7
:75cd6de8 ; C:\Windows\syswow64\user32.dll
:75cd6e44 ; C:\Windows\syswow64\user32.dll
:76f7011a ntdll.KiUserCallbackDispatcher + 0x2e
:75cd6a8c ; C:\Windows\syswow64\user32.dll
:71330b64 ; C:\Windows\SysWOW64\uxtheme.dll
:71330b96 ; C:\Windows\SysWOW64\uxtheme.dll
:75cd729a user32.GetPropW + 0x73
:75cd62fa ; C:\Windows\syswow64\user32.dll
:75cd6d3a user32.GetThreadDesktop + 0xd7
:75ce0d27 user32.GetClientRect + 0xc5
:75ce0d4d user32.CallWindowProcW + 0x1b
:004fd9e1 ; Controls::TWinControl::DefaultHandler
OS: Windows 7 32bit
** if make setting "Ribbon1->QuickAccessToolbar->Position =
qpBottom" by IDE,occurred a Access Violation on "TForm1::TForm1"
on runtime.
So can't show a form of a program.
QC Entry 93699
QC #:
Date Reported:
Area:
83324
1/22/2010 4:22:52 PM
VCL\Gestures
Description:
Steps:
Tested on Windows XP and 7
Problem linking Gestures.pas
Added by Tomohiro Takahashi
<<<<<<<<<<<<<<<
This issue reproted as QC#81471
>>>>>>>>>>>>>>>
1. File|New|VCL C++ application
2. Drop TGestureManager onto form
3. Project|Options. Packages. Turn off option 'Build with Runtime
Packages'
4. Project|Options. C++ Linker. Set Dynamic RTL to 'False'
5. Project|Build Project1..
//exp: Successful
//act:
[ILINK32 Error] Fatal: Type index 2147479550 is bad in module
Gestures.pas
QC #:
Date Reported:
Area:
60062
3/28/2008
Debugger\Watches
Note: Same steps work fine in Fulcrum.
Description:
Steps:
[QC Short Description]
Please have Watch evaluator show full contents of AnsiString
download attached project Project | Options | Debugger Options |
CodeGear Debuggers | General - check "Allow side effects in new
watches" Open project verify breakpoint set on line 17 of Unit1.cpp F9
[QC Description]
to build and run - stops at breakpoint Open Watch window verify
The attached project builds an AnsiString variable with an embedded watches set for ms, ms.Length() and ms.SubString(7,5) Exp: ms will
\0 character. The watch evaluator properly shows the length of the
show Length() characters (11 characters) Act: Only 6 characters
AnsiString as 11 and shows the contents of a SubString starting after show in the watch Note that the SubString() node shows the
the \0 character, but the contents of the AnsiString are shown only up remaining portion of ms Resume execution Note that the program is
to the \0.
able to access the remainder of the data as well
QC Entry 60062
QC #:
Date Reported:
Area:
95964
7/8/2011
Debugger\Watches
Description:
Steps:
[QC Short Description]
Debugger visualizer TDateTime not working
0. start IDE on Russian locale. 1. File -> New -> VCL Application 2.
Trivial code void __fastcall TForm1::FormCreate(TObject *Sender) {
TDateTime x = Now(); ShowMessage(x.DateTimeString()); } 3.
Breakpoint on "ShowMessage" line 4. Variable 'x' in a Watch list 5.
Displayed value = '????' No IDE plugins installed. Just a clean C++
Builder XE Update 1. All standard debugger visualizers enabled
(default) See the attached screenshot
[QC Description]
Added by Sysop
<<<<
This issue occurs on Russian locale.
>>>>
QC Entry 95964
QC #:
Date Reported:
Area:
84978
5/28/2010
Debugger\Evaluator
Description:
Steps:
[QC Short Description]
TDateTime visualizer is not working
1. Open a project
2. add following to a .cpp file
[QC Description]
If a variable is of type reference to TDateTime, the visualizer is not
showing the string date.
QC Entry 84978
#include <windows.h>
#include <sysutils.hpp>
void f( TDateTime & var ) {
OutputDebugStringW( var.DateTimeString().c_str() );
}
void f2() {
TDateTime now( Now() );
f( now );
}
call f2() from somewhre.
3. Compile
4. Set breakpoint on OutputDebugString
5. Run.
6. When breakpoint is hit, hover over 'var' or look at it in the local vars
view
7. Observe that the string is not displayed.
QC #:
Date Reported:
Area:
20434
10/21/2005
Debugger\Interaction with IDE
Description:
Steps:
[QC Short Description]
Blue dot woes.
[QC Description]
It would appear that blue 'execution point' dots only appear in the
gutter for header files that are already open when debugging starts.
QC Entry 20434
1.Load the attached C++ project
2.Run it under the debugger.
2.5 Add breakpoint line 23 in unit3.cpp (at dummy2() call)
3.Click the button - execution stops at breakpoint.
4.Use View Unit (Ctrl+F12) to open Unit1.
5.Switch to Unit1.H
6.Note absence of blue dots in gutter.
6.1 Switch to Unit1.cpp and note no blue dots in gutter.
7.Step execution into the header and note blue dots miraculously
appear :)
QC #:
Date Reported:
Area:
77576
9/10/2009
Debugger\Inspector
Description:
Steps:
[QC Short Description]
Codeinspector display wrong value
class cls_Data : public TObject { int i_Data; public: cls_Data (int
Data){i_Data = Data;}; }; TTemplateList<cls_Data*> * Results = new
TTemplateList< cls_Data *>(false); Results->Add(new cls_Data(10));
Results->Add(new cls_Data(20)); int i_Count = Results->Count; Start
the debugger an move to the last line. Move mouse over the line
"Results->Count" expression. Debugger displays wrong value. We
attached a small example.
[QC Description]
We are using template classes with properties. While debugging,
when you move over the property count of an instance of template
class, the wrong value or none value is diesplayed
//--------------------------------------------------------------------------template <typename T> class TTemplateList
{
private:
vector<T> vData;
bool FOwnsObjects;
T GetItem (const int Index)
{
return vData.at (Index);
};
void SetItem (const int Index, T Object)
{
if (FOwnsObjects)
{
CheckType (Object);
}
vData.at (Index) = Object;
};
const unsigned int GetCapacity()
{
return vData.capacity();
};
const unsigned int GetCount()
{
return vData.size();
};
.
.
.
.
public:
__property const unsigned int Capacity = { read = GetCapacity };
__property unsigned int Count = { read = GetCount };
__property bool OwnsObjects = { read = FOwnsObjects, write =
SetOwnsObjects };
__property T Items[int Index] = {read=GetItem, write=SetItem};
QC Entry 77576
QC #:
Date Reported:
Area:
76164
7/22/2009 3:33:45 PM
Debugger\Evaluator View
Description:
Steps:
Using the Evaluate dialog:
1. paste these lines into a new console app.
Expressions with side effects have their side effects doubled.
int main()
{
int i = 0;
return 0;
}
Evaluating function calls actually calls the function twice.
evaluate/modify shows wrong value when evaluating an expression
with side effects (ie a variable using increment operator)
2. set breakpoint on line "return 0" and run
3. ctrl+F7 (evaluate/modify)
4. enter ++i: it shows "1"
5. enter ++i again
exp:shows '2'
act: shows '3'
QC #:
Date Reported:
Area:
87945
9/10/2010
Internet\XML\Data Binding
Description:
Steps:
[QC Short Description]
XSD files are treated as regular XML files during import
see attached files: simple.xsd: a simple XSD simple_2010: the
binding RS2010 created (correct) simple_XE: the binding RSXE
created (wrong)
[QC Description]
The XML Data Binding Wizard treats XSD files as regular XML files.
The generated binding is hence unusable. DTD files work as
expected as does RS2010.
QC Entry 87945
QC #:
Date Reported:
Area:
95898
7/7/2011
Compatibility\Previous -> Current
Description:
Steps:
[QC Short Description]
Auto-generated standard copy constructor not longer calls:
// Compile, link and run the following console application:
a) calls the base constructor
b) copies fields from source
[QC Description]
[REGRESSION]
QC Entry 95898
#include <System.hpp>
#include <stdio.h>
class TMyClass : public TObject {
public:
TMyClass(int AValue) : FValue(AValue) {}
int FValue;
};
int main() {
TMyClass *object1 = new TMyClass( 1 );
TMyClass *object2 = new TMyClass( *object1 );
printf("object2->FValue=%d\n", object2->FValue);
return 0;
}
Exp: The expected value of object2->FValue is '1'
Act: The value is '0'
(Plus, looking at the assembly code generated you'll see that the
base constructor (i.e. TObject's) is also not being called). IOW, the
compiler generated copy constructor is broken. This worked fine until
XE.
QC #:
Date Reported:
Area:
77221
8/31/2009
Compatibility\BCB<->Delphi
Description:
Steps:
[QC Short Description]
The Rtti unit does not work with runtime packages disabled
Create a new VCL application with the following code somewhere,
eg. in a button OnClick:
TRttiContext LContext;
TArray__1<TRttiType*> Types = LContext.GetTypes();
[QC Description]
When "Build with runtime packages" is disabled the Rtti unit is
completely useless.
You also need to include Rtti.hpp at the top of the file.
When enabled the Rtti unit is just very buggy.
QC Entry 77221
This works when "Build with runtime packages" is enabled and Types
gets filled with a list of all types. But when runtime packages is
disabled the list is empty.
QC #:
Date Reported:
Area:
4753
11/13/2001
Linker
Description:
Steps:
The linker doesn't seem to like having a '+' (plus sign) anywhere in a
path. Gives error:
[Linker Fatal Error] Fatal: Expected a file name:
1. File | New | Application
2. Save All | New Folder < name it something with a '+' in it (ie.
C++Folder) >
3. F9
//exp: clean build
//res: [Linker Fatal Error] Fatal: Expected a file name:
QC #:
Date Reported:
Area:
81838
2/4/2010
Linker
Description:
Steps:
[QC Short Description]
Add support /3GB aware: IMAGE_FILE_LARGE_ADDRESS_AWARE
[QC Description]
With C++Builder 2010, default memory manager(heap) has been replaced
with FastMM.
So, please add support /3GB linker option like Delphi compiler.
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
Note:
[Enabling An Address Space > 2GB - Appropriate Linker Directive]
http://edn.embarcadero.com/article/33416#12EnablingAnAddressSpaceGB
QC Entry 81838
QC #:
Date Reported:
Area:
90719
1/6/2011
Linker\ILINK32\Errors/Warnings
Description:
Steps:
The following code throws a bunch of warnings and then finally a
linker error (see
below).
1. new Console App
2. include the following code:
#include "shlobj.h"
Only occurs when application is built statically.
wchar_t *APath = NULL;
#include "shlobj.h"
wchar_t *APath = NULL;
HRESULT hr = ::SHGetKnownFolderPath(
FOLDERID_Desktop, 0, NULL, &APath );
HRESULT hr = ::SHGetKnownFolderPath(
FOLDERID_Desktop, 0, NULL, &APath );
3. Compile
-> application compiled successfully
Errors:
4. Select linking with static RTL
5. Uncheck the Build with runtime packages check button
[ILINK32 Warning] Warning: BSS : 0x00000000 / 0x00800000
[ILINK32 Warning] Warning: CODE : 0x000472bb / 0x00800000
[ILINK32 Warning] Warning: DATA : 0x00031790 / 0x00800000
[ILINK32 Warning] Warning: DEBNAM : 0x0012d15f / 0x00800000
[ILINK32 Warning] Warning: DEBSYM : 0x00041b0c / 0x00800000
[ILINK32 Warning] Warning: DEBTYP : 0x0021a0d9 / 0x00800000
[ILINK32 Warning] Warning: Extdef flags : 0x00000418 / 0x00004000
[ILINK32 Warning] Warning: Extdefs : 0x00001060 / 0x00004000
[ILINK32 Warning] Warning: External types : 0x00000910 /
0x00040000
[ILINK32 Warning] Warning: Import symbols : 0x0000030c /
0x00100000
[ILINK32 Warning] Warning: Line number cache : 0x0001429e /
0x00060000
[ILINK32 Warning] Warning: OBJ symbols : 0x000a0cc8 /
0x00400000
[ILINK32 Warning] Warning: Public GSX : 0x0000c5e4 / 0x000c0000
[ILINK32 Warning] Warning: Public types : 0x00015280 / 0x00080000
[ILINK32 Warning] Warning: Publics : 0x0006f504 / 0x000c0000
[ILINK32 Warning] Warning: SegRelocs : 0x00059704 / 0x00800000
[ILINK32 Warning] Warning: StringBlock : 0x000009fb / 0x00800000
[ILINK32 Warning] Warning: TLS : 0x0000009c / 0x00800000
[ILINK32 Warning] Warning: Type names : 0x0003633d / 0x00100000
[ILINK32 Warning] Warning: UNKNOWN : 0x00000018 / 0x00800000
[ILINK32 Warning] Warning: Virdefs : 0x0000c5e4 / 0x00020000
[ILINK32 Warning] Warning: C:/Documents and
Settings/Administrator/Desktop/Known Folders/BCB
XE/KnownFolders.ilc:
0x00308000 / 0x08000000
[ILINK32 Warning] Warning: C:/Documents and
Settings/Administrator/Desktop/Known Folders/BCB
XE/KnownFolders.ild:
0x00062000 / 0x08000000
[ILINK32 Warning] Warning: C:/Documents and
Settings/Administrator/Desktop/Known Folders/BCB
XE/KnownFolders.ilf:
0x00526000 / 0x08000000
[ILINK32 Warning] Warning: C:/Documents and
Settings/Administrator/Desktop/Known Folders/BCB
XE/KnownFolders.ils:
0x008ae000 / 0x06000000
[ILINK32 Warning] Warning: C:/Documents and
Settings/Administrator/Desktop/Known Folders/BCB
XE/KnownFolders.tds:
0x01320000 / 0x08000000
[ILINK32 Warning] Warning: unknown heap name : 0x08000000 /
0x08000000
[ILINK32 Warning] Warning: Error detected (PE972)
[ILINK32 Error] Error: Unable to perform link
QC Entry 90719
exp:
application compiled without warnings and errors
QC #:
Date Reported:
Area:
21417
11/14/2005
ActiveX\IDE\Project Manager
Interaction
rez:
warnings and unable to perform link error
Description:
Steps:
[QC Short Description]
Project Manager does not display the Project_TLB.h file
File | New | Other | ActiveX | ActiveX Library
[QC Description]
The Project Manager never displays the Project_TLB.h file of an
ActiveX Library. It does display the Project_TLB.cpp file by itself,
which rarely does anything when clicked on.
QC Entry 21417
Expected:
"Project_TLB.cpp" treenode that displays two child nodes "Project_TLB.cpp" and "Project_TLB.h"
Actual:
"Project_TLB.cpp" treenode that has no child nodes at all.
File | Save All
create new directory and save all files
Flie | Close All
File | Reopen and selcet the project
check nodes on PM
// _ATL.cpp has sub nodes
_ATL.cpp
_ATL.h
// _TLB.cpp doesn't have sub node
QC #:
Date Reported:
Area:
23482
1/13/2006
ActiveX\Code Generators\C++
Description:
Steps:
[QC Short Description]
Imported ActiveX into new package but package won't install (linker
errors)
1. tregsvr attached .tlb
2. File | New C++ Package
3. Component | Import Component
4. Select Type Library
[QC Description]
5. Find and select this type library in the list: "Shockwave flash",
When trying to install a package with the imported flash activex control
click Next
the linker generates 8 errors:
6. Check the Generate Component Wrapper check box, click Next
7. Add unit to package, click Finsih
[Linker Error] Error: Unresolved external '__stdcall
8. Ctrl + F9
Shockwaveflashobjects_tlb::IDispatchEx::GetDispID(wchar_t *, unsigned //res:
long, long *)' referenced from D:\RICHARD'S DOCUMENTS\BORLAND [Linker Error] Error: Unresolved external '__stdcall
STUDIO
Stuffflash_tlb::IDispatchEx::GetDispID(wchar_t *, unsigned long,
PROJECTS\DEBUG_BUILD\SHOCKWAVEFLASHOBJECTS_OCX.OBJ long *)' referenced from
::
..\DEBUG_BUILD\STUFFFLASH_OCX.OBJ
QC Entry 23482
-- Previous steps -1. Open up attached project in Package1.zip
2. Build
3. Get Error that the linker can't find GetDispID
Note: if you comment out __declspec (package) then it works.
-- Old steps -1) Launch Borland C++Builder 2006
2) Select 'File->New->Package - C++Builder'
3) Select 'Component->Import Component'
4) Select 'Import ActiveX Control' radio button
5) Choose 'Shockwave Flash' from the list
6) Click 'Next'
7) Accept default options:
Class Name(s): = TShockwaveFlash
Palette Page: = ActiveX
Unit Dir Name: = c:\program files\borland\bds\4.0\Imports\
Search Path: =
$(BDS)\Include\Indy9;$(BDS)\Lib\Indy9;c:\windows\system32
'Generate Component Wrappers' is checked
and click 'Next'
8) Select 'Add unit to Package1.bdsproj project'
9) Click 'Finish'
10) In 'Project Manager' right-click on 'Package1.bpl' and select
Install
QC #:
Date Reported:
Area:
92394
3/18/2011
ActiveX\Code Generators\C++
Description:
Steps:
[QC Short Description]
ciSingleInstance and ciInternal COM object cannot be created
- In an empty project - Add new Active X Library - Add new
Automation Object - name it anything you want - select single
instance or internal - save and look at the imple file generated code
the createfactory will state Comobj::ciMultiInstance rather than what
you chose. The COM object when used acts a multi instance.
[QC Description]
Creating a COM object in a DLL or EXE choosing single instance or
internal in wizard does not produce different code than multiple
instance
QC Entry 92394
QC #:
Date Reported:
Area:
5521
8/6/2003
ActiveX\Type Library Editor
Description:
Steps:
[QC Short Description]
Should be self explanatory! If not then 1/ Create an automation object
Redundant semicolon always added to end of all implementation
stubs!
2/ Add a method or property 3/ Refresh implementation 4/ Examine
generated code
[QC Description]
Minor problem
When refresh implementation button is pressed
all newly generated implementation stubs
have a semicolon added at the end of the closing brace
e.g.
STDMETHODIMP TEDGMsgContextImpl::set_TargetAddress(long
Value)
{
try
{
}
catch(Exception &e)
{
return Error(e.Message.c_str(), IID_IEDGMsgContext);
}
return S_OK;
};
There should NOT BE a semicolon HERE!
Causes minor issues with source code validation tools (such as lint)
QC Entry 5521
QC #:
Date Reported:
Area:
79606
11/18/2009
CodeGuard
Description:
Steps:
[QC Short Description]
Pointer arithmetic underrun
1. if you use sstream in this example CodeGuard reports Pointer
arithmetic underrun in process: ScadaKSA.exe(3140) - c:\program
files\embarcadero\rad
studio\7.0\include\../include/dinkumware/streambuf#201 in each case
if you use dynamic RTL or not; #include <sstream> using namespace
std; void main () { ostringstream os; os<< 2; string s = os.str(); } 2.
only way i solved this issue is to turn off is to set (in options) C++
Compiler -> Debugging -> Enable CodeGuard ->Monitor inline pointer
access = FALSE but this turns off basic codeguard functionality.
[QC Description]
Pointer arithmetic underrun in process: ScadaKSA.exe(3140) c:\program files\embarcadero\rad
studio\7.0\include\../include/dinkumware/streambuf#201
QC Entry 79606
QC #:
Date Reported:
Area:
90513
12/26/2010
Compiler\C++
Description:
Steps:
[QC Short Description]
Complier error (2 variables get the same memory address)
1) Create a new VCL forms application 2) Copy the code above to
header file 3) create an instance of TTest 4) Run 5) Observe the
'Error'
[QC Description]
In the case of the following code the compiler creates bad assembly
code. Different varables get the same memory addres.
The code:
class Base
{
public:
int Fa;
int Fb;
};
class TTest : private Base
{
public:
TTest() {
Fa=0;
Fb=5;
if (Fa == Fb) ShowMessage("Error");
}
__property int a = { read = Fa};
virtual bool AnyFunction(){return true;}
};
CPU window:
TestMain.h.23: Fa=0;
00401D3B 8B4508 mov eax,[ebp+$08]
00401D3E 33D2 xor edx,edx
00401D40 895004 mov [eax+$04],edx
TestMain.h.24: Fb=5;
00401D43 8B4D08 mov ecx,[ebp+$08]
00401D46 C7410405000000 mov [ecx+$04],$00000005
Note that the problem only occurs if there is a virtual function and a
propery in the TTest class. C++ Builder 5 works fine.
QC Entry 90513
QC #:
Date Reported:
Area:
95526
6/23/2011
Compiler\C++
Description:
Steps:
[QC Short Description]
conditional operator ?: corrupts input variable
std::wstring s1 = L"Hello world"; std::wstring s2 = (true) ? s1 :
std::wstring(); // BUG?!: s1 cleared std::wstring s3 = s1; // s3 still
empty Thanks to Eike Petersen for providing simplified code.
[QC Description]
Conditional operator in XE corrupts input variables.
std::wstring str2 = condition ? str1 : std::wstring(L"cou cou");
if condition is true, str1 will be assigned to str2, then str1 will become
empty.
QC Entry 95526
QC #:
Date Reported:
Area:
88686
10/5/2010
Compiler\C++
Description:
Steps:
[QC Short Description]
[ILINK32 Error] Fatal: The symbol @%Foo$i%@$barow$xqv has
zero size, or excessive offset in module 'S:\..\FILE1.OBJ'
Exp: compile and link without errors Act: [ILINK32 Error] Fatal: The
symbol @%Foo$i%@$barow$xqv has zero size, or excessive offset
in module 'S:\..\FILE1.OBJ' Quote from Bruneau: It's definitely a bug
against whatever generated the .obj: the linker is simply reporting "Oh
no, you won't get me to fixup to this: something's wrong here!". Before
the linker added this check, it would proceed and then fail later,
causing some error that lead one to believe that the culprit was the
linker. So, I'm glad about this particular addition: during the beta cycle
it caught lots of bad .objs generated by DCC32 (specially for
generics); it seems that now it's catching bad .objs generated by
BCC32 for the new import/export logic we've put in XE.
[QC Description]
#include <vcl.h>
#pragma hdrstop
#include <tchar.h>
template <typename T>
class FooBar
{
public:
inline T* operator->() const
{
throw Exception("not supposed to see this!");
}
};
namespace foons
{
template <typename T>
class TBar;
template <typename T>
struct Bar
{
typedef FooBar<TBar<T> > Type;
typedef TBar<T> BaseType;
};
}
template <typename T>
class PACKAGE Foo
{
protected:
T* ptr;
public:
inline Foo() { }
public:
inline foons::Bar<T>::Type operator->() const;
};
template <typename T>
inline foons::Bar<T>::Type Foo<T>::operator->() const
{
throw Exception("what happened to me???");
}
namespace foons
{
template <typename T>
class TBar
{
public:
int __fastcall Foo() const
{
throw Exception("can't get here either");
}
};
}
#pragma argsused
int _tmain(int argc, _TCHAR* argv[])
{
Foo<int> foo;
foo->Foo();
return 0;
}
QC Entry 88686
QC #:
Date Reported:
Area:
89869
11/22/2010
Compiler\C++
Description:
Steps:
[QC Short Description]
destructor not called after exception
Compile with the following command line. bcc32 test.cpp run test.exe
exp: FooBar c'tor FooBar d'tor passed. act: FooBar c'tor failed.
[QC Description]
#include <iostream>
#include <tchar.h>
int foobar_count = 0;
class FooBar
{
public:
inline FooBar(const FooBar& obj) { foobar_count++; }
inline FooBar() { }
template <typename P> inline
FooBar(const P& obj)
{
foobar_count++;
std::cout<<"FooBar c'tor"<<std::endl;
}
inline ~FooBar()
{
std::cout<<"FooBar d'tor"<<std::endl;
foobar_count--;
}
inline operator bool() const
{
return false;
}
};
#pragma option push -xdstruct Base
{
inline Base()
{
}
inline ~Base()
{
}
};
template <typename T>
class Bar : public Base
{
public:
inline Bar() { }
};
template <typename T>
class Foo : public Bar<T>
{
public:
inline Foo() { }
};
#pragma option pop
#pragma argsused
int _tmain(int argc, _TCHAR* argv[])
{
try
{
Foo<void> foo;
if (FooBar f = foo) { } else
{
throw 1;
}
}
catch (...)
{
}
if (foobar_count)
{
std::cout<<"failed!!!!!"<<std::endl;
}
else
{
std::cout<<"passed."<<std::endl;
}
return 0;
}
QC Entry 89869
QC #:
Date Reported:
Area:
88001
9/12/2010
Compiler\C++
Description:
Steps:
[QC Short Description]
Compiler outputs warning 8122 indiscriminantly when all warning are
enabled
- Create a new Package or VCL Forms Application project - Edit
project options and enable all compiler warnings - Add the code from
the description - Compile exp: Successful compilation with no
warnings act: [BCC32 Warning] W8122 dllexport class member
'TNotMuch::Code' should be of exported type
[QC Description]
When all warnings are enabled the new "8122 Dllexport member
must be of exported type" warning is output for valid class
declarations. If only explicit warnings are enabled and "8122" is
checked on then the warning is not output.
Consider this code:
class PACKAGE TNotMuch
{
public:
String Code;
};
The compiler will output the following warning:
[BCC32 Warning] W8122 dllexport class member 'TNotMuch::Code'
should be of exported type
This happens for any class exported via the PACKAGE macro or
__declspec(dllexport). And, it only seems to happen for certain
property types. It errors for String, AnsiString, and WideString. I have
tried other types that do not generate the error such as int, double,
and TComponent*.
QC Entry 88001
QC #:
Date Reported:
Area:
88813
10/10/2010
Compiler\C++
Description:
Steps:
[QC Short Description]
Optimizer's BUG
bcc32 -O2 280786.cpp
280786.exe
[QC Description]
See Attachments.
exp:
no output (as without -O2)
Added by Sysop
<<<<<<<<<<
This issue is related to QC#85745(InternalTracking#277648).
The issue is not fixed yet in C++Builder XE.
>>>>>>>>>>
QC Entry 88813
act:
Compiler wrong!
QC #:
Date Reported:
Area:
89420
11/3/2010
Compiler\C++
Description:
Steps:
[QC Short Description]
bcc32 fails to compile code when "expand inline functions" is not
disabled
Compile the attached mainform.cpp file as per description.
[QC Description]
The attached cpp file (generated by cpp32) compiles fine with the
following command line:
bcc32.exe -c -w-par -vi- mainform.cpp
BUT fails with the following:
bcc32.exe -c -w-par mainform.cpp
with this error message:
Error E2027 mainform.cpp 850028: Must take address of a memory
location in function _fastcall CleanupUpdateProj(TfrmMain
*,Server,const
UnicodeString)
*** 1 errors in Compile ***
QC Entry 89420
QC #:
Date Reported:
Area:
76879
8/20/2009
Compiler\C++\Back End
Description:
Steps:
[QC Short Description]
BCC doesn't correctly emit the updated type info
- Download the attached sample project, compile it (bcc32 -WCV
qc76879.cpp) and run it. Expected output: // ----- Testing TObject...
[QC Description]
The type info structures in TypInfo.pas have been updated to support
the new RTTI features, primarily attributes. Look at the following diff
of TTypeData from Tiburon to Weaver:
// ----TTypeData = packed record
case TTypeKind of
...
tkClass: (
ClassType: TClass; // most data for instance types is in VMT offsets
ParentInfo: PPTypeInfo;
PropCount: SmallInt; // total properties inc. ancestors
UnitName: ShortStringBase;
- {PropData: TPropData});
+ {PropData: TPropData;
+ PropDataEx: TPropDataEx;
+ ClassAttrData: TAttrData;});
...
end;
// -----
PASS Testing TStringList... PASS Testing TComponent... PASS
Testing TInterfacedObject... PASS Testing TCppObject... PASS
Testing TCppStringList... PASS Testing TCppComponent... PASS
Testing TCppInterfacedObject... PASS // ----- Actual output (message
language may differ depending on locale and setup): // ----- Testing
TObject... PASS Testing TStringList... PASS Testing TComponent...
PASS Testing TInterfacedObject... PASS Testing TCppObject... FAIL
EAccessViolation: Zugriffsverletzung bei Adresse 0040166C in Modul
'qc.exe'. L esen von Adresse 0050AC36 Testing TCppStringList...
FAIL EAccessViolation: Zugriffsverletzung bei Adresse 0040166C in
Modul 'qc.exe'. L esen von Adresse 004FC5CF Testing
TCppComponent... FAIL EAccessViolation: Zugriffsverletzung bei
Adresse 0040166C in Modul 'qc.exe'. L esen von Adresse 004FB8AE
Testing TCppInterfacedObject... FAIL EAccessViolation:
Zugriffsverletzung bei Adresse 0040166C in Modul 'qc.exe'. L esen
von Adresse 004FB000 // -----
However, BCC doesn't emit the new type info fields, primarily the
PropDataEx and ClassAttrData fields. It is understandable that BCC
doesn't fully support the new RTTI features such as attributes right
now, but it should at least zero out the new fields - right now the type
info generated by BCC is simply wrong, and all code that tries to read
in all type info fields simply crashes.
To demonstrate the failure, I've attached a test case that simply reads
out and skips above fields. It works fine for DCC-built type info but, as
expected, it runs into AVs when consuming BCC-generated type info.
In addition, once QC's #76875 and #76877 are fixed, I think Rtti.pas
will form another good test case for this problem.
QC Entry 76879
QC #:
Date Reported:
Area:
91407
2/8/2011
Compiler\C++\Ba
ck End
Description:
Steps:
[QC Short Description]
Calling a virtual class method raises the AV
1. Compile and
run our sample. 2.
Click the "Button1"
button.
[QC Description]
Calling a virtual class method raises the AV.
Please review the attached sample. This sample contains a TTest object with a GetID2 virtual class method. Within the
Button.Onclick event, we call this method, and it raises the AV:
ShowMessage(IntToStr(test->GetID2()));
We believe that the AV should not occur, because in the "Class Methods" topic
(http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devwin32/classmethods_x
ml.html), it is stated that it is possible to use virtual class methods.
QC Entry 91407
QC #:
Date Reported:
Area:
83835
4/13/2010
Compiler\C++\Back End
Description:
Steps:
[QC Short Description]
Compiler doesn't initialize temporary records to 0
- Download the attachment, execute build.bat - Execute qc83835.exe
Expected output: Initial result value: 00000000 Initial result value:
00000000 Actual output: Initial result value: 00000000 Initial result
value: 00000001 Expected behavior: executes and terminates cleanly
Actual behavior: executes and terminates with an access violation
[QC Description]
Assuming you have a simple managed record, and a function which
returns an instance of it:
// ----type
TManagedRecord = record
ManagedField: String;
end;
function GetManagedRecord: TManagedRecord;
begin
Result.ManagedField := 'Foo';
end;
// ----When calling GetManagedRecord(), the caller passes a reference to
a temporary TManagedRecord which is being represented by 'Result'.
When calling from Delphi code, DCC will make the caller initialize this
temporary record to zero. IOW, upon entering GetManagedRecord(),
Result.ManagedField is always initialized to nil.
Unfortunately this isn't the case when calling the function from C++
code. C++ doesn't know an implicit 'Result' variable; the caller
expects the callee to initialize the temporary record if needed.
This basically means that you can't invoke Delphi-written functions
returning managed records from C++ code.
QC Entry 83835
QC #:
Date Reported:
Area:
62524
5/24/2008
Compiler\C++\Front End
Description:
Steps:
[QC Short Description]
Boost related Internal Compiler Error (conversion\lexical_cast_test)
bcc32 -c -P QC62524.i exp: completed compilation, possibly
with errors act: internal compiler error
[QC Description]
Compiling the enclosed preprocessed source results in the following error
message:
Fatal F1004 QC62524.i 55801: Internal compiler error at 0x46574d with base
0x400000 in function operator
lexical_stream_limited_src<char,lexical_streambuf_fake,
std::char_traits<char> >::<<(int)
Fatal F1004 QC62524.i 55801: Internal compiler error in function operator
lexical_stream_limited_src<char,lexical_streambuf_fake,std::char_traits<char>
>::<<(int)
QC Entry 62524
QC #:
Date Reported:
Area:
89640
11/13/2010
Compiler\C++\Front End
Description:
Steps:
[QC Short Description]
__delphirtti() sometimes causes an internal code generation error
Create a VCL application and add the following line somewhere:
TTypeInfo *a = __delphirtti(System::Pointer); When compiling you get
the following error: [BCC32 Fatal Error] Unit1.cpp(201): F1001
Internal code generator error
[QC Description]
When __delphirtti() is used with System::Pointer you get an internal
code generation error. It doesn't have to be System::Pointer. Several
other types causes the same error, e.g. System::Openstring or
System::PackageInfo.
QC Entry 89640
QC #:
Date Reported:
Area:
18831
3/11/1999
Compiler\C++\Front
End\Diagnostics
Description:
Steps:
This code gets warning W8061: Initialization is only partially
bracketed.
struct A
{
int a[10];
};
A a = {1, 2}; [QC Entry 18831]
bcc32 -c 46793.cpp
Result:
Warning W8061 46793.cpp 5: Initialization is only partially bracketed
QC #:
Date Reported:
Area:
18896
4/12/1999
Compiler\C++\Front
End\Diagnostics
Description:
Steps:
This code gets an internal compiler error:
struct A{ operator double(int); };
A::operator double(); [QC Entry 18896]
bcc32 -c 47774.cpp
//res:
Fatal F1004 47774.cpp 2: Internal compiler error at 0x469fd8 with
base 0x400000
QC #:
Date Reported:
Area:
8680
7/21/2004
Compiler\C++\Front End\Exception
Handling
Description:
Steps:
[QC Short Description]
Throwing an Exception can clear GetLastError()
TFileStream *Strm = NULL;
try
{
[QC Description]
Strm = new TFileStream("C:\\No Existant\\file.ext", fmOpenRead);
For example, when creating a TFileStream instance using a path that }
produces a Win32 API failure, which is reported by FileOpen() or
catch(const Exception &e)
FileCreate() returning -1, the GetLastError() function returns 0 when {
the exception is handled in the user's code.
DWORD dwError = GetLastError(); // <-- here
//...
Somewhere in the constructor of the Exception class, the error code }
is getting reset while the Message property is being formatted. The
error code needs to be preserved.
Expected:
QC Entry 8680
dwError to be 2 (ERROR_FILE_NOT_FOUND) or 3
(ERROR_PATH_NOT_FOUND)
Actual:
dwError is 0
NOTE: This error only occurs when linking with dynamic RTL +
Packages.
QC #:
Date Reported:
Area:
89260
10/26/2010
Compiler\C++\Front End\Exception
Handling
Description:
Steps:
[QC Short Description]
Use of boost::shared_ptr breaks exception unwinding in constructors
The attached project files demonstrate the problem. The main
function (test.cpp) is int _tmain(int argc, _TCHAR* argv[]) { try { X x;
x.f(); } catch (const std::exception& e) { std::cout << e.what() <<
[QC Description]
std::endl; } return 0; } The class X is defined in the header (x.h) as
boost::shared_ptr provides one useful way of hiding a class's
follows: class X { public: X(); ~X(); void f(); private: struct Impl;
implementation. The header file for the class can be something like
boost::shared_ptr<Impl> impl; }; The implementation is in x.cpp: struct
X::Impl { Impl(); ~Impl(); }; X::Impl::Impl() { std::cout << "X::Impl
#include <boost/shared_ptr.hpp>
ctor\n"; } X::Impl::~Impl() { std::cout << "X::Impl dtor\n"; } X::X() :
impl(new Impl()) { std::cout << "X ctor\n"; throw
class X {
std::runtime_error("could not construct X"); } X::~X() { std::cout << "X
public:
dtor\n"; } void X::f() { std::cout << "X::f\n"; throw
X();
std::runtime_error("problem in X::f"); } Building and running this
private:
program with C++Builder 2010 generates the (correct) output: >
struct Impl;
X::Impl ctor > X ctor > X::Impl dtor > could not construct X But with
boost::shared_ptr<Impl> impl;
C++Builder XE the output is: > X::Impl ctor > X ctor > Assertion failed:
};
varType->tpClass.tpcDtorAddr, file xx.cpp, line 3285 > Abnormal
program termination Some other points: 1. If all the code is placed in
By using boost::shared_ptr, the Impl structure does not need to be
a single file (e.g. test.cpp), the assertion disappears. (But, of course,
defined in the header file. However, in C++Builder XE, an exception
this is not very useful for hiding the implementation!) 2. If the
thrown in the constructor of X will result in an exception unwinding
exception is not thrown in the constructor, but in some other member
assertion, and program termination. This did not occur in C++ Builder function, there is no problem. This can be demonstrated by
2010.
commenting out the constructor exception throw in the example. 3.
QC Entry 89260
The same exception unwinding assertion is raised if the Impl class is
left totally undefined, and the X constructor is changed to X::X() {
std::cout << "X ctor\n"; throw std::runtime_error("could not construct
X"); } Once again, this causes no such problem in C++Builder 2010.
QC #:
Date Reported:
Area:
90038
11/30/2010
Compiler\C++\Front End\Exception
Handling
Description:
Steps:
[QC Short Description]
Cannot catch EOverflow exception
Create a new C++Builder VCL Forms Application - Place the
following code in TForm1::TForm1(): String str =
[QC Description]
Code that produced an EOverflow exception in C++ Builder 2010 and
2007 no longer produces any exception that can be caught. The
Messagebox displayed at the application catch is empty.
std::numeric_limits<double>::max(); Cds->CreateDataSet(); Cds>Open(); Cds->Append(); try { CdsFld->AsString = str; } catch
(Exception& E) { ShowMessage(E.Message); } Cds->Post(); Cds>Close(); - Build and run expect: messagebox with Floating Point
Overflow message actual: empty messagebox
This is similar to QC 88027 except that the messagebox display is
empty. The debugger shows an exception is caught at the
TApplication level, but the message is empty.
Added by Sysop
<<<<<<<<<<<
Please see comments of QC for more information.
>>>>>>>>>>>
QC Entry 90038
QC #:
Date Reported:
Area:
92701
3/30/2011
Compiler\C++\Front End\Exception
Handling
Description:
Steps:
[QC Short Description]
Stack unwinding results in a non-constructed base class's destructor
being called
1. Build the attached source file. 2. Run it with a nonexistent directory
as its command-line parameter. 3. Note that it throws a
boost::filesystem exception (as expected) then crashes with an
access violation while trying to unwind the stack from the
boost::filesystem exception. The debugger indicates that the
exception is within boost::filter_iterator's DosWildcardMatcher's
mRegex, even though boost::filter_iterator has not been constructed.
[QC Description]
An exception thrown by a parameter to a base class's constructor
may result in the base class's destructor being called, even though
the base class has not been constructed. This is a violation of the
C++ standard and can result in access violations and other bad
things.
Added by Sysop
<<<<
This issue still exists in C++Builder XE(w/ Update1).
>>>>
QC Entry 92701
QC #:
Date Reported:
Area:
18983
6/7/1999
Compiler\C++\Front End\Language
Description:
Steps:
Terniary operator returning an object does not complie corectly
unless extra parentheses are used. [QC Entry 18983]
bcc32 -c 61809.cpp
//res:
Error E2357 61809.cpp 11: Reference initialized with 'Foo', needs
lvalue of type 'Foo' in function main()
Error E2340 61809.cpp 11: Type mismatch in parameter 1 (wanted
'Foo', got 'const Foo &') in function main()
QC #:
Date Reported:
Area:
97624
8/14/2011
Compiler\C++\Front End\Language
Description:
Steps:
[QC Short Description]
E2015 Ambiguity between 'operator COARefTime::double()' and
'operator CRefTime::__int64() const' - DirectShow source code
generate ambiguity errors
create a project and copy the following code to compile. ----------[BCC32 Error] File12.cpp(49): E2015 Ambiguity between 'operator
COARefTime::double()' and 'operator CRefTime::__int64() const' Full
parser context File12.cpp(47): parsing: void get_Duration(double *) ---------- class CRefTime { public: inline CRefTime() { m_time = 0; };
operator LONGLONG() const { return m_time; }; protected:
LONGLONG m_time; }; class COARefTime : public CRefTime {
public: COARefTime() {}; operator double() { return double(m_time) /
10000000; }; }; void get_Duration(double * plength) { COARefTime
m_Duration; *plength = m_Duration; //E2015 Ambiguity here }
[QC Description]
I compile directshow source code and find a ambiguity error. The
code is simplied as following. There shouldn't be any ambiguity
errors.
----------[BCC32 Error] File12.cpp(49): E2015 Ambiguity between 'operator
COARefTime::double()' and 'operator CRefTime::__int64() const'
Full parser context
File12.cpp(47): parsing: void get_Duration(double *)
----------class CRefTime
{
public:
inline CRefTime()
{
m_time = 0;
};
operator LONGLONG() const
{
return m_time;
};
protected:
LONGLONG m_time;
};
class COARefTime : public CRefTime
{
public:
COARefTime() {};
operator double()
{
return double(m_time) / 10000000;
};
};
void get_Duration(double * plength)
{
COARefTime m_Duration;
*plength = m_Duration; //E2015 Ambiguity here
}
QC Entry 97624
QC #:
Date Reported:
Area:
4878
6/30/2003
Compiler\C++\Front
End\Namespaces
Description:
Steps:
[QC Short Description]
Failure to generate code for templates in parent namespace
1. Compile and run this code: #include <iostream> #pragma hdrstop
namespace A { template< class T > int answer( const T& ) { return 42;
} namespace B { struct Oracle { int tell() { return answer( *this ); } }; } }
[QC Description]
int main() { A::B::Oracle oracle; std::cout << oracle.tell() << std::endl; }
The code listed under Steps reveals a nasty compiler bug.
The output is 0 instead of the expected 42! Also according to the
missing "line has compiled code" icon on A::answer()'s lines, no code
Although a workaround exists, severity critical seems appropriate to
seems to be generated for answer() at all. 2. In the above code,
me since this can (and has for me) cause program malfunctions and replace return answer( *this ); with return answer( *this, 0, 1, 2, 3, 4,
crashes for no apparent reason, while there is absolutely no compiler 5, 6, 7, 8, 9 ); or anything similar and compile again: the code still
diagnostic.
compiles WITH NO ERROR
QC Entry 4878
Happens in BCB6
QC #:
Date Reported:
Area:
79973
12/2/2009
Compiler\C++\Front End\Pre-Compiled
Headers
Description:
Steps:
[QC Short Description]
PCH treats include names as if they were DOS names
bcc32 -c -H qc79973 Exp (this is result without the -H option): Error
E2209 qc79973.cpp 1: Unable to open include file
'iostream_is_what_i_want' Error E2209 qc79973.cpp 3: Unable to
open include file 'iostream_is_what_i_want' Error E2090 qc79973.cpp
7: Qualifier 'std' is not a class or namespace name in function main()
Error E2379 qc79973.cpp 7: Statement missing ; in function main()
*** 4 errors in Compile *** Act: Error E2209 qc79973.cpp 3: Unable to
open include file 'iostream_is_what_i_want' *** 1 errors in Compile ***
[Steps as originally filed. Sysop was unable to reproduce step 7 perhaps different after applying patch 4] 1) Add a new C++ unit to a
project 2) Replace the contents of unit.s cpp file with this lines
//#pragma hdrstop // line 1 #include <iostream_is_what_i_want> //
line 2 //#include <what_would_be_included> // line 3 int main(int,
char* argv) { std::ostream o; return 0; } 3) Check in Project Options
that precompiled headers are turned on 4) Compile unit's code 5) It
compiles with no error, thou the code includes module
[QC Description]
Long include file names are truncated to 8 characters and looked up
again if an exact match is not found when used in pre-compiled
headers. This does not happen after #pragma hdrstop or with
precompiled headers turned off.
Attached code:
#include <iostream_is_what_i_want> // line 1
#pragma hdrstop // line 2
#include <iostream_is_what_i_want> // line 3
int main()
{
std::ostream o;
return 0;
}
[Original description]
The following code compiles with no errors in both CB2010 and
CB2006 with precompiled headers turned on (note the name of the
included file on line 2).
<iostream_is_what_i_want> that does not exist. 6) Uncommenting
line 1 (#pragma hdrstop) will result in copiler error E2209 Unable to
open include file 'iostream_is_what_i_want' as one would expect. 7)
With line 1 commented out and line 3 uncommented you get the error
E2209 Unable to open include file 'what_wou.h' 8) With line 1
uncommented and line 3 uncommented you get here the error E2209
Unable to open include file 'what_would_be_included_here'
//#pragma hdrstop // line 1
#include <iostream_is_what_i_want> // line 2
//#include <what_would_be_included> // line 3
int main(int, char* argv)
{
std::ostream o;
return 0;
}
It looks like if the compiler cuts the include names to 8 chars and
adds .h automatically, if precompiled headers are turned on (line 1
then includes iostreams.h, which succeeds).
See Steps for more.
QC Entry 79973
QC #:
Date Reported:
Area:
61468
4/26/2008
Compiler\C++\Front
End\Preprocessor
Description:
Steps:
[QC Short Description]
Preprocessor creates file that will not compile
cpp32.exe -O2 qc61468.cpp
bcc32.exe -P -O2 qc61468.i
[QC Description]
The preprocessor file for the following code errs on compile with the O2 switch even though the original code compiles without error with
the same switch.
res:
Embarcadero C++ 6.30 for Win32 Copyright (c) 1993-2009
Embarcadero Technologies, Inc.
Preliminary version built Dec 7 2009 17:22:31
qc61468.i:
Error E2316 qc61468.i 8743: '__strcmp__' is not a member of 'std'
Error E2272 qc61468.i 8743: Identifier expected
Error E2316 qc61468.i 8744: '__strcpy__' is not a member of 'std'
Error E2272 qc61468.i 8744: Identifier expected
*** 4 errors in Compile ***
Attached code:
#include <windows.h>
int main()
{
return 0;
}
QC Entry 61468
QC #:
Date Reported:
Area:
33714
9/8/2006
Compiler\C++\Front
End\Preprocessor
Description:
Steps:
[QC Short Description]
#import fails
<sysop> download the attached file and compile it. I used
sysmon.ocx since I have Win2K and richtx32.ocx was not on my
system. Original steps follow: </sysop> Extract test program from
above description, place in file, adjusting control imported to be one
you have on your system, or adjusting path as necessary. Compile
with command shown in description.
[QC Description]
testprog.cpp containing:
//#import <c:\\windows\\system32\\richtx32.ocx>
//#import "c:\\windows\\system32\\richtx32.ocx"
#import "c:\windows\system32\richtx32.ocx"
int main(int argc, char *argv[])
{
return 0 ;
}
and compiling with
bcc32 -c testprog.cpp
Produces an error "Unable to open ' richtx32.tlh'", where there is
apparently an extraneous extra character in front of the file name.
(Note
that the file richtx32.tlh [with no leading extraneous character] has
been
produced in the directory after the compilation attempt.)
All 3 versions of the #import produce the same error - they were
various
attempts hunting for a possible workaround. (richtx32.ocx is not the
item I
wish to use - it just seems to be one present in an XP installation
QC Entry 33714
QC #:
Date Reported:
Area:
86264
7/14/2010
Compiler\C++\Front End\RTTI
Description:
Steps:
[QC Short Description]
C++ compiler doesn't generate correct RTTI for everything but plain
non-virtual member functions
- Download the attachment, run build.bat.
- Run the resulting executable (qc86264.exe).
Expected output:
[QC Description]
// ----When retrieving RTTI at runtime for C++ classes, the results are often procedure virtualMethod: expected & actual: dkVtable
slightly incorrect in non-trivial details. Look at this class:
procedure dynamicMethod: expected & actual: dkDynamic
procedure staticMethod(i: int; j: int): expected & actual:
// ----mkClassProcedure
class DECLSPEC_DRTTI TTestClass : public TObject
procedure staticMethod(i: int; j: int): expected & actual: static
{
procedure staticMethod(i: int; j: int): expected & actual: 2 arguments
public:
procedure classMethod(i: int; j: int): expected & actual:
virtual void virtualMethod (void) {}
mkClassProcedure
__declspec(dynamic) void dynamicMethod (void) {}
procedure classMethod(i: int; j: int): expected & actual: extended
static void staticMethod (int i, int j) {}
RTTI
__classmethod void classMethod (int i, int j) {}
procedure publishedMethod: expected & actual: mvPublished
TTestClass (int i) { }
<constructor>: constructor Create(i: int)
__fastcall ~TTestClass (void) {}
PASS
__published:
// ----void publishedMethod (void) {}
};
Actual output:
// ----// ----procedure virtualMethod: expected: dkVtable, actual: dkStatic
RTTI returns the following wrong values:
procedure dynamicMethod: expected: dkDynamic, actual: dkStatic
- TTestClass::virtualMethod() is TDispatchKind::dkStatic (should be
procedure staticMethod(j: int): expected: mkClassProcedure, actual:
dkVtable)
mkProcedure
- TTestClass::dynamicMethod() is TDispatchKind::dkStatic (should be procedure staticMethod(j: int): expected: static, actual: non-static
dkDynamic)
procedure staticMethod(j: int): expected: 2 arguments, actual: 1
- TTestClass::staticMethod() is TMethodKind::mkProcedure (should
argument
be mkClassProcedure)
(basic) procedure classMethod: expected: mkClassProcedure, actual:
- TRttiMethod::IsStatic returns false for TTestClass::staticMethod()
mkProcedure
- TTestClass::staticMethod() is reported to have only one argument
(basic) procedure classMethod: expected: extended RTTI, actual:
(should be 2)
basic RTTI
- TTestClass::classMethod() is TMethodKind::mkProcedure (should
procedure publishedMethod: expected: mvPublished, actual:
be mkClassProcedure)
mvPublic
- TRttiMethod::HasExtendedInfo returns false for
<constructor>: no RTTI available
TTestClass::classMethod() (which implies that no RTTI is available
FAIL
for arguments, return value, calling convention etc.)
// ----- TTestClass::publishedMethod() is TMemberVisibility::mvPublic
(should be mvPublished)
- no RTTI is generated for the TTestClass constructor
#########################
Complete test case attached.
QC Entry 86264
Make sure to compile with --xrtti
#########################
QC #:
Date Reported:
Area:
18732
6/21/1999
Compiler\C++\Front End\Templates
Description:
Steps:
The compiler does incorrect deduction of template arguments from a
function call re: ISO/IEC 14882:1998(E): 14.8.2.1 - 14.8.2.4
[ANSI]
bcc32 62493.cpp
//res: no diagnostic
int i;
int* pi;
volatile int vi;
volatile int* pvi;
template <class T> void f(T, T*);
template <class T> void g(T*, T);
//exp:
62493.cpp:12: no matching function for call to `f (volatile int &, volatile
int
*&)'
62493.cpp:13: no matching function for call to `g (volatile int *&,
volatile int &)'
int main()
{
f( i, pi);
f(vi, pvi);
g(pvi, vi);
}
[QC Entry 18732]
QC #:
Date Reported:
Area:
18647
12/15/1999
Compiler\C++\Front End\Templates
Description:
Steps:
Builder will not compile code that explicitly provides template
prameters to function templates that are members of a template
class. There is no problem if the class is not templatized.
bcc32 -c 76889.cpp
//res:
Error E2105 76889.cpp 17: 'template' qualifier must specify a member
template name in function main()
Error E2379 76889.cpp 17: Statement missing ; in function main()
template<class T>
class Foo
{
public:
template<class U>
void bar( void );
};
//exp: no diagnostics
template<class T> template<class U>
void Foo<T>::bar( void )
{
}
main()
{
Foo<int> foo;
foo.template bar<short>(); //Error
// 'template' qualifier must specify a member template name in
function main()
}
[QC Entry 18647]
QC #:
Date Reported:
Area:
19131
1/15/1999
Compiler\C++\Front End\Extensions
Description:
Steps:
Properties that return a struct by reference return 8 bytes instead of 4 bcc32 44657.cpp
bytes. [QC Entry 19131]
run 44657.exe
should print out 'passed'
gp faults right now.
QC #:
Date Reported:
Area:
19597
1/12/1998
Compiler\C++\Front End\Extensions
Description:
The following code generates an internal compiler error:
class foo {
static foo& getfoo();
__property foo nop = { read = getfoo};
};
Properties that require calls to static methods are not supported by
the compiler. However, the internal error should not occur. [QC Entry
19597]
Steps:
QC #:
Date Reported:
Area:
19527
10/27/1998
Compiler\C++\Front End\Extensions
Description:
Steps:
When an assignment to a VCL property is part of an equality
expression, the assignment doesn't get made. We don't support
calling a getter and setter on a property within the same expression.
[QC Entry 19527]
make -B USERDEFINES=SHOWBUG -f Project2.bpr
Project2.exe
Click button and notice text in edit doesn't change.
make -B -f Project2.bpr
Project2.exe
Click button and see correct behavior; edit text changes.
--- original text --make -B Given a form with a button and an edit on it, with the following
OnClick handler for the button:
{
String string1 = "-DbTest-";
(Edit1->Text = string1.SubString(2, 6)) == "";
}
The assignment does not get made (i.e., whatever was in the edit
before doesn't get changed to the new substring). The originator
claims that clicking repeatedly on the button (i.e., continuously
executing the handler) crashed his test program. Couldn't replicate
that behaviour. In addition, since the setter for TEdit doesn't return
anything, the second statement probably shouldn't compile anyway,
since the following won't:
void foo() {;}
...
(foo() == "")
There's a long discussion in the .vcl newsgroup entitled "BCB3's
satirical compiler bug", started by Pierre Moillen.
QC #:
Date Reported:
Area:
18832
3/12/1999
Compiler\C++\Front End\Extensions
Description:
Steps:
Source containing __declspec, when compiled with -A switch, gets an bcc32 -c 46813.cpp
internal compiler error. [QC Entry 18832]
Result:
Warning W8036 46813.cpp 1: Fatal F1004 46813.cpp 1: Internal
compiler error at 0x498408 with base 0x400000
QC #:
Date Reported:
Area:
18705
11/9/1993
Compiler\C++\Front
End\Initialization
Description:
Steps:
[ANSI]
Contrary to ANSI 8.4.3, paragraph 4, the compiler does not allow the
initialization of a const reference return type with a different type
object that can be converted to the return type (e.g. int -> const
unsigned & and int -> const int &). [QC Entry 18705]
bcc -c b4020160 --> Two invalid (one confusing) error messages.
Should see warnings regarding intialization of temps.
QC #:
Date Reported:
Area:
18838
3/12/1999
Compiler\C++\Front
End\Initialization
Description:
Steps:
Code gets error Expression expected.
According to the C++ standard, section 8.5, paragraph 1, the
following code is legal:
int a[1] = {}; [QC Entry 18838]
[ANSI]
bcc32 -c 46833.cpp
Result:
Error 46833.cpp 1: Expression expected
QC #:
Date Reported:
Area:
18766
7/8/1999
Compiler\C++\Front
End\Initialization
Description:
Steps:
Incorrect compiler error when initializing static variables with
constructor syntax.
struct Foo
{
static int x;
};
int Foo::x(1); [QC Entry 18766]
bcc32 -c 64370.cpp
//res:
Warning W8054 64370.cpp 6: Style of function definition is now
obsolete
Error E2293 64370.cpp 6: ) expected
QC #:
Date Reported:
Area:
18781
7/8/1999
Compiler\C++\Front
End\Overloading
//exp: no diagnostics
Description:
Steps:
The attached code doesn't compile. There is no ambiguity since no
conversion from Derived const * to Base * exists. It seems that the
compiler is ignoring the constness of the pointer type.
class Base {};
class Derived : public Base {};
bcc32 64407.cpp
//res:
Error E2015 64407.cpp 21: Ambiguity between
'Ptr<Derived>::operator Derived *() const' and
'C_Ptr<Derived>::operator const Derived *() const' in function main()
Error E2340 64407.cpp 21: Type mismatch in parameter 1 (wanted
'Ptr<Derived>', got 'Base *') in function main()
Error E2015 64407.cpp 22: Ambiguity between
'Ptr<Derived>::operator Derived *() const' and
'C_Ptr<Derived>::operator const Derived *() const' in function main()
template<class T>
class C_Ptr {
public:
operator T const *() const;
};
//exp: no errors
template<class T>
class Ptr : public C_Ptr<T> {
public:
operator T*() const;
};
void bar(Base *);
int main()
{
Ptr<Derived> x;
bar(x);
bar((Base *)x);
} [QC Entry 18781]
QC #:
Date Reported:
Area:
93439
4/28/2011
Compiler\Delphi
Description:
Steps:
[QC Short Description]
DCC32 throws exception, fails when building Delphi package to
output C++ headers
See comments. Simplified test case attached.
[QC Description]
Running RAD Studio XE with both Delphi & C++ personalities on
Win7/64-bit. Tried to build SMcomponents (scalabium.com) with
"Generate all C++ Builder files" enabled.
IDE reports failure in DCC.
1) Unzip SMcomponents attached to RAID
2) Open RAD studio with both personalities enabled
3) Open SMCmpntXE.dpk in the SOURCES directory for
SMcomponents
4) Modify the "BASE" build configuration's "Output-C/C++" config to
"Generate all C++Builder files"
5) Build SMCmpntXE.bpl
--> dcc error is thrown <--
Manual execution of the DCC32 command line results in the following The dcc GPF error only occurs if C++ headers are emitted.
error after several (apparently) successful compliations:
Another interesting item: Change back to generate DCUs only, and
SMBar.pas(1) Fatal: F2084 Internal Error: GPFC00000FD-00463350- the IDE compiler for error insite seems to be having problems with
0
SMBar.pas as well. Starting on line 110, most of the inherited
properties being declared in the published section have red squiggles
Modifying the C/C++ output to any option that DOES NOT create
and the Structure pane shows them as "Undefined property". A
header files results in success; any time header files are elected, the Syntax check fails, yet a full compile succeeds and produces a valid
error is thrown
BPL. This might have something to do with the C++ header
QC Entry 93439
generation failing.
QC #:
Date Reported:
Area:
2298
9/6/2002
Compiler\Delphi\Header Generation
Description:
Steps:
[QC Short Description]
TComponentList::TComponentList(bool) can't be found
1) Compile a project containing the following code: TComponentList*
foo = new TComponentList(true); 2) Observe error described.
[QC Description]
The documentation for TComponentList::TComponentList states that
a bool can be passed in the constructor for the value of OwnsObjects.
However, when a constructor with a bool is used, the following error
is received:
E2285 Could not find a match for
'TComponentList::TComponentList(bool)
I suppose this report could be classified as a documentation issue,
rather than a VCL issue, depending on your point of view. One or the
other had to be chosen, though.
<sysop>
The help for BDS doesn't have any documentation for the
constructor(s)
The following is the help from BCB6
Creates and initializes a TComponentList.
__fastcall TComponentList(void);
__fastcall TComponentList(bool AOwnsObjects);
Description
TComponentList creates a TComponentList instance. If no parameter
is specified, or if the constructor is called with the true parameter, the
new TComponentList is initialized with OwnsObjects set to true.
Do not call TComponentList directly. Instead, use the new keyword.
</sysop>
QC Entry 2298
QC #:
Date Reported:
Area:
92477
3/22/2011
Compiler\Delphi\Header
Generation
Description:
Steps:
[QC Short Description]
DCC doesn't emit underlying enum types
To bypass inclusion of Db.hpp on a header, try to use
namespace Db { // #include <DB.hpp> enum TLocateOption :
BYTE; } using Db::TLocateOption; it won't compile (type
mismatch?). There is no way on the C++ specs to forward
declare an enum it we do not specify it's underlying type.
[QC Description]
Forward declaration for enums generated by the delphi compiler is not
currently possible because it's underlying type is missing. This could have
been implemented since D2009, because of it's partial support for C++0x
(which brought that feature into the C++ realm).
Currently it's still not possible to forward declare some enums from the
VCL like TFieldType, TFieldKind, TLocateOption because auto generated
hpp's do not propagate their underlying type as in:
enum TFieldType : BYTE { ftUnknown, (...), ftSingle };
enum TFieldKind : BYTE { fkData, fkCalculated, fkLookup, fkInternalCalc,
fkAggregate };
enum TLocateOption : BYTE { loCaseInsensitive, loPartialKey };
This really would open the way to have extremely clean and lean headers
(and way faster compilations).
More information in
https://forums.embarcadero.com/thread.jspa?messageID=324731#324731
QC Entry 92477
QC #:
Date Reported:
Area:
84198
4/28/2010
Compiler\Delphi\Header Generation
Description:
Steps:
[QC Short Description]
bcc32 -tCV 276923.cpp
Improve support for Delphi records in C++
exp: clean compile/run
[QC Description]
- Delphi doesn't have the notion of a "default constructor"; for
records, the default is to initialize all managed fields to 0 (which
is done via RTTI). Unfortunately this means that the compiler won't
generate a default constructor for records in C++ header files, which
is problematic especially when the record defines constructors with
arguments. TValue takes it to the extreme: it only has a private
constructor. Right now there's no clean way to instantiate TValue in
C++ code.
Suggestion: Have DCC generate a public default constructor for
every
record. It's as simple as this:
// ----__fastcall [!RecordName] (void) {}
// -----
act:
Error E2093 276923.cpp 19: 'operator+' not implemented in type
'TTimeSpan' for a
rguments of the same type in function main()
Error E2093 276923.cpp 21: 'operator-' not implemented in type
'TTimeSpan' for a
rguments of the same type in function main()
Error E2015 276923.cpp 30: Ambiguity between '_fastcall operator
TDateTime::doub
le() const' and '_fastcall operator TDateTime::int() const' in function
main()
Error E2094 276923.cpp 32: 'operator+' not implemented in type
'TTimeSpan' for a
rguments of type 'TDateTime' in function main()
- Delphi supports operator overloads for records, but the aren't being Error E2015 276923.cpp 36: Ambiguity between '_fastcall operator
mapped to C++ operator overloads. For example, look at TTimeSpan TDateTime::doub
in
le() const' and '_fastcall operator TDateTime::int() const' in function
Timespan.hpp and TValue in Rtti.hpp:
main()
// ----Error E2093 276923.cpp 39: 'operator==' not implemented in type
struct TValue
'TTimeSpan' for
{
arguments of the same type in function main()
...
Error E2093 276923.cpp 42: 'operator!=' not implemented in type
static TValue __fastcall _op_Implicit(int Value);
'TTimeSpan' for
...
arguments of the same type in function main()
};
Error E2093 276923.cpp 45: 'operator>' not implemented in type
...
'TTimeSpan' for a
struct TTimeSpan
rguments of the same type in function main()
{
Error E2093 276923.cpp 48: 'operator>=' not implemented in type
...
'TTimeSpan' for
static TTimeSpan __fastcall _op_Addition(const TTimeSpan &Left,
arguments of the same type in function main()
const TTimeSpan &Right);
Error E2093 276923.cpp 49: 'operator>=' not implemented in type
...
'TTimeSpan' for
static bool __fastcall _op_Equality(const TTimeSpan &Left,
arguments of the same type in function main()
const TTimeSpan &Right);
Error E2093 276923.cpp 52: 'operator<' not implemented in type
...
'TTimeSpan' for a
static TTimeSpan __fastcall _op_UnaryNegation(
rguments of the same type in function main()
const TTimeSpan &Value);
Error E2093 276923.cpp 55: 'operator<=' not implemented in type
...
'TTimeSpan' for
};
arguments of the same type in function main()
Suggestion: if the definitions are public, emit the following
Error E2093 276923.cpp 56: 'operator<=' not implemented in type
additional definitions in the header:
'TTimeSpan' for
// ----arguments of the same type in function main()
struct TValue
Warning W8004 276923.cpp 58: 'prevDay' is assigned a value that is
{
never used in
...
function main()
TValue (int Value) { *this = _op_Implicit (Value); }
*** 13 errors in Compile ***
...
};
...
struct TTimeSpan
{
...
TTimeSpan operator - (const TTimeSpan& Value)
{ return _op_UnaryNegation (Value); }
};
TTimeSpan operator + (const TTimeSpan& Left, const TTimeSpan&
Right)
{ return TTimeSpan::_op_Addition (Left, Right); }
TTimeSpan operator == (const TTimeSpan& Left, const TTimeSpan&
Right)
{ return TTimeSpan::_op_Equality (Left, Right); }
// ----QC Entry 84198
QC #:
Date Reported:
Area:
92191
3/10/2011
RTL
Description:
Steps:
[QC Short Description]
C++Builder XE - types.hpp file issues
Looks like a copy and paste type error. In both functions the right
value should be modified by DX instead of DY.
[QC Description]
Below is the part of the types.hpp file. Both functions have problems.
void Offset(int DX, int DY)
{
left += DX;
right += DY;
top += DY;
bottom += DY;
}
void Inflate(int DX, int DY)
{
left -= DX;
right += DY;
top -= DY;
bottom += DY;
}
QC Entry 92191
QC #:
Date Reported:
Area:
89676
11/15/2010
RTL\C++
Description:
Steps:
[QC Short Description]
after install of boost update, compiles fail
1. Install update.
2. create a VCL forms application
3. #include <boost/algorithm/string.hpp> to the cpp file
4. compile...errors will be created
[QC Description]
the following errors occur in tuple.h
[BCC32 Error] tuple.hpp(58): E2209 Unable to open include file
'boost/fusion/include/tuple.hpp'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
[BCC32 Error] tuple.hpp(59): E2209 Unable to open include file
'boost/fusion/include/std_pair.hpp'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
[BCC32 Error] tuple.hpp(63): E2316 'fusion' is not a member of 'boost'
Added by Sysop
<<<<<<<<<<<
Please modify '..\include\boost_1_39\boost\tr1\detail\config.hpp'
from
#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x630)) ...
to
#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x631)) ...
>>>>>>>>>>>
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(63): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(66): E2316 'fusion' is not a member of 'boost'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(66): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(67): E2316 'fusion' is not a member of 'boost'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(67): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(68): E2316 'fusion' is not a member of 'boost'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(68): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(69): E2316 'fusion' is not a member of 'boost'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(69): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(72): E2316 'fusion' is not a member of 'boost'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(72): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(73): E2316 'fusion' is not a member of 'boost'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] tuple.hpp(73): E2272 Identifier expected
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/mutable_iterator.hpp
mutable_iterator.hpp(26): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost\tr1\tr1\utility
utility(38): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/utility.hpp
utility.hpp(117): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/tr1/tuple.hpp
tuple.hpp(61): namespace std
tuple.hpp(61): namespace tr1
[BCC32 Error] integral_constant.hpp(34): E2238 Multiple declaration for
'integral_constant<bool,1>::type'
Full parser context
SQLServer.cpp(31): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string.hpp
string.hpp(19): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/algorithm/string/trim.hpp
trim.hpp(16): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/begin.hpp
begin.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/iterator.hpp
iterator.hpp(20): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/range/const_iterator.hpp
const_iterator.hpp(24): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/type_traits/remove_const.hpp
remove_const.hpp(14): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/type_traits/is_volatile.hpp
is_volatile.hpp(40): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/type_traits/detail/bool_trait_def.hpp
bool_trait_def.hpp(15): #include C:\Program Files\Embarcadero\RAD
Studio\8.0\include\boost_1_39\boost/type_traits/integral_constant.hpp
integral_constant.hpp(13): namespace boost
integral_constant.hpp(25): class integral_constant<bool,1>
QC Entry 89676
QC #:
Date Reported:
Area:
76880
8/20/2009
RTL\C++\Exception Handling
Description:
Steps:
[QC Short Description]
type_info_hash doesn't free names and thereby causes memory
leaks
The description should cover it sufficiently.
[QC Description]
In xxtype.cpp, all type_info_hash functions are registered in a global
hash table which is freed by FreeHashTab() to prevent CodeGuard
from reporting memory leaks. However, type_info_hash doesn't free
its member "name", which can be set by type_info::name().
Fix:
// ----...
// This is the new version that allocates type_info structures on the
heap
// and deals with delphi classes as well
class type_info_hash : public type_info
{
public:
void *vmt;
type_info_hash *next;
mutable char *name;
type_info_hash(void *_tpp, void *_vmt, type_info_hash *_next) :
type_info((tpid *)_tpp)
{
vmt = _vmt;
next = _next;
name = 0;
}
+
+ ~type_info_hash (void)
+{
+ delete [] name;
+}
};
...
// ----QC Entry 76880
QC #:
Date Reported:
Area:
90940
1/18/2011
RTL\C++\Header Files
Description:
Steps:
[QC Short Description]
boost auto_link.hpp with debug
create a cpp-file with #include "boost/cregex.hpp" #include
"boost/regex.hpp" compile with debug option
[QC Description]
In boost header auto_link.hpp lines 261-263 read:
#if __BORLANDC__ > 0x561
#pragma defineonoption BOOST_BORLAND_DEBUG -v
#endif
After every update I have to (re)patch the debug option to -y because
-v is an unrecognized switch.
Shouldn't this by now be known to the publishers of this header. I'm
patching this for about 5 years and had been living in expectation the
developers of boost had been able to fix it, but ...
QC Entry 90940
QC #:
Date Reported:
Area:
53592
10/17/2007
RTL\C++\I/O Streams
Description:
Steps:
[QC Short Description]
Access violation when using streams in Form destructor
This issue has been discussed and confirmed at newsgoup
borland.public.cppbuilder.language.cpp (post 51781 and followups)
QC Entry 53592
1) Start BCB2006 2) Create a VCL Forms Application. 3) Leave the
form 4) Make sure that the main form Form1 is autocreated 5) Paste
the following code over the main form's cpp code (Unit1.cpp):
#include <vcl.h> #pragma hdrstop #include <string> #include
<fstream> #include <io.h> #include <locale> #include "Unit1.h"
#pragma package(smart_init) #pragma resource "*.dfm" TForm1
*Form1; using namespace std; __fastcall
TForm1::TForm1(TComponent* Owner) : TForm(Owner) { // use
implementation defined locale setlocale( LC_ALL, "" ); // C functions
locale::global(locale("")); // C++ STL } __fastcall TForm1::~TForm1() {
std::ofstream ofs("temp.txt"); std::string s("tempstring"); ofs << s; }
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction
&Action) { // } 6) Go to the project options and set: Linker/Linking/Use
dynamic RTL Off Linker/Linking/Full debug info [-v] On 7) Build the
application and run it. 8) Close the form (Windows standard button or
Alt+F4) - ends up with 'access violation .... write of address....' Or use
the attached BCB2006 project to reproduce the error.
QC #:
Date Reported:
Area:
90396
12/19/2010
RTL\C++\Miscellaneous
[QC Description]
Using STL output streams in main Forms destructor causes "Access
violation error".
When CodeGuard is turned on it detects an error:
Method called on freed object in ...\include\dinkumware\xlocale line
104:
|}
|
|> void _Incref()
| { // safely increment the reference count
Description:
Steps:
[QC Short Description]
wmemset function Illegal floating point op
Run the following program to reproduce: #pragma hdrstop #include
<wchar.h> #pragma argsused int wmain(int argc, wchar_t* argv[]) {
wchar_t data[1024] ; wmemset(data, 0xfff5, 556) ; return 0; }
[QC Description]
Calling wmemset function in CC32110MT.dll with some arguments
gives illegal floating point operation exception. This happens under
both Windows XP and Windows 7 and on different systems, so I
conclude it is a bug in the RTL.
[the same program ran under Visual C++ 2008 without problem]
QC Entry 90396
QC #:
Date Reported:
Area:
1403
12/26/1999
RTL\C++\Threads
Description:
Steps:
Memory leak due to the different threading models used in the VCL
and the RTL.
bcc32 -tCV -tM 77393.cpp
77393.exe
This can cause *massive* leakage if a C RTL function is called that
caches thread-specific data.
bcc32 -tCV -tM -DBUG 77393.cpp
77393.exe
Example:
use task manager to view memory usage (You should see memory
increasing while running until the process ends).
strtok (_tcstok) in STRTOK.C
has the line
#ifdef _MT
save = (_TCHAR **)&_thread_data()->thread_token;
#else
This will allocate some "static" thread data via "_thread_data_new"
(see THRDDATA.C). The problem now is that as part of the VCL
threading code (TThread in Classes.pas and BeginThread,
EndThread in System.pas) there is no call to either of _endthread,
_endthreadex, or _unadopt_thread.
And that will cause leakage of sizeof(THREAD_DATA) bytes (see
_THREAD.H) each time a VCL thread calling in .Execute any C
function that uses this "static" thread data is created + destroyed,
because the "static" thread data allocated implicitly via the call to
_thread_data will never be freed.
This obviously is not limited to TThread, but also
System::BeginThread and System::EndThread.
Note increase in memory usage not observed when _beginthread is
used.
I suspect that the best fix is to provide a transition layer for
System::BeginThread and System::EndThread for C++ code that
unadopts the thread so that the "static" thread data managed by the C
RTL is freed.
QC: 1403
QC #:
Date Reported:
Area:
88561
10/1/2010
SOAP\Server Applications
Description:
Steps:
[QC Short Description]
Unresolved external error when building a WebServices project and
with the option to 'Build with runtime packages' turned off.
1. Create a new C++ SOAP server app 2. Build project //Result: No
errors 3. Project -> Options -> Packages. Turn off 'Build with runtime
packages'. 4. Build project //Result: [ILINK32 Error] Error: Unresolved
external 'CertOpenSystemStoreW' referenced from C:\PROGRAM
FILES\EMBARCADERO\RAD
STUDIO\8.0\LIB\WIN32\RELEASE\SOAPRTL.LIB|SOAPHTTPTrans
[ILINK32 Error] Error: Unresolved external
'CertEnumCertificatesInStore' referenced from C:\PROGRAM
FILES\EMBARCADERO\RAD
STUDIO\8.0\LIB\WIN32\RELEASE\SOAPRTL.LIB|CertHelper
[ILINK32 Error] Error: Unresolved external
'CertFreeCertificateContext' referenced from C:\PROGRAM
FILES\EMBARCADERO\RAD
STUDIO\8.0\LIB\WIN32\RELEASE\SOAPRTL.LIB|SOAPHTTPTrans
[ILINK32 Error] Error: Unresolved external 'CertCloseStore'
referenced from C:\PROGRAM FILES\EMBARCADERO\RAD
STUDIO\8.0\LIB\WIN32\RELEASE\SOAPRTL.LIB|SOAPHTTPTrans
[ILINK32 Error] Error: Unable to perform link
QC Entry 88561
QC #:
Date Reported:
Area:
46966
6/3/2007
Modeling
Description:
Steps:
Race condition when starting model support for a project. If you close 1. Create a new C++ VCL project
the project before together finsihed, you get the error: "La référence
2. Select Model view
d'objet n'est pas définie à une instance d'un objet."
3. Accept adding modelization, confirm file save
=> You see progress bar (untranslated)
QC Entry 46966
4. While progress bar is shown, quickly file -> Close all
=> You get the error
QC #:
Date Reported:
Area:
87621
8/29/2010
Modeling\IDE Integration
Description:
[QC Short Description]
Sequence Diagram Support should not be available
[QC Description]
The IDE provides support for sequence diagrams in the C++
personality. These items should not be available for selection.
Sequence diagrams can be added, and class functions can be added
to a new sequence diagram.
QC Entry 87621
Steps: