QC - Embarcadero Developer Network Home Page
Transcription
QC - Embarcadero Developer Network Home Page
QC #: Date Reported: Area: 584 4/9/2002 IDE\Structure Pane Description: Steps: [QC Short Description] Strcuture View (formerly Object TreeView) doesn't automatically scroll when in Drag&Drop 1. Create a new application 2. Drop quite a few buttons etc. on the form and a PageControl. 3. Open the Object TreeView (Alt+Shift+F11) 4. Resize the Object TreeView window so that not all nodes are visible and the scrollbars appear 5. Now try to drag one of the buttons TreeNodes to the edges of the TreeView exp: TreeView should automatically scroll act: Nothing [QC Description] When designing complex forms the content of Structure View doesn't fit on the screen. If you then try to move components in the Structure TreeView by Drag&Drop you can't drop it onto a TreeView node which is currently not visible because the TreeView doesn't scroll when you're pointing your mouse near the edges of the TreeView. That way Object TreeView loses it's most important feature (IMO) ! QC Entry 584 QC #: Date Reported: Area: 739 4/12/2002 IDE\Code Editor\Keymapping Description: Steps: [QC Short Description] Tab key should indent block [QC Description] The tab key should indent a block of text when it is highlighted. This is the behaviour of most other IDEs and makes more sense than the current key combination. Shift+tab should unindent a block of text when it is highlighted. This suggestion costs nothing to implement, has no negatives, makes life easier for people changing from VB, is intuitive for new users, and makes it easier for everyone who has ever had to indent text. There is no need to remove the current functionality of tab when no block is highlighted. And there is no need to remove the other keystrokes which indent blocks of text. QC Entry 739 QC #: Date Reported: Area: 1936 7/26/2002 IDE\Search\Find in Files Description: Steps: [QC Short Description] Allow "find in files" in properties on forms/datamodels/frames (DFMs) [QC Description] When finding in files only the source code is searched. There is no such function for searching in all forms / data models within a project / directory etc. Example: Your customer asks you to change all texts / labels / ... from Automobile to Vehicle. You know this word is present is source code, on many forms in captions, hints etc. Do a "Find in files" on Automobile with the (Associated files checkbox enabled or something like that). When you select the Automobiles found on DFMs it popups the form, selects the correct component/control, popups the Object Inspector and selects the correct property. QC Entry 1936 QC #: Date Reported: Area: 2248 9/2/2002 Documentation\Online Help\VCL Description: Steps: [QC Short Description] Delphi 7: No help for TXPManifest Put a TXPManifest on a form and press F1 while it is selected Fixed in Weaver, see [QC Description] There is not helptopic about TXPManifest, which makes is hard to understand in de Trial version. QC Entry 2248 ms-help://embarcadero.rs2010/vcl/XPMan.TXPManifest.html QC #: Date Reported: Area: 2267 2/15/2004 VCL\Additional Controls\TCheckListBox Description: Steps: (This report "migrated" from QC 2267 for D6) It would be really useful to have the following methods in TCheckListBox: CheckAll; -> set all items to Checked UncheckAll;-> set all items to Unchecked It might be nice to include a default (const bool=True) parameter to specify whether also the Grayed items should be influenced by these sweep-all methods. (PS why is there no QC "Area" for VCL TCheckListBox in D.NET?) QC Entry 2267 QC #: Date Reported: 3111 12/12/2002 Area: Database\TParams Description: Steps: [QC Short Description] ParseSQL alters function parameter by value Open the attachement and click the button on the mainform. It enters an event handler which will initialize some components reproduce the bug and show a workaround. [QC Description] TParams.ParseSql is declared as: with SqlClientDataSet1 do begin CommandText := 'select * from employee where emp_no=:emp_no'; Params.ParseSQL(CommandText, True); { <-- BUG ALTERS THE COMMANDTEXT VALUE } Params.ParamValues['emp_no'] := 100; Open; { <-- EXCEPTION APPEARS HERE } end; function ParseSQL(SQL: String; DoCreate: Boolean): String; But the implementation behaves like the SQL is passed as a parameter by reference. It used a PChar typecast on the SQL parameter and works on the characters inside this buffer. Therefor it behaves as a parameter by reference: ParseSql(var SQL: string; DoCreate: boolean); ParseSql's implementation should not affect the original SQL string parameter. QC Entry 3111 QC #: Date Reported: Area: 3156 12/18/2002 Debugger\Inspector Description: Steps: [QC Short Description] Create watch from Inspect window Note: initially, do this for top level items [QC Description] It'd be nice to be able to right click an item in the Inspect window and create a watch for it. QC Entry 3156 QC #: Date Reported: Area: 3445 1/29/2003 AddOn\Interbase components Description: Steps: [QC Short Description] TIBStringField a EmptyAsNull [QC Description] Since there is no way to tell if an blank DBEdit is to be stored as NULL or an Empty string an extra property to TIBStringField (EmptyAsNull) should be added so the developer can override the default behavior of storing NULL. The default should be true to keep the long standing behavior intact (this behavior matches most TDataset descendants). QC Entry 3445 QC #: Date Reported: Area: 4790 6/19/2003 Midas\TClientDataSet Description: Steps: Open the example project. First press the button 'Load From File', next press 'Filter Widestring' -> Exception Midas generates an exception when filtering on WideString fields using "like". Note from Tomohiro Takahashi <<<<<<< QC#10828 >>>>>>> QC #: Date Reported: Area: 5067 5/14/1998 ActiveX\Framework Description: Steps: Imported IE4 WebBrowser ActiveX Control does not size correctly when dropped on a D4 form. This is not the case for D3 or VB5 1- Import MS Internet Controls 2- Drop the WebBrowser on a D4 form 3- Notice that the Control does not respect the size on the form that it was dropped for. QC #: Date Reported: Area: 5836 9/4/2003 Database\TParams Description: Steps: [QC Short Description] ParseSQL incorrectly interprets quotes in literal strings With ParamCheck = TRUE, set SQL.Text on a query similar to the following (Oracle is the RDBMS in this example): SELECT SYSDATE FROM DUAL WHERE USER IN ( 'LPs are 12" in diameter', 'My TV is 16:9 ratio' ) The ParseSQL implementation incorrectly identifies a parameter with a name of "9". This could be particularly tricky to identify as a problem, considering that this, only slightly different, query works as expected: SELECT SYSDATE FROM DUAL WHERE USER IN ( 'LPs are 12" in diameter', 'CDs are 5" in diameter', 'My TV is 16:9 ratio' ) [QC Description] When parsing an SQL statement that contains strings literals, the ParseSQL implementation does not properly interpret quote characters embedded within those literals. A double-quote char (") encountered within a string literal (enclosed by a pair of ') is interpreted as the end of the string literal. In most cases this is a silent failure, but if you also have string literals in the SQL that contain colons, then under the right conditions that colon is treated as a parameter identifier and not part of a literal. We found this because we had a query that built a "WHERE COLUMN IN ( <string literal list>)", where the literals included some entries with length information (" denoting inches) and ratios (e.g, 1:500). NB - I have yet to check Delphi7 as I don't currently have access to my D7 installation, to see whether the implementation of ParseSQL has been altered to address this area. QC Entry 5836 QC #: Date Reported: Area: 6417 11/13/2003 ActiveX\Framework\DAX\Container Support (TOleControl) Description: Steps: I have created a simple ActiveX control which is a descendant of the TActiveXControl. (I picked TMemo for the VCL Class Name in the ActiveX Control wizard). procedure TActiveXControl.Initialize; begin inherited Initialize; FConnectionPoints := TConnectionPoints.Create(Self); FControlFactory := Factory as TActiveXControlFactory; if FControlFactory.EventTypeInfo <> nil then FConnectionPoints.CreateConnectionPoint(FControlFactory.EventIID, ckSingle, EventConnect); FPropertySinks := FConnectionPoints.CreateConnectionPoint(IPropertyNotifySink, ckMulti, nil); FControl := FControlFactory.WinControlClass.CreateParented(ParkingWindow); if csReflector in FControl.ControlStyle then FWinControl := TReflectorWindow.Create(ParkingWindow, FControl) else FWinControl := FControl; FControlWndProc := FControl.WindowProc; FControl.WindowProc := WndProc; InitializeControl; end; When I dynamically instantiate this control in a client program and Free it, it seems to have a memory leak. I have a client program which basically creates and frees the control in a loop and you can watch the memory leak. I have attached the ActiveX and the client program source code. An interesting point to note is that if I replace the Delphi 7 version of Axctrls.pas unit with the one in Delphi 6 version, the problem seems to go away! There are a few differences between these files… but perhaps the most significant is the code as noted below. destructor TActiveXControl.Destroy; begin if Assigned(FControlWndProc) then FControl.WindowProc := FControlWndProc; FControl.Free; if FWinControl <> FControl then FWinControl.Free; FConnectionPoints.Free; inherited Destroy; end; Delphi 7.x (Axctrls.pas) Noted: The addition of code that allocates an instance of the class ToleLinkStub and then manually adjusts the interface pointer reference count (why is this done?) procedure TActiveXControl.Initialize; begin inherited Initialize; FConnectionPoints := TConnectionPoints.Create(Self); FOleLinkStub := TOleLinkStub.Create(nil); FOleLinkStub._AddRef; FControlFactory := Factory as TActiveXControlFactory; if FControlFactory.EventTypeInfo <> nil then FConnectionPoints.CreateConnectionPoint(FControlFactory.EventIID, ckSingle, EventConnect); FPropertySinks := FConnectionPoints.CreateConnectionPoint(IPropertyNotifySink, ckMulti, nil); FControl := FControlFactory.WinControlClass.CreateParented(ParkingWindow); if csReflector in FControl.ControlStyle then FWinControl := TReflectorWindow.Create(ParkingWindow, FControl) else QC #: Date Reported: Area: 6725 12/29/2003 VCL\Printing Description: Steps: [QC Short Description] TPrinter fails in Service Applications on W2K Create new service application. Add Printers to the uses clause In the service attempt to read the value of Printer.PrinterIndex Watch the exception happen via debugger (or with a try/except block and a dialog message (requires the service be set to interact with the desktop)) Note: I had the service set to interact with the desktop, though it still happens when it is not set this way. I did not try running the service in a specific account, only the local system account. [QC Description] When a service application uses the local system account on Windows 2000 the procedure TPrinter.SetToDefaultPrinter fails to identify and set the default printer. The property Printers does contain the complete list of printers. Because the TPrinter object fails to properly set the default printer most calls end up with an exception, even attempting to set the default printer. In the SetToDefaultPrinter procedure the following block of code is executed and the value of Device is a single space. else begin GetProfileString('windows', 'device', '', DefaultPrinter, SizeOf(DefaultPrinter) - 1); Cur := DefaultPrinter; Device := FetchStr(Cur); {As a w2k service in local account Device is ' ' at this point} It should also be noted that this is not the method Microsoft recommends for finding the default printer, though I can't seem to find the link on MSDN where I was reading this. QC Entry 6725 QC #: Date Reported: Area: 7393 2/24/2004 VCL\Core VCL Classes\TApplication Description: Steps: [QC Short Description] App with no main form showing a form with hints freezes Create a second form in the project, set ShowHint to True, dump a couple controls down and give them hints. In the project file, change the mainline code to the following: begin Form2 := TForm2.Create(nil); if Form2.Showmodal = 1 then begin Application.Initialize; Application.CreateForm(TForm1, Form1); [QC Description] Application.Run; end; end. Run the project, have some other app running close by or overlapping so you can It is fairly common to do things like present a splash screen or login screen prior to creating the main form of an experiment with getting a hint to appear on the modal dialog and then switch quickly to the other window. The application. person reporting this apparently can reproduce this easily. (See thread starting with message ID <[email protected]> in borland.public.delphi.language.delphi.general). I had to make If such a form has hints enabled, it is possible to completely hang that app by hovering over a control to display a quite a number of tries to reproduce but was able to. I ran the test app outside of Delphi and on W2K, but do hint and then very quickly switching to another window on the desktop. not know if either of these matter. The code at fault appears to be in UnhookHintHooks: HintHook := 0; if HintThread <> 0 then begin SetEvent(HintDoneEvent); if GetCurrentThreadId <> HintThreadID then WaitForSingleObject(HintThread, INFINITE); CloseHandle(HintThread); WaitOnSingleObject never comes back for some reason. The problem is also present in Delphi 7 / 4.453. The following provides a stack trace of when the deadlock occurs. It was lifted from 7383... applications lock up. can happen at anytime during the execution of the program generally when it has called NtWaitForSingleObject from ntdll.dll. the following is some exception reporting i have when the application freezes. main thread ($1b4): 77f827e8 ntdll.dll NtWaitForSingleObject 77e86a13 kernel32.dll WaitForSingleObjectEx 77e86a38 kernel32.dll WaitForSingleObject 004c6414 prog.exe Forms UnhookHintHooks 004c885d prog.exe Forms TApplication.CancelHint 004c8330 prog.exe Forms TApplication.Idle 004c7a23 prog.exe Forms TApplication.HandleMessage 004c4771 prog.exe Forms TCustomForm.ShowModal 006c78d3 prog.exe frmLogin 266 TLogin.TestLogin 006d2d99 prog.exe prog 66 EntryPoint thread $4c4: 77e15d3b user32.dll ShowWindow 004c883c prog.exe Forms TApplication.HideHint 004c884f prog.exe Forms TApplication.CancelHint 004c62f8 prog.exe Forms HintMouseThread 004254d3 prog.exe madExcept 3942 ThreadExceptFrame >> created by main thread ($1b4) at: 004c63c3 prog.exe Forms HookHintHooks disassembling: 77f827dd public NtWaitForSingleObject: ; function entry point 77f827dd mov eax, $ea 77f827e2 lea edx, [esp+4] 77f827e6 int $2e 77f827e8 » ret $c QC Entry 7393 QC #: Date Reported: Area: 7472 3/1/2004 Compiler\Delphi\Language Description: Steps: [QC Short Description] Allow multiple properties to be default within a single class Allow the following syntax: type T1 = class private function GetA(Idx: Integer): string; function GetB(Idx: string): Integer; procedure SetA(Idx: Integer; const Value: string); procedure SetB(Idx: string; const Value: Integer); public property A[Idx: Integer]: string read GetA write SetA; default; property B[Idx: string]: Integer read GetB write SetB; default; end; [QC Description] Currently, only a single default property is allowed within a single class. This default property can also be considered an overloaded operator [] . Whenever the index datatypes differ, it can be allowed to add multiple default properties. Example: Consider a 'list' class where objects need to be accessed on index in the array and on some key (for example a string). You could use the following notation: for i := 0 to 9 do DoSomethingInteresting(List[i]); DoSomethingInteresting(List['John']); I think this would allow Delphi to extend its easy to readability of Delphi source code, it does not introduce ambiguity (just like overloaded methods) like default properties without indexers would. QC Entry 7472 QC #: Date Reported: Area: 7527 3/5/2004 Database\Data Aware Controls\TDBGrid Description: Steps: Update: DBGrid doesn't repaint itself correctly when scroll bars get are toggled from off, to on, to off. (This is really seen in master detail apps... when a master record has 0 detail and another master record has serveral detail records) 1. Compile and Run the attached test-case 2. Record 4 is active in the top grid; note that the bottom detail grid needs a scrollbar to show all records 3. In the top grid activate the record with 5 in the first field 4. Go back to the record 4 exp: Scrollbar in the bottom detail grid should be displayed as in step 2 act: Scollbar is hidden If you repeat steps 3 and 4, notice how the grid scrollbar appears and dissappears. You can just about make out the outline of the scrollbar on the right, including the thumb thingy shadow moving as you scroll! [QC Short Description] TDBGrid vertical scrollbar dissappears [QC Description] When you have a master/detail record, and the detail is shown using a TDBGrid, then the vertical scrollbar dissappear randomly, even if there are more records than will fit! You can see the right border outline of the scrollbar though, including the thumb thingy moving. It's as if the grid has resized slightly over the scrollbar. See attached test-case. QC Entry 7527 QC #: Date Reported: Area: 7767 3/29/2004 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Incorrect BackupSeek declaration // see windows.pas Is function BackupSeek(hFile: THandle; dwLowBytesToSeek, dwHighBytesToSeek: DWORD; var lpdwLowByteSeeked, lpdwHighByteSeeked: DWORD; lpContext: Pointer): BOOL; stdcall; but should be function BackupSeek(hFile: THandle; dwLowBytesToSeek, dwHighBytesToSeek: DWORD; var lpdwLowByteSeeked, lpdwHighByteSeeked: DWORD; var lpContext: Pointer): BOOL; stdcall; [QC Description] windows.pas declares the BackupSeek function as function BackupSeek(hFile: THandle; dwLowBytesToSeek, dwHighBytesToSeek: DWORD; var lpdwLowByteSeeked, lpdwHighByteSeeked: DWORD; lpContext: Pointer): BOOL; stdcall; This is wrong according to MSDN. The correct declaration is (var missing before lpContext) QC Entry 7767 QC #: Date Reported: Area: 7802 4/2/2004 Internet\XML Description: Steps: [QC Short Description] TXmlDocument.SaveToStream does not clear Modified Flag var XmlDoc : IXmlDocument; Node : IXmlNode; memStream : TMemoryStream; begin XmlDoc := NewXmlDocument; XmlDoc.Node.AddChild('Sub'); if XmlDoc.Modified then begin memStream := TMemoryStream.Create; XmlDoc.SaveToStream(memStream); FreeAndNil(MemStream); end; if XmlDoc.Modified then begin ShowMessage('Still Modified'); XmlDoc.SaveToFile('\\.\NUL'); end; if XmlDoc.Modified then begin ShowMessage('Still Modified'); // never reached end; end; [QC Description] Saving a XML Document to a Stream using SaveToFile clears the Modified Flag. Same procedure using SaveToStream does NOT clear the modified flag. QC Entry 7802 QC #: Date Reported: Area: 8365 6/7/2004 Midas\TClientDataSet Description: Steps: [QC Short Description] CloneCursor reset=true does not reset active ranges 1. Run attached application 2. click the button - note that it thinks it has a range applied at 0 3. turn the filter and range on (check boxes) 4. note the record count in the status bar 5. click the button again - note the range is still applied and it sees 10 records which means that the range is still applied, but the filter is not 6. remove the range and filter (check boxes) 7. click the button - it is now correct since there is no range applied to the cds being cloned [QC Description] When doing cds.cloneCursor(true) there all filters AND ranges on the cloned dataset should be cleared. This is not the case for Delphi 6.02, Delphi 7, and Delphi 7.1. The filter is correctly removed, but the range is never removed. QC Entry 8365 [Diamondback] QC #: Date Reported: 8433 6/16/2004 Area: Debugger Description: Steps: [QC Short Description] Declaring a method called DebugHook and then calling it causes "too many consecutive exceptions" 1. Unzip attached files 2. Compile and run [QC Description] As per the subject, declaring a method with parameters called DebugHook and then calling it causes a "too many consecutive exceptions" error. I relalise that this is an extreme corner case, and has an easy workaround, however I expect it's worth investigating as the underlying reasons may affect other areas. The problem was originally reported by Sterling Bates in the borland.public.delphi.language.delphi.win32 newsgroup. QC Entry 8433 QC #: Date Reported: Area: 8616 7/10/2004 IDE\Packages Description: Steps: [QC Short Description] Include an Uninstall/Remove context menu item in the project manager when a package is loaded. [QC Description] When a package project is open in the project manager. I would like an Uninstall context menu item, so that the package can be unloaded from the IDE easily. QC Entry 8616 QC #: Date Reported: Area: 9147 9/27/2004 VCL\Standard Controls\TListBox Description: Steps: [QC Short Description] TListbox doesn't color the whole background Start new Application with a TListBox and a TButton. Add at designtime some items to the Listbox. Add code at the OnClick of the Button. SOmething like ListBox1.Color := clGradientActiveCaption. Hit run and press the button. [QC Description] When setting the color of a listbox at designtime, only the background of the items is colored and not the rest of the background. QC Entry 9147 QC #: Date Reported: 9511 11/8/2004 Area: Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Charcter Array -> String conversion problem Compile and run the attached application below. See the following output at run-time indicating failure. [QC Description] procedure TForm1.Button1Click(Sender: TObject); var Buf: array[0..300] of Char; p: PChar; a: string; i: Integer; begin for i := 0 to 280 do Buf[i] := 'a'; Buf[280] := #0; p := Buf; a := 'M' + p; ShowMessage(IntToStr(Length(a))); end; This code reports 256! QC Entry 9511 FAIL L=256 This result indicates that the target string received only 256 of the 281 expected characters. program BTS257545; {$APPTYPE CONSOLE} var Buf: array[0..300] of Char; p: PChar; a: string; i: Integer; L: INteger; begin for i := 0 to 280 do Buf[i] := 'a'; Buf[280] := #0; p := Buf; a := 'M' + p; L := Length(A); if L = 281 then writeLn('PASS') else WriteLn('FAIL L=', L); end. QC #: Date Reported: Area: 9757 12/5/2004 Documentation\Online Help\VCL Description: Steps: [QC Short Description] Help hypertext links were not converted from delphi 7 to 2005 Compare delphi 7 online help and delphi 2005 online help for the same entries. [QC Description] Hypertext links in parameterlists or description text were not converted to 2005. Examples: sysutils.FindFirst, sysutils.StrToDateTime, sysutils.FormatDatetime and so on. As I see, the conversion was done automatically but failed in this respect. This is particulary annoying, when parameters are of complex (non simple) type. QC Entry 9757 QC #: Date Reported: Area: 10015 12/25/2004 Compiler\Delphi\Linker Description: Steps: [QC Short Description] trial version doesn't accept 3rd party precompiled DCUs (1) Install the D7 trial version. (2) Install any 3rd party components which don't ship with sources, but with precompiled DCUs only. E.g. http://madshi.net/madCollection.exe (3) Try to use those 3rd party components. The IDE experts will work, but the project will not be successfully compiled. Instead you'll get a message like "something.pas" not found. [QC Description] The D7 trial version doesn't accept any precompiled 3rd party DCUs. This is not really a problem in itself. But the trial version doesn't say "I don't accept these DCUs because I'm a trial version". Instead it sais "file xxx.pas" not found. As a result I'm regularly getting support requests, because people think my component collection is at fault. It would be nice, if the trial version could complain with a better warning, so that we component developers don't get those support requests all the time. QC Entry 10015 QC #: Date Reported: Area: 10309 1/12/2005 IDE\Toolbars Description: Steps: [QC Short Description] Placing URL Text Box command on the toolbar displays junk in the edit part of the combo 1. Right click on the toolbar area and select customize 2. Select the Browse category 3. Drag and drop the "URL Text Box" command onto the toolbar //exp: URL text box shows up empty //act: URL shows Japanese text in the box. [QC Description] If you drag the URL Text Box command onto a toolbar, the combobox text part gets junk text in it. When you select an item from the combo, the junk text disappears. --------------- ORIGINAL --------------------------Check out the text. I get 6 boxes in my edit portion and the default welcome page is currently being displayed. QC Entry 10309 QC #: Date Reported: Area: 10392 1/14/2005 IDE Description: [QC Short Description] Open Project menu item doesn't use the correct filter [QC Description] When you select Open Project from either the menu item or the toolbar, the filter used is wrong. By default the filter used is the "Borland Developer Studio File" which incase you don't know, includes just about every file you could ever hope to use in the IDE. This is wrong. The reason I have done "Open Project" is so that I can open a PROJECT file. A PROJECT file for Delphi 2005 and it should be either a bdsproj or bdsgroup (I like to live in the NOW not the past). Not all of the legacy project file types. Once I've updated my project to Delphi 2005, I should not have to continually see these files in a default filter. For one thing it's off putting seeing twice as many files lists as I expected. Perhaps there needs to be a "Delphi 2005 Project File" filter that includes bdsproj and bdsgroup ONLY and it's the default filter for the Open Project action. If people want to upgrade a project to D2005, then let them select the Delphi Project or Delphi Package filters (which should be combined into a Delphi Legacy Filter IMHO). After all - they are only ever going to do it once. QC Entry 10392 Steps: QC #: Date Reported: Area: 10395 1/14/2005 IDE\Project Management Description: Steps: [QC Short Description] Add a listbox for runtime package list 1. Create a new project, or open an existing one. 2. Go to Project > Options. 3. In the treeview, select the "Packages" page. 4. If the "Build with runtime packages" checkbox isn't checked, check it. 5. Look at the text box just under the checkbox. This is a single-line text box containing a semicolon-delimited list (typically a very long list) of package names. 6. Try to remove an item from this list. Note that the only way to do so is clicking and typing, typically with a lot of scrolling left and right (because the list is usually wider than the text box). 7. In the treeview, select the "Directories/Conditionals" page. 8. Note the similarity: this page has a large number of combo boxes, most of which contain a (sometimes long) semicolon-delimited list. Also note the "..." buttons. 9. Click the "..." button next to one of the combo boxes. A "Directories" dialog box appears, with the semicolondelimited list split out into multiple lines in a list box. Note the buttons for adding new items to the list, removing items from the list, and replacing items. If the list of runtime packages had a "..." button, and that button brought up a dialog similar to this "Directories" dialog, runtime packages would be a great deal easier to work with. [QC Description] In Project Options, the list of runtime packages is jammed into a single edit box. Please add a way to make this list more easily editable. Something similar to the "..." buttons from Directories/Conditionals (and the list-edit dialogs they bring up) would be an excellent way to accomplish this. See Steps. QC Entry 10395 QC #: Date Reported: Area: 10481 1/19/2005 Debugger\Watches Description: Steps: [QC Short Description] You can't delete multiple selected watches. Open any project Add a few watches Select more than one watch in the watch view Press the <Delete> key Only a single watch is deleted [QC Description] In the watches window you can multi select the watches. However if you then press the DEL key or the Ctrl+D shortcut, only one watch (amongst the selected group) is deleted. QC Entry 10481 QC #: Date Reported: Area: 10931 2/15/2005 Documentation Description: Steps: [QC Short Description] TChart Help If you press F1 (over TChart comp.), Help appears 'No topic found' [QC Description] The TChart Help is not available. QC Entry 10931 TChart help is in Tiburon: ms-help://embarcadero.rs2009/TeeChart8Standard/html/TChart.html QC #: Date Reported: Area: 12768 5/12/2005 Debugger\CPU Description: Steps: [QC Short Description] New register pane context menu items N/A [QC Description] It would be useful if the context menu for registers in the register pane contained items to: 1) Display memory starting at the register address. 2) Start a disassembly starting at the register address. The register address should be used directly or optionally dereferenced. QC Entry 12768 QC #: Date Reported: Area: 12993 5/21/2005 MTS\Wizards Description: Steps: [QC Short Description] There are no MTS Wizards Try File, new, other and nothing is found. Also after first making an ActiveX Library. [QC Description] I can not find these wizards anywhere. The help says To bring up the Transactional Object wizard Choose FileNewOther. Select the folder labeled ActiveX under Delphi Projects. Double-click the Transactional Object icon in the right pane. This is not possible. QC Entry 12993 QC #: Date Reported: Area: 13104 5/25/2005 IDE\Menus Description: Steps: [QC Short Description] Too few projects on File/Reopen N/A [QC Description] IMO, there are too few projects and too many individual files listed on the File/Reopen menu. Please increase the number of projects and decrease the number of individual files. It would be nice if there were an option to set the number of each - a registry entry would suffice as far as I'm concerned. QC Entry 13104 QC #: Date Reported: Area: 13670 6/14/2005 Debugger\Watches Description: Steps: [QC Short Description] ability to right click on an expanded sub property in watch window and select Add as watch [QC Description] With the addition of expanding watches the following additional feature request is made: Ability to right click on an expanded sub property in watch window and select Add as watch Specifically if I drill down multiiple levels, it might be easier to maintain a watch at that level, instead of seeing all of the expanded properties. QC Entry 13670 QC #: Date Reported: Area: 13816 6/20/2005 IDE\Project Management\Project Manager Description: [QC Short Description] Make path reconstruction in ProjectManager optional Steps: [QC Description] Currently, path in PM is represented as folder with subfolders... when project structure is complex enough, then to get to the file will require some number of clicks... Now, yes, it is good in many cases, but not very good fit for others... Is it possible to make this "reconstruction" optional - have ability for "Delphi 7" style - yes, we lost file location column, but I would live with just Hint for file location... QC Entry 13816 QC #: Date Reported: Area: 14024 6/29/2005 Internet\XML\Data Binding Description: Steps: [QC Short Description] Decimal type, duplicate names 2 errors Generate a binding for the attached file and try to compile it. [QC Description] The data binding wizard dosn't recognises the decimal type, it's imported with the default type 'widestring' in my case. If duplicate names are present in the .xsd file the wizard will create duplicate interface and objects and the compiler will report error. If the interface name is redefined in the wizard dialog the interface definitions will be ok, but the object definitions will be still duplicate. QC Entry 14024 QC #: Date Reported: Area: 14232 7/9/2005 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TFileStream.Create lists fmShareXxxx constants twice SYSOP: The page for this help topic is. mshelp://borland.bds3/bds3win32api_win32/html/ClassesTFileStreamCreateMethod.htm [QC Description] The online help for TFileStream.Create has two tables of constants to be passed to the Mode parameter. The sentence before the first table suggest that this table contains only the "open mode" constants while the second table contains the "share mode" constants. Actually the first table contains both, the "open mode" and the "share mode" constants. QC Entry 14232 10/26/05 - The topic still exists as specified in this bug. We will have to defer it until Highlander, since the DeXter doc is locked. -- Janet QC #: Date Reported: Area: 14558 7/21/2005 VCL\Win 32 Controls\TListView Description: Steps: [QC Short Description] Basic bug in clear leads to huge execution time 1. Create empty VCL application. 2. Paste this procedure TForm1.FormCreate(Sender: TObject); var I : integer; begin FListView := TListView.Create(Self); with FListView do begin Parent := self; Align := alLeft; ViewStyle := vsReport; Columns.Add.Width := 200; SortType := stNone; Items.BeginUpdate; for I := 1 to 10000 do AddItem (IntToStr(I), nil); Items.EndUpdate; end; end; 3. Run 4. Close (while looking at the task manager CPU). Then you can try the same using the attached comctrls unit (be sure to build with it). [QC Description] First the behavior: if you have a simple list with 10000 items, clearing takes a lot of time (populating takes also time, but that's something else). Clear is sending LVM_DELETEALLITEMS message, which triggers LVN_DELETEALLITEMS notification. There are several basic problems with notifications: - Item.Destroy sends LVM_DELETEITEM message even if it's coming from a notification. This means that LVN_DELETEALLITEMS triggers one LVN_DELETEITEM also, which is totally unnecessary (there is some logic to avoid double free) IF LVN_DELETEALLITEMS returns 1. - LVN_DELETEALLITEMS does NOT set the return value to 1 (same in LVN_DELETEITEM)! Because of this each list item must be deleted (in destroy) sending an explicit call. Correcting these problems leads to an instant response for the clear call. QC Entry 14558 QC #: Date Reported: 19881 10/7/2005 Area: Debugger\Call Stack Description: Steps: [QC Short Description] Allow for the contents of the Call Stack Window to be copied/exported Similar to other windows in the IDE that have multiple lines (like Message View), I'd like to have the ability to copy all of the lines and/or export the contents of the window to a text file. To make this 100% obvious, please add menu items to the context menu for this window. [QC Description] Allow for the contents of the Call Stack Window to be copied/exported QC Entry 19881 QC #: Date Reported: Area: 19963 10/10/2005 IDE\Code Editor\Sync Edit Description: Steps: [QC Short Description] Scrolling in sync edit mode sometimes cancels the sync New->Delphi Projects->VCL Forms Application Click on the Code tab CTRL-A to select all CTRL-SHIFT-J to activate sync edit mode Scroll the editor window down by clicking the vertical scroll bar Result; Sync edit is cancelled Now; CTRL-A to select all CTRL-SHIFT-J to activate sync edit mode Scroll the editor window down by rolling the mouse wheel Result; Sync edit is NOT cancelled [QC Description] Whan a block of code highlighted, and sync edit is activated scrolling the code editor using the scroll bars (horizontal or vertical) sync edit is cancelled. But, scrolling using the mouse wheel doesn't cancel sync edit mode. This is true for C++, and C# projects. QC Entry 19963 QC #: Date Reported: Area: 20027 10/11/2005 Documentation\Online Help Description: Steps: [QC Short Description] Help system uses black text on default background 1. Start Internet Explorer 2. Select Tools|Options 3. Click the Colors button in the lower left corner on the General tab 4. Turn off "use Windows colors", and set the text to white, and background to black. 5. Start Delphi 2006. 6. Click the Help button. Help file's welcome page is readable with black text on a white [QC Description] background. 7. Look up TControl (Delphi for Win32) in the index TControl's help is displayed with black text on The body text of many (but not all) topics in the Delphi 2006 help system seems to be hard-coded as black, while a black background. the background color is the default background color specified in Internet Explorer. If Internet Explorer is configured to show white text on a black background, the Delphi 2006 help system will show black text on a black background. QC Entry 20027 QC #: Date Reported: Area: 20051 10/12/2005 IDE\Search Description: [QC Short Description] Steps: Remove modal search dialog and add a "Firefox Search Bar" [QC Description] Currently, the current file search feature of the IDE pops up a modal dialog box, which the user fills out, and which then requires a click. Since modal dialogs are rapidly going out of style, please institute a search functionality similar to that found in the Firefox web browser. Rather than pop up a modal dialog, the IDE should display at the bottom of the editor a small tool bar that allows the user to type the search phrase into an edit box. Incremental search is done as the user types. If the user types something that is not found in the file, then a small "not found" sound is played. The tool bar can have common search choices such as "Match Case", "Find Next", "Find Previous", etc. I've grown quite used to the Firefox Search model, and really like it. I think it would make a great addition to the Delphi IDE. QC Entry 20051 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: 20383 10/20/2005 Documentation\Online Help\VCL Description: Steps: [QC Short Description] Missing Font.Orientation documentation [QC Description] Doesn't appear to be any documentation on how this works. QC Entry 20383 QC #: Date Reported: 20899 11/1/2005 Area: Debugger\Evaluator ToolTips Description: Steps: [QC Short Description] Eval Hover Hints Do Not Update As Easily as in D7 For example, File, New VCL Forms App Double click the form aand add this code Set a breakpoint on that single line, run Move the mouse from Self to Caption, but the hint still shows the Self eval hint: procedure TForm1.FormCreate(Sender: TObject); begin Self.Caption := 'Test'; end; [QC Description] While debugging, if I move the mouse from one identifier to the next, the previous eval hint doesn't always disappear, so I have to click to make the hint move to the new identifier and show the new identifier's value. Previously, I could just hover. See Steps. The above may be a change in behavior because it thinks I might be moving the mouse into the hint to expand something? From Chris: Yes, before expandable hints, the code would keep the hint visible as long as the mouse stayed in the bounding rectangle of the editor token. Now, it uses a union of the editor token rect and the hint rect itself. So in most cases it won't go away when simply moving the mouse horizontally to a different token on the same line (depending on how wide the hint itself is). There may be a way to be smarter about this. If you file a QC report for this, I'll investigate it. QC Entry 20899 QC #: Date Reported: Area: 20965 11/3/2005 IDE\Packages Description: Steps: [QC Short Description] F2084 Internal Error when attempting to install certain packages In the IDE, open the attached project group, ProjectGroup1.bdsgroup. [QC Description] Attached is the source for the popular open source library RXLib (now part of the JVCL). Attempting to install all packages causes the following error: In the Project Manager, right click RxCtl10.bpl and select "Build" from the local menu. Then right click RxDB10.bpl and select "Build" from the local menu. Right click dclrx10.bpl and select "Install" from the local menu. Right click dclrxdb10.bpl and select "Install" from the local menu. [Pascal Fatal Error] dclrxdb10.dpk(39): F2084 Internal Error: AV1AD113B6-R00000000-0 Please refer to steps to produce the error. QC Entry 20965 See the following Internal Error. [Pascal Fatal Error] dclrxdb10.dpk(39): F2084 Internal Error: AV12AF13B6-R00000000-0' (Original Description) (JJS: See attached comment by Chris Pattinson from 2/5/2007 with Barry Kelly's comments. Basically, he recommends handling exceptions in user components so they are not reported as compiler Internal Errors) 1) Compile RxCtl10.dpk 2) Compile RxDB10.dpk 3) Install dclrx10.dpk 4) Attempt to install dclrxdb10.dpk. You will get the following error: [Pascal Fatal Error] dclrxdb10.dpk(39): F2084 Internal Error: AV1AD113B6-R00000000-0 QC #: Date Reported: Area: 20997 11/4/2005 VCL\Additional Controls\TSplitter Description: Steps: [QC Short Description] AlignWithMargins blocks TSplitter 1) New VCL32 Form 2) Place a TPanel, Align=alTop 3) Place a TSplitter, Align=alTop 4) Place a Panel, Align=alClient 5) Run and test, all Ok 6) Set AlignWithmargins=True on First Panel 7) Run and Test, Splitter is nonfunctional ----- Additional: Setting the Splitter's AlignWithmargins=True also breaks it, setting it for the alClient Panel has no effect [QC Description] See steps QC Entry 20997 QC #: Date Reported: Area: 21041 11/5/2005 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Update ShellAPI.pas Compare ShellAPI.pas and ShellAPI.h (from the Microsoft Platform SDK). [QC Description] The ShellAPI.pas is not sync with the latest version of ShellAPI.h Here is a list of differencies : ShellAPI.pas: Line 155 of ShellAPI.h: #define ABM_SETSTATE 0x0000000a Line 236 of ShellAPI.h: #define FOF_NORECURSEREPARSE 0x8000 Line 370 : #define SEE_MASK_HMONITOR 0x00200000 Line 372 : #define SEE_MASK_NOZONECHECKS 0x00800000 Line 375 : #define SEE_MASK_NOQUERYCLASSSTORE 0x01000000 Line 376 : #define SEE_MASK_WAITFORINPUTIDLE 0x02000000 Line 379 : #define SEE_MASK_FLAG_LOG_USAGE 0x04000000 Line 420 : HANDLE hMonitor; // in _SHELLEXECUTEINFOA Line 442 : HANDLE hMonitor; // in _SHELLEXECUTEINFOW Line 461 : Missing WinExecErrorA Line 462 : Missing WinExecErrorW Line 466 : Missing WinExecError Line 470 : Missing SHCreateProcessAsUser declaration and types Line 499 : Missing SHQueryRecycleBinA, SHQueryRecycleBinW, SHQueryRecycleBin and types Line 513 : Missing #define SHERB_NOCONFIRMATION 0x00000001 Line 514 : Missing #define SHERB_NOPROGRESSUI 0x00000002 Line 515 : Missing #define SHERB_NOSOUND 0x00000004 Line 525 : Missing SHEmptyRecycleBinA, SHEmptyRecycleBinW, SHEmptyRecycleBin Line 559 : Missing UINT uVersion; // in _NOTIFYICONDATAA Line 565 : Missing GUID guidItem; // in _NOTIFYICONDATAA Line 586 : Missing UINT uVersion; // in _NOTIFYICONDATAW Line 592 : Missing GUID guidItem; // in _NOTIFYICONDATAW Line 652 : Missing #define NIF_GUID 0x00000020 Line 656 : Missing #define NIS_HIDDEN 0x00000001 Line 657 : Missing #define NIS_SHAREDICON 0x00000002 Line 669 : Missing #define NIIF_USER 0x00000004 Line 673 : Missing #define NIIF_NOSOUND 0x00000010 Line 747 : Missing #define SHGFI_ATTR_SPECIFIED 0x000020000 // get only specified attributes Line 756 : Missing #define SHGFI_ADDOVERLAYS 0x000000020 // apply the appropriate overlays Line 757 : Missing #define SHGFI_OVERLAYINDEX 0x000000040 // Get the index of the overlay Line 779 : Missing SHGetNewLinkInfoA, SHGetNewLinkInfoW, SHGetNewLinkInfo Line 791 : Missing #define SHGNLI_NOLNK 0x000000008 // don't add ".lnk" extension Line 800 : Missing SHInvokePrinterCommandA, SHInvokePrinterCommandW, SHInvokePrinterCommand and associated constants Line 836 : Missing SHLoadNonloadedIconOverlayIdentifiers Line 857 : Missing SHIsFileAvailableOffline Line 859 : Missing #define OFFLINE_STATUS_LOCAL 0x0001 Line 860 : Missing #define OFFLINE_STATUS_REMOTE 0x0002 Line 861 : Missing #define OFFLINE_STATUS_INCOMPLETE 0x0004 Line 869 : Missing SHSetLocalizedName Line 892 : Missing ShellMessageBoxA, ShellMessageBoxW, ShellMessageBox Line 915 : Missing IsLFNDriveA, IsLFNDriveW, IsLFNDrive Line 927 : Missing SHEnumerateUnreadMailAccountsA, SHEnumerateUnreadMailAccountsW, SHEnumerateUnreadMailAccounts Line 934 : Missing SHGetUnreadMailCountA, SHGetUnreadMailCountW, SHGetUnreadMailCount // overloaded Line 941 : Missing SHSetUnreadMailCountA, SHSetUnreadMailCountW, SHSetUnreadMailCount // overloaded Line 952 : Missing SHTestTokenMembership Line 957 : Missing SHGetImageList Line 959 : Missing #define SHIL_LARGE 0 Line 960 : Missing #define SHIL_SMALL 1 Line 961 : Missing #define SHIL_EXTRALARGE 2 Line 962 : Missing #define SHIL_SYSSMALL 3 Line 964 : Missing #define SHIL_LAST SHIL_SYSSMALL QC Entry 21041 QC #: Date Reported: Area: 21044 11/5/2005 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Update of ShlObj.pas Compare shlguid.h and shlobj.h (from the Microsoft Platform SDK) to ShlObj.pas [QC Description] ShlObj.pas is not sync with the latest version of ShlObj.h (new interfaces, new types, new structures, new constants). The declaration of SID_ and IID_ should contains changes in ShlGuid.h too, adding guid from CLSID_ShellDesktop (line 22 of ShlGuid.h) to CLSID_MyDocuments (line 35 of shlguid.h) would be a great idea. QC Entry 21044 QC #: Date Reported: 21140 11/7/2005 Description: Area: Debugger\Stepping Steps: [QC Short Description] Stepping/debugging within selected thread(s) only [QC Description] When debugging multi-threaded applications single stepping the debugger can cause jumps between threads. This is of course not an error but it can be rather anoying. I suggest a Ctrl/Shift/Alt F7/F8 or whatever key combination that will cause the debugger to not stop in other threads but only in the relevant thread. It would also be great to be able to enable/disable breakpoints/breakpoint groups based on what thread they are activated in. Of course this feature is equally relevant in Win32 and .NET. QC Entry 21140 QC #: Date Reported: Area: 21211 11/9/2005 IDE\Project Management Description: Steps: [QC Short Description] Right click save as fails! 1. Open a project, that has more than one unit. 2. right click on an unopen unit. 3. Select "Save as" // Expected: A prompt to rename // Act: "This operation requires that the selected module be open in the editor" Details >> + $29[20BCC233]{coreide100.bpl} ProjectModule.ProjectModule.TBaseProject.SaveLocalFile (Line 1513, "ProjectModule.pas" + 7) + $29 + $0[5202CAB7]{vcl100.bpl } Menus.Menus.TMenuItem.Click (Line 1878, "Menus.pas" + 14) + $0 + $B[5202F08D]{vcl100.bpl } Menus.Menus.TPopupList.MainWndProc (Line 3373, "Menus.pas" + 1) + $B + $9[51F40BA0]{rtl100.bpl } Classes.Classes.TDataModule.BeforeDestruction (Line 11375, "classes.pas" + 1) + $9 + $2588[77D43A5C]{USER32.dll } CreateWindowExA + $2588 + $2655 [77D43B29]{USER32.dll } CreateWindowExA + $2655 + $2891[77D43D65]{USER32.dll } CreateWindowExA + $2891 [QC Description] Project Manager -> Right click -> save as fails! // See steps QC Entry 21211 QC #: Date Reported: Area: 21702 11/23/2005 VCL\Dialog Controls Description: Steps: [QC Short Description] Update Printing Commondialog with latest values from commn.dlg.h Update TPageSetupDialogOption in Dialogs.pas to include psoEnablePagePaintHook psoEnablePageSetupHook psoEnablePageSetupTemplate psoEnablePageSetupTemplateHandle And update the Execute function. [QC Description] The TPageSetupDialogOptions typedef is missing some values from commndlg.h. PSD_ENABLEPAGEPAINTHOOK PSD_ENABLEPAGESETUPHOOK PSD_ENABLEPAGESETUPTEMPLATE PSD_ENABLEPAGESETUPTEMPLATEHANDLE QC Entry 21702 QC #: Date Reported: Area: 21817 11/30/2005 Documentation\Online Help\Main help Description: Steps: [QC Short Description] Help incorrect for Templates Go to ms-help://borland.bds4/bds4win32devguide/html/idh_programmingtemplates.htm My help shows text starting with: "ToolsOptions>Editor Options>Source Options Use this page to manage code templates. Code templates include commonly used programming statements (such as if, while, and for statements) that you can insert into your source code. ..." [QC Description] It took me a while to locate the code template list dialog. It's actually on \View\Templates but part of the help claims it's on \Options\Editor options\Source options. QC Entry 21817 QC #: Date Reported: Area: 21930 12/4/2005 Documentation\Online Help\Object Pascal Description: Steps: [QC Short Description] operator overloading documentation correction [QC Description] A minor (but highly annoying) correction for-ms-help://borland.bds4/bds4ref/html/OperatorOverloads.htm. For the shift operators, they are LeftShift and RightShift, not ShiftLeft and ShiftRight (though the latter seem more appropriate; maybe the compiler guy(s) can be convinced to use both). QC Entry 21930 QC #: Date Reported: Area: 22022 12/7/2005 IDE Description: Steps: [QC Short Description] Using view unit (Ctrl+F12) always shows design form Set IDE to non embedded classic undocked. Open up a project with several units that have design forms. Try flipping between the units using Ctrl+F12. Notice that the IDE will always show the form, and not the source view. So you have to press F12 once more. (Creates another problem, see QC 10661: Install all components from JVCL and DevExpress, and then try this. Notice that it will take about 2-3 seconds for it to switch) [QC Description] Tested in non embedded, classic undocked. Default behaviour is broken, as the designer now always show the design form of the unit when using Ctrl+F12 to view a new unit. Default behaviour before was showing the source code, and is the most logical thing to have here since you want to vew the unit, not the form. You have Shift+F12 (View form) for that. Since viewing a form takes 2 seconds on a XP 3200 with 1G RAM (when JVCL and DevExpress is installed), a bi effect is that switching units will take a long time. See QC 10661 for more info on this (speeded up a bit in D2005 update 3). But still slow. So please change it back to the standard behaviour, and view source instead of form. Or make it an option. QC Entry 22022 QC #: Date Reported: Area: 22059 1/13/2004 IDE\Dialogs\Project Options Description: Steps: I have the IDE set to echo command lines in the message window. When I tried to use this to capture a command line for a delphi package I was surprised to find that the command line does not work - even after extensive work on my part to try to "fix it up". - i have a Output directory of "..\..\Bin" specified for my project. very obviously, the assembly also gets built into said directory. however, when i turn on "Show CommandLine" i see "-ER:\RemObjects SDK for .NET\Source\RemObjects.SDK.Delphi8\" which is my project folder. Tried also with a simple delphi vcl forms app and had the same problem. - the command line output lists an option of -C0 [That's a Zero], which dccil doesn't understand. - the command line output also lists the .dpk as *last* item of the commandline, leading dccil to emit "project $A-" not found. the project has to be the FIRST item on the command line - it doesn't bother to prefix the $A+ etc compiler options with a "-" - it doesn't bother to quote filenames and searchpaths that have spaces in summary, i guess it would have been easier to list what parts the command line output got *right*, and it's hard to hold back saying this is just completely useless. QC #: Date Reported: Area: 22169 12/10/2005 Documentation\Online Help\Object Pascal Description: Steps: [QC Short Description] Bad indentation on sample code in help examples In page "ms-help://borland.bds4/bds4ref/html/Overview.htm" the example code for "A Simple Console Application" is formatted in a rather odd manner: program greeting; {$APPTYPE CONSOLE} var MyMessage: string; begin MyMessage := 'Hello world!'; Writeln(MyMessage); end. Likewise the code for the "A More Complicated Example": program greeting; {$APPTYPE CONSOLE} uses Unit1; begin PrintMessage('Hello World!'); end. The "A VCL Application" example has the same problem. [QC Description] The indentation is highly irregular. QC Entry 22169 QC #: Date Reported: Area: 22262 12/13/2005 Documentation Description: Steps: [QC Short Description] Help lists wrong VER symbol for D2006 SYSOP: Link in Help File: ms-help://borland.bds4/bds4ref/html/fhxr39722.htm [QC Description] The online help topic "Conditional compilation (Delphi)" lists the version constant for D2006 as VER140. This is wrong, it is VER180. QC Entry 22262 ms-help://embarcadero.rs2010/rad/Conditional_compilation_(Delphi).html Latest version says: Always defined, indicating the version number of the Delphi compiler. (Each compiler version has a corresponding predefined symbol. For example, compiler version 18.0 has VER180 defined.) QC #: Date Reported: Area: 22354 12/15/2005 IDE\Packages\Package Manager Description: Steps: [QC Short Description] Adding a unit with a form to a package only registers the unit Create a new package and save it. Create a form and save it. Remove form from package. Right-click on package and click Add. Select the unit you previously removed. Check the project manager. The form branch is not there and the package source doesn't have the form name associated to the unit. [QC Description] If you create a new package and create a form in the package, the Project Manager correctly displays a unit with a form branch. If you remove the form and add the unit manually by any means (drag and drop, right-click->Add) the unit is registered and does NOT have the form branch showing. This affect StarTeam checkin and checkout and also affects form inheritance since the base class cannot be found unless the form info is specified in the package source. The package source after adding looks like this: Unit1 in 'Unit1.pas'; when it should look like: Unit1 in 'Unit1.pas' {Form1}; I have to manually edit the package source to correct it. QC Entry 22354 QC #: Date Reported: Area: 22532 12/19/2005 IDE\File Handling Description: Steps: [QC Short Description] "List index out of bounds" after using Welcome Page Open Project button 1. Open Delphi 7, 8, Delphi 2005, or Delphi 2006 (any or no Service Pack for any of them). 2. Use "Welcome Page => Open Project button" to open any existing project that is not on the Welcome Page MRU list. 3. Use "Toolbar => File Open Dropdown array" to try to open any recent project. Delphi will tell you "List index out of bounds (2)", when you try again "List index out of bounds (1)", and only on third try open. I will attach a screenshot anyway... PS: MRU = Most Recently Used PPS: Already exists in bug 11007 // Note (QC Sysop): The Projects need to be on a samba drive. Unable to reproduce without samba. // Note (QC Sysop): AIR with stacktrace and modules lists can be found here: QC 22751, QC 22839, QC 22840, QC23099 [QC Description] When using both Open button on Welcome page and toolbar MRU, projects won't open, Delphi will tell me "List index out of bounds" instead. Update to Service Pack 1 did not help (updated build no in bug entry therefore). QC Entry 22532 NOTE: i have no Samba drive, ergo i cannot reproduce this. i opened it in case anyone in R&D has one and can try it. QC #: Date Reported: Area: 22540 12/19/2005 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Using external editors for unsupported file types [QC Description] It would be great if files, added to project, but not supported by IDE editors, would be edited in their original editors if you just double click them in Project Manager window. For example, I have a folder Documents. There are some DOC and XLS files related to my project. For now if I want to see their contents or edit them I have to open then from external editors (Word, Excel etc.) or find them by file manager and activate. If I double click them in Project Manager, Delphi tries to edit such files - opens them in hex editor. Instead of such behaviour I propose to just raise such files with ShellExecute function. That would: 1. save time when need to edit some info 2. help to collect all project-related files in project manager. (well not 'help' itself, but stimulate to do so) QC Entry 22540 QC #: Date Reported: Area: 23195 1/6/2006 IDE\Form Designer Description: Steps: [QC Short Description] AV using control guidelines with dock controls from Developer Express ExpressBars ExpressBars product from Developer Express was used. 1) Drop TdxDockPanel on the form 2) Click it The problem seems to be here: function TControlGuidelines.CalcHorzPos(APos: Integer): Integer; var LParent: TWinControl; begin if Component <> Container then LParent := TControl(Component).Parent else LParent := TWinControl(Component); Result := TControl(Component).Left + APos; while LParent <> Container do <<<<<< begin Inc(Result, LParent.Left); LParent := LParent.Parent; end; end; The code assumes that after LParent := LParent.Parent; LParent cannot be nil and it is probably nil in this case. [QC Description] Access violation at address 00371FF1 in module 'designide100.bpl'. Read of address 00000040. QC Entry 23195 The following QC AIR reports also show this stack trace: 70585 26503 25900 25899 QC #: Date Reported: Area: 23651 1/16/2006 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TServiceApplication.DelayInitialize property not documented Try finding TServiceApplication.DelayInitialize in the help system; it's not there. [QC Description] TServiceApplication.DelayInitialize -- a very important property to know about when writing for apps running on Windows 2003 systems (see http://distribucon.com/blog/archive/2006/01/11/870.aspx) is not mentioned in the Help system. When it is documented, it might be good to discuss the pros & cons of both possible values when running in Win2003 and non-Win2003 environments, and whether post-Win2003 -- e.g., Vista -- Windows version are likely to require it to be set a particular way. I myself am using the code SvcMgr.Application.DelayInitialize := CheckWin32Version(5, 2); in my DPR, but this may not be ideal. QC Entry 23651 QC #: Date Reported: Area: 23670 1/16/2006 IDE\Tool Palette Description: Steps: [QC Short Description] Remember Tool Palette position after going to src and than back to designer 1. File | new | vcl app 2. <in tool pallate> scroll down towards bottom (ie WebSnap) and put a TAdapter on a form 3. F12 to view source 4. F12 again to switch back to design view [QC Description] When I'm designning a form and placeing some components near the end of component palette and click F12 to edit some source and than going back to designning form than the position in Tool Pallette is not the same //exp : tool pallate to be where you left it where it was before. (The Tool Pallette is other in source than in designning, than you reposition view.) It may be //res : it's somwhere else fine when you will store scrollbar position of tool palette for each view/type separatelly. QC Entry 23670 QC #: Date Reported: Area: 23732 1/17/2006 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TWideStrings documentation is incorrect or missing. 1. Load Delph help. 2. Browse the following URL. ms-help://borland.bds4/bds4win32api_win32/html/DelphiWin32_WSDLIntfTWideStringsClass.htm [QC Description] Online help file says TWideStrings is in WSDLIntf.pas, but it is also in WideStrings.pas. WideStrings.pas should be documented. QC Entry 23732 Fixed, see ms-help://embarcadero.rs2009/delphivclwin32/WideStrings_TWideStrings.html QC #: Date Reported: Area: 24521 2/5/2006 Compiler\Delphi\Interfaces Description: Steps: [QC Short Description] interface implementation methods not recognized if declared as strict private Compile the attached program below. See the following compile time error. [QC Description] Under Delphi 2006 (Win32 personality), the following code is accepted and behaves as expected: type IMyInterface = interface ['{291883F3-1000-4BC6-9FC3-ABB16F4F7D36}'] procedure DoSomething; end; Error: E2003 Undeclared identifier: 'DoSomething' This behavior is inconsistent with Delphi for .NET which compiles and runs the test case as expected. program BTS257056; {$APPTYPE CONSOLE} TMyClass = class(TInterfacedObject, IMyInterface) private procedure DoSomething; end; However, declaring the TMyClass.DoSomething method as strict private is not accepted.Ex: type IMyInterface = interface ['{291883F3-1000-4BC6-9FC3-ABB16F4F7D36}'] procedure DoSomething; end; TMyClass = class(TInterfacedObject, IMyInterface) strict private procedure DoSomething; end; The error I receive is: [Pascal Error] MyUnit.pas(14): E2003 Undeclared identifier: 'DoSomething' QC Entry 24521 var Counter: Integer = 0; type IMyInterface = interface ['{291883F3-1000-4BC6-9FC3-ABB16F4F7D36}'] procedure DoSomething; end; TMyClass = class(TInterfacedObject, IMyInterface) strict private procedure DoSomething; end; procedure TMyClass.DoSomething; begin Inc(Counter); end; var MyStuff: IMyInterface; begin MyStuff := TMyClass.Create; MyStuff.DoSomething; if Counter = 1 then WriteLn('PASS') else WriteLn('FAIL'); end. QC #: Date Reported: Area: 24804 2/12/2006 IDE\Code Editor Description: Steps: [QC Short Description] Inappropriate Edit options are available New->Delphi Projects->VCL Forms Application Click OK Add a TButton to the form Click on the Code Tab Now click Edit->Lock Controls Click on the Design Tab Result; You can move the TButton. It isn't locked [QC Description] When the Code (for Delphi projects) or Unit (for C++Builder projects) tab is enabled, the Edit menu option has design options enabled. These options do not apply and have no effect. QC Entry 24804 QC #: Date Reported: Area: 24884 2/14/2006 Internet\XML\Data Binding Description: Steps: [QC Short Description] Duplicate type created for Danish OIOXML Invoice schema Use the XML data binding wizard to import this xml schema: http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd Compile the resulting code. [QC Description] Denmark is using electronic invoices for all government offices. These are defined in the xml namespace: http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ The schema in question is: http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd The two elements "com:TypeCode" and "main:InvoiceCurrencyCode" both use the type TXMLCodeType. This type is generated twice by the wizard. The resulting code will not compile because of this. Mind that I haven't read through the schemas to see if they are totally error free. So I won't guarantee that this isn't a problem with the schemas themselves. I don't think so though. QC Entry 24884 QC #: Date Reported: Area: 24948 2/15/2006 Debugger\Event Log View Description: [QC Short Description] large amount of OutputDebugString makes IDE totally unresponsive. Steps: 1. Create new classic Delphi VCL application (Win32) 2. Add Button. Double click it. 3. add this onClick event handler code: procedure TForm1.Button1Click(Sender: TObject); var t,n:Integer; begin n := 0; Button1.caption := 'now try to stop the debugger'; for t := 0 to 65535 do begin // almost an endless loop... [QC Description] OutputDebugString('The Delphi IDE Debugger will go slightly crazy and be non responsive until this completes. Create a new application and put the code shown in Steps into it, and run the application, and your IDE will be This could take a few hours'); Inc(n); //Sleep(n); end; end; 4. Run the application. [warning, save anything non-responsive permanently and you will either need to kill the EXE. important before running.] 5. Try to click any button in the IDE toolbar, especially the debugger Pause button. Try to do anything at all in the IDE. 6. For slightly less insanity, uncomment the sleep line above, which if you If a large number of OutputDebugString lines output to the Event Log View then the whole IDE will become non- put enough sleep time in, you may be able to still use the IDE. responsive. This means that the toolbar buttons used to control the debug target application (such as pause) are no longer clickable. Perhaps some kind of throttling, or some kind of buffering is necessary for OutputDebugString output. This is really severe because it means that the target delphi app (or C++Builder app, or perhaps even a dotNet app) that outputs enough output via the win32 api OutputDebugString could make the whole IDE unstable. If the target application keeps outputing lots of OutputDebugString output permanently, then the only way out of the situation is to kill the IDE and the target Application exe. This causes major data loss. This does NOT happen in Delphi 7. It appears to happen in Delphi 2005 and 2006. It may be infrequent for most users, since most users don't have a lot of outputdebugstring messages, and are probably careful not to generate a huge amount of it. but if you ever slip up and put a debug message somewhere where it gets hit 100 times a second, you can kiss your IDE goodbye. QC Entry 24948 QC #: Date Reported: Area: 25056 2/17/2006 VCL\Win 32 Controls\TListView Description: Steps: [QC Short Description] When ListView appeares Access Violation message rises. [QC Description] In the procedure TCustomListView.CreateWnd there is a piece of code: if FSaveSelectedIndex <> -1 then begin Selected := Items[FSaveSelectedIndex]; Selected.MakeVisible(False); end; Sometimes it happendes so that Items[FSaveSelectedIndex] returns NIL value. This causes the trouble described above. Also method TListItems.GetItem uses the expression ListView_GetItem(Handle, Item), that returns False value. And because of this Items[FSaveSelectedIndex] returns NIL value. QC Entry 25056 QC #: Date Reported: 25286 2/23/2006 Description: Area: Compiler\Delphi\Language Steps: [QC Short Description] Qualifiable enumeration constants [QC Description] Enumeration constants are always in unit scope, even if declared local to a class. Due to this language "quirk" generations of Pascal programmers are in need to prefix nearly all those constants with something in order to circumvent the likely naming conflict. If there were a possibility to quilify the identifiers those problems were absent. I propose something like the following: type te=enum(a,b,c); To access the constants you would write stuff like te.a. For enum types generated by this new syntax I suggest that they must be qualified. By the way: This opens the possibility to even create expandable enums like type te_enhances=enum[te](d,e,f); QC Entry 25286 QC #: Date Reported: Area: 25441 2/26/2006 Documentation Description: Steps: [QC Short Description] TSaveTextFileDialog and TOpenTextFileDialog undocumented 1. Open the help file 2. Type TSaveTextFileDialog or TOpenTextFileDialog in the index 3. Find nothing [QC Description] TSaveTextFileDialog and TOpenTextFileDialog undocumented QC Entry 25441 Fixed, see ms-help://embarcadero.rs2009/delphivclwin32/ExtDlgs_TSaveTextFileDialog.html and ms-help://embarcadero.rs2009/delphivclwin32/ExtDlgs_TOpenTextFileDialog.html QC #: Date Reported: Area: 25613 3/2/2006 IDE\Form Designer Description: Steps: [QC Short Description] sometime component's caption disappear and toolbar dithering when vcl designer show component captions checked 1. Select IDE classic undocked layout 2. In Tools-Options, select VCL Designer, set show component captions checked 3. new a vcl form application, put some non-visual component, such as TClientDataset, TDataSource 4. F9 run the application, then close the application return to IDE then you will find the non-visual component's caption no visual and when you move component, will find the whole IDE repaint(dithering) [QC Description] when IDE use default layout, sometime appear this instance when use undocked layout, run application will appear this. very diffault to find different coomponent. QC Entry 25613 QC #: Date Reported: Area: 25763 3/6/2006 Documentation\Online Help Description: Steps: [QC Short Description] Surround Editor Context Menu Item not documented Fixed in Weaver, see ms-help://embarcadero.rs2010/rad/Using_Live_Templates.html [QC Description] Search for the Surround in the Help and no item was returned QC Entry 25763 QC #: Date Reported: Area: 26193 3/16/2006 IDE\Dialogs\Project Options Description: Steps: [QC Short Description] Creating a DLL project and setting LIBSUFFIX causes AV and prevents generation and usage of the project .RES file 1. File|New|Other, Delphi Projects, DLL Wizard, click OK 2. Project|Options, enter 01 for LibSuffix, click OK Exp: No error Actual: --------------------------Error --------------------------- [QC Description] As per short description, creating a DLL project and setting LIBSUFFIX causes an AV and prevents generation and usage of the project .RES file QC Entry 26193 [D2006 : RTM : AV in coreide100.bpl ] setting prefix causes AV in coreide100.bpl Access violation at address 51F5156D in module 'rtl100.bpl'. Read of address 0000000B. --------------------------OK Details << --------------------------Details: + $3[51F5156D]{rtl100.bpl } Classes.Classes.TList.Get (Line 2993, "classes.pas" + 3) + $3 + $0[51F26B4B]{rtl100.bpl } System.System.@HandleAnyException (Line 9980, "system.pas" + 13) + $0 + $41[7C903786]{ntdll.dll } RtlConvertUlongToLargeInteger + $41 + $9[7C90EAF5]{ntdll.dll } KiUserExceptionDispatcher + $9 //results with latest Spacely: --------------------------Error --------------------------Access violation at address 20985FF3 in module 'coreide100.bpl'. Read of address 00000033. --------------------------OK Details >> --------------------------+ $3[20985FF3]{coreide100.bpl} ResUtils.ResUtils.TResFile.Find (Line 609, "ResUtils.pas" + 1) + $3 + $0[00346D23]{rtl100.bpl } System.System.@HandleAnyException (Line 9986, "sys\system.pas" + 13) + $0 + $41[7C903786]{ntdll.dll } RtlConvertUlongToLargeInteger + $41 QC #: Date Reported: Area: 26291 3/20/2006 RTL\Delphi\Thread support Description: Steps: [QC Short Description] Using TThread.Resume may cause setting freed object value Make a routine to create many TThread's that finish up very quickly. Set them to FreeOnTerminate and use the TThread.Resume. Set FastMM to use FullDebugMode, and it will detect modified memory after free. [QC Description] When using TThread in suspended state, and FreeOnTerminate, TThread.Resume miss threadsafe handling of the thread. Today the code looks like this: procedure TThread.Resume; var SuspendCount: Integer; begin SuspendCount := ResumeThread(FHandle); CheckThreadError(SuspendCount >= 0); if SuspendCount = 1 then FSuspended := False; end; The problem is, if there are many threads created and freed, the delay after ResumeThread(FHandle) could be big enough for the thread to finish and free itself before the routine arrives at FSuspended := False. This will cause TThread.Resume to set a value on the freed object, and in worst case corrupt memory on newly allocated memory for some other structure. This routine has to be made threadsafe, with interlocked states or using a critical section. One solution could be something like this: [See resolution comment] [Top Ten] QC Entry 26291 QC #: Date Reported: Area: 26409 3/22/2006 Database\DBExpress\TSQLStoredProc Description: Steps: [QC Short Description] TSQLStoredProc parameters in incorrect position (Oracle) See report 8678 - states it's fixed. [QC Description] TSQLStoredProc returns an Oracle 10g stored procedure parameters in wrong order. The issue is exaclty like in report 8678. Report 8678 is marked as fixed but the build number is not specified. Any more information on it? The issue is simple - SYS.ALL_ARGUMENTS.POSITION is not being selected nor used in ORDER BY. The fix is very simple but it seems it never got to any public release or update. QC Entry 26409 QC #: Date Reported: Area: 26707 3/29/2006 Internet Description: Steps: [QC Short Description] WebSnap do not compile in Delphi 2006 File -> New -> Other -> Delphi Projects -> WebSnap -> WebSnao Applicartion Web app debugger executable Class name: any OK Run (F9) [Pascal Fatal Error] Project3.dpr(9): F2051 Unit SockApp was compiled with a different version of IdTCPServer.TIdTCPServer [QC Description] When compiling a Websnap app I got this error message: [Pascal Fatal Error] Project3.dpr(9): F2051 Unit SockApp was compiled with a different version of IdTCPServer.TIdTCPServer QC Entry 26707 QC #: Date Reported: Area: 27156 4/10/2006 IDE\Dialogs Description: Steps: [QC Short Description] Make Install Packages dialog resizable [QC Description] 1. When no project is loaded: Clicking the Components/Install Packages menu item brings up a dialog/window 'Install Packages' which is RESIZABLE. 2. When a project is loaded: Clicking the Components/Install Packages menu item brings up a dialog/window 'Project Options for ThisProject.exe' which is NOT resizable. However obviously this is not the same dialog as when clicking Project/Options so the question arises why this dialog is not resizable as the dialog/window under 1. Not resizable dialogs which contain lists of variable length are a very bad design, because the user has to scroll a lot to find the desired list item and he has no overview to the whole list. Dialogs which are not resizable containing lists of variable length are a reminiscence to the old times of DOS where such cumbersome user interfaces were a result of the restricted technology at that time. QC Entry 27156 [see RAID 219297] QC #: Date Reported: Area: 29307 5/21/2006 VCL Description: Steps: [QC Short Description] Form size constraints do not work properly 1. File | New | VCL Win32 Applicaiton 2. drop a TCheckBox 3. double click CheckBox1 to code editor 4. paste: Constraints.MaxWidth := Width; Constraints.MinWidth := Width; 5. run 6. Resize the running form //exp: you can't change the form size //act : you can change it's height, but not width [QC Description] With a form's MaxWidth and MinWidth constraint set equally, dragging the left form border moves the form's position on the screen. Dragging the right form border does nothing (as expected). Sample project attached. QC Entry 29307 Bug exist in D7 ============== old steps =========== 1) Unzip the attached project. 2) Run the program. 3) With the Constrain checkbox unchecked, drag both the left and right form borders to resize the form. 4) Check the Constrain checkbox. 5) Drag the right border - nothing happens as expected. 6) Drag the left form border - the form is repositioned on the screen. <sysop> From the comments: This is non-standard behavior and a client has complained about it. </sysop> QC #: Date Reported: Area: 30036 6/12/2006 IDE Description: Steps: [QC Short Description] Save type libraries (TLB) in text format instead of binary [QC Description] Please provide a way to maintain type libraries in text format instead of binary format. The binary format is bad when using version control software as you cannot compare two versions and see what changed. If two developers have changed the same file it becomes really inconvenient to manually merge the changes The particular format is not important (IDL, XML, ...) as long as you can easily compare two versions of a type library file. QC Entry 30036 QC #: Date Reported: 30665 6/27/2006 Description: Area: RTL Steps: [QC Short Description] ImageGetCertificateHeader has wrong parameter [QC Description] ImageHlp.ImageGetCertificateHeader is declared as: function ImageGetCertificateHeader(FileHandle: THandle; CertificateIndex: DWORD; var Certificateheader: PWinCertificate): Bool; stdcall; It should be: function ImageGetCertificateHeader(FileHandle: THandle; CertificateIndex: DWORD; var Certificateheader: TWinCertificate): Bool; stdcall; QC Entry 30665 QC #: Date Reported: Area: 31435 7/19/2006 RTL\Delphi\Pascal Strings Description: Steps: [QC Short Description] Please complete the functionality of the UTF8String type N/A - Feature request [QC Description] Delphi 2006 has rudimentary support for UTF-8 text through the UTF8String type. This report requests the completion of the compiler and language support necessary to make this type fully functional and on par with the AnsiString and WideString types. Currently the type maps to a long string, which is great since that means it inherits some great features (allocation/deallocation speed, reference counting, etc.). However, there are many areas in which support is currently lacking: 1) Implicit type conversion: UTF8String is currently treated in exactly the same way as an AnsiString when doing assignments to different types, so assigning a UTF8String to a WideString or Ansistring will cause data corruption if the UTF8String contains code points outside the ASCII range (code points U+0 to U+7F). 2) Object Inspector support: UTF8Strings cannot be edited in the Object Inspector. Again, the UTF8String is treated as an ordinary AnsiString, and thus code points outside the ASCII range are lost or corrupted. 3) Compiler support for UTF-8 string constants: The compiler does not support the assignment of Unicode text constants to UTF8String variables. All code points outside the ASCII range are lost or corrupted when assigning a Unicode text constant to a UTF8String variable. The compiler should implicitly convert the constant to UTF-8 during compilation. 4) Manual type conversion functions (Utf8ToUnicode and UnicodeToUTF8) only support the BMP (Basic Multilingual Plane, plane 0. i.e. the first 64K code points): The RTL and IDE's Unicode support is still limited to UCS-2, whereas Windows has moved on to UTF-16. Full support of UTF-8 is a worthwhile companion to full support of UTF-16. UTF-8 is more storage space efficient than UTF-16 when working with predominantly European languages. Backed by the long string type the UTF8String type is also faster than the WideString type because it is not allocated on the (slow) Windows heap, and it is also reference counted. QC Entry 31435 QC #: Date Reported: Area: 31728 7/25/2006 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Add ability to specify build configurations for all projects in a group [QC Description] I have a project group with about 8 projects in it. When I want to switch from DEBUG to RELEASE builds I have to edit the properties of each project in turn and turn off debug info, add conditional defines, etc. On 8 projects this takes far too long, and then I have to switch them back again afterwards. I'd like to be able to create build configurations in which I can set compiler/linker options + defines that get merged into the projects' conditional defines during compilation. QC Entry 31728 + Bring up multiple project in a project group + Project | Build Configurations (similar to the C++ idea). QC #: Date Reported: Area: 31809 7/27/2006 IDE\File Handling Description: Steps: [QC Short Description] Cannot close a project if read-only 1) Create a project 2) Save all 3) Close the project 4) Mark the project files read-only (as if checked into source control) 5) Open the project 6) Close the project Step 6 fails because ......bdsproj.local is read-only. ---------Additional from QA -------------------- You must kill the IDE in order to close the project. You are unable to close the project or start a new one because the files are not handled correctly. [QC Description] The IDE will not let me close a project if it is read-only QC Entry 31809 QC #: Date Reported: Area: 31978 8/1/2006 IDE Description: Steps: [QC Short Description] Remove Limit from Menu: File, Reopen Project List. [QC Description] There has been NG chatter (on & off) about this for the last 6 years, but apparently it was never entered in QC. It would be great if we could set our own limit for the MRU Project list; 4 are just not enough. I generally ping-pong between 6 - 7 different projects in any given month. Not too mention package builds. I have one client who currently has 6 on going projects for different sections of their company. If you can't let us set the limit, then I would suggest that 10 - 15 would be a respectable number. QC Entry 31978 QC #: Date Reported: Area: 32017 8/2/2006 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Project Manager should scroll automatically if necessary when dragging file to new location Open a project with a large number of files. Size the PM pane to not show all of the files in the project Scroll so that the last file in the list is showing Grab the bottom file and try to drag to the top of the list - move it above the top visible file - window does not scroll It is necessary to drop the file near the top of the list, scroll the list and then grab and drag the file again to reach the top of the list. [QC Description] The Project Manager pane allows files to be dragged to new locations with the mouse, but if the desired location is not visible in the pane, it will not scroll to show the location. Please add auto-scrolling during dragging as is done in Windows Explorer. sysop note: This is very similar to QC 584 and very easy to implement since this is automatically supported by TVirtualStringTree: just include toAutoScroll in TreeOptions.AutoOptions! QC Entry 32017 QC #: Date Reported: Area: 32038 8/2/2006 Database Description: Steps: [QC Short Description] TParams.ParseSQL return null terminated string with rubbish appended var S, T: string; P: TParams; begin S := 'SELECT * FROM A WHERE Code=:Code AND DocNo=:DocNo'; P := TParams.Create; try T := P.ParseSQL(S, True); CheckEquals(40, Length(T)); finally P.Free; end; end; [QC Description] Use TParams.ParseSQL to parse the following SQL: SELECT * FROM A WHERE Code=:Code AND DocNo=:DocNo It will return SELECT * FROM A WHERE Code=? AND DocNo=?'#0'ocNo'#0'cNo We can notice there are some rubbish characters appended behind the #0 char. QC Entry 32038 QC #: Date Reported: Area: 32115 8/4/2006 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Please add capability to drag & drop from an editor tab to the project manager Try to drag an editor file to the project manager Project manager shows insertion point as if ready to accept file, but the mouse cursor remains the don't symbol [QC Description] If an external file is opened in the editor, I would like to be able to add the file to the project by draging and dropping from the editor tab to the project manager. QC Entry 32115 QC #: Date Reported: Area: 33599 9/6/2006 IDE\Object Inspector Description: Steps: [QC Short Description] OI Drop down list stay open after switching to another application with ALT Tab Start BDS 2006 select default (docked) desktop layout Create New Delphi Win32 Application Add some components on the form Select one of this component Click on the OI Drop Down list of components Click again if it does not drop down Switch to another application with the "Alt" "Tab" combination Act : drop down list stay open in the middle of the screen on application switch Exp: drop down list should close before switching to another application Note - this happens only once - after closing the dropdown it will later function properly until another new app is created or the desktop layout is changed [QC Description] OI "Drop down list" stay open after switching to another application when using ALT Tab QC Entry 33599 QC #: Date Reported: Area: 33766 9/10/2006 VCL\Printing Description: Steps: [QC Short Description] missing DeviceCapabilities constants use WinSpool.DeviceCapabilities to check for staple support, the pages per minute, or list the supported media types. <sysop> Compare the DC_xxxx constants in windows.pas with the latest microsoft wingdi.h header. (in $BDS\Include\wingdi.h) </sysop> [QC Description] the following constants for use with WinSpool.DeviceCapabilities are missing in windows.pas: {$EXTERNALSYM DC_STAPLE} DC_STAPLE = 30 {$EXTERNALSYM DC_PRINTRATEPPM} DC_PRINTRATEPPM = 31 {$EXTERNALSYM DC_MEDIATYPENAMES} DC_MEDIATYPENAMES = 34 {$EXTERNALSYM DC_MEDIATYPES} DC_MEDIATYPES = 35 [sysop] adjusted to include appropriate code style QC Entry 33766 QC #: Date Reported: Area: 33869 9/13/2006 Documentation\OpenHelp Description: Steps: [QC Short Description] FileAge deprecated but alternative not named * Compile code that uses FileAge * Double-click on the Pascal Warning in the Messages list * Put the cursor onto FileAge and press F1 [QC Description] When using FileAge, the compiler warns: [Pascal Warning] Someunit.pas(1234): W1000 Symbol 'FileAge' is deprecated But if I open the BDS help on FileAge, it documents FileAge quite normally, and doesn't tell that it's either deprecated, or worse, it doesn't even name alternatives. QC Entry 33869 QC #: Date Reported: Area: 34035 9/16/2006 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Incomplete winspool conversion compare with winspool.h [QC Description] Current conversion of winspool is missing the following: Structures: PRINTER_INFO_7 PRINTER_INFO_8 PRINTER_INFO_9 DRIVER_INFO_4 DRIVER_INFO_5 DRIVER_INFO_6 DOC_INFO_3 PRINTPROCESSOR_CAPS_1 PRINTER_ENUM_VALUES BINARY_CONTAINER BIDI_DATA BIDI_REQUEST_DATA BIDI_REQUEST_CONTAINER BIDI_RESPONSE_DATA BIDI_RESPONSE_CONTAINER PROVIDOR_INFO_2 Constants: PRINTER_ATTRIBUTE_PUBLISHED PRINTER_ATTRIBUTE_FAX PRINTER_ATTRIBUTE_TS DSPRINT_* JOB_STATUS_COMPLETE DRIVER_KERNELMODE DRIVER_USERMODE DPD_DELETE_* APD_STRICT_* APD_COPY_* DI_MEMORYMAP_WRITE NORMAL_PRINT REVERSE_PRINT PRINTER_ENUM_HIDE SPOOL_FILE_PERSISTENT SPOOL_FILE_TEMPORARY PRINTER_NOTIFY_FIELD_OBJECT_GUID BIDI_ACTION_* BIDI_ACCESS_* ERROR_BIDI_* SPLREG_* SPLDS_* Functions: AddPrinterDriverEx FlushPrinter ExtDeviceMode GetPrinterDataEx EnumPrinterDataEx EnumPrinterKey SetPrinterDataEx DeletePrinterDataEx DeletePrinterKey XcvData GetDefaultPrinter SetDefaultPrinter IsValidDevmode QC Entry 34035 QC #: Date Reported: Area: 34447 9/26/2006 Database\Data Aware Controls\TDBGrid Description: Steps: [QC Short Description] Data loss in TDBGrid 1. Download and run the attached test-case 2. Activate the second record by clicking on the cell showing "two" 3. Enter a different text (e.g. "test") into the DBEdit above the grid 4. click on the empty area in the grid below the records exp: updated value ("test") should show up in the grid act: value is cleared, i.e. data loss [QC Description] there is data loss if - record is edited using DBEdits and simultaneously shown in a DBGrid - user clicks on the empty are of a DBGrid See steps and attached test-case This is caused since in TCustomDBGrid.MouseDown there is a call to UpdateData instead of FDataLink.UpdateData (see workaround) QC Entry 34447 QC #: Date Reported: 34745 10/2/2006 Area: Database\DBExpress\TSQLQuery Description: Steps: [QC Short Description] 1. Put a TSQLQuery on a form. 2. Enter a simple update query that uses a date parameter. 3. Assign the .AsDateTime still does not work parameter value in code. TSQLQuery1.ParamByName('THE_DATE').AsDateTime = Date; 4. Execute the query using ExecSQL. 5. Watch the "unassigned code" error come up. [QC Description] When adding parameters to a TSQLQuery the .AsDateTime still cannot be used. When the query is executed it produces a "unassigned code" error. This has been a problem ever since dbExpress came out. Whilst simple in theory to fix when migrating code to dbExpress this is a major pain and should not need to be done. QC Entry 34745 QC #: Date Reported: 34747 10/2/2006 Area: Debugger\Event Log View Description: Steps: [QC Short Description] It is impossible to stop the scrolling in the event log 1. Create a VCL application 2. Drop a TTimer on the form and set its Interval property to 50 3. Add event handler to the timer 4. In the event handler call OutputDebugString( "some text\n" ); 5. Run 6. Observe the text scrolling quickly in the event log without ability to go to a particular place. [QC Description] There is no way to pause the scrolling in the events pane. This makes debugging very difficult, at times. Please, consider stopping the scrolling if the pane was clicked. This allows for manual scrolling to the points of interest. [QC Workaround] A way to pause the scrolling is possible by a checkbox in the tools | options | Event page but it requires a lot of clicks/inputs to be invoked. QC #: Date Reported: Area: 34840 10/4/2006 RTL\Delphi\Date - Time Description: Steps: [QC Short Description] StrToDateTime does not work when current locale s date/time format include extra character(s) between Date and Time. Compile and run the attached program below. [QC Description] StrToDateTime does not work when current locale s date/time format include extra character(s) between Date and Time. For example if current locale s date/time format is "dd.m.yyyy '?.' HH:MM:SS" the function fail. Our ShortDateFormat (Bulgaria) is "dd.m.yyyy '?.'" (Windows default locale settings). When I call ShowMessage(DateTimeToStr(StrToDateTime(DateTimeToStr(Now)))), I receive error message (exception), SInvalidDateTime (%s is not a valid date and time). FAIL - Exception=EConvertError Msg='17.10.2006 year 1:59:16 PM' is not a valid date and time Functions TryStrToTime and TryStrToDate fork OK, without remarks. This is from Delphi Version 2 up to Turbo Delphi Explorer. QC Entry 34840 See the following output in lieu of the expected output PASS. program BTS242400; {$APPTYPE CONSOLE} uses SysUtils; var dt: TDateTime; S: String; TimeValue: TDateTime; begin try ShortDateFormat:= 'dd.m.yyyy ''year'''; TimeValue := Now; S := DateTimeToStr(TimeValue); dt := StrToDateTime(S); //Exception!!! if dt = TimeValue then WriteLn('PASS') else WriteLn('FAIL - Expected value not found.'); except on E: Exception do WriteLn('FAIL - Exception=', E.ClassName, ' Msg=', E.Message); end; end. QC #: Date Reported: Area: 35001 10/9/2006 Database\Data Aware Controls\TDBGrid Description: Steps: [QC Short Description] MDIChild's active control focus is not set correctly for a DBGrid. (Applies to Delphi 7) [QC Description] If you have a TWinControl on the MDIForm that can get the focus and then you click on the last active MDI Child, the MDI Child's active control isn't focused for Windows, but the VCL thinks it is and doesn't execute a Windows.SetFocus on it. 1. Download and start the attached project 2. Click on the button on the left panel 3. Click on a non-selected row of the DBGrid in the MDIChild Expected: The row is now selected Actually: Nothing happens. The problem is that the SetActiveControl call in TCustomForm.FocusControl doesn't do anything because there was no change in the ActiveControl of the MDIChild. But the "ActiveControl" isn't Focused(). QC Entry 35001 QC #: Date Reported: Area: 35073 10/11/2006 IDE Description: Steps: [QC Short Description] Windows x64 resize/repaint bug Restore/maximize Delphi IDE by double-clicking the window border. [QC Description] On Windows XP x64 Edition, double-click on Delphi IDE window border to restore, then double-click again to maximize. The panels are not resized/repainted properly. The are grayed and accept no user interaction. We are having this problem in one of our applications when run on Windows x64. The application is designed in Delphi 2005. Sysop Note: Andreas Hausladen has an unofficial fix for this: http://cc.codegear.com/Item/25412 QC Entry 35073 QC #: Date Reported: Area: 35912 10/30/2006 IDE\File Handling Description: Steps: [QC Short Description] Need more than 4 recent projects [QC Description] Delphi only offers quick access to four recent projects in the File, Reopen menu. It would be nice if one could specify the maximum number of recent projects so you never need to use File>Open to browse for them. <sysop> keywords: MRU count reopen recent file history </sysop> QC Entry 35912 QC #: Date Reported: Area: 35992 11/1/2006 IDE\Packages\Package Manager Description: Steps: [QC Short Description] Edit button of Install Packages dialog doesn't work 1. Start IDE and don't open a project 2. Select "Install Packages" 3. Select a package where the "Edit" button gets enabled. (if you haven't got one, take the package from RAID 237742) 4. Press "Edit" [QC Description] If there is no project open in the IDE, the Edit button of the Install Packages dialog does nothing when clicked. It should either be disabled if this is not supported (that would be a regression compared to D7 and before) or it should open the appropriate package (as it does if there already is a project open). QC Entry 35992 exp: package should be opened in the IDE act: Nothing happens QC #: Date Reported: Area: 36045 11/2/2006 ActiveX\IDE\Import ActiveX Control/Type Library Description: Steps: [QC Short Description] Importing an ActiveX control should assist Install Into package All I did was select Component > Import Component, clicked on the "Import ActiveX control" radio button, clicked next, selected a component from the list (I've tried several - all give the same behavior), clicked next, accepted the defaults (although I tried several variations to see if that had anything to do with it), clicked next, and the "Create unit" page shows just "Create Unit" with a single radio button. The other options that are supposed to be there, aren't. [QC Description] It should not be necessary to open or create a package before installing an ActiveX control. The only option it gives for "importing" is a single radio button to "create Unit". The options for install to existing package and install to new package that were there in previous versions of Delphi are missing.. QC Entry 36045 QC #: Date Reported: Area: 36262 11/7/2006 IDE\Dialogs\Editor Options Description: Steps: [QC Short Description] Editor font selector is not sorted Start BDS. Select Tools, Options, Editor Options, Display. Click on the arrow next to the Editor font. Observe the font order. [QC Description] List of fonts under the 'Editor font' heading in the Editor Options, Display dialog is sorted in an 'arbitrary' order (looks like an installation order - probably the order fonts are returned from the enumeration function). I believe this list should be displayed in alphabetical order. QC Entry 36262 QC #: Date Reported: Area: 36412 11/9/2006 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] 'Add Existing Project" Menu should add multiple projects [QC Description] Creating project groups based on lots of existing projects is very slow and awkward. e.g. Jedi VCL contains lots of project files that have to be added separately QC Entry 36412 QC #: Date Reported: Area: 36481 11/11/2006 IDE\Block Completion Description: Steps: [QC Short Description] Editor inserts extra "end;" after a forward record declaration 1. Start new project (Win32 or VCL.NET) 2. Navigate to the implemetation section 3. type "type TMyRecord = record;" 4. Press return exp: Block Completion should not add an "end" since this is a forward declaration act: Block completion adds "end;" [QC Description] Forward declaring record types is allowed now. (It wasn't in BDS2006) But after forward declaring it the editor insists on having to insert "end;" every time you press return below the forward declaration. BDS2006 does this too but compiling shows that the syntax is not accepted while in Highlander it is accepted (valid) syntax. QC Entry 36481 QC #: Date Reported: Area: 37053 11/27/2006 IDE\Startup/Shutdown Description: Steps: [QC Short Description] Splash screen closes on ALT+F4 1. Start Highlander 2. Click on the splash screen (to be sure that the splash screen has the focus) 3. Press ALT+F4 Expected: The splash screen isn't closed. Actual: The splash screen disappears. [QC Description] When pressing ALT+F4 on the splash screen, the splash screen disappears. This should be very easy to fix: OnCloseQuery CanClose := False; QC Entry 37053 QC #: Date Reported: Area: 37462 12/7/2006 IDE\File Handling Description: Steps: [QC Short Description] IDE may select the wrong file when performing a ctrl + left-click on a filename in the editor Steps: 1) Extract the attached files into a folder, preserving the folder structure 2) Start the BDS (Win32) 3) File>Open and select Folder1\Project1.dpr 4) File->Open and select Folder2\Unit1.pas 5) Click on the "Project1.dpr" tab in the editor 6) Hold down Ctrl and left-click (or right-click->"Open File At Cursor") on "Unit1" on the line "Unit1 in 'Unit1.pas';" in the editor. Up to this point everything is as expected. In step 6 the editor opens up the correct Unit1.pas, ignoring the incorrect one located in Folder2 which is also listed among the editor tabs. 7) Press Ctrl-F9 to compile the project 8) Click on the "Project1.dpr" tab in the editor 9) Hold down Ctrl and left-click (or right-click->"Open File At Cursor") on "Unit1" on the line "Unit1 in 'Unit1.pas';" in the editor. Expected: The editor changes tabs to the correct Unit1.pas from Folder1 (as it did previously) Actual: The editor focuses on the tab for the wrong Unit1.pas - the one located in Folder2 [QC Description] Sometimes when you ctrl + left-click or right-click->"Open File At Cursor" the editor selects the wrong file. This bug makes working with files from different projects, but with the same filenames, very tricky. Sometimes when I work on the latest version of my software I may have units of the old version open in the editor (for reference purposes). I have to be very vigilant to avoid accidentally editing the wrong file, because the IDE's ctrl and left-click mechanism cannot always be trusted. Refer to "steps" and the attached files for an example. QC Entry 37462 QC #: Date Reported: Area: 37520 12/8/2006 IDE\Form Designer Description: Steps: [QC Short Description] No prompt to save after load form with changed component properties To simluate a removed property we just edit the dfm outside of the IDE and add a fake form property: 1. New Delphi VCL 32 Forms project 2. Save all, Close All 3. edit unit1.dfm outside of the IDE and add a new fake property to TForm1, like "DummProp = 1" 4. Reopen the project, ignore the warning about the non-existing property 5. Close All exp: IDE should ask if changes should be saved to the form act: IDE does not ask, form is closed unsaved, so after reopening the project, the missing property warning is shown again [QC Description] If you load a form that contains components whose property names have been changed/removed it warns you about them but does not make the form as modified, so when closing the form you are nor prompted to save. QC Entry 37520 QC #: Date Reported: Area: 37715 12/14/2006 Midas\TClientDataSet Description: Steps: [QC Short Description] ClientDataSet's internalCalc don't work when Closing / Freeing CloneCursor 1) Open a ClientDataSet (the "Original") with InternalCalc Fields 2) Clone this ClientDataSet with another ClientDataSet (the "Clone") 3) Close or Free this Clone. 4) Insert new records in the Original. => issue: The InternalCalc fields don't get calculated. [QC Description] When a ClientDataSet with InternalCalc fields is Cloned, and the Cloned ClientDataSet gets Closed or Freed, the new records their InternalCalc Fields don't get Calculated. (=> The state of the ClientDataSet is never dsInternalCalc.) Added by Sysop <<<<<<<< This issue exist in D2006/D2007/D2009. >>>>>>>> QC Entry 37715 QC #: Date Reported: Area: 38464 1/8/2007 IDE\Repository\New\Console wizard Description: Steps: [QC Short Description] Console Wizard formatting not according to style guide Create a new Delphi for Win32 or Delphi for .NET console program, using: File -> New -> Other -> Delphi Projects OR Delphi for .NET Projects -> Console Application See the generated code. [QC Description] The code created by the console wizard for Delphi for Win32 and .NET contains the following: except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; That should be on E: Exception do i.e. there should be a space between : and Exception. QC Entry 38464 QC #: Date Reported: Area: 38729 1/15/2007 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] No help found for context in form designer Set to embedded designer File | New | Delphi Win 32 application Clicking on an empty part of the form designer Press F1 [QC Description] In a Delphi Win 32 application, clicking on an empty part of the form designer and pressing F1 gives a No help found for context error. I'd expect it to show this page: ms-help://borland.bds5/bds5guide/html/IDETour.htm#designsurface or ms-help://borland.bds5/bds5guide/html/formdesigner.htm QC Entry 38729 QC #: Date Reported: Area: 38793 1/16/2007 Documentation\Online Help\VCL Description: Steps: [QC Short Description] OLH does not mention the TPopupActionBar component 1. open OLH 2. go to Search tab 3. search for "TPopupActionBar" The result list is emtpy. The same applies for the Index tab. [QC Description] There seems to be no documentation for the TPopupActionBar component in the Online Help, at least neither the index nor the search function displays any hits when searching for it. QC Entry 38793 QC #: Date Reported: 38811 1/16/2007 Area: Documentation\Online Help\VCL Description: Steps: [QC Short Description] TSpeedButton Transparent help insufficient N/A fixed in Weaver [QC Description] The help for the TSpeedButton transparent property at ms-help://embarcadero.rs2010/vcl/Buttons.TSpeedButton.Transparent.html mshelp://borland.bds5/bds5dnetapi_dnet/html/DelphiNET_BorlandVclButtonsTSpeedButtonTransparentProperty.htm says: Description Use Transparent to specify whether the background of the button is transparent. It should also say that it will only work if the TSpeedButton's Flat property is set to true. If QC 38831 is not fixed the help should also explain that setting Transparent to true will not work if Windows Themes are enabled. QC Entry 38811 QC #: Date Reported: 38928 1/18/2007 Area: SOAP Description: Steps: [QC Short Description] Calling a WebService fails when strings are long Import a WebService (New . Others . WebServices . Import WSDL). The WebService has been made by Microsoft VisualBasic. The WebService function called had the following C++ call syntax (generated by the BDS IDE from a .WSDL): virtual WideString SendRequest(const WideString XMLCallerInfo, const WideString XML) = 0; Calling it with short arguments in both strings will operate ok. Calling it with a long string (> 26000 bytes) in the second string throws the exception 'The action must be retried ...' if compiling with C++ BDS 4.0 (Update 2). Again: it was ok with Borland C++ Builder 6 ! [QC Description] Exception 'The action must be retried - URL:http://testdatagate.wienkav.at/MedArchiv/MedArchiv.asmx SOAPAction:http://www.wienkav.at/kav/kav.datagate/MedArchiv/SendRequest' when calling the WebService with an argument string longer than about 25 kB. This problem is new in C++ builder 2006 (BDS 2006); with BC++ Builder 6 the same program operated ok ! Borland Developer Studio f r Microsoft Windows Version 10.0.2288.42451 Update 2 QC Entry 38928 QC #: Date Reported: Area: 38937 1/18/2007 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TMouseEvent topic missing 1. Open the help. 2. Go to the index. 3. Enter TMouseEvent Expected: The TMouseEvent help topic to be selected. Actual: There is no TMouseEvent help topic, so the next one (TMouseButton Type) is selected. [QC Description] The TMouseEvent topic is missing from the help files. QC Entry 38937 QC #: Date Reported: Area: 39016 1/19/2007 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Context menu requires two clicks 0. start HL 1. File / New / Delphi .NET VCL app 2. Right click on a blank project area of the project manager to bring up the project manager context menu. 3. Move the mouse on the menu. Expected: The menu item under the mouse to be hot-tracked. Actual: The menu item is not hot-tracked. 4. Click on a menu item. Expected: The menu item to be clicked, and the action taken. Actual: The menu item is not clicked, and the action isn't taken, but now we have mouse tracking. Clicking again triggers the menu item to be clicked. Note - if you right click twice in the Project Manager, the second right click will bring up a menu that is mouse tracking immediately. [QC Description] The project manager context menu does not get mouse tracking. See steps for details. QC Entry 39016 QC #: Date Reported: Area: 39049 1/20/2007 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] Help missing for TPersistent.xaAbortRetaining and xaCommitRetaining 1) Placed cursor on the TADOConnection.Attributes.xaAbortRetaining component property. 2) Press F1. 3) Expected result - Help file for xaAbortRetaining. 4) Observed result - No help for TPersistent.xaAbortRetaining. [QC Description] Place cursor on various component properties and press the F1 key. QC Entry 39049 QC #: Date Reported: Area: 39183 1/23/2007 Documentation Description: Steps: [QC Short Description] Typos in "TTreeNodes" methods help topics [QC Description] There are typos in TTreeNodes methods help topics. These typos follow the same pattern: the actual parameter name that should be used in the description there is "Node". This applies to the following methods: Add, AddChild, AddChildFirst, AddChildObject, AddChildObjectFirst, AddFirst AddObject AddObjectFirst Insert InsertNode InsertObject For example: 1) In the "TTreeNodes.Add" help topic there is a typo: Is: "... specified by the Node parameter" Should be: "... specified by the Sibling parameter" 2) In the "TTreeNodes.AddObject" help topic there is a typo: Is:"... specified by the Node parameter" Should be:"... specified by the Sibling parameter" 3) In the "TTreeNodes.AddChildObject" help topic there is a typo: Is: "... specified by the Node parameter" Should be: "... specified by the Parent parameter" QC Entry 39183 QC #: Date Reported: Area: 39191 1/23/2007 IDE\Dialogs\Environment Options Description: Steps: [QC Short Description] Alignment and layout glitches in Environment Options dialog N/A [QC Description] See red marks in the attached screenshots for glitches locations. The scrollbar glitch is a rerun of an old one in QCs that keeps coming back (9751, 10318 and 38070) QC Entry 39191 QC #: Date Reported: Area: 39229 1/23/2007 Documentation\Help Output Description: Steps: [QC Short Description] Missing Topics for ActnRes.pas Fixed in Weaver ms-help://embarcadero.rs2010/vcl/ActnRes.html [QC Description] The following documentation topics are not included in the TOC / Index for the unit ActnRes.pas: and is in the TOC ActnRes.TStandardActions QC Entry 39229 QC #: Date Reported: Area: 39383 1/26/2007 VCL\Core VCL Classes\TThread Description: Steps: [QC Short Description] Unused Threadcount in classes.pas Scan classes.pas for 'ThreadCount'. You will only get three occurences. Listed below. implementation ... var ... ThreadCount: Integer; procedure AddThread; begin InterlockedIncrement(ThreadCount); end; procedure RemoveThread; begin InterlockedDecrement(ThreadCount); end; [QC Description] Classes.pas has a unit variable ThreadCount in the implementation that is added to and subtracted from. Only it is never used. And since it is in implementation it cannot be used outside this unit. So there is a useless blocking (interlockedexchange) call for every thread created and destroyed. It is likely old leftover code because in D5 classes.pas threadcount variable is really used, but D7 en D2006 classes.pas do not use it anymore. It cannot be for threadsafety as interlockedexchange only synchs the variable inc/dec, nothing else. Please remove it! QC Entry 39383 [Top Ten] QC #: Date Reported: Area: 39991 2/5/2007 Install Description: Steps: [QC Short Description] Installation should check that Delphi 2007 is running before uninstall and any modification [QC Description] Installtion should check that Delphi 2007 is running before uninstall and any modification. QC Entry 39991 QC #: Date Reported: Area: 40103 2/7/2007 Documentation Description: Steps: [QC Short Description] Parser and Documentation seem to be interfering Start a vcl-project. drop a button double click the button [QC Description] If the keyword is red underlined, the Doc will not found it. QC Entry 40103 NOTE: Error: No help found for context. apply anywhere caption := IntToStr(11); // may not be: Inttostr will be underlined (expected) try to press F1 for IntToStr to find the cause the error. It result an error instead of expected help. ////// This appears to be fixed in build 2516 - Leo Siefert QC #: Date Reported: Area: 40110 2/7/2007 VCL\Property/Type Editors Description: Steps: [QC Short Description] Make the openpicture dialog resizeable for the TImageList component editor 1. Start BDS 2. File / New / Win32 VCL Forms App 3. Add a TImageList to a form 4. double click ImageList to bring up the Component Editor 5. press the "Add" button to add a image/icon to the list. act: The dialog that comes up can not resized. exp: it is resizable [QC Description] Please make the Openfile dialog for the "Add" function on the ImageList component editor resizeable. The TOpenPictureDialog that is used can be resized nowadays, this should be easy to fix. Why is this needed? Its annoying when you have to add images/icons that are larger then 16x16 or use detailed view to see a preview of bitmaps etc.. There will be a lot to scroll and it gets harder to find that file your looking for. QC Entry 40110 QC #: Date Reported: Area: 40232 2/9/2007 IDE\Dialogs\Project Options Description: Steps: [QC Short Description] Please sort compiler messages list [QC Description] In Project Options|Compiler Messages the list of compiler messages is unsorted. As the list grows, it becomes quite difficult to find the one you are looking for. QC Entry 40232 QC #: Date Reported: Area: 40284 2/11/2007 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] The Project Manager always expands all items [QC Description] Using Spacely, when opening a Project Group with several Projects, all items in all projects are visible. Highly irritating. In Delphi 2006, the Project Manager remembered what was open. QC Entry 40284 QC #: Date Reported: Area: 40305 2/12/2007 IDE\Startup/Shutdown Description: Steps: [QC Short Description] Doubleclicking project or group should only load Win32 personality 1. Install BDS with all personalities (C++, C#, Win32, .NET). 2. Create a Win32 project and save it. 3. Close BDS. 4. Doubleclick the .bdsproj file. Wait while BDS loads all unneccesary personalities. [QC Description] When launching a Delphi Win32 project by doubleclicking its .bdsproj or .bdsgroup file, BDS should only load the personality the project uses, to save some loading-time. Alternatively, a configurator tool could be produced that allowed creating a launcher for this purpose. I did try to modify Windows File Types, but with no success. Manually creating a shortcut pointing to bds.exe does make it possible to launch using a single personality, but I don't have time to create a large number of such shortcuts. QC Entry 40305 QC #: Date Reported: 40803 2/18/2007 Description: Area: Compiler\Delphi\Language Steps: [QC Short Description] Allow Array Usage with Typed Pointer types [QC Description] Allow Array Usage with Typed Pointer types. If Cp is PChar then Cp[44] is allowed (using Cp as an array type), I would like other typed pointer types to also allow that syntax. For instance, if Dp is PDouble, then Dp[44] should be allowed. Compare this to Inc(Dp). This is allowed, and moves the pointer Dp SizeOf(Double) forward. QC Entry 40803 QC #: Date Reported: Area: 40817 2/18/2007 Description: Debugger\CPU Steps: [QC Short Description] "Trace into" does not reliable work in the CPU view -Start Spacely -Create a console application and change it to: program Project1; {$APPTYPE CONSOLE} uses SysUtils; begin end. -Place a breakpoint at the line with "begin" -Run the application -When the debugger stops at the breakpoint open the "Entire CPU" view. -Now use "Trace into" to step from instruction to instruction up to [QC Description] "call @InitExe" -The next "Trace into" will not step into the desired function but instead will execute the The "Trace into" function of the debugger does not reliable work in the CPU view. One cannot step into "special" complete application. functions like @InitExe. QC Entry 40817 QC #: Date Reported: 41034 2/21/2007 Area: Database\DBExpress Description: Steps: [QC Short Description] Please support Firebird database with the DBExpress driver None [QC Description] Please support Firebird database with the DBExpress driver. A huge percent of the Delphi community are Firebird users and are claiming for this. Or at least help the Firebird team to implement this support in DBX4. QC Entry 41034 QC #: Date Reported: Area: 41231 2/23/2007 Install\User Interface Description: Steps: [QC Short Description] Install icon looks bad at 48x48 On Vista: 1. Look in Install folder 2. Change to Icon view 3. Look at Setup.exe icon. At 48x48 it looks pretty bad [QC Description] The install icon looks pretty bad on Vista at 48x48. This is an issue because for an application to really look like a "Vista" app it needs to have a high color 48x48 icon. QC Entry 41231 QC #: Date Reported: Area: 41258 2/24/2007 IDE\Code Editor\Keymapping Description: Steps: [QC Short Description] Add a keystroke to close all other tabs 1. Start Spacely. 2. File/New/VCL Forms App. 3. After form appears, hit F12 to switch to Editor. 4. Click on a few units, and open them with Control+Enter. 5. Now, you want to close all but the currently open unit. You *have* to use the mouse to do it, cannot use the keyboard. [QC Description] When you have multiple files open in the editor, right-clicking on the tabs gives a local menu which has one option: Close all other tabs. There is no keystroke for it currently. Suggestion: Add one, for example Control+Shift+F4 (Control+F4 closes the currently open file). QC Entry 41258 QC #: Date Reported: Area: 41584 3/1/2007 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] GetComputerNameEx not available in Windows.pas [QC Description] There is a function in Kernel32 named GetComputerNameEx which would be nice to have built into Windows.pas. QC Entry 41584 QC #: Date Reported: Area: 41632 3/2/2007 Documentation\Help Output Description: Steps: [QC Short Description] Incorrect method names in TSQLConnection help Fixed in Weaver [QC Description] The methods CommitFreeAndNil and RollbackFreeAndNil appear as CommitAndFree and RollbackAndFreel in the help of TSQLConnection methods. QC Entry 41632 ms-help://embarcadero.rs2010/vcl/SqlExpr.TSQLConnection.CommitFreeAndNil.html QC #: Date Reported: Area: 41835 3/4/2007 Documentation\Help Output ms-help://embarcadero.rs2010/vcl/SqlExpr.TSQLConnection.RollbackFreeAndNil.html Description: Steps: [QC Short Description] Remote Debugger References References to C# and .Net deleted in ms-help://embarcadero.rs2010/rad/Preparing_Files_for_Remote_Debugging.html [QC Description] ms-help://borland.bds5/devcommon/remotedebugprepfiles_xml.html Note, we cannot provide a Delphi-only help, though improved filtering should help. Preparing Files for Remote Debugging Topic includes references to C++, C# and Delphi for .NET language which is correct for BDS, but not for Delphi 2007 which is only for Delphi for Win32 QC Entry 41835 QC #: Date Reported: Area: 42122 3/8/2007 Documentation\Online Help Description: Steps: [QC Short Description] The help for the memory manager is outdated and (in some places) wrong [QC Description] The online help for the memory manager should be updated to reflect the changes since the memory manager was replaced in BDS 2006. Example: ms-help://borland.bds5/devcommon/memorymanagementov_xml.html still refers to AllocMemCount and AllocMemSize, which no longer work. Attached is suggested documentation for the new memory manager. QC Entry 42122 QC #: Date Reported: Area: 42168 3/8/2007 IDE\Tool Palette Description: Steps: [QC Short Description] Add ability to rename category in tool palette [QC Description] Add ability to rename category in tool palette QC Entry 42168 QC #: Date Reported: Area: 42169 3/8/2007 Documentation Description: Steps: [QC Short Description] There is a lot of entries missed in Help Index [QC Description] There is a lot of entries missed in Help Index. For example Length, StrPas, StrToInt BlockRead, BlockWrite FloatToStr, Flush Assigned it looks like everything from System.pas completelly missed QC Entry 42169 QC #: Date Reported: Area: 42310 3/10/2007 IDE\Code Completion Description: Steps: [QC Short Description] Add support for scrolling lists displayed by Code Insight using the mouse wheel Press Ctrl+Space in any event handler (for a form) to invoke Code Insight. Try to scroll the list using the mouse wheel. It doesn't work! [QC Description] When code insight displays lists (properties, methods, etc) after typing a dot or being invoked manually, it should be possible to scroll the list using the mouse wheel, in addition to scrolling using the middle-mouse button (autoscroll). QC Entry 42310 QC #: Date Reported: Area: 42385 3/12/2007 VCL\Graphics Description: Steps: [QC Short Description] TGIFImage.Assign(TGIFImage) adds two copies of each frame instead of only one var Source, Target: TGIFImage; Bitmap: TBitmap; begin Source := TGIFImage.Create; Target := TGIFImage.Create; Bitmap := TBitmap.Create; // Load a bitmap - any bitmap Bitmap.LoadFromFile ('test.bmp'); // Convert bitmap to GIF with single frame. Source.Assign(Bitmap); ASSERT(Source.Images.Count [QC Description] = 1, 'Wrong number of frames in source'); // Copy GIF to GIF Target.Assign(Source); ASSERT When copying one GIF to another, via the TGIFImage.Assign method, the target GIF ends up containing each of (Target.Images.Count = 1, 'Wrong number of frames in target'); end; // Exp: No error // Act: Assertion faillure: the source frames twice. Wrong number of frames in target The cause of the problem is that the code in TGIFImage.Assign assumes that TGIFFrame.Create doesn't add the frame to the parent TGIFImage and that TGIFImage.Add does. This was true in the old version but not in the new. The following modification fixes the problem (+ means add line, - means delete line): procedure TGIFImage.Assign(Source: TPersistent); ... for i := 0 to TGIFImage(Source).Images.Count-1 do begin {-} Image := TGIFFrame.Create(Self); {-} Image.Assign(TGIFImage(Source).Images[i]); {-} Add(Image); {+} Add(TGIFImage(Source).Images[i]); Progress(Self, psRunning, MulDiv(i+1, 100, TGIFImage(Source).Images.Count), False, Rect(0,0,0,0), sProgressCopying); end; ... QC Entry 42385 QC #: Date Reported: Area: 42389 3/12/2007 VCL\Graphics Description: [QC Short Description] TGIFImage and TGIFFrame should provide means to free the cached bitmap, mask and palette GDI objects. [QC Description] This functionality is needed by applications that can potentially load and display large number of GIFs. Since an animated GIF can contain a large number of frames, and each frames uses up to two bitmap handles and one palette handle, apllications that needs to display arbitrary number of animated GIFs must be able to limit the GDI resource usage. Most of the required functionality already exist, it just need to be made accesible. The following proposed change introduces two public methods, TGIFImage.Dormant and TGIFFrame.Dormant. The methods releases cached GDI resources. 1) Introduce the TGIFFrame FreePalette strict protected method and the Dormant public method: procedure TGIFFrame.FreePalette; begin if (FLocalPalette <> 0) then begin DeleteObject(FLocalPalette); FLocalPalette := 0; end; end; procedure TGIFFrame.Dormant; begin FreeBitmap; FreeMask; FreePalette; end; 2) Introduce the TGIFImage FreePalette and FreeBitmap strict protected methods and the Dormant public method: procedure TGIFImage.FreeBitmap; begin Steps: StopDraw; FreeAndNil(FBitmap); end; procedure TGIFImage.FreePalette; begin if (FGlobalPalette <> 0) then begin DeleteObject(FGlobalPalette); FGlobalPalette := 0; end; end; procedure TGIFImage.Dormant; var i: integer; begin FreeBitmap; FreePalette; for i := 0 to FImages.Count-1 do FImages[i].Dormant; end; QC Entry 42389 QC #: Date Reported: 42577 3/14/2007 Description: Area: VCL Steps: [QC Short Description] SetWindowLongPtr not supported [QC Description] Certain Win32 API functions are still not supported. One of these is SetWindowLongPtr added by Sysop. <<<<<<<<<<<<< The declaration for SetWindowLongPtr has been added since Delphi 2009. >>>>>>>>>>>>> QC Entry 42577 QC #: Date Reported: 42891 3/20/2007 Area: Compiler Description: Steps: [QC Short Description] F2084 Internal Error: AV0542F601-R00000000-0 1. Start IDE, create a new console project and paste the following code: program Project1; {$APPTYPE CONSOLE} uses SysUtils; type { INTERNAL ERROR if GetItemCount is commented out ([DCC Error] Project1.dpr(13): F2084 Internal Error: AV0542F601-R00000000-0). There should be a more graceful error message } IUpdateableItemInfo = interface( IInterface ) // function GetItemCount: Integer; property ItemCount: Integer read GetItemCount; end; begin try WriteLn( 'hello' ); ReadLn; except on E:Exception do Writeln (E.Classname, ': ', E.Message); end; end. 2. Compile exp: compiler error about undeclared identifer GetItemCount act: internal error F2084 [QC Description] Compiling the console program shown in Steps leads to the internal error. Of course there is an error in the code, but there should be a more graceful message. QC Entry 42891 QC #: Date Reported: Area: 42929 3/21/2007 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] While need 2 click on context menu of undocked PM right-click in blank area of PM for General context menu (toolbar, show path, etc. [optinal - right-click at a different location in PM and Exp results will now occur] move mouse over menu Exp: Selection highlight will move with mouse Act: no selection highlight Click on a menu item Exp: Item will be checked or unchecked Act: Selection highlight shows and begins to track mouse movements Click on item again - now item is checked/unchecked [QC Description] Click on a blank area for its general context menu (for show toolbar, statusbar, etc). While the mouse-coursor is moving the highlighting is change dinamically as expected, the checked/nonchecked status of a highlighted item will change at the 2nd click on it. QC Entry 42929 QC #: Date Reported: Area: 42974 3/21/2007 IDE\Dialogs\Environment Options Description: Steps: [QC Short Description] Improve Tools, Options UI (allow dialog to resize or other UI changes) Start Delphi 2007 Tools, Options Click around in the options tree and notice some ot the options screens seem cramped in the existing small dialog (see the list in the Description for details) I've attached screenshots of how this dialog looks once it is made resizable, and I think the results are nicer [QC Description] I've listed all of the options areas of the Tools Options dialog that I consider more difficult to use because the UI seems cramped inside the existing smallish dialog. I believe an alternate UI for those areas of the settings, or allowing this dialog to resize would make this dialog more usable. The first 4(*) items in the list would give me a significant benefit, because I believe developers use them more frequently. Tools (Environment) Options (Ignoring Together) -----------------------------------------------------------------------------Significant Benefit (central portion could resize, less scrolling, etc.): - Library Win32 (path lists)* - Environment Variables (variable lists)* - Color (syntax preview)* - Language Exceptions (exception list)* - Native OS Exceptions (exception list) - Event Log (color listbox very cramped) Minor Benefit: - Environment Options (paths) - Object Inspector (color listbox) - Explorer (explorer categories) - CodeGear Debuggers (paths) Little/No Benefit: - Tool Palette - Colors - Type Library - VCL Designer - Editor Options - Source Options (could resize, but large enough now) - Display - Key mappings (could resize, but large enough now) - Code Insight - Debugger Options I'm happy to accept a better/alternate UI instead of resizing, if CodeGear can come up with one that performs the same function in less space, but resizing is the bet option I've imagined so far. QC 9751 kind of requested this (in the title at least), but was marked as a duplicate of an only vaguely related bug. QC Entry 42974 QC #: Date Reported: Area: 43075 3/23/2007 IDE Description: Steps: [QC Short Description] When Setup.exe is not present, and the IDE is set to check for updates, the message show in the Auto Run pane is not correct [QC Description] It says: "Setup.exe(1): The window does not have scroll bars" Double clicking that message does show the proper message. QC Entry 43075 QC #: Date Reported: Area: 43200 3/25/2007 Database\dbExpressCore Description: Steps: *** See Resolution thread on what will be fixed and what could be reproduced. -Steve [QA Note] I'm still trying to put together a reproducible test case [/QA] [QC Short Description] dbxadapt30 does not communicate all connection parameters to driver [QC Description] BDS2006 communicates the following connection parameters to a driver during connecting: 1. eConnCommitRetain 2. eConnAutoCommit 3. eConnTxnIsoLevel 4. eConnTrimChar 5. eConnCustomInfo 6. eConnTimeOut 7. eConnBlobSize 1. put connection on form, connect to a dbx3 driver 2. put query on form 3. set breakpoint in driver's Connection.SetOption method to see what it gets 4. execute query 5. see only the following options set: - eConnCommitRetain - eConnTxnIsoLevel (always 0!) - eConnTrimchar all other are missing. Delphi2007/dbxadapt30 only communicates the following parameters: 1. eConnCommitRetain 3. eConnTxnIsoLevel (always 0!) 4. eConnTrimchar makes working with dbx3 drivers a problem. Especially the Transaction Isolation level is always 0 (xilReadCommited) and there is no way to set it to DirtyRead. QC Entry 43200 QC #: Date Reported: 43212 3/25/2007 Area: Database\TParams Description: Steps: [QC Short Description] DB.Pas/TParam.GetDataSize,GetData and SetData do not handleftLargeInt TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_249213 [QC Description] While TField does support Int64/ftLargeInt data type, TParam does not handle these yet. TParam.GetDataSize, TParam.GetData and TParam.SetData all are missing cases for ftLargeInt. QC Entry 43212 [QA Notes] This issues existed in BDS 2006 as well, but has a test case submitted. See TDBXBugsSuite.Native for reproducible test case: TDBXBugsSuite.Native.exe -s:oRaid_249213 [/QA Notes] 1. put TSQLQuery on a form 2. connect it to a driver that support ftlargeInt 3. execute a query that inserts a int64 via parameters (set the parameters datatype to ftLargeInt) 4. message is: field "xxx" is of an unsupported type. QC #: Date Reported: Area: 43213 3/25/2007 IDE\Dialogs\Environment Options Description: Steps: [QC Short Description] User defined Environment Variables are semi-accessible until restart of IDE See steps for detailed instructions on how to see this behavior. QC Entry 43213 01) Start Delphi 2007 02) File->New->VCL Forms Application - Delphi for Win32 03) File->Save All 04) Create a new folder named TEST 05) Select that folder 06) Create a new folder named SRC 07) Create a new folder named OUT 08) Select the SRC folder and accept file name defaults for both unit and project You should now have a TEST\SRC and TEST\OUT with the files saved in TEST\SRC 09) Tools->Options->Environment Options->Environment Variables 10) Click New on the bottom and add a new Environment Variable named PRJ with the value set to the full path of the SRC folder created in step 4 11) Close that dialog and go to Project->Options->Directories/Conditionals 12) Set "Output directory" and "Unit output directory" to this: $(PRJ) \..\OUT 13) Close and do a Project->Build Project (Shift-F9) Exp.: Generated DCU/EXE to be in the OUT folder inside TEST; Act.: Generated files were created inside \OUT (from the root of that drive) 14) Press F9 (or Project->Run) Exp.: The generated EXE to be executed Act.: Error message shown in attached FM43213A.PNG (Could not find program, '...Projects\TEST\OUT\Project1.exe') The compiler completely ignored the $(TEST) variable, but the IDE tried to use it to run the program. QC #: Date Reported: Area: 43484 3/30/2007 [QC Description] There is *no* mention, nor in the dialog that allows to define them, nor in the help file of this behavior. Also, some "parts" of the IDE accept that variable instantly (see step 14), while others require a restart for that variable to be in effect, hence the "bug" report. Compiler\Delphi Description: Steps: [QC Short Description] METHODINFO OFF incorrectly also sets TYPEINFO OFF // This works : {$TYPEINFO ON} {$IFOPT M-} {$MESSAGE FATAL 'TYPEINFO shouldn''t be off here!'} {$ENDIF} // This failes : {$TYPEINFO ON} {$METHODINFO OFF} {$IFOPT M-} {$MESSAGE FATAL 'TYPEINFO shouldn''t be off here!'} {$ENDIF} [QC Description] The compiler makes a mistake when METHODINFO is turned off; TYPEINFO is incorrectly turned off also! PS: How can one detect if METHODINFO is on or off? This seems to be impossible (just like HINTS and WARNINGS cannot be detected for years now...) QC Entry 43484 QC #: Date Reported: Area: 43613 4/1/2007 IDE\Unit Testing\Test Case Wizard Description: Steps: [QC Short Description] DUnit Test application leaks memory when run as console application Compile and run the attached project from within the IDE. [QC Description] TestTestRunner.RunRegisteredTests returns an instance of TTestResult which is not freed. The code generated by the Dunit Wizard look like this. begin Application.Initialize; if IsConsole then TextTestRunner.RunRegisteredTests else Act: A memory leak report from FastMM (UnitTest_MemoryManager_EventLog.txt) Exp: No report GUITestRunner.RunRegisteredTests; end. It should probably look something like this instead. begin Application.Initialize; if IsConsole then with TextTestRunner.RunRegisteredTests do Free else GUITestRunner.RunRegisteredTests; end. QC Entry 43613 QC #: Date Reported: Area: 43703 4/3/2007 Debugger\Breakpoints Description: Steps: [QC Short Description] Possibility to hide toolbar in breakpoint window Open the Breakpoint List (View>Debug windows>Breakpoints). Notice the big toolbar taking up mutch space. Try to hide the toolbar. [QC Description] The toolbar in the breakpoint window takes up the space of two breakpoints. Those that knows the keyboard keys to create new breakpoints etc. may not want to use up space on this toolbar. There is possibility to remove the captions on the toolbar, but this does not help because the toolbar still has the same vertical size. If a possibility for hiding the toolbar was provided (mutch like the existing possibility to hide columnheader inside the watch list), that would give more room for listing breakpoints without having to scroll. Screenshot of breakpoint window and watchlist attached. QC Entry 43703 QC #: Date Reported: Area: 43762 2/28/2007 IDE\Start Page Description: Steps: Personality is being reported as "other" when you Show Recent Projects + Install latest build + Create a couple of projects + Click File | Close All + Go to the welcome page + Click Show Recent Projects link + Examine the project list for the projects you created //exp: Personality: Delphi Win32 //act: Personality: other QC #: Date Reported: Area: 44304 4/12/2007 IDE Description: Steps: [QC Short Description] Macro expansions in Configure Tools don't expand 1. Make sure you have a project open, so there will be a project name for the macro to expand. 2. Go to Tools > Configure Tools... 3. Click Add... 4. For Title, type "Test" (no quotes). 5. For Program, type "cmd.exe" (no quotes). 6. For Parameters, type "/k echo /path:$PATH($PROJECT)" (no quotes). 7. OK out of everything. 8. [QC Description] Go to Tools > Test. This will run the ECHO command, and then leave a command prompt open so you can see When you add an item to Configure Tools and try to add macro expansions like $PATH($PROJECT) or ECHO's output. Expected: should output something like "/path:C:\Documents and Settings\UserName\My $EDNAME, they only work when preceded by a space. This makes it impossible to launch certain tools from the Documents\Borland Studio Projects\". Actual: outputs "/path:$PATH". If you put a space between "/path:" and Tools menu. "$PATH($PROJECT)", it expands the path as expected; however, some external tools (e.g. TortoiseProc.exe, part of TortoiseSVN) require that there be no space after "/path:". (It doesn't get any better when you try to For example, TortoiseSVN requires a parameter of the form /path:c:\path\filename. This would require a make Delphi quote the path correctly...) command-line parameter of the form /path:$PATH($PROJECT) but this doesn't work: Delphi simply passes the literal text "/path:$PATH" on the command line, instead of expanding it to "/path:c:\svn\myproject". (It's not clear what happens to the "($PROJECT)" part of the command line.) QC Entry 44304 QC #: Date Reported: Area: 45050 4/25/2007 IDE\Start Page Description: Steps: [QC Short Description] No way to remove dead project links in start page Environment: XP - sp2 IE -7 1)Create a new project and save it in the desktop. 2)Close the IDE. 3)Delete the newly created project from the desktop. 4)Open the IDE and click the non-existing project link. Expected: An Error msg about the missing project file and link from the page getting removed. Actual : Error msg without the link getting removed from the start page. [QC Description] When a project is delete from the disk, there is no way to remove its link from the start page. When I click on the non existence project link, an error msg comes up but the project name is not removed from the welcome page's project list. QC Entry 45050 Changed to Delphi as this affects all Personalities. QC #: Date Reported: 45072 4/26/2007 Area: Compiler\Delphi\Language Description: Steps: [QC Short Description] Class constructors in Delphi/Win32 I would like to be able to write code for Delphi/Win32 that looks like the following example (Singleton pattern). Currently, I have to make the class var "private" instead of "strict private", and initialize it in the unit initialization section. This works, but it's poor encapsulation: the code for my class is not all with the class, and I have to use a weak visibility specifier (private) instead of a properly encapsulated visibility (strict private). -------- unit Comparers; interface type IComparer = interface function Compare(A, B: string): Integer; end; TDefaultComparer = class(TInterfacedObject, IComparer) strict private class var FInstance: IComparer; public class constructor Create; function Compare(A, B: string): Integer; class property Instance: IComparer read FInstance; end; implementation uses SysUtils; { TDefaultComparer } function TDefaultComparer.Compare(A, B: string): Integer; begin Result := AnsiCompareStr(A, B); end; class constructor TDefaultComparer.Create; begin // run at the same time as all unit initialization, // but has access to strict private & strict protected members FInstance := TDefaultComparer.Create; end; end. [QC Description] It would be nice if Delphi for Win32 supported the "class constructor" syntax that is already supported in Delphi for .NET. This would basically be another "initialization" section (and run at the same time as all other "initialization" sections), but it would be scoped to the class, and therefore better encapsulated (both with regards to member visibility, and just from the viewpoint of having all of the code that relates to the class as part of the class). This would be particularly helpful for implementing the Singleton pattern for simple and/or null objects. See Steps. QC Entry 45072 QC #: Date Reported: Area: 45125 4/27/2007 IDE\Tool Palette Description: Steps: [QC Short Description] Show package for component From Nick: Ideas for implementation could be to have the hint on the Tool Palette show the package, or the hint on the form designer? [QC Description] The hint could tell them: Please make it possible to start from a component, and find which package FILE (.bpl) contains it; at the moment it is difficult to determine which BPLs need distributing/installing on anothe IDE to provide the component. Unit name Runtime package RAised as I use a few JVCL comonents, and currently end up installing everything as I can't determine which Designtime Package packages I actually need. QC Entry 45125 QC #: Date Reported: Area: 45243 3/14/2007 Install Description: Steps: Registered DisplayName of Uninstallation is just "RAD Studio", isn't it "CodeGear RAD Studio"? // see attachment or 1. Install 11.0.2627.5503.1 2. Invoke Uninstall from Control Panel // ACT: see RAD Studio // EXP: see CodeGear RAD Studio QC #: Date Reported: Area: 46095 5/16/2007 IDE\Code Editor Description: Steps: [QC Short Description] Show some notification when file is readonly 1. Open a file (.h or .cpp) in code editor 2. Right click the page, select "Read Only" It's better to give some visual feedback when file is readonly. for example, changing its icon or simply showing "[ReadOnly]" in the page tab. [QC Description] There is no visual feedback when file is readonly. QC Entry 46095 NOTE: it says Read Only at the bottom of the editor QC #: Date Reported: Area: 46143 5/17/2007 IDE\Open Tools API Description: Steps: [QC Short Description] Folding API is severely limited. Attempt to create a custom key binding that provides features available in current keybindings, such as : Toggle Current: Ctrl+Shift+K T. Expand All: Ctrl+Shift+K A. Collapse All: They make this one painful; you have to specify what you want to collapse. Collapse all classes: Ctrl+Shift+K C. Collapse all methods: Ctrl+Shift+K M. Collapse namespace/unit: Ctrl+Shift+K N. Collapse nested procedures: Ctrl+Shift+K P. Collapse regions: Ctrl+Shift+K R. The IOTAElideActions interface fails to provide adequate functionality. [QC Description] It is impossible to use the current Open Tools API to create a custom keybinding that affects code folding. IOTAElideActions does not let you determine in the nearest block is folded or not, and does not provide any of the following options: Collapse all classes Collapse all methods Collapse namespace/unit Collapse nested procedures Collapse regions Since you can not determine if the current folding block is folded or not, toggling functionatly can't be provided either. QC Entry 46143 QC #: Date Reported: Area: 46198 5/18/2007 IDE\Structure Pane Description: Steps: [QC Short Description] Structure Pane is not Refreshed on it first display (Code view) [QC Description] Structure pane is not Refreshed on it first display (Code view) Start Spacely, open a VCL App Tools | Options | Editor Options | Code Insight, disable Error Insight and close Delphi. Start Spacely From the Main menu, create a new VCL Application Form - Delphi for Win32 Press F12 Key to display the Code + Code Structure View I've disabled Error Insight I'm using the default layout QC Entry 46198 Act : Structure view is empty Expt : Should display all the Objects Workarraound : Press twice F12 (to Display the Form and then the Code). Structure view is now refreshed QC #: Date Reported: Area: 46310 5/21/2007 Internet\XML\Data Binding Description: Steps: [QC Short Description] XML Data Binding doesn't create valid source on derived element Open the attached Word document with screenshots of the structure of the attached XSD files. 1. Try first the XML Data Binding Wizard with the attached file DelphiXSDText.xsd. The code produced will not compile. 2. The next file, DelphiXSDTest2.xsd, has a dummy element added - and then everything is ok. [QC Description] Look at the attached files and Steps. This problem seems to be apparent only when deriving complex types. QC Entry 46310 QC #: Date Reported: Area: 46313 5/21/2007 Internet\XML\Data Binding Description: Steps: [QC Short Description] XML Data Binding fails when including and deriving 1. Run the wizard on the attachedfile: DelphiXSDTestDerived.xsd. You will then se that the code for the BaseType complex element, from the file DelphiXSDTestBase.xsd, is not included in the generated unit. The code will terefore not compile. [QC Description] The wizard will fail to create the source for the base class in the unit, when the element is derived from another included XSD. This is true only if extending the base element. Nick Adds: Actually, when opening the file, I get repeated errors: QC Entry 46313 --------------------------Error --------------------------The system cannot locate the object specified. Line: 0 --------------------------OK Details >> --------------------------- QC #: Date Reported: Area: 46527 5/24/2007 RTL\Delphi\WinAPI Description: [QC Short Description] Missing Windows API Calls Steps: [QC Description] Many of the "Newer" windows API calls are missing completely from the codegear sources.. They are available using the JEDI Windows API headers (JWA), but these cause other issues (such as incompatible calling types with the windows.pas unit). Missing Functions: (not meant to be a complete list) 1. Replacefile - (in source already) 2. WinSock2 calls (yes these are in the Indy libs, but why not in a "regular" delphi winsock2 header unit) 3. UnregisterWaitEx - (in source already) 4. DeleteTimerQueueTimer 5. RegisterWaitForSingleObject - (in source already) 6. CreateTimerQueueTimer 7. GetComputerNameEx - (in source already) 8. VerifyVersionInfo 9. UnregisterWait - (in source already) Basically it appears that much of what M$ documents as requiring _WIN32_WINNT to be defined as 0x0500 (or higher) has no entry in the delphi units.. QC Entry 46527 QC #: Date Reported: Area: 46922 6/1/2007 Install\Files Description: Steps: HelpInstf and ExtCtrls are debug DCU. Compare the files in lib and lib\debug Old descritpion [QC Short Description] 493 DCUs are wrongly installed for German installation // other steps 1. Launch Delphi2007(German or French or Japanese edition). 2. File | New | VCL Form Application - Delphi for Win32 3. Project | Options | Compiler Confirm not checking to 'Use debug DCUs' in debugging. 4. Down [F7] or Run | Trace Into Debugger is tracing in Sysint.pas. (English edition is not tracing in Sysinit.pas) [QC Description] In the German installation of Delphi 2007 Prof. there are 493 DCU files wrongly installed. 489 DCU files in the lib and lib\debug directory are identical 4 DCU files in lib and lib\debug directory have smaller debug DCUs (what indicates that there is something stange because debug units normally are larger due to the additional debug information) QC Entry 46922 // Comment C.Yonezawa Japanese Edition is same too. Perhaps French will be same too. QC #: Date Reported: Area: 46942 6/2/2007 IDE\Help Description: Steps: [QC Short Description] No help about dbExpress isolation levels Open the help index. Type in TTransactionDesc and read the topic. Then wonder where to find out what these isolation level each mean... [QC Description] The help about TTransactionDesc mentiones the IsolationLevel property but offere no clue where one can find out the values and their exact meanings of the different isolation levels for the different supplied dbExpress drivers. QC Entry 46942 QC #: Date Reported: Area: 47242 6/8/2007 IDE\Code Editor Description: Steps: [QC Short Description] Possible AV when shutting down the IDE close delphi [QC Description] In certain cases, an AV will occur when shutting down the IDE. The attachments are from an automated incident report. Zugriffsverletzung bei Adresse 209D35A3 in Modul 'coreide100.bpl'. Lesen von Adresse 00000018. QC Entry 47242 QC #: Date Reported: Area: 47654 6/17/2007 Install\Files Description: Steps: [QC Short Description] Easier way to get files for command line compilation in a different language [QC Description] I don't think that I am the only one that needs the english lib files for command line compilation but wants to use a non english IDE. The IDE is the german one in my case and I need the english lib files for the JEDI VCS binaries. I order to get the english files I had installed D2007 in a virtual machine and that is very time consuming. It would be good if the installer had an option (or options) to install all necessary files for command line compilation into a separate directory. QC Entry 47654 QC #: Date Reported: Area: 47956 6/22/2007 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Random paths are prepended to .dcp references 1. Create the following directories: C:\MyPackage C:\MyPackage\Subdir 2. Click File | New | Package - Delphi for Win32. 3. Click File | Save All. Save the package as: C:\MyPackage\Package1.dproj 4. With the IDE still open, view Package1.dproj in Notepad. Notice the line: <DCCReference Include="rtl.dcp" /> No problem yet... 5. Back in Delphi, click File | New | Unit - Delphi for Win32. 6. Click File | Save. Save the file under the Subdir directory as: C:\MyPackage\Subdir\Unit1.pas 7. Click File | Save All. 8. View Package1.dproj in Notepad. This time we see: <DCCReference Include="Subdir\rtl.dcp" /> <DCCReference Include="Subdir\Unit1.pas" /> Notice how "rtl.dcp" has changed to "Subdir\rtl.dcp". Obviously this is wrong. rtl.dcp isn't located under Subdir; it's in the Delphi "lib" directory. Now try this: 1. Close and reopen the Delphi IDE. 2. Click File | Reopen | C:\MyPackage\Package1.dproj. 3. In the Project Manager pane, right-click Package1.bpl and click Save. 4. View Package1.dproj in Notepad. Now we see: <DCCReference Include="C:\Documents and Settings\Username\Desktop\rtl.dcp" /> <DCCReference Include="Subdir\Unit1.pas" /> So apparently it just prepends the current directory onto .dcp references? Expected behavior: It should always write "rtl.dcp" with no path. [QC Description] Inside .dproj files, random paths are prepended to .dcp references when a package is saved. This is a new issue with Delphi 2007's .dproj files. It didn't happen with Delphi 2006's .bdsproj files. See Steps for details. QC Entry 47956 QC #: Date Reported: 48227 6/28/2007 Area: Database Description: Steps: [QC Short Description] Compile the attached program below. Duplicate "DecimalSeparator" See the following unexpected compile-time error. [QC Description] duplicity "DecimalSeparator" Error: E2036 Variable required SysUtils line 624 var - DecimalSeparator: Char; SqlConst line 57 const - DECIMALSEPARATOR = 'Decimal Separator'; { Do not localize } QC Entry 48227 program BTS252023; {$APPTYPE CONSOLE} (JJS: Not seen in build 14.0.3455.22156) uses SysUtils, SqlConst; begin if @SysUtils.DecimalSeparator = @DecimalSeparator then WriteLn('PASS') else WriteLn('FAIL - DecimalSeparator redeclared in SqlConst'); end. QC #: Date Reported: Area: 48593 7/5/2007 Documentation Description: Steps: [QC Short Description] No link to AssignFile and related keywords Type "AssignFile" into 'Look for' exp: Found the keyword for the I/O routin act: No link to Type AssignFile, while ms-help://borland.bds5/devcommon/standardroutinesov_xml.html exists in the documentation. This page give a list of Input and output procedures and functions , but index seem to be lack of issues to have a link to these keywords. [QC Description] Type "AssignFile" into 'Look for' QC Entry 48593 QC #: Date Reported: Area: 48605 7/5/2007 Compiler\Delphi\Code Generation/Optimization Description: Steps: REGRESSION FROM DELPHI 7 Compile and run the following Win32 console program: //-------------------------------------------------------------------------- program Project2; {$APPTYPE CONSOLE} uses SysUtils; {$OVERFLOWCHECKS ON} var I: Integer = MaxInt - 1; begin try I := -I; Writeln(I); except on E: Exception do Writeln(E.Classname, ': ', E.Message); end; Readln; end. //--------------------------------------------------------------------------- exp output: EIntOverflow: Integer overflow act output: -2147483648 [QC Short Description] Negation of -MaxInt-1 does not cause integer overflow error. [QC Description] If you negate a value of -MaxInt - 1, overflow is not checked, and no overflow error is generated, even if overflow checks are on. Looking at the CPU window, one sees that no overflow checking code is generated: neg dword ptr [I] instead of: neg dword ptr [I] jno +$5 call @IntOver In D7, the error checking code is generated and the program will cause an overflow error. QC Entry 48605 QC #: Date Reported: Area: 49323 7/19/2007 IDE\Dialogs\Project Options Description: Steps: [QC Short Description] Change compiler options for all projects in a group at once [QC Description] I have a projectgroup with about 20 projects, all using the same compiler settings. If one setting have to be changed, it must be applied manually to all 20 projects. I like to change the settings for all the projects at one time. The existing possibility of using an include file is not preferred, because all the projects have to include that file and it's not directly clear wich settings are used by the compiler. QC Entry 49323 QC #: Date Reported: Area: 49625 7/26/2007 Documentation\Online Help Description: Steps: [QC Short Description] Many unit constants and variables lack links to their explanation Open online help topic ms-help://borland.bds5/delphivclwin32/!!VARIABLES_Variants.html exp: links to decriptions of variables act: no links [QC Description] One example: ms-help://borland.bds5/delphivclwin32/!!VARIABLES_Variants.html << Name Description BooleanToStringRule This is variable Variants.BooleanToStringRule. ChangeAnyProc This is variable Variants.ChangeAnyProc. ClearAnyProc This is variable Variants.ClearAnyProc. EmptyParam This is variable Variants.EmptyParam. NullAsStringValue This is variable Variants.NullAsStringValue. Yeah well, I guess we would like to know what they contain, so they should be linked to the topics. E.g. BooleanToStringRule should link to: ms-help://borland.bds5/delphivclwin32/Variants_BooleanToStringRule1.html Etc. QC Entry 49625 QC #: Date Reported: Area: 49897 8/1/2007 Documentation Description: Steps: [QC Short Description] Iteration Over Containers Using For statements ms-help://borland.bds5/devcommon/declarationsandstatements_xml.html (JJS: See workaround on the QA tab for an example that compiles) [QC Description] This part of code generate a compiler error message: // Iterating over a dynamic array IDynArray := IArray1; for I in IDynArray do begin // Do something with I... end; [DCC Error] uMain.pas(80): E2010 Incompatible types: 'TGenericIntArray' and 'Array' QC Entry 49897 QC #: Date Reported: Area: 49996 8/3/2007 Compiler\Delphi\Language Description: Steps: [QC Short Description] Closures / lambda / anonymous functions. (Functional programming) [QC Description] Please implement closures / lambda / anonymous functions. Because the topic is (I presume) widely known, I don't insist now in benefits or in syntax descriptions. Of course, this can be implemented in Delphi using a CG like Boehm. Related to this, explore also this possibility to have unmanaged program elements and managed ones - but this is another topic. My small proposal is to use an attribute like 'closure' (syntax is subject to change, of course) which will create behind the scenes an object which will be passed, as needed. For ex.: function Func1(aStr: string; aInt: integer): string; closure; Will create internally something similar with the following structure TFunc1 = class(TBaseClosure) ... Public _Context: somepointer; //the pointer to the context in which the code is executed aStr: string; //the parameters with the appropriate type aInt: integer; Execute: string; // the result has the appropriate type //for a procedure is a method here with no result end; {var} Func1: TFunc1; In short, we can see a closure declaration like a much more concise way to declare classes. If someone has in his code ShowMessage(Func1('Test', 1)); the compiler will check if Func1 points to nil, if yes, then create the object, load the parameters in the object's fields, (or pass a pointer there if we speak about variable parameters) and execute the code returning the result (if appropriate). In fact, it's a usual way to simulate the closures, but without the overhead which is required from the programmer's POV regarding the object's lifecycle management, class declaration, code flexibility aso. As we saw, the 'closures' are created automatically at first call; they can be freed manually by invoking Func1.Free, which also must set the Func1 pointer to 'nil' in order to allow their safe re-creation on a new, possible call. If they aren't freed, the compiler must free them at the program termination. Also, explore the possibility of freeing them earlier (when they got out of scope etc.) but, imho, because, usually, the overhead by not freeing them is very little (in normal conditions), by simply freeing them at the program termination is already a very good solution. Hth. QC Entry 49996 QC #: Date Reported: Area: 50261 8/8/2007 RTL\Delphi\WinAPI Description: [QC Short Description] System.pas calls _isNECWindows function in the initialization section [QC Description] System.pas calls _isNECWindows function in the initialization section. _isNECWindows in turn calls GetKeyboardType(), which should not be called in an initialization section of a dll (exe is Ok). This results in application hang under certain conditions (not readily reproducible, depends on the current Windows state at the moment). Firstly, it is not safe to call *any* Windows API function in a dll loader section, secondly, AFAIK that function only applies to Windows 95. Below is call stack of outlook.exe loading OutSpy.dll (written in Delphi) which in turn calls GetKeyboardType from the system.pas initialization section: > ntdll.dll!_KiFastSystemCallRet@0() Line 547 Asm ntdll.dll!_ZwWaitForSingleObject@12() Line 2371 + 0xc bytes Asm ntdll.dll!RtlpWaitOnCriticalSection(_RTL_CRITICAL_SECTION * CriticalSection=0x00000000, long Increment=4) Line 619 C ntdll.dll!RtlEnterCriticalSection(_RTL_CRITICAL_SECTION * CriticalSection=0x77ce8078) Line 870 C rpcrt4.dll!LoadableTransportInfo(unsigned short * DllName=0x00254908, unsigned short * RpcProtocolSequence=0x002546c0, TRANS_INFO * * pTransInfo=0x0013cb4c) Line 2688 C++ rpcrt4.dll!OsfMapRpcProtocolSequence(int ServerSideFlag=2443528, unsigned short * RpcProtocolSequence=0x002546c0, TRANS_INFO * * ClientTransInfo=0x0013cb4c) Line 16150 C++ rpcrt4.dll!DCE_BINDING::CreateBindingHandle(long * Status=0x0013cb64) Line 1739 C++ rpcrt4.dll!RpcBindingFromStringBindingW(unsigned short * StringBinding=0x002407d0, void * * Binding=0x0013cbe8) Line 268 C++ advapi32.dll!RpcpBindRpc(unsigned short * ServerName=0x00000000, unsigned short * ServiceName=0x77f642e4, unsigned short * NetworkOptions=0x00000000, void * * pBindingHandle=0x0013cbe8) Line 223 + 0xa bytes C advapi32.dll!PLSAPR_SERVER_NAME_bind(unsigned short * ServerName=0x00000000) Line 70 C rpcrt4.dll!GenericHandleMgr(const _MIDL_STUB_DESC * pStubDesc=0x77f618b8, unsigned char * ArgPtr=0x00000000, const unsigned char * pFormat=0x77f639be, unsigned int Flags=8, void * * pGenericHandle=0x0013cd94) Line 141 + 0x4 bytes C++ rpcrt4.dll!ExplicitBindHandleMgr(const _MIDL_STUB_DESC * pStubDesc=0x77f618b8, unsigned char * ArgPtr=0x0013d030, const unsigned char * pFormat=0x77f639be, void * * pSavedGenericHandle=0x0013cd94) Line 387 C++ rpcrt4.dll!NdrClientCall2(const _MIDL_STUB_DESC * pStubDescriptor=0x77f618b8, const unsigned char * pFormat=0x77f639b4, ...) Line 1005 + 0xd bytes C++ advapi32.dll!LsarOpenPolicy2(unsigned short * SystemName=0x00000000, _LSAPR_OBJECT_ATTRIBUTES * ObjectAttributes=0x0013d09c, unsigned long DesiredAccess=2048, void * * PolicyHandle=0x0013d05c) Line Steps: 857 + 0x16 bytes C advapi32.dll!LsaOpenPolicy(_UNICODE_STRING * SystemName=0x00000000, _OBJECT_ATTRIBUTES * ObjectAttributes=0x0013d09c, unsigned long DesiredAccess=2048, void * * PolicyHandle=0x0013d0d8) Line 249 + 0xe bytes C advapi32.dll!LookupAccountNameInternal(const unsigned short * lpSystemName=0x00000000, const unsigned short * lpAccountName=0x771f3f9c, void * Sid=0x00248410, unsigned long * cbSid=0x0013d140, unsigned short * ReferencedDomainName=0x002541e0, unsigned long * cchReferencedDomainName=0x0013d144, _SID_NAME_USE * peUse=0x0013d13c, int fUnicode=1) Line 7150 C advapi32.dll!LookupAccountNameW(const unsigned short * lpSystemName=0x00000000, const unsigned short * lpAccountName=0x771f3f9c, void * Sid=0x00248410, unsigned long * cbSid=0x0013d140, unsigned short * ReferencedDomainName=0x002541e0, unsigned long * cchReferencedDomainName=0x0013d144, _SID_NAME_USE * peUse=0x0013d13c) Line 7600 C rpcrt4.dll!RpcpLookupAccountNameDirect(unsigned short * ServerPrincipalName=0x771f3f9c, void * * Sid=0x0013d188) Line 220 + 0x19 bytes C++ rpcrt4.dll!RpcpLookupAccountName(unsigned short * ServerPrincipalName=0x771f3f9c, int * fCache=0x0013d184, void * * Sid=0x0013d188) Line 328 + 0x9 bytes C++ rpcrt4.dll!LRPC_BINDING_HANDLE::SetAuthInformation(unsigned short * ServerPrincipalName=0x771f3f9c, unsigned long AuthenticationLevel=6, unsigned long AuthenticationService=10, void * AuthIdentity=0x00000000, void * OriginalAuthIdentity=0x00000000, unsigned long AuthorizationService=0, SECURITY_CREDENTIALS * Credentials=0x00000000, unsigned long ImpersonationType=3, unsigned long IdentityTracking=1, unsigned long Capabilities=1, unsigned long AuthFlags=1, unsigned long AdditionalTransportCredentialsType=0, void * AdditionalCredentials=0x00000000, void * Sid=0x00000000) Line 1176 C++ rpcrt4.dll!RpcBindingSetAuthInfoExW(void * Binding=0x0023d1a8, unsigned short * ServerPrincName=0x771f3f9c, unsigned long AuthnLevel=6, unsigned long AuthnSvc=10, void * AuthIdentity=0x00000000, unsigned long AuthzSvc=0, _RPC_SECURITY_QOS * SecurityQOS=0x00000000) Line 1264 + 0x1f bytes C++ winsta.dll!WinStationOpenLocalServer() Line 598 + 0x18 bytes C winsta.dll!RpcLocalAutoBind() Line 671 C winsta.dll!WinStationQueryInformationW(void * hServer=0x00000000, unsigned long LogonId=4294967295, _WINSTATIONINFOCLASS WinStationInformationClass=WinStationClient, void * pWinStationInformation=0x0013d2d4, unsigned long WinStationInformationLength=2296, unsigned long * pReturnLength=0x0013d2d0) Line 2361 + 0x14 bytes C user32.dll!GetClientKeyboardType(_CLIENTKEYBOARDTYPE * KeyboardType=0x0013dbdc) Line 3369 + 0x1e bytes C user32.dll!GetKeyboardType(int nTypeFlags=0) Line 3402 + 0x9 bytes C OutSpy.dll!04193c5a() [Frames below may be incorrect and/or missing, no symbols loaded for OutSpy.dll] OutSpy.dll!041972ae() OutSpy.dll!0419498c() OutSpy.dll!04194a78() OutSpy.dll!041974d5() OutSpy.dll!04338b00() ntdll.dll!$$$00005() Line 136 Asm ntdll.dll!LdrpRunInitializeRoutines(_CONTEXT * Context=0x00000000) Line 1183 + 0x10 bytes C ntdll.dll!LdrpLoadDll(unsigned long Flags=0, const unsigned short * DllPath=0x00254ac8, unsigned long * DllCharacteristics=0x0013e2ec, const _UNICODE_STRING * DllName=0x0013e2cc, void * * DllHandle=0x0013e2e8, unsigned char RunInitRoutines='') Line 524 + 0x6 bytes C ntdll.dll!LdrLoadDll(const unsigned short * DllPath=0x00254ac8, unsigned long * DllCharacteristics=0x0013e2ec, const _UNICODE_STRING * DllName=0x0013e2cc, void * * DllHandle=0x0013e2e8) Line 227 + 0x1b bytes C kernel32.dll!LoadLibraryExW(const unsigned short * lpwLibFileName=0x0013e550, void * hFile=0x00000000, unsigned long dwFlags=0) Line 507 + 0x15 bytes C kernel32.dll!LoadLibraryW(const unsigned short * lpwLibFileName=0x0013e550) Line 626 C OLMAPI32.DLL!HrLoadProviderDllW(const unsigned short * wzDllName=0x0013e550, HINSTANCE__ * * phinst=0x0171f414) Line 7034 + 0xa bytes C OLMAPI32.DLL!HrLoadProviderDllA(const char * szDllName=0x00250990, HINSTANCE__ * * phinst=0x0171f414) Line 7017 + 0x10 bytes C OUTLOOK.EXE!HrSubstLoadLibrary(const char * szPathParam=0x00250990, HINSTANCE__ * * phinstResult=0x0171f414, const char * pszSharDir=0x00000000, unsigned long ulMiscFlags=145) Line 996 + 0xd bytes C++ OUTLOOK.EXE!ExtensionEntry::HrLoadExtLibrary() Line 2630 + 0x2f bytes C++ OUTLOOK.EXE!ExtensionEntry::EICaponeExtensionEntry::LoadExchExt(IExchExt * * peex=0x0171a33c) Line 2686 + 0x8 bytes C++ OUTLOOK.EXE!RenExtOnCapone::HrEnsureInstalled(IRenCallback * prcb=0x00ca6610) Line 653 + 0x2b bytes C++ OUTLOOK.EXE!RenExtOnCapone::Install(IRenCallback * prcb=0x00ca6610, const __MIDL_IRenExtensionEntry_0006 * prec=0x01712634, IRenExtensionSite * prextsite=0x00ca3468) Line 489 + 0xf bytes C++ OUTLOOK.EXE!ExtensionSite::EnsureLoaded() Line 522 + 0x33 bytes C++ OUTLOOK.EXE!ExtensionSite::EnsureLoaded(IRenCallback * prcb=0x00ca6610) Line 345 + 0xf bytes C++ OUTLOOK.EXE!ExtensionSite::DelayInstall(IRenCallback * prcb=0x00ca6610) Line 308 C++ OUTLOOK.EXE!EventManager::HrPopulateExtensionManager(IRenCallback * prcb=0x00ca6610, int fUpdateOnly=0, unsigned long ulEvtidPopulate=1, IRenExtensionEntry * preePopulate=0x00000000, int fLoadedPopulate=0) Line 537 C++ OUTLOOK.EXE!EventManager::HrInit(unsigned long ulEvtidPopulate=1, IRenExtensionEntry * preePopulate=0x00000000, int fLoadedPopulate=0) Line 592 + 0x1d bytes C++ OUTLOOK.EXE!EventManager::HrInit(unsigned long ulEvtidPopulate=1) Line 629 C++ OUTLOOK.EXE!EventManager::EIRenApplicationEvents::OnStartup(IRenApplicationCallback * pacb=0x00ca6610) Line 924 C++ OUTLOOK.EXE!DelayInitExtensions(IRenCallback * prcb=0x0316202c) Line 357 C++ OUTLOOK.EXE!EventManager::HrPopulateExtensionManager(IRenCallback * prcb=0x0316202c, int fUpdateOnly=0, unsigned long ulEvtidPopulate=134217728, IRenExtensionEntry * preePopulate=0x00000000, int fLoadedPopulate=0) Line 331 C++ OUTLOOK.EXE!EventManager::HrInit(unsigned long ulEvtidPopulate=134217728, IRenExtensionEntry * preePopulate=0x00000000, int fLoadedPopulate=0) Line 592 + 0x1d bytes C++ OUTLOOK.EXE!EventManager::HrInit(unsigned long ulEvtidPopulate=134217728) Line 629 C++ OUTLOOK.EXE!EventManager::EIRenSessionEvents::OnLogon(IRenSessionCallback * pscb=0x0316202c) Line 1073 C++ OUTLOOK.EXE!MapiNamespace::MapiLogon(unsigned long ulUIParam=592406, const char * szProfile=0x00000000, const char * szPassword=0x00000000, unsigned long flFlags=36905) Line 10838 C++ OUTLOOK.EXE!MapiNamespace::MapiNamespace() Line 1451 + 0x1e bytes C++ OUTLOOK.EXE!HrGetPrimarySession(int fCreate=1, IMAPISession * * ppmsess=0x0013ed20, int fRequired=1) Line 1058 + 0x22 bytes C++ OUTLOOK.EXE!GetPrimaryMapiNamespace(int fCreate=1, IExplorerNamespace * * ppns=0x0171b2f4, int fRequired=1) Line 1130 + 0x16 bytes C++ OUTLOOK.EXE!ExplorerObject::HrGetNamespace(const _GUID & clsidNS={...}, IExplorerNamespace * * ppxns=0x0013edd0, int fLoad=1) Line 4529 + 0x18 bytes C++ OUTLOOK.EXE!BaseExplorFrame::HrGetNamespace(const _GUID & clsidNS={...}, IExplorerNamespace * * ppxns=0x0013edd0) Line 1034 C++ OUTLOOK.EXE!ExplorerFrame::ShowFolder(_GUID clsidNamespace={...}, const wchar_t * wzUrl=0x00000000, __MIDL___MIDL_itf_xtypes_0000_0002 * peidFolder=0x00000000, __MIDL___MIDL_itf_xtypes_0000_0002 * peidHint=0x00000000, int nCmdShow=-1, int wbcid=-1, unsigned long dwXfsfFlags=0, __MIDL___MIDL_itf_xtypes_0000_0002 * * ppeidNew=0x00000000, IUnknown * * ppunk=0x00000000) Line 8352 + 0x15 bytes C++ OUTLOOK.EXE!BaseExplorFrame::EIExplorerFrame::ShowFolder(_GUID clsidNamespace={...}, const wchar_t * wzUrl=0x00000000, __MIDL___MIDL_itf_xtypes_0000_0002 * peidFolder=0x00000000, __MIDL___MIDL_itf_xtypes_0000_0002 * peidHint=0x00000000, int nCmdShow=-1, int wbcid=-1, unsigned long dwXfsfFlags=0, __MIDL___MIDL_itf_xtypes_0000_0002 * * ppeidNew=0x00000000, IUnknown * * ppunk=0x00000000) Line 2702 C++ OUTLOOK.EXE!LaunchRen(int nCmdShow=-1, wchar_t * pwzCmdLine=0x00ca3074, int fFirstLaunch=1, IExplorerFrame * * ppexp=0x0013feb0, void * hEvent=0x00000000) Line 6602 + 0x5d bytes C++ OUTLOOK.EXE!RenInitInstance(int nCmdShow=1, const char * pszCmdLineAnsi=0x001624c2) Line 3565 + 0x1a bytes C++ OUTLOOK.EXE!RenLibDLL::InitInstance() Line 387 + 0x13 bytes C++ OUTLOOK.EXE!WinMain(HINSTANCE__ * hInstance=0x30000000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x001624c2, int nCmdShow=1) Line 271 + 0xd bytes C++ OUTLOOK.EXE!__tmainCRTStartup() Line 578 + 0x1d bytes C kernel32.dll!BaseProcessStart(unsigned long (void)* lpStartAddress=0x301d9900) Line 813 + 0x3 bytes QC Entry 50261 QC #: Date Reported: 50327 8/10/2007 Area: Database\ADO Description: Steps: [QC Short Description] TADODataSet throws "invalid variant operation" exception TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_263745 =or= [QC Description] Technical stuff Take a look at the example source code (attachment) and you can see everything works fine with an access database/tables. OS.........: Windows XP SP2 and Windows Vista Business MDAC.......: 2.81.1117.0 Compiler...: Delphi 2007 for Win32 (11.0.2709.7128) Database...: MS-SQL Server 2005 Developer and Express with SP2 (9.0.3042) QC Entry 50327 Try the same thing with MS-SQL 2005 tables where the primary keys are BIGINT and the foreign key ADDR_ID in the second table is also an BIGINT. Debugging --> ADODB.PAS Failure in procedure TCustomADODataSet.RefreshParams; in sub function function MasterFieldsChanged: boolean; { .. } if Parameters.ParamByName(MasterField.FieldName).Value <> MasterField.Value then // <-- This creates the "invalid variant operation" { ... } How to solve? Seems to be a problem with trying to compare an varDecimal with varInt64? QC #: Date Reported: Area: 50430 8/13/2007 VCL\Win 32 Controls\TListView Description: Steps: [QC Short Description] TListview loses items if not visible in front - Drop a TPagecontrol on a form and add 2 Tabsheets - Drop a TListview on the second Tabsheet, set ViewStyle to vsICON - Create a TImagelist and add some Images; associate the Listview with the Imagelist Add some items to the Listview - Compile and run - everything works fine, items in the Listivew are there Make the first Tabsheet the default; save the project again; close all, reopen the project, compile and run - all items in the Lsitview are gone. Sample Project is attached. [QC Description] A TListview loses the items if it is not visible in front. QC Entry 50430 QC #: Date Reported: Area: 50593 8/15/2007 IDE\Search\Find in Files Description: [QC Short Description] Search Results needs a "Close All" option [QC Description] If you do a lot of searches with the "Display results in separate tab" option enabled, you can end up with a lot of Steps: tabs active in the search results window at one time. There is no "Close all tabs" or "Close all other tabs" options anywhere, though. It would be nice if there were such options available. It is very tedious (especially on a laptop) to have to right-click on each tab and close them individually. QC Entry 50593 QC #: Date Reported: Area: 51299 8/30/2007 IDE\Start Page Description: Steps: [QC Short Description] Welcome page feeds need cleanup 1. The single most obvious feed - DelphiFeeds.com is not there (how did they miss that one) [QC Description] A couple of things are wrong with the feeds on the welcome page at the moment. 2. The overlapping menus system doesn't work very well. For example, on a 1024x768 display with all dockable areas of the IDE unpinned (collapsed) the English Community Blogs extend beyond the bottom of the screen and one cannot get to the links at the bottom in any obvious way. Either trim them down, support scrolling or show multiple collumns. I've attached a screen shot (englishblogs.png). ---- #2 UPDATE: Cannot reproduce even in 800x600 --------3. Some of the blogs that are listed have been dead for years and some don't load at all. Of the ones I can access (point 2), these all have issues: 3.1. Brad Prendergast, Dan Miser doesn't seem to load at all -- #3.1 Update: Cannot reproduce as these have been removed ----3.2. Daniel Wischnewski, Deepak Shenoy and Holger Flick hasn't updated it this year (not too bad, I suppose) -- #3.1 Update: Cannot reproduce . Updates are appearing just fine. ---3.3 Erwien Saputra last posted in 2006, saying that it is "definitely" his last post - in fact he is not using Delphi anymore! ----- #3.2 Update: User should be removed. RSS Feed no longer active ----3.4. Jake Jacobson's blog doesn't load correctly - you see lots of CSS markup instead of text (could of course be his own fault, but then his blogs should not show). ----- #3.4 Update: Cannot reproduce. User has been removed. -------4. How about a "Beta Bloggers" feed? Probably, it should be a CodeGear feed that aggregates the feeds from everyone Nick has approved as Beta Bloggers. That way it can be maintained as new beta bloggers are added and old ones go away. QC Entry 51299 QC #: Date Reported: Area: 51427 8/31/2007 RTL\Delphi\RTL Exceptions Description: Steps: [QC Short Description] Calling Halt in 'except' or 'finally' forcibly displays the exception message, and causes process to return wrong exit code Run this code: program Project1; uses Windows, SysUtils; begin try raise Exception.Create('xxx'); except Halt (5); end; end. Expected results (what happened in Delphi 2.0 through 2006): 1. The process should return with an exit code of 5. Actual results on Delphi 2007: 1. A message box is displayed: --------------------------Application Error --------------------------- Exception Exception in module Project1.exe at 00055753. xxx. -------------------------- OK --------------------------- 2. The process returns with an exit code of 1, not 5. (JJS: Seems related to 255308 but reproducible with D2007 December Update) [QC Description] This is a new problem introduced in Delphi 2007 (and still repro with the Dec2007 update installed): If Halt is called inside an 'except' or 'finally' block, the current exception's message is forcibly displayed on the screen, and the process returns with an exit code of 1 instead of the exit code specified in the Halt call. The cause appears to be these lines in SysUtils' DoneException procedure, which are new to Delphi 2007: if ExceptObject <> nil then ExceptHandler(ExceptObject, ExceptAddr); I assume the intention there is to ensure that any new exceptions raised during termination are brought to the attention of the user. In my case, however (see the example code), the exception was raised before termination commenced. DoneException should ignore such pre-existing exceptions. And it certainly should not be changing my exit code from 5 to 1. QC Entry 51427 QC #: Date Reported: Area: 51976 9/13/2007 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Codegen for IN test is buggy [reported initially to BASM newsgroup by Thorsten Engler, Nexus Database Systems] Just a warning for everyone... This program crashes: >>>>> program InCrash; {$APPTYPE CONSOLE} uses Windows, SysUtils; type TEnum = (e0, e1, e2, e3, e4, e5, e6, e7); TSet = set of TEnum; TRecord = record FieldA : array[0..4091] of Byte; FieldB : Boolean; FieldC : Boolean; FieldD : Boolean; SetField : TSet; end; PRecord = ^TRecord; var e : TEnum; p : PRecord; Old : Cardinal; begin {$C+} try Assert(SizeOf(TRecord) = 4096); p := VirtualAlloc(nil, 64 * 1024, MEM_COMMIT, PAGE_NOACCESS); Assert(Assigned(p)); Assert(VirtualProtect(p, 4096, PAGE_READWRITE, Old)); p.SetField := [e0]; e := e0; if e in p.SetField then ; except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. <<<<< The if e in ... compiles to : InCrash.dpr.36: if e in p.SetField then 004091C6 3C07 cmp al,$07 004091C8 770A jnbe $004091d4 004091CA 83E07F and eax,$7f 004091CD 0FA383FF0F0000 bt [ebx+$00000fff],eax From Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2A: Instruction Set Reference, A-M: >>>>> When accessing a bit in memory, the processor may access 4 bytes starting from the memory address for a 32-bit operand size, using by the following relationship: Effective Address + (4 x (BitOffset DIV 32)) Or, it may access 2 bytes starting from the memory address for a 16-bit operand, using this relationship: Effective Address + (2 x (BitOffset DIV 16)) It may do so even when only a single byte needs to be accessed to reach the given bit. When using this bit addressing mechanism, software should avoid referencing areas of memory close to address space holes. In particular, it should avoid references to memory-mapped I/O registers. Instead, software should use the MOV instructions to load from or store to these addresses, and use the register form of these instructions to manipulate the data. <<<<< The compiler should recognize that the start of the set it wants to check is less then 4 bytes from the end of the containing type and should use a single byte mov to read the value into a register first. And before someone says that the example above is not realistic, the problem can also be seen by just having an object with a byte sized set as last field which is preceded by 3 other byte sized fields and the memory that's allocated for the object just happens to be in front of a page boundary... Cheers, Thorsten -- [QC Description] faulty codegen for IN can result in memory access across page boundaries with access violations as a result QC Entry 51976 [Tester Recommended] QC #: Date Reported: Area: 52290 9/20/2007 Documentation Description: Steps: [QC Short Description] Screen Scaling and Changescale Changescale fails in some instances which have been traced to the following: 1. Changescale is dependent on the "Border Style" property of forms. When BorderStyle is "Single" the user can not resize the form manually and Changescale feels free to adjust form size as would be expected. However, if a form's BorderStyle is "Sizeable", changescale fails, as if believing the user can take care of sizing. The developer does not expect the form sizing to fail. 2. Changescale is sensative to columns in a DBGrid which have been sized by the developer. Changescale will fail on such columns. This can result in a DBGrid component and Form being adjusted by Changescale, but the Columns in the DBGrid Not being resized. (BTW, the developer can not remove the column sizing through normal use of the IDE. So, this problem is not easily corrected. In Form Text mode the developer can remove the Width statement on the column definition.) [QC Description] Poor documentation of managing form scaling for various user screen resolutions has produced many newsgroup threads with rare satisfactory resolutions. Failure is now traced to undocumented behavior in "Changescale". Documentation of this statement should be completed. Functionality change may not be desireable, but accurate documentation would help. QC Entry 52290 QC #: Date Reported: Area: 52439 9/24/2007 Database\Data Aware Controls\TDBNavigator Description: Steps: [QC Short Description] DbNavigator paints incorrectly when flat=true in themed mode //make sure windows is themed 1. Create a VCL VCL App 2. Drop two DbNavigators, set Flat=True in one of them, leave Flat=False in the second for comparison. 3. Drop a TDataSource and a TClientDataSet, linking the datasource to the clientdataset and both navigators to the datasource. 4. Right click on the clientdataset and choose Load from MyBase table. Choose employee.xml from Common Files \CodeGear Shared\Data (or any other data). 5. Run the application and click Last and First. exp: Flat navigator should paint buttons as disabled when appropriate. act: Buttons paint incorrently. [QC Description] When you use a TDbNavigator in themed mode with Flat=True it paints incorrectly, not showing enabled/disabled state. QC Entry 52439 QC #: Date Reported: Area: 52448 9/24/2007 IDE\Start Page Description: Steps: [QC Short Description] Welcome Page gets corrupted after Close All ---------- UPDATED ------------------- install Tiburon build 3056 - start "CodeGear RAD Studio" - choose Tools - Option - Environment Options - in Autosave Options check "Editor files" and "Project desktop" - close dialog with OK - create a new VCL Forms Application and save it with all defaults - make sure "Form1" is visible in the embedded designer - exit IDE (via File - Exit or close button) - restart "CodeGear RAD Studio" ("Form1" should be visible now) - choose File - Close All --------------------- ORIGINAL ---------------- start IDE - make sure "Auto Save" is set for "Editor Files" and "Project Desktop" - open or (create and save) a project - close IDE - start IDE (project should be open now - this seems to be the trigger) - select "File - Close All" [QC Description] Sometimes when I select "Close All" the Welcome Page gets corrupted. Now I was able to provide steps to reproduce this. QC Entry 52448 exp: see proper Welcome Page act: Welcome Page corrupted (f.i. "TCodeGear.Create" visible on top right) QC #: Date Reported: Area: 52593 9/26/2007 Documentation\Online Help\Object Pascal Description: Steps: [QC Short Description] Error in description of dynamic arrays [QC Description] ms-help://borland.bds5/devcommon/structuredtypes_xml.html In the section about dynamic arrays, search this sentence: "In the case of a zero-length array, High returns 1 (with the anomalous consequence that High < Low)." In this case, High returns -1. It should read: "In the case of a zero-length array, High returns -1 (with the anomalous consequence that High < Low)." QC Entry 52593 QC #: Date Reported: Area: 52848 10/2/2007 Documentation\Online Help\VCL Description: Steps: [QC Short Description] Documentation missing for several TThread methods Go to this page in the online documentation: ms-help://borland.bds5/delphivclwin32/!! MEMBEROVERVIEW_Classes_TThread.html click on any of the listed members Exp: Help Act: Description This is Queue, a member of class TThread. [QC Description] The TThread threading class has some methods where the documentation is missing. Specifically: public methods Queue RemoveQueuedEvents StaticQueue StaticSynchronize Synchronize Synchronize is probably the most important of those. QC Entry 52848 QC #: Date Reported: Area: 53454 10/15/2007 IDE\Search\Find in Files Description: Steps: [QC Short Description] Invalid pointer / list out of bounds etc when Search/Find in files Press ALT-S, F, SHIFT-TAB in the code editor after coding a few hours. I think I have usually done some Search / Find in files before the error occurs. It happens on a daily basis, but I can't produce the exact steps to reproduce it. SYSOP: When problem happens, it has this kind of call stack: Access violation at address $209f8860 in module coreide100.bpl. Read of address 00000018 [209F8860]{coreide100.bpl} EdTrackr.TEdTracker.GetCount (Line 171, "EdTrackr.pas" + 0) + $0 [209F89CA]{coreide100.bpl} EdTrackr.TEdTracker.IndexOfData (Line 223, "EdTrackr.pas" + 1) + $2 [20A1312A]{coreide100.bpl} MsgLines.TFileEntry.Remove (Line 876, "MsgLines.pas" + 3) + $B [20A132DC]{coreide100.bpl} MsgLines.TFileBuffer.RemoveLine (Line 956, "MsgLines.pas" + 4) + $5 [20A137A8]{coreide100.bpl} MsgLines.TLineBuffer.RemoveAllFileMessageLines (Line 1121, "MsgLines.pas" + 4) + $11 [20A1377B] {coreide100.bpl} MsgLines.TLineBuffer.RemoveAllFileMessageLines (Line 1119, "MsgLines.pas" + 2) + $D [20A138AD]{coreide100.bpl} MsgLines.TLineBuffer.Clear (Line 1161, "MsgLines.pas" + 6) + $4 [20A1422C] {coreide100.bpl} MsgLines.TLineBufferList.RemoveList (Line 1468, "MsgLines.pas" + 6) + $4 [20963607] {coreide100.bpl} FileFind.TThreadSearch.Create (Line 153, "FileFind.pas" + 6) + $A [209643C9] {coreide100.bpl} FileFind.TProjectFileSearch.Create (Line 574, "FileFind.pas" + 5) + $F [20964FF6] {coreide100.bpl} FileFind.DoFindInFiles (Line 817, "FileFind.pas" + 11) + $15 [209B5019]{coreide100.bpl} EditorControl.TCustomEditControl.Search (Line 5752, "EditorControl.pas" + 30) + $53 [20006A3F]{rtl100.bpl } System.TObject.Dispatch (Line 9284, "sys\system.pas" + 8) + $0 [209B822C]{coreide100.bpl} EditorControl.TEditControl.CMControlCommand (Line 7311, "EditorControl.pas" + 6) + $0 [2013C4F3] {vcl100.bpl } Controls.TControl.WndProc (Line 5146, "Controls.pas" + 83) + $6 [20142615]{vcl100.bpl } Controls.TWinControl.CMChildKey (Line 8375, "Controls.pas" + 1) + $C [2013C4F3]{vcl100.bpl } Controls.TControl.WndProc (Line 5146, "Controls.pas" + 83) + $6 [2014076A]{vcl100.bpl } Controls.TWinControl.DefaultHandler (Line 7334, "Controls.pas" + 23) + $17 [2013C4F3]{vcl100.bpl } Controls.TControl.WndProc (Line 5146, "Controls.pas" + 83) + $6 [20140673]{vcl100.bpl } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6 [2013FD9C]{vcl100.bpl } Controls.TWinControl.MainWndProc (Line 7073, "Controls.pas" + 3) + $6 [20040DD4]{rtl100.bpl } Classes.StdWndProc (Line 11583, "common\Classes.pas" + 8) + $0 [209A2D42]{coreide100.bpl} VClient.SendWindowMsg (Line 2683, "VClient.pas" + 2) + $10 [209A19D8]{coreide100.bpl} VClient.SendWindowMsgProc (Line 1599, "VClient.pas" + 1) + $D [2093DE36]{coreide100.bpl} IDEKbd.@interpret_bmi_macro$qqrp5BMI_tpcp11CmdMapTableppc (Line 39, "bmi.cpp" + 14) + $5 [2093CA32]{coreide100.bpl} IDEKbd... (Line 586, "IDEKbd.pas" + 0) + $16E [209A044C]{coreide100.bpl} VClient.CmdStringProc (Line 504, "VClient.pas" + 5) + $17 [2015EAED]{vcl100.bpl } Forms.TraverseClients (Line 5968, "Forms.pas" + 5) + $2D [2093E593]{coreide100.bpl} IDEKbd.@LookUpKey$qqrp11KeyMapTableul [QC Description] After some editing, compiling and searching, I often get an invalid pointer operation with a following 'List out of bounds', and sometimes other consequential errors just as I open the Search / Find in files dialog. It occurs when I press ALT-S, F, SHIFT-TAB I must always restart Delphi afterwards. I had the same problem with Delphi 5. I suspect the message window to be somehow involved. QC Entry 53454 (Line 101, "keymap.cpp" + 6) + $4 [20A0C198]{coreide100.bpl} KbClient.TIDEKBDFrameAPI.MapAndEvalInternal (Line 842, "KbClient.pas" + 10) + $11 [20A0BC1D] {coreide100.bpl} KbClient.HandleKey (Line 572, "KbClient.pas" + 6) + $12 [20A0BC8F]{coreide100.bpl} KbClient.HandleKey (Line 578, "KbClient.pas" + 12) + $19 [20A0C11E]{coreide100.bpl} KbClient.TIDEKBDFrameAPI.ProcessKeyStroke (Line 820, "KbClient.pas" + 238) + $1 [20140673]{vcl100.bpl } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6 [20A0CC60]{coreide100.bpl} KbClient.TIDEKBDChildAPI.ProcessKeyStroke (Line 1367, "KbClient.pas" + 14) + $16 [209B6E28] {coreide100.bpl} EditorControl.TCustomEditControl.DoKeyDown (Line 6853, "EditorControl.pas" + 6) + $18 [209ADA2A]{coreide100.bpl} EditorControl.TCustomEditControl.CNKeyDown (Line 1961, "EditorControl.pas" + 17) + $4 [2013C4F3]{vcl100.bpl } Controls.TControl.WndProc (Line 5146, "Controls.pas" + 83) + $6 [20159E5F] {vcl100.bpl } Forms.TCustomForm.WndProc (Line 3512, "Forms.pas" + 136) + $5 [20D1972A] {designide100.bpl} DeskUtil.SetFocusHook (Line 435, "DeskUtil.pas" + 4) + $C [2013C180]{vcl100.bpl } Controls.TControl.Perform (Line 5021, "Controls.pas" + 5) + $C [201640BD]{vcl100.bpl } Forms.TApplication.DispatchAction (Line 9022, "Forms.pas" + 9) + $A [20161B6F]{vcl100.bpl } Forms.TApplication.WndProc (Line 7769, "Forms.pas" + 82) + $E [20140673]{vcl100.bpl } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6 [2013FD9C]{vcl100.bpl } Controls.TWinControl.MainWndProc (Line 7073, "Controls.pas" + 3) + $6 [20040DD4]{rtl100.bpl } Classes.StdWndProc (Line 11583, "common\Classes.pas" + 8) + $0 [20162328]{vcl100.bpl } Forms.TApplication.IsKeyMsg (Line 8020, "Forms.pas" + 22) + $12 [201623BE]{vcl100.bpl } Forms.TApplication.IsHintMsg (Line 8040, "Forms.pas" + 3) + $2 [201625A5]{vcl100.bpl } Forms.TApplication.ProcessMessage (Line 8097, "Forms.pas" + 15) + $32 [2016260A]{vcl100.bpl } Forms.TApplication.HandleMessage (Line 8124, "Forms.pas" + 1) + $4 [201628FF]{vcl100.bpl } Forms.TApplication.Run (Line 8223, "Forms.pas" + 20) + $3 [00422976]{bds.exe } bds.bds (Line 195, "" + 7) + $7 QC #: Date Reported: Area: 54331 11/2/2007 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] SysUtils.Abort raise an "Access Viaolation" exception {$APPTYPE CONSOLE} uses SysUtils; procedure s; var a0, a1, a2, a3, a4, a5, a6: Integer; begin a0 := 1; a1 := a0 + 1; a2 := a0 + a1 + 1; a3 := a0 + a1 + a2 + 1; a4 := a0 + a1 + a2 + a3 + 1; a5 := a0 + a1 + a2 + a3 + a4 + 1; a6 := a0 + a1 + a2 + a3 + a4 + a5 + 1; if a0 + a1 + a2 + a3 + a4 + a5 + a6 + 1 <> 0 then SysUtils.Abort; end; begin try s except on EAbort do end; Writeln('OK'); end. (JJS: Reproducible with the integration build but not with the developer build) [QC Description] SysUtils.Abort may cause an AV exception if a call to the Abort is maked from a procedure, that uses EBP as a local variable. Source for SysUtils.Abort in 2006: procedure Abort; function ReturnAddr: Pointer; asm MOV EAX,[EBP + 4] end; begin raise EAbort.CreateRes(@SOperationAborted) at ReturnAddr; end; Source in Delphi 4 procedure Abort; function ReturnAddr: Pointer; asm MOV EAX,[EBP - 4] end; begin raise EAbort.Create(SOperationAborted) at ReturnAddr; end; The defference is that Delphi 4 version has a compiler-generated local variable for loading resource string. So compiler saves old value of EBP and assigns it to ESP. But in Delphi 2006 resource string is acceessed by a @ reference and there is no need in such a local variable and value if EBP is preserved and it has a value from the calling procedure. Sometimes it can hold a local variable. QC Entry 54331 QC #: Date Reported: Area: 54904 11/15/2007 IDE\Code Editor Description: Steps: [QC Short Description] Bookmark Icon Right click in editor window, and select "Toggle Bookmark". The bookmark in the margin is dark green, with a small - unreadable - black digit. [QC Description] Please change the color of the bookmark icon in the gutter to a lighter color, so the black text would be more readable. Having numbered bookmarks is a great advantage over VS approach, but only if the small text would be readable.. This is annoying since BCB5! QC Entry 54904 QC #: Date Reported: Area: 55121 11/21/2007 IDE\Block Completion Description: Steps: [QC Short Description] Broken block completion on Operator method implementations Type in the following record declaration: longintx = record public class operator Add(a, b: longintx): longintx; inline; end; Type in (manually) the following record implementation: class operator longintx.Add(a, b: longintx): longintx; begin Then press Return. Result: block completion does *not* complete the block by adding "end;" as it should. [QC Description] Block completion does not work in Operator method implementations QC Entry 55121 QC #: Date Reported: Area: 55221 11/24/2007 Compiler\Delphi\Language Description: [QC Short Description] Generics in Delphi32 Steps: // Principale use CSumContainerElt = concept ( record ) // restrict its use with record (or value type) class operator Add( const Left,Right : TSelf ); // TSelf : type who is implementing the concept function ToString : string; class property NullValue : TSelf; end; TSumContainer< TElt : CSumContainerElt > = class(TObject) [QC Description] private FArrayElt : array of TElt; public function Sum : TElt; function ToString : string; // Other members ... end; (sorry for my English) function TSumContainer<TElt>.Sum: TElt; var Elt : TElt; begin Result := TElt.NullValue; for Elt in FArrayElt do According to the Delphi roadmap (http://dn.codegear.com/article/36620), generics (or "parameterized types") will Result := Result + Elt; end; function TSumContainer<TElt>.ToString: string; var Elt : TElt; begin Result := ''; for be availiable in Delphi "Tibur n". Elt in FArrayElt do Result := Result + Elt.ToString; end; //Use TMyRecord = record ( CSumContainerElt ) // or create a key word ex "assume" : class ( ancestor, interfaces ) assume ( concepts ... ) private FNumber : But .Net generics have many restrictions ; this kind of code is not allowed : Cardinal; class function GetNullValue : TMyRecord; public class property NullValue : TMyRecord read TGenericSum<Type> = class GetNullValue; class operator Add( const Left,Right : TMyRecord ); function WriteString : string; class function Sum(const Left,Right: Type): Type; static; CSumContainerElt.ToString = WriteString; // Like for interface (in case of mutiple concept assumed // or if you end; can't change the class/record but providing a method matching with a concept method expected) end; THelpInt class function TGenericSum<Type>.Sum(const Left,Right: Type): Type; begin Result := Left + Right; // Has Type an operator Add ??? end; = record helper for Integer ( CSumContainerElt ) private class function GetNullValue : Integer; public function ToString : string; class property NullValue : Integer read GetNullValue; end; TSumMyRecord = TSumContainer<TMyRecord>; TSumInteger = TSumContainer<Integer>; C++ templates permit this but generate complexes errors cases if a type can't use with a template (verifications are do only when the code for a template is creating). .Net constraints are a good idea but extend them will produce hard reading code : TMyGeneric<Type:operator Add, operator Subtract, operator ..... > //help ! So what i propose : a new key word to specifie what kind of type is allowed for the generic. The next C++ standard can also introduce this feature (http://www.openstd.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf). With this generics in Delphi would be as powerfull as C++ template but with a easy to read code. This new key word would work as interfaces but only at compiling time and could be used with class, record, class helper and record helper. Exemples of possible use (with a "concept" key word) below. QC Entry 55221 QC #: Date Reported: Area: 55550 12/4/2007 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] BcdMultiply return invalid result for negative operand Run the following Test Case: program BTS256690; [QC Description] If we use BcdMultiply to multiply 2 BCD values: 0 and -1. The return result is 0 with negative sign. However, we expect it is 0 without negative sign. QC Entry 55550 {$APPTYPE CONSOLE} uses FmtBCD; var B1, B2: TBcd; Counter: Integer = 0; begin if BcdCompare(VarToBcd(0), VarToBcd(0)) = 0 then Inc(Counter) else WriteLn('FAIL #1'); B1 := VarToBcd(0); BcdMultiply(B1, VarToBcd(-1), B2); if BcdCompare(B2, VarToBcd(0)) = 0 then Inc(Counter) else WriteLn('FAIL #2 B2=', BCDToStr(B2)); if Counter = 2 then WriteLn('PASS'); end. QC #: Date Reported: Area: 55863 12/11/2007 Documentation Description: Steps: [QC Short Description] See Also links for the Model View Window aren't linked 1. Navigate to the Help Topic: ms-help://borland.bds5/devcommon/modelview_xml.html 2. Look at the See Also section of the help topic exp: All See Also links can be navigated act: Some See Also links are not links [QC Description] When viewing the Model View Window topic, some of the See Also links are not actually links. QC Entry 55863 QC #: Date Reported: Area: 56062 12/17/2007 IDE\Docking Description: Steps: [QC Short Description] The "dock edit window" feature fails to dock 1. Launch BDS without anything opened (except welcome page) 2. Trigger "View" -> "Dock Edit Window" Exp: the edit window is undocked Act: the edit window is undocked :) 3. Trigger an other time "View" -> "Dock Edit Window" Exp: the edit window is docked Act: the main window is enlarged but area stays gray, main window has to be maximized/restored in order to be workable. [QC Description] The "Dock Edit Window" in the View menu can successfully undock editor. Problems appear when attempting to dock the editor window: client area is empty and gray. Reproduced with Delphi 2007 and RAD Studio 2007 on different systems (Windows 2000, Windows XP32, Windows Vista). Screeshot and steps are part of this report QC Entry 56062 QC #: Date Reported: Area: 56230 12/20/2007 IDE\Structure Pane Description: Steps: [QC Short Description] Ability to rename functions in the structure pane. 1. Open structure pane. 2. Right click on Properties. 3. Unable to rename function in Explorer Options pane. [QC Description] Ability to rename functions in the structure pane. QC Entry 56230 QC #: Date Reported: Area: 56714 1/8/2008 IDE Description: Steps: [QC Short Description] Check for quotes in "Tools/Configure Tools..." dialog Create a directory: c:\Path with Spaces\bin Copy any .exe into that directory [QC Description] This is a really minor thing and not actually a bug, but I thought I'd report it anyway: Tools | Configure Tools Click Add.. Give any title For Program, give "c:\Path with Spaces\bin\<exename>.exe". Be sure to include the surrounding double quotes Click OK Click Close From the main IDE Tools menu choose the item you jsut added While adding a "tool" application in the "Configure Tools" dialog, I pasted the path to the program from a link on the desktop. It was pasted as is, including the enclosing quote characters: "c:\Program Files\...\some_tool.exe" The IDE couldn't run it, apparently because it saved the link with the quotes and then tried to enclose it into another pair of quotes before launching the app. After going back to the "Configure Tools" dlg and manually removing the quotes, all worked fine. I know it was really my fault and the delimiters should not be there in the first place, but it was really easy to make such a mistake. Wouldn't it be nice to include a simplest check to remove the outer level quotes, if any, before storing the data? QC Entry 56714 QC #: Date Reported: 56893 1/12/2008 EXP: the program runs ACT: You get the following error message: --------------------------Error --------------------------Unable to execute '""c:\Path with Spaces\bin\LicenseManager.exe""' (Error 2) --------------------------OK --------------------------- Area: Compiler\Delphi\Language Description: Steps: [QC Short Description] with <> ".": Syntax ambiguity?! Compile and run the attached application below. See the following output indicating failure. [QC Description] Use "with .. do" statement allows write access to fields of read-only properties of record type. QC Entry 56893 [Tester Recommended] FAIL #1 - Read Only property altered FAIL #2 - Compile time error expected Note that since a compile time error was expected, that the program compiles is a problem. The property MyRecord on the line marked #1 is clearly a read-only record. Consequently, the assignment on the line marked #2 governed by the "with..do" statement should produce a compile time error and does produce a compile time error with the .NET compiler. Enabling the line marked #3 produces the expected compile time message but as you see does not involve a "with..do". program BTS257191; {##COMERR: Error: E2064 Left side cannot be assigned to} {$APPTYPE CONSOLE} uses SysUtils; type TMyRecord = record Field1, Field2 : integer; end; TMyClass = class(TObject) strict private { private declarations } fMyRecord:TMyRecord; protected { protected declarations } public { public declarations } property MyRecord : TMyRecord read fMyRecord; // #1 procedure InitMyRecord; published { published declarations } end; var MyClass : TMyClass; { TMyClass } procedure TMyClass.InitMyRecord; begin fMyRecord.Field1:=1; fMyRecord.Field2:=2; end; begin MyClass:=TMyClass.Create; MyClass.InitMyRecord; //Compiler eats this ?! with MyClass, MyRecord do Field1:=2; //#2 //Here compiler fails //MyClass.MyRecord.Field1:=2; //#3 if MyClass.MyRecord.Field1 = 2 then writeLn('FAIL #1 - Read Only property altered'); WriteLn('FAIL #2 - Compile time error expected'); end. QC #: Date Reported: Area: 56935 1/14/2008 Internet\WebSnap Description: Steps: [QC Short Description] ISAPI BUG / MULTIPART FORM DATA build an ISAPI application with Multipart form data, use IIS, Send big file, stop suddenly the connection ... see the cpu raise to 100% for ever ! [QC Description] i don't know if this bug is still in Delphi 2005 - 2006 - 2007. in the object TMultipartContentParser: procedure TMultipartContentParser.BufferContent; var L, R: Integer; P: PChar; begin if (WebRequest.ContentLength > 0) and (FContentBuffer = '') then begin FContentBuffer := WebRequest.Content; if Length(WebRequest.Content) < WebRequest.ContentLength then begin L := Length(FContentBuffer); SetLength(FContentBuffer, WebRequest.ContentLength); P := PChar(FContentBuffer) + L; while L < WebRequest.ContentLength do begin R := WebRequest.ReadClient(P^, WebRequest.ContentLength - L); if R = 0 then break; Inc(L, R); Inc(P, R); end; end; end; end; you see the instruction : while L < WebRequest.ContentLength do begin R := WebRequest.ReadClient(P^, WebRequest.ContentLength - L); if R = 0 then break; Inc(L, R); Inc(P, R); end; It's a disaster ! in some condition this will result as an indefinitly loop (with 100% CPU usage) I gave you one indice : function TISAPIRequest.ReadClient(var Buffer; Count: Integer): Integer; begin Result := Count; if not ECB.ReadClient(ECB.ConnID, @Buffer, DWORD(Result)) then Result := -1; end; so you understand :) the function ReadClient give a result of -1 and not 0 if she not success !!!!!!!!!! so while L < WebRequest.ContentLength do begin R := WebRequest.ReadClient(P^, WebRequest.ContentLength - L); if R = 0 then break; Inc(L, R); Inc(P, R); end; Give an infinite loop if the client for exemple send a big file and stop suddenly the connection because the condition (if R = 0 then break;) will be never true st phane Vander Clock QC Entry 56935 QC #: Date Reported: 56985 1/15/2008 Area: Database\DBExpress\TSQLDataSet Description: Steps: Statements reprepared on every call to ExecSQL. TDBXWeaverBugsSuite.native.db.test.exe connection=fbconnection -s:TestRaid_257237 [QC Short Description] ExecSql sets Prepared to false. or See attached test program. I was able to reproduce the issue using drivers delivered with RAD studio and FireBird 1.5 with fbclient.dll. SqlExpr.* (pas, dcu, dcuil, hpp) dbexpress4100.* (bpl, dcp, lib, bpi) Borland.VclDbExpress.* (dll, dcpil, pdb) [QC Description] Calling TSqlDataSet.ExecSQL closes the statement and set's Prepared to false. This was working fine in Delphi 6.0. FSqlDataSet := TSQLDataSet.Create(nil); FSQLDataSet.SQLConnection := ASqlConnection; FSQLDataSet.CommandText := 'insert .....'; FSQLDataSet.Prepared := ADoPrepare; while [ data available ] do begin // set params FSQLDataSet.Params.ParamByName('PSomething').AsInteger := Random(12); // insert the record. Here Prepared is set to false FSQLDataSet.ExecSQL end; // Francois Piette It's not a DBX driver problem. It apears with CodeGear supplyed driver, Upscene Firebird driver and with Corelab Oracle driver as well. QC Entry 56985 QC #: Date Reported: Area: 56992 1/15/2008 SOAP\WSDL Importer Description: Steps: [QC Short Description] Function Results changed to TSOAPAttachment Use the attached WSDL and run it through the WSDLImporter [QC Description] Having a function with TSOAPAttachment as result, results in all functions having TSOAPAttachment as result. Example: IIPSScriptManager [WSDL] (urn:UIPSTypes-IIPSScriptManager) unsignedShort CreateScript(TIPSScriptType ScriptType, unsignedShort ScriptID) void DeleteScript(unsignedShort ScriptID) void SetFile(unsignedShort ScriptID, string ScriptFile) unsignedShort GetScriptID(string ScriptName) boolean ScriptExists(unsignedShort ScriptID) void CheckScript(unsignedShort ScriptID) TIPSScript GetScript(unsignedShort ScriptID) TIPSScripts GetScripts(TScriptIDs ScriptIDs) TScriptIDs GetScriptList() base64Binary DownloadScript(unsignedShort ScriptID) void UploadScript(unsignedShort ScriptID, base64Binary Data) Generates: IIPSScriptManager = interface(IInvokable) ['{4B5040E7-8619-0246-2314-C94617BC1F64}'] function CreateScript(const ScriptType: TIPSScriptType; const ScriptID: Word): TSOAPAttachment; stdcall; procedure DeleteScript(const ScriptID: Word); stdcall; procedure SetFile(const ScriptID: Word; const ScriptFile: WideString); stdcall; function GetScriptID(const ScriptName: WideString): TSOAPAttachment; stdcall; function ScriptExists(const ScriptID: Word): TSOAPAttachment; stdcall; procedure CheckScript(const ScriptID: Word); stdcall; function GetScript(const ScriptID: Word): TSOAPAttachment; stdcall; function GetScripts(const ScriptIDs: TScriptIDs): TSOAPAttachment; stdcall; function GetScriptList: TSOAPAttachment; stdcall; function DownloadScript(const ScriptID: Word): TSOAPAttachment; stdcall; procedure UploadScript(const ScriptID: Word; const Data: TSOAPAttachment); stdcall; end; QC Entry 56992 QC #: Date Reported: Area: 57496 1/27/2008 IDE\Form Designer Description: Steps: [QC Short Description] Modifier to disable snap to grid and designer guidelines while moving/sizing a control [QC Description] When moving/sizing a control, I seemed to me that Ctrl/Shift/Alt or any combination of them have no effect. (Shift & control show guidelines when a control is selected, but while moving/sizing, no effect). It would be nice if they could be used to temporarily turn off (or on depending on global settings) snap to grid and guidelines, as, while they are often quite useful, sometimes snap & guidelines can be quite annoying. Additionnaly, it'd be even nicer to be able to disable them temporarily only for horizontal aligning/snapping or vertical one, using different combination of modifiers (ok, I know there are not so many modifiers ;) I like using Win key as modifier) QC Entry 57496 QC #: Date Reported: Area: 58117 2/12/2008 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TDataSet.Filter Help [QC Description] In the examples, "State" is the name of a field and should not be linked to TDataSet.State. "SettingTheFilterProperty" should be "Setting The Filter Property" QC Entry 58117 // Francois Piette Same in french version. QC #: Date Reported: Area: 58473 2/19/2008 Database\dbExpressCore Description: Steps: [QC Short Description] For field of the type NCHAR when call ApplyUpdates is not indicated SubType (fldstFIXED) 1) sample 1 ********* Needs any dbx driver which correct returns information on NCHAR (DbxType := fldZSTRING; DbxSubType := fldstFIXED;). For instance drivers corelab or dbxoodbc or other. Example for MSSQL (dbxoodbc version 3.100 at 2008-02-24): CREATE TABLE dbx_test_nchar ( -- INT [f_bigint] bigint NOT NULL, -- NCHAR [f_nchar_1] nchar(1) NULL, [f_nchar_3] nchar(3) NULL, [f_nchar_128] nchar(128) NULL, [f_nchar_129] nchar(129) NULL, [f_nchar_254] nchar(254) NULL, [f_nchar_255] nchar(255) NULL, [f_nchar_256] nchar(256) NULL, [f_nchar_355] nchar(355) NULL, [f_nchar_2048] nchar(2048) NULL, PRIMARY KEY f_bigint ); For request below, create simple form for editing (SQLQuery-Provider-CDSDataSource-DBGrid): select * from dbx_test_nchar; Install the point of the interruption into Delphi 2007/2006: SQLExpr.pas: procedure SetProcedureParams( Or in code dbx driver on procedure to installation parameter ISQLCommand30.setParameter (TSqlCommandOdbc.setParameter for dbxoodbc) You see that information on subtype is absent (uSubType = 0). 2) sample 2 ********** open sample from qc 58678: - run app - press button "ReConnect" - select query "select * from dbx_test_char" - press button "Open CDS" - change any char column and press button "Apply CDS" and see value of uSubType on DbxOpenOdbc.pas:TSqlCommandOdbc.setParameter [QC Description] For field of the type NCHAR when call ApplyUpdates is not indicated SubType (fldstFIXED). From for this impossible processing the mode TrimChar in dbx-driver. fixed: SQLExpr.pas: D2007: ... procedure SetProcedureParams( ... iSubType := 0; //if iFldType in [TDBXDataTypes.BlobType, TDBXDataTypes.AnsiStringType] then // OLD LINE. if iFldType in [TDBXDataTypes.BlobType, TDBXDataTypes.AnsiStringType, TDBXDataTypes.WideStringType] then // FIXED LINE. iSubType := Word(FldSubTypeMap[Param.DataType]) else if iFldType = TDBXDataTypes.UnknownType then ... D2006: ... procedure SetProcedureParams( ... iSubType := 0; //if iFldType in [fldBlob, fldZString] then // OLD LINE. if iFldType in [fldBlob, fldZString, fldWIDESTRING] then // FIXED LINE. iSubType := Word(FldSubTypeMap[Params[I].DataType]) else if iFldType = fldUNKNOWN then ... QC Entry 58473 QC #: Date Reported: Area: 58540 2/21/2008 IDE\Menus Description: Steps: [QC Short Description] Designer-specific commends in Edit menu remain enabled in editor see descr [QC Description] There is a number of commands in "Edit..." submenu (of the main menu) that are specific to the form designer: these are all commands starting from "Align to grid..." and below. When editing a unit (not even a form), all these commands remain visible and many of them ("Align...", "Size..." and all below them) are even enabled, although they obviously can't do anything useful in this context. Solution: hide these commands when not in Designer. QC Entry 58540 QC #: Date Reported: Area: 58622 2/23/2008 IDE\Memory Issues Description: Steps: [QC Short Description] Delphi 2007 About Box doesn't display more than 2 GB of memory available (1) Launch Delphi 2007 on Windows Vista wit 4 GB of RAM installed (2) Display IDE dialog box (3) Notice that it displays 2 097 152 KB of memory installed instead of 3 142 676 KB [QC Description] Delphi 2007 about box displays the wrong number of memory available when PC got more than 2 GB of RAM installed. // Francois Piette See attached screen dump showing side by side about box and Vista system informations. Implementation tip: When calling the Windows API, GlobalMemoryStatusEx should be used instead of GlobalMemoryStatus. QC Entry 58622 QC #: Date Reported: Area: 58955 3/1/2008 Install\User Interface Description: Steps: [QC Short Description] Go to http://members.codegear.com and log in. Choose to see registered products. Select your serial number Allow pasting of serial number/key during install. and press Ctrl-C Install Rad Studio When prompted for serial number press Ctrl-V Only the first edit will be pasted to. [QC Description] Four edit boxes are used to enter you serial number during install. We can copy our serial number from our account on the CodeGear website or from an email received but we have to enter each piece of the serial number in the four edit boxes. It would be convenient that whatever box we were in we could press <Ctrl><V> to paste our serial. What is in the clipboard would be parsed and entered into the correct edit boxes. QC Entry 58955 QC #: Date Reported: Area: 59251 3/9/2008 IDE\Refactoring\Find References Description: Steps: [QC Short Description] Hint for "Delete" button says "Refactor" see descr. [QC Description] In the toolbar of the "Find references" result panel there are two buttons: "Delete" and "Delete All". The popup hint for the "Delete" button is incorrect: it says "Refactor", should be something like "Remove the selected reference". QC Entry 59251 // Uwe Schuster I can repeat that in the english and german version. // Francois Piette I can reproduce in the french version for the delete button. It says "Refactoring (suppr)" which is misleading. I suggest "Supprimer sélection". QC #: Date Reported: Area: 59963 3/26/2008 VCL\Core VCL Classes\TForm Description: Steps: [QC Short Description] PopupMode=pmExplicit doesn't handle correctly the closing of forms in certain cases ref:238588, possible dup. [QC Description] Hi, Compile & run the attached program. Also, read the instructions on the forms. When a (secondary) form has the PopupMode=pmExplicit and PopupParent the main form, then, if, while the 2ndary form is open, the focus is switched to another program and back, by closing the 2ndary form (which implicitly should bring the focus to the Delphi application), the main form is sent in back to the program which was focused at some moment in time. Compile & run the attached program. Be sure to read the instructions written on the forms to reproduce the bug. (Note: The behavior is the same even I assign the properties in code or in OI, at design-time). QC Entry 59963 QC #: Date Reported: Area: 60125 3/29/2008 IDE\File Handling Description: Steps: [QC Short Description] IDE error when __history folder can't be created 1. Create a new folder 2. In the folder, create or copy a file named "__history" 3. Launch RAD studio 4. Create a new Delphi VCL forms application 5. Save the project into the new folder 6. Do any change in the project, such as resizing the form 7. Save the project again. => You get the error Expected: The IDE should tell the user that in cannot create the folder "__history" because that name is already used. [QC Description] Impossible de renommer 'Y:\FPiette\CodeGear\Q1-2008\Tests\Raid240161\Unit1.dfm' en 'Y:\FPiette\CodeGear\Q1-2008\Tests\Raid240161\__history\Unit1.dfm.~1~' "__history" was a file instead of a folder. See attached stack trace QC Entry 60125 QC #: Date Reported: Area: 60175 3/31/2008 ActiveX\Type Library Editor Description: Steps: [QC Short Description] Renaming interfaces in a remote datamodule will trash source files 1) Create a remote datamodule with some interfaces 2) Implement some methods 3) Rename the interfaces Expected: Source files are update accordingly Result: Source files methods are not update correctly and get trashed. [QC Description] After renaming some interfaces in a remote datamodule with some child datamodules, the source files where trashed. Here some examples: What was class procedure TADMINQueryEngine.UpdateRegistry became, after renaming IADMINQueryEngine to IS3DQueryEngine class procedure TS3DQueryEnS3DQueryEnginetry function TADMINQueryEngine.ExecuteSearch became function TS3DQueryEngiS3DQueryEngine function TADMINQueryEngine.GetSessionFileData became TS3DQueryEngineS3DQueryEngineata It looks something went wrong in refactoring, it looks it repeats parts of the new string and overwrites the old one partially. Also a datamodule is turned into a form. It contains form properties (open in in text view) QC Entry 60175 QC #: Date Reported: Area: 60211 4/1/2008 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] AddModuleUnloadProc nearly empty and twice in the overview 1. open help 2. enter the URL given 3. see it exists 2x [QC Description] The description of AddModuleUnloadProc is "This is... of ..." and it's listed 2 times in ms-help://borland.bds5/delphivclwin32/!!FUNCTIONS_System.html QC Entry 60211 QC #: Date Reported: Area: 60534 4/7/2008 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] SetLastError not properly documented [QC Description] ms-help://borland.bds5/delphivclwin32/!!FUNCTIONS_System.html says only "This is System.SetLastError" QC Entry 60534 QC #: Date Reported: 60729 4/10/2008 Description: Area: Database\ADO Steps: [QC Short Description] TParameters.ParseSQL error leading to Parameter object is improperly defined on valid SQL drop a ADOConnection on a form and add 2 buttons and attach the following code. procedure TForm1.Button1Click(Sender: TObject); var Query: TADOQuery; begin //Colon breaks because of presence of preceeding Double quote in lateral string Query := TADOQuery.Create(nil); try Query.Connection := [QC Description] ADOConnection1; Query.SQL.Add(' Select '' Hello this is a Colon " : " '' '); Query.Open; finally Query.Free; end; TParameters.ParseSQL has a bug in detecting termination of Literals which can cause subsequent misdiagnosis end; procedure TForm1.Button2Click(Sender: TObject); var Query: TADOQuery; begin //Colon fine here of the : character as the start of a parameter leading to a "Parameter object is improperly defined. Inconsistent or Query := TADOQuery.Create(nil); try Query.Connection := ADOConnection1; Query.SQL.Add(' Select '' Hello incomplete information was provided" Exception. this is a Colon : '' '); Query.Open; finally Query.Free; end; end; Button 1 should now demonstrate the bug. This bug seems to be present in all versions of ADODB.pas (seen in Delphi6 and 2007). QC Entry 60729 QC #: Date Reported: Area: 60817 4/12/2008 VCL\Standard Controls\TLabel Description: Steps: [QC Short Description] TLabel does not autosize if added by pressing ENTER in the tool palette 1. Create a new VCL Win32 Application 2. Use the tool palette to select the TLabel item 3. Press Enter in the focused tool palette Expected: The Label appears on the form and the autosize property causes the width and height to fit the text. Actual: The Label appears on the form but the autosize property isn't taken into account. The Label's width and height do not fit. [QC Description] The TLabel does not autosize if it is added by pressing ENTER in the tool palette. This causes the TLabel have a wrong width and height until the form is closed and reopened. This also affects TDBText and other autosized controls. QC Entry 60817 QC #: Date Reported: Area: 61216 4/21/2008 IDE Description: Steps: [QC Short Description] Resources not needed in the IDE [QC Description] Opening various files in a Resource Editor I found: BDS.EXE There is a Bitmap called "SPLASH16" than contains the old Delphi 7 look at feel splash screen. It shows Borland with no mention of CodeGear. CoreIDE120.bpl There is a Bitmap called WIZARDDEFAULT that is black and white logo of Borland Vertical. Maybe should be CodeGear if used. BDSLauncher.exe Contains all of the BB* Resources, which since I don't think this can display anything, it may be linking in too much. We just recently reduced our EXE sizes here by doing audits on our resouce files and found several images that were old and not needed, so I hoping this small list might help. -QC Entry 61216 QC #: Date Reported: Area: 61378 4/24/2008 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Please add Alphabetize option/options to PM and eliminate all forced alphabetization see QC61372 and QC61376 for steps showing unexpected behavior in C++ personality. [QC Description] Please eliminate all automatic and uncontrollable alpahabetization in Project Manager for all personalities. Currently in Delphi alphabetization is automatic and enforced at all times. I prefer to keep libs, resource files, etc together at the bottom of the list since I cannot edit thes files in the IDE. Others may wish to group files by topic. PM does not allow reording files at all in the Delphi personality. In C++, the situation is worse because the order of files in PM controls the build order. User can drag and drop files into a different order, but the files are realphabetized every time a new file is added to the project QC61376 or when the view is changed QC61372. I would like to see all forced reordering of the PM file list eliminated and optional alphabetization implemented instead. Ideally this would include an option to alphabetize now as well as an option to turn on automatic alphabetization as currently enforced in Delphi. QC Entry 61378 QC #: Date Reported: Area: 62347 5/20/2008 Documentation Description: [QC Short Description] TControlBar.RowSnap help useless [QC Description] ms-help://borland.bds5/delphivclwin32/ExtCtrls_TControlBar_RowSnap.html is useless as it only says "This is member..." QC Entry 62347 Steps: QC #: Date Reported: Area: 62348 5/20/2008 Documentation Description: Steps: [QC Short Description] TControlBar.RowSize useless [QC Description] ms-help://borland.bds5/delphivclwin32/ExtCtrls_TControlBar_RowSize.html is useless it says "This is member of..." QC Entry 62348 QC #: Date Reported: 62562 5/25/2008 Area: Database\DBExpress Description: Steps: [ASE] TDBXWeaverBugsSuite.Native.DB.Test.exe connection=aseconnection -s:TestRaid_260834 [QC Short Description] Memory leak when ExecSQL using dbexpress TSQLconnection / TSQLQuery with ASE (dbxase30.dll) -or- Simple Delphi 2007 test application source is attached which reproduces the problem. This establishes runtime TSQLConnection and TSQLQuery component, and attempts to truncate then write 1000 unique records to a database table called dse_trpprc, which comprises two char fields (trp, prctyp). This can be easily changed to any table name / field names in the source. Note that using VCL components at design time, or creating runtime components for TSQLConnection or The issue appears to be related to dbxase30.dll (Sybase ASE), as the same test application does not produce a TSQLQuery makes no difference. memory leak if the TSQLConnection is instead associated with the 3rd party dbexpca400.dll (from Peter Example output from the dbxase30.dll ASE connection using the test application is as follows (demonstrating a Sawatzki) and connected to an AS/400 database. memory leak): -Including "ReportMemoryLeaksOnShutdown:=true;" in the test application FormCreate, does not report any Start Mem: 3,988 K - End Mem: 6,204 K - Consumed: 2,216 K memory leaks on shutdown, despite the application having consumed and not released additional memory for Start Mem: 6,212 K - End Mem: 6,216 K - Consumed: 4 K each ExecSQL call. Start Mem: 6,216 K - End Mem: 6,220 K - Consumed: 4 K Start Mem: 6,220 K - End Mem: 6,228 K - Consumed: 8 K The leaked memory is also not released even after Free'ing the TSQLQuery object that was used to invoke the Start Mem: 6,228 K - End Mem: 6,232 K - Consumed: 4 K ExecSQL call (perhaps further confirming the issue exists with dbxase30.dll?). The memory is only released Start Mem: 6,232 K - End Mem: 6,240 K - Consumed: 8 K upon termination of the application. Start Mem: 6,240 K - End Mem: 6,244 K - Consumed: 4 K QC Entry 62562 Start Mem: 6,244 K - End Mem: 6,252 K - Consumed: 8 K etc. -Conversely, if the TSQLConnection is changed to use dbexpca400.dll / dbxadapter30.dll to connect to an AS/400 database (instead of Sybase ASE), the following output is logged (noting no memory leak - only the initial component memory consumption): -Start Mem: 3,256 K - End Mem: 6,504 K - Consumed: 3,248 K Start Mem: 6,508 K - End Mem: 6,512 K - Consumed: 4 K Start Mem: 6,512 K - End Mem: 6,516 K - Consumed: 4 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K Start Mem: 6,516 K - End Mem: 6,516 K - Consumed: 0 K etc. -[QC Description] When using dbxpress TSQLConnection / TSQLQuery with Sybase ASE (using dbxase30.dll) in Deplhi 2007, a memory leak occurs with each call to ExecSQL. QC #: Date Reported: Area: 62671 5/28/2008 Documentation Description: Steps: [QC Short Description] Help for WM_User useless [QC Description] This topic: ms-help://borland.bds5/delphivclwin32/Messages_WM_USER.html is useless as it says only "This is..:". Good that the Windows SDK provides a more usefull help topic which is listed as well. QC Entry 62671 QC #: Date Reported: Area: 62794 6/1/2008 IDE\Code Completion Description: Steps: [QC Short Description] Code completion doesn't work inside classes 1. Open the attached project, or create a console application and paste in this code: program BugFinder; {$APPTYPE CONSOLE} type TSomeType = (stOne, stTwo); TTestCodeCompletion = class(TObject) public function GetSomeType: TSo // PUT CURSOR AT END OF THIS LINE end; function NonClassGetSomeType: TSo begin end. 2. Position the cursor at the end of the marked line and press Ctrl-Space to invoke code completion // EXP: TSomeType to show in the code completion list // ACT: Nothing happens If you place the cursor at the end of the line function NonClassGetSomeType: TSo and press Ctrl-Space to invoke code completion, it works as expected. If you insert a new 'type' line after TSomeType = (stOne, stTwo); code completion also works. [QC Description] Code completion doesn't see other types declared in the same type section when invoked from within a class declaration. QC Entry 62794 QC #: Date Reported: Area: 62797 6/1/2008 IDE\Code Completion Description: Steps: [QC Short Description] Code completion fails when a type name has been completed 1. Open the attached project, or create a console application and paste in this code: program BugFinder; {$APPTYPE CONSOLE} type TSome = (sOne, sTwo); TSomeType = (stOne, stTwo); var Something: TSome // PUT THE CURSOR HERE function GetSomething: TSome begin end. 2. Put the cursor after TSome on the marked line, and press Ctrl-Space to invoke code completion. //EXP: the code completion list should show TSome and TSomeType //ACT: nothing happens If you put the cursor at the end of the line function GetSomething: TSome and press Ctrl-Space to invoke code completion, the expected behaviour is seen. [QC Description] If code completion is invoked in a variable declaration at a point where the text so far forms the complete name of an existing type, it fails to show alternatives that start with that name. It doesn't have the same problem in a function declaration. QC Entry 62797 QC #: Date Reported: Area: 63083 6/9/2008 RTL\Delphi Description: [QC Short Description] Add TStringBuilder.Clear method. [QC Description] As an alternative to setting Length to 0 on a TStringBuilder, it would be more intuitive to call a Clear method that does the same thing. (Perhaps a class helper could do the same thing for the .NET StringBuilder. I'll QC this seperately.) QC Entry 63083 Steps: QC #: Date Reported: Area: 63088 6/9/2008 VCL Description: Steps: [QC Short Description] Missing INLINE opportunities [QC Description] Control.TWinControl.DisableAlign seems like a good INLINE candidate. Control.TWinControl.GetParentBackground seems like a good INLINE candidate. Graphics.TBrush.GetColor seems like a good INLINE candidate. Graphics.TBrush.GetStyle seems like a good INLINE candidate. Graphics.TPen.GetColor seems like a good INLINE candidate. Graphics.TPen.GetWidth seems like a good INLINE candidate. Graphics.TFont.GetStyle seems like a good INLINE candidate. Graphics.TFont.GetHeight seems like a good INLINE candidate. Forms.TScreen.GetFormCount seems like a good INLINE candidate. Forms.TScreen.GetCustomFormCount seems like a good INLINE candidate. QC Entry 63088 QC #: Date Reported: Area: 63089 6/9/2008 RTL Description: Steps: [QC Short Description] Missing INLINE opportunities [QC Description] System.TObject.ClassType seems like a good INLINE candidate. System.TObject.ClassInfo seems like a good INLINE candidate. Classes.TCollection.GetCount seems like a good INLINE candidate. Types.Point seems like a good INLINE candidate. Types.RectWidth and Types.RectHeight seem like good INLINE candidates and are in fact marked INLINE, but only in the IMPLEMENTATION and neither are in fact inlined e.g. when called from Controls.TCustomHint.SetHintSize. QC Entry 63089 QC #: Date Reported: Area: 63126 6/10/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Generic constrained on "class" can access TObject methods but Error Insight says it cannot 1. Get build 3079 and type the code at the bottom in a unit 2. Compile Exp: Compilation succeeds Act: Compilation succeeds 3. Observe Error Insight Exp: No error indicated Act: 4 errors: GetHahCode is not declared ========================================================================================================= interface type IEquatable<T> = interface function Equals(Other: T): Boolean; end; IEqualityComparer<T> = interface function Equals(A, B: T): Boolean; function GetHashCode(Obj: T): Integer; end; TEquatable<T: class> = class(TInterfacedObject, IEquatable<T>, IEqualityComparer<T>) public { IEquatable<T> } function Equals(Other: T): Boolean; overload; { IEqualityComparer<T> } function Equals (A, B: T): Boolean; overload; function GetHashCode2(Obj: T): Integer; function IEqualityComparer<T>.GetHashCode = GetHashCode2; end; implementation //=== { TEquatable<T> } =========================================== function TEquatable<T>.Equals (Other: T): Boolean; begin if Other = nil then Result := False else Result := GetHashCode = Other.GetHashCode; end; function TEquatable<T>.Equals(A, B: T): Boolean; begin if A = nil then Result := B = nil else if B = nil then Result := False else Result := A.GetHashCode = B.GetHashCode; end; function TEquatable<T>.GetHashCode2(Obj: T): Integer; begin if Obj = nil then Result := 0 else Result := Obj.GetHashCode; end; [QC Description] QC61237 has been fixed and the compiler is happy with the code in the issue. However, the very same example code gives an error in Error Insight saying GetHashCode is an undeclared identifier. QC Entry 63126 QC #: Date Reported: Area: 63188 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 [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 the message pane - copy the "dcc32.exe" line and paste it into notepad.exe (or any other tool where you can better read and re-format it) expected: -Ic:\MySearchPath;<library path> -Oc:\MySearchPath;<library path> option in the MSBuild command line. In fact of the incorrect -R option the resource files could not Rc:\MySearchPath;<library path> -Uc:\MySearchPath;<library path> actual: -Ic:\MySearchPath;<library path> be found and I had to add the resource file path to the library path to get it compiling. O<library path> -R<library path> -Uc:\MySearchPath;<library path> 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: 63324 6/15/2008 IDE\Code Completion Description: Steps: [QC Short Description] CodeInsight AutoInvoke is shown when pressing Ctrl+Y (Delete line) 1. Activate the "Auto Invoke" option in the Tools/Options.../Code Insight page. 2. Create a new VCL application 3. Double click on the form (to create a OnCreate event handler) 4. Press Ctrl+Y (delete line) Expected: No code insight listbox should be shown Actual: The code insight listbox appears [QC Description] If you activate the CodeInsight AutoInvoke option and then you press the Ctrl+Y (delete line) shortcut in an empty line that is followed by a non-empty line the CodeInsight listbox is displayed. Solution: Ctrl+Y should be treated like the arrow keys and not show the code insight listbox. Maybe there are other shortcuts that have the same problem. QC Entry 63324 QC #: Date Reported: Area: 63336 6/15/2008 IDE Description: Steps: [QC Short Description] Blank DesktopName key prevents IDE from displaying Close Delphi Open the registry key HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Session\ Set DesktopName value to "" Restart Delphi You will only see the Windows Caption bar and the welcome page. No Menus, No Toolbar, No Palette, No Object Inspector, Project Manager etc [QC Description] The desktop for the design time IDe is stored in HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Session\DesktopName If this value is blank, then the Windows Caption bar of the IDE displays, along with the Welcome page. Nothing else is displayed - and there is no way of accessing the "Save Desktop" combobox, as the menu bar and toolbars are not shown either. Entering "Default Layout" into the registry value fixes the problem. QC Entry 63336 QC #: Date Reported: 63474 6/18/2008 Area: Compiler\Delphi\Language Description: Steps: [QC Short Description] Compiler failure with PChar and char literals Compile the attached application below. See the following unexpected compile-time error. [QC Description] The following code generates an [DCC Error] ... E2008 Incompatible types Error: E2008 Incompatible types program BTS261179; var x: PChar; begin x := '.'; if x <> '.' then; //Error here end; {$APPTYPE CONSOLE} uses SysUtils; var It compiles and works fine under Delphi 2007. It doesn't generate pretty code (it creates a temporary short string Counter: Integer = 0; from the PChar), but it works nonetheless. procedure DoIt; Casting '.' as PChar('.') makes the problem go away. The compiler shoudl have done this itself. var QC Entry 63474 x: PChar; begin [Tester Recommended] x := '.'; if x <> '.' then //Error here WriteLn('FAIL') else WriteLn('PASS'); end; begin try DoIt; except on E: Exception do WriteLN('FAIL Exception=', E.ClassName, '/', E.Message); end; end. QC #: Date Reported: Area: 63540 6/20/2008 RTL\Delphi Description: Steps: [QC Short Description] TList<T>: "Item" property should be named "Items" var A: TList; B: TList<Pointer>; begin A.Items[0] := nil; // compiles B.Items[0] := nil; // does not compile because the property is misnamed end. [QC Description] On TList<T>, the "Item" property should be named "Items" for consistency with existing list classes (TList, TInterfaceList, TCollection, etc.). Change: property Item[Index: Integer]: T read GetItem write SetItem; default; to: property Items[Index: Integer]: T read GetItem write SetItem; default; QC Entry 63540 QC #: Date Reported: Area: 63619 6/23/2008 IDE\Structure Pane Description: Steps: [QC Short Description] Structure pane does not show anything in a *_TLB.pas file 1) Create a type library 2) Select the _TLB.pas file Expected: the structure pane shows the interfaces Actual: the structure pane does not show anything [QC Description] When the active editor tab is a type library pas file (*_TLB.pas), the structure pane does not show anything, QC Entry 63619 QC #: Date Reported: Area: 64414 7/13/2008 RTL\Delphi\Pascal Strings Description: Steps: [QC Short Description] Replacement string comparison routines program BTS262144; {$APPTYPE CONSOLE} [QC Description] Attached are suggested replacement functions for _LStrCmp, _UStrCmp, as well as suggested implementations uses for _UStrEqual and _LStrEqual (that currently redirect to _UStrCmp and _LStrCmp). They have been tested by SysUtils; myself as well as participants of the Tiburon field test. procedure DoTest; Please replace the existing four functions in system.pas in order to improve string handling performance. var a, b: AnsiString; QC Entry 64414 begin a := 'abc'; b := 'abbc'; if a <= b then WriteLn('FAIL') else 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: 64453 7/14/2008 RTL\Delphi Description: Steps: [QC Short Description] TList<T> should have First, Last and Move methods like TList [QC Description] The TList<T> class in Generics.Collections does not have First, Last and Move methods like TList in the Classes unit does. This makes migrating code from TList to TList<T> more work than it should be. QC Entry 64453 QC #: Date Reported: Area: 64484 7/15/2008 RTL\Delphi\RTL Exceptions Description: Steps: [QC Short Description] SysUtils.Abort can raise an AccessViolation 1. Create a new VCL application 2. Put the following code into the OnCreate event handler 3. Execute the application procedure TForm1.FormCreate(Sender: TObject); begin {1} asm push ebp; mov ebp, 1; end; // this could be done by the optimizer {2} Abort; {3} asm pop ebp; end; end; Expected: Abort raises an EAbort exception at address {2} Actual: Abort crashes with an access violation because [EBP+4] fails. [QC Description] The SysUtils.Abort procedure can raise an AccessViolation if compiler uses the EBP register in the caller for a variable. Furthermore the Abort::ReturnAddress function doesn't return the return address of Abort but the return address of the caller. This is because SysUtils.Abort doesn't have a stack frame. QC Entry 64484 QC #: Date Reported: Area: 64625 7/19/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] TObject is shown as Undeclared Identifier 1. Run Delphi 2. Create a new application. 3. Dop a button on the form, and double-click it. 4. Examine the code window. [QC Description] In the code below, TObject is shown with the red squiggly underline, and the tooltip "Undeclared identifier 'TObject'" unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); // <== undeclared identifier TObject private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); // <== undeclared identifier TObject begin (TButton(Sender)).Caption := 'Click'; end; end. QC Entry 64625 QC #: Date Reported: Area: 64642 7/20/2008 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] The design time packages are not distinguishable in the project manager The Runtime, Design time, and combined(runtime/design time) packages have the same icons in the project manager. This makes it difficult to figure out which package from the project group has to be installed. 1. Open a project group containing Design Time and Runtime packages. 2. They all have the same icon. There is no visual difference between them, and you have to try them one by one to see which one can be installed in the IDE, and which one can't. [QC Description] The Runtime, and Design time packages have the same icons in the project manager. QC Entry 64642 QC #: Date Reported: Area: 64836 7/25/2008 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Rebuilding packages in a project group. 1. Create a project group with multiple packages dependant on each other. 2. Build and install all the packages. 3. Make a change in a class name in the hierarchy of dependencies and start a "Build All". The build will go very slow as the packages are uninstalled installed all the time during the build, and a number or errors will popup. [QC Description] When rebuilding the packages in a project group every package is uninstalled prior to its rebuild, and installed immediately after that. This makes the rebuild enormously slow as all dependant packages are also reinstalled over and over again often taking longer than the compilation itself. In addition when a change is made in a class name in a package and the package is recompiled all dependant packages start throwing a massive amount of popup error messages. All those problems can be fixed if when "rebuilding all" the packages in the project group are uninstalled first and installed after the full rebuild is finished. The rebuild process will be significantly faster and there will be no annoying popup error messages. QC Entry 64836 QC #: Date Reported: Area: 64967 7/29/2008 IDE\Code Browsing Description: Steps: [QC Short Description] Ctrl+Click doesn't work with project attached (because of unit aliases) In attached examples control click doesn't work. Attached project contains standard new unit and 2 new uses in Implementation section and FormCreate event handler which contains one line. Unit RT_Types contains only 2 uses and nothing else. QC Entry 64967 To reproduce open attached project open the Messages view. COMPILE - This is the necessary step to reproduce. and ctrl-click on word Contnrs. Nothing happend. you will see message: [Pascal Fatal Error] Unit2.pas(23): F1026 File not found: 'WinProcs.dcu' the same happend if you ctrl+click on ExtractFilePath word. I belive it is realted to unit aliases WinProcs and WinTypes in RT_Types. QC #: Date Reported: Area: 64994 7/30/2008 Documentation\Help Output Description: Steps: [QC Short Description] FormatCurr help entry is wrong. Try to use formatCurr('%m', 2.1). The result is "%m" without quotes. (This example is from a post in borland.public.delphi.language.delphi.general by "kei") on 2008-07-30 [QC Description] The Help entry for FormatCurr Function says "For information on the format strings, see Format Strings." Which is wrong. Maybe it should say "For information on the format strings, see FormatFloat." --JohnH QC Entry 64994 QC #: Date Reported: Area: 65047 7/31/2008 IDE\Block Completion Description: Steps: [QC Short Description] "begin" is not completed in the initialization and finalization block. 1. Create a new VCL application 2. Add an initialization block to the unit 3. Write "begin" in the initialization block and press ENTER Expected: Block Completion adds the missing "end;" Actual: Nothing happens 4. Remove the "begin" 4. Add a finalization block to the unit 5. Write "begin" in the finalization block and press ENTER Expected: Block Completion adds the missing "end;" Actual: Nothing happens [QC Description] Block Completion doesn't complete the "begin" in the initialization and finalization block. QC Entry 65047 QC #: Date Reported: Area: 65112 8/1/2008 Database\TParams Description: Steps: [QC Short Description] TParam.SetAsVariant does not use TFieldType introduced in D2009 [QC Description] Current code in TParam.SetAsVariant has following case statement: case VarType(Value) of varSmallint, varShortInt, varByte: FDataType := ftSmallInt; varWord, varInteger: FDataType := ftInteger; varCurrency: FDataType := ftBCD; varLongWord, varSingle, varDouble: FDataType := ftFloat; varDate: FDataType := ftDateTime; varBoolean: FDataType := ftBoolean; varString, varOleStr: if FDataType <> ftFixedChar then FDataType := ftString; varInt64: FDataType := ftLargeInt; else It ignores TFieldType introduced in D2009. The more correct code should be: case VarType(Value) of varSmallint: FDataType := ftSmallInt; varShortInt: FDataType := ftShortInt; varByte: FDataType := ftByte; varInteger: FDataType := ftInteger; varWord: FDataType := ftWord; ........ etc BTW, the same may be applied to the VarTypeToDataType function. QC Entry 65112 QC #: Date Reported: Area: 65226 8/4/2008 RTL\Delphi\Pascal Strings Description: Steps: [QC Short Description] _LStrFromPWCharLen writes 0 into codePage field Test #1: {$ASSERTIONS ON} var U: UnicodeString; A: AnsiString; begin // _NewAnsiString test -- this correctly sets codePage=DefaultSystemCodePage SetLength(A, 1); // These succeed: Assert(StringCodePage(A) <> 0); Assert(StringCodePage(A) = DefaultSystemCodePage); // _LStrFromPWCharLen test -- this incorrectly sets codePage=0 U := 'test'; A := U; // These fail: Assert(StringCodePage(A) <> 0); Assert(StringCodePage(A) = DefaultSystemCodePage); end. Actual result: The second set of assertions fail. Expected result: No assertion failures. ========================================= Test #2: {$ASSERTIONS ON} var A: AnsiString; U: UnicodeString; begin Assert(DefaultSystemCodePage = 1252); DefaultSystemCodePage := 1251; // Cyrillic // Initialize the AnsiString SetLength(A, 1); A[1] := #212; // Convert ANSI -> Unicode U := A; Assert(U = #$0424); // Convert Unicode -> ANSI A := U; Assert(A[1] = #212); // Convert ANSI -> Unicode again U := A; Assert(U = #$0424); // Assertion fails! end. Actual result: The last assertion fails. Expected result: No assertion failures. [QC Description] When a UnicodeString is assigned to an AnsiString, _LStrFromPWCharLen writes 0 in the AnsiString's code page field. This is inconsistent with _NewAnsiString, which initializes the code page field to DefaultSystemCodePage. (0 is translated to DefaultSystemCodePage internally.) As a consequence of this bug, string conversions do not round-trip correctly when a custom DefaultSystemCodePage setting is used. (See Test #2) Suggested fix: procedure _LStrFromPWCharLen(var Dest: AnsiString; Source: PWideChar; Length: Integer; CodePage: Word); var DestLen: Integer; begin if Length <= 0 then begin _LStrClr(Dest); Exit; end; // ADD THESE TWO LINES: if CodePage = 0 then CodePage := DefaultSystemCodePage; DestLen := CharFromWChar(nil, 0, Source, Length, CodePage); SetLength(Dest, DestLen); if DestLen > 0 then begin CharFromWChar(Pointer(Dest), DestLen, Source, Length, CodePage); PStrRec(Integer(Pointer(Dest)) - skew).codePage := CodePage; end else _LStrClr(Dest); end; QC Entry 65226 QC #: Date Reported: Area: 65233 8/4/2008 Database\DBExpress Description: Steps: [QC Short Description] Need to provide an easy way to specify port number in DSProxyGen [see description] [QC Description] There is no way to specify a non-default connection string in the command-line DSProxyGen.exe. As people will be migrating a suite of existing Datasnap applications, the easiest way will be to assign a new port to each application so as to not conflict with the default 211. In order to generate the new proxy code, they will need to specify the correct port to allow the connection to pick up the right app server. QC Entry 65233 [added second parameter] The first argument is the output file name. The second parameter is the connection string, e.g.: -c:driver=datasnap;port=211 QC #: Date Reported: Area: 65318 8/5/2008 Debugger\Debugger UI Description: Steps: [QC Short Description] Show Execution Point is not enabled when program stopped on exception 1. Create new VCL Form Application 2. Double click on form 3. Paste this: Raise Exception.Create(''); 4. Run program and program will stop on that line. Expected: Menu Run|Show executing Point is enabled Actually: Menu Run|Show executing Point is disabled. Really annoying QC Entry 65318 QC #: Date Reported: Area: 65320 8/5/2008 Debugger\Watches Description: Steps: [QC Short Description] Watch List item appears to have focus, but doesn't 1. Add a single item to the Watch List. 2. Click over into the code editor (to remove the focus from the Watch List). 3. Click back into the Watch List, but in an empty area below the item. The item in the Watch List changes color from grey to blue, seemingly indicating that it has the focus. 4. Press Delete on the keyboard. Nothing happens. 5. Click directly on the item, somewhere in the Value column. The appearance of the item doesn't change at all, but now it *really* has the focus. 6. Press Delete on the keyboard. This time, the item is deleted. Expected result: Pressing Delete in Step 4 should have deleted the item. If the item is going to be drawn in a "focused" color, then it really should have the focus. [QC Description] See Steps. This didn't happen in older versions of Delphi that used a plain list box for the Watch List. QC Entry 65320 QC #: Date Reported: Area: 65406 8/7/2008 VCL\Additional Controls\TStringGrid Description: Steps: [QC Short Description] Themes for TStringGrid and TDBGrid controls [QC Description] The TStringGrid and TDBGrid controls badly need support for the Windows XP themes. They are almost last controls in VCL that lack a modern appearance. QC Entry 65406 QC #: Date Reported: Area: 65415 8/7/2008 VCL\Standard Controls\TComboBox Description: Steps: [QC Short Description] TextHint doesn't show in ComboBox On XP or above with themes enabled: Create a new application Add a TComboBox and TEdit control to the main form. For both controls, make sure the Text property is empty. For both controls, enter some text in the TextHint property. Run the application. Change the focus between the controls. Note the background of each control. Expected: The TextHint text should show in both controls at design time and in the unfocused control at run time. Actual: TextHint shows for the TEdit control, but not the TComboBox. [QC Description] When you set the TextHint in a TComboBox, it doesn't show at design or run time. QC Entry 65415 QC #: Date Reported: Area: 65455 8/8/2008 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] New Package Project always create Package1.bpl - New Project | Package - Save with default name Package1.bpl - New Project | Package - IDE create agais Package1.bpl - Save with a different name - Package2.bpl - New Project | Package - IDE create agais Package1.bpl and so one. If the project is not saved, IDE create the new packages as package1, package2, package3... [QC Description] With a opened project group, adding a new package project, it always is created as Package1.bpl, if the project IS saved. QC Entry 65455 <Note: This only happens if you save the package outside the default project folder. If you save inside the default project folder, the number suffix for the package is incremented correctly.> QC #: Date Reported: Area: 65458 8/8/2008 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TComboBox - Clarify TextHint property as Vista and above only [QC Description] The TextHint property works in XP or later for edit controls, but only in Vista or later for TComboBox. Please add a clarification to the help for TextHint under TComboBox for this. QC Entry 65458 QC #: Date Reported: Area: 65459 8/8/2008 Documentation\Online Help\VCL Description: [QC Short Description] Clarify behaviour of TEdit.NumbersOnly property (it still allows non-numeric data) [QC Description] When the NumbersOnly property is set, non numeric values can still be assigned to the TEdit programatically or pasted into the control by the user. This is expected behaviour according to microsoft's documentation on ES_NUMBER style: http://msdn.microsoft.com/en-us/library/bb775464.aspx Steps: Please add a clarification to the help for NumbersOnly under TEdit for this. QC Entry 65459 QC #: Date Reported: Area: 65544 8/11/2008 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Deleting a project from a project group does not mark it as unsaved. 1. Open a project group with multiple C++ Builder projects. 2. Remove a project from the group. 3. The "Save All" button remains disabled and prevents saving the changes in the group. [QC Description] After deleting a project from a project group the "Save All" button remains disabled. QC Entry 65544 QC #: Date Reported: 65680 8/14/2008 Area: Database\DBExpress\TFMTBcd Description: Steps: [Informix] TDBXTiburonBugsSuite.Native.DB.Test.exe connection=informixconnection -s:TestRaid_264520 [QC Short Description] TBCDField error size 255 [QC Description] For some BCD fields where the value is calculated using sum, nvl or sub-query in TCustomSQLDataSet.AddFieldDesc the iunits2 has value 255. That is out of bounds and the DataSet tries to define the field with size of 255. The result is 'Invalid field size'. By debugging and changing the field size to 32 (On informix IDS server I don't know whenever the max value depeneds on server type) the program worked ok. With value higher of 32 also results 'BCD overflow'. However I can't find a way to change this behaviour. Please if someone could give me a hint how to replace the 255 with 32 in source. It would help me a lot as I must soon deploy the application to a client. A simple query to fail: select b/a from example2 create table example2 (a integer, b decimal(16,2) ) ; Now I've uploaded the source of the first example. I hope this will help to reproduce the problem. QC Entry 65680 QC #: Date Reported: Area: 65728 8/16/2008 Documentation\Online Help Description: Steps: [QC Short Description] AnsiStrings name-space doesn't exist. [QC Description] AnsiStrings name space doesn't exist. Moreover, the example of defining the function included in it doesn't exist. Ex. function AnsiCompareStr(const S1, S2: AnsiString): Integer; QC Entry 65728 QC #: Date Reported: Area: 65767 8/18/2008 RTL\Delphi\File Management Description: Steps: [QC Short Description] OpenFile, CreateFile with TFileStream or SysUtils.CreateFile dont honor fmShareDenyWrite, it's impossible to read an already opened File from an other programm!!!! Some Programms look in ONE single file. One Create the file for Writing it, all others can read the file. Open new file with delph, shared mode deny WRITE , tfilestream or else... dont close file. lockfilehandle := TFileStream.Create(s, fmCreate OR fmShareDenyWrite ); <==== fmShareDeny* will be ignored Open the same file for READ only with another delphi programm... dont work... FSlockfilehandle := TFileStream.Create (Filename, fmOpenRead or fmShareDenyWrite ); <=== NO HANDLE!!!! FSlockfilehandle.Read (macbuffer^,sizeof(macbuffer^)) [QC Description] FSlockfilehandle := TFileStream.Create(Filename, fmOpenRead or fmShareDenyWrite ); Don't Work! sysutils.FileOpen(Filename,fmOpenRead or fmShareDenyWrite ); Don't Work! ...\source\Win32\rtl\sys\Sysutils.pas There is a function not allready out-programmed!!! function FileOpen(const FileName: string; Mode: LongWord): Integer; { FileCreate creates a new file by the specified name. If the return value is positive, the function was successful and the value is the file handle of the new file. A return value of -1 indicates that an error occurred. On Linux, this calls FileCreate(FileName, DEFFILEMODE) to create the file with read and write access for the current user only. } function FileCreate(const FileName: string): Integer; overload; inline; { This second version of FileCreate lets you specify the access rights to put on the newly created file. The access rights parameter is ignored on Win32 } function FileCreate(const FileName: string; Rights: Integer): Integer; overload; inline; { FileRead reads Count bytes from the file given by Handle into the buffer specified by Buffer. The return value is the number of bytes actually read; it is less than Count if the end of the file was reached. The return value is -1 if an error occurred. } function FileCreate(const FileName: string): Integer; {$IFDEF MSWINDOWS} begin Result := Integer(CreateFile(PChar(FileName), GENERIC_READ or GENERIC_WRITE, 0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)); end; {$ENDIF} {$IFDEF LINUX} begin Result := FileCreate(FileName, FileAccessRights); end; {$ENDIF} function FileCreate(const FileName: string; Rights: Integer): Integer; {$IFDEF MSWINDOWS} begin Result := FileCreate(FileName); <<========== HERE IS MISSING CODE!!! end; {$ENDIF} {$IFDEF LINUX} begin Result := Integer(open(PChar(FileName), O_RDWR or O_CREAT or O_TRUNC, Rights)); end; QC Entry 65767 QC #: Date Reported: Area: 65837 8/19/2008 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] TItemChange problems [QC Description] Description for csState is incomplete. Links in See Also are messed up (and these aren't links at all): TListItem TListItem TCustomViewItem TListItem TListItem TCustomViewItem TListItem TCustomViewItem TCustomViewItem TCustomViewControl TCustomListView TCustomListview QC Entry 65837 QC #: Date Reported: Area: 65839 8/19/2008 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] TList.Notify - no help [QC Description] At least no entry in the Index, as well as for other protected members of TList. QC Entry 65839 QC #: Date Reported: Area: 65949 8/21/2008 RTL\Delphi Description: Steps: [QC Short Description] TStringBuilder.set_Length allows negative length and mishandles capacity-expansion failure Test #1 - Negative values: var S: TStringBuilder; begin try S := TStringBuilder.Create; S.Length := 100000000; // no exception! S[S.Length-1] := 'a'; // Access violation / heap corruption except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. Test #2 - Length left at new value following EOutOfMemory: var S: TStringBuilder; begin try S := TStringBuilder.Create; try // This raises EOutOfMemory on my VM with 384 MB RAM. // On a system with more memory, you'll probably have to issue a few // large GetMem's first for this to fail. S.Length := $1FFFFFF0; except on EOutOfMemory do Writeln('Caught EOutOfMemory. S.Length = $', IntToHex(S.Length, 1)); end; if S.Length <> 0 then S[S.Length-1] := 'a'; // Access violation / heap corruption except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. [QC Description] TStringBuilder.set_Length issues: - It silently accepts a negative Value. It should raise an exception as .NET does. (Note that Append can feed negative Values to set_Length when "Length := Length + ..." overflows.) - It updates FLength *before* expanding the capacity. Problem there is, if ExpandCapacity raises EOutOfMemory, FLength will be left holding the new value. This can lead to heap corruption if the application tries to write FLength bytes afterward. - In ExpandCapacity, "Length * 2" could overflow. It should fall back to setting a capacity of Length in that case. Suggested fixes attached on Workaround tab. QC Entry 65949 QC #: Date Reported: Area: 66017 8/23/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Error insight fails to parse some procedure declarations with directives (stdcall, etc.) File, New VCL Forms Application SHow form source Overwrite the entire "type" source line with this: type TMyProc = function(Foo: Boolean): Boolean stdcall; Error insight reports this error: type TMyProc = function (Foo: Boolean): Boolean stdcall; The project compiles fine. You can also duplicate this by opening ToolsAPI.pas and the above error is triggered twice. [QC Description] Error insight fails to parse some procedure declarations with directives, such as this one: type TMyProc = function(Foo: Boolean): Boolean stdcall; The resulting error is: Expected ; but received an identifier 'stdcall' at line 9 (9:48) QC Entry 66017 QC #: Date Reported: Area: 66035 8/24/2008 Database\Data Aware Controls\TDBRichEdit Description: Steps: [QC Short Description] TDBRichEdit doesn't save it's changes in certain circumstances To test it, do a simple app with a TDataSet, TDBGrid and a TDBRichEdit connected to one of TDataSet's fields. Add two buttons with the following OnClick handlers: procedure TfrmMain.Button1Click(Sender: TObject); begin with DBRichEdit1.Paragraph do Alignment:=taCenter; end; procedure TfrmMain.Button2Click(Sender: TObject); begin with DBRichEdit1.SelAttributes do Size:=Size+5; end; Add some records. Make sure that you fill in something in the rich edit. Commit. Go to any record which has some text in the DB rich edit. Make sure that TDataSet is in dsBrowse state (look at TDBGrid indicator). Make a selection. Press the Button1 once and Button2 several times. The text must be centered and the font selection size must grow. Note that the TDBGrid's indicator remains unchanged. Go to another record (in order to "save" the data). Return back. EXP: The changes must be persisted. The font size must be bigger. Alignment: Centered. ACTUAL: The changes are not saved. [QC Description] Hi, If we have a TDBRichEdit bound to a field F1 and F1's TDataSet is in dsBrowse mode, then by using SelAttributes and/or Paragraph properties in order to change the RTF format, the F1.DataSet doesn't enter in edit mode and the changes are not saved. See steps for how to reproduce the problem. Proposed fix: -----------Add to TDBRichEdit the RichEdit unit to the Uses clause in order to allow you to add the following private procedures (the messages are defined in RichEdit.pas): procedure EMSetCharFormat(var Message: TMessage); message EM_SETCHARFORMAT; procedure EMSetParaFormat(var Message: TMessage); message EM_SETPARAFORMAT; with the bodies procedure TDBRichEdit.EMSetCharFormat(var Message: TMessage); begin BeginEditing; inherited; end; procedure TDBRichEdit.EMSetParaFormat(var Message: TMessage); begin BeginEditing; inherited; end; - implemented & tested in 3155. HTH & TIA QC Entry 66035 QC #: Date Reported: Area: 66151 8/28/2008 Database\dbExpressCore Description: Steps: [Oracle] CodeGear™ RAD Studio 2007 Version 11.0.2902.10471 Copyright © 2007 [QC Short Description] DBExpress Problems Oracle 10G driver Oracle 10G Database - Delphi RAD Studio 2007 (WIN32 VCL and VCL.NET) Database Table [QC Description] >>>>>Urgent >>>> Oracle 10G select on NUMERIC; FLOAT; DATE ; BINARY_DOUBLE Fields results in ERROR On Vista Connect to Oracle Database is OK select VARCHAR2 is OK QC Entry 66151 TABLE TESTORACLE ID - NUMERIC 10 Primary Key Matchcode VARCHAR2(30) CHANGED DATE PRICE FLOAT PRICE2 BINARY_DOUBLE one row with ID = 1; MATCHCODE = Test; Changed = 12.12.2008; PRICE = 1; PRICE2 = 1; var dmodul.quleer1: TSQLQuery; //with TSQLConnection; //Connect to Oracle 10G is OK on Vista Business Client / Server Vista Business dmodul.quleer1.Close; dmodul.quleer1.SQL.Clear; dmodul.quleer1.SQL.Add('select MATCHCODE FROM TESTORACLE WHERE ID = 1'); dmodul.quleer1.open; ---> Test --->>>>>>OK dmodul.quleer1.Close; dmodul.quleer1.SQL.Clear; dmodul.quleer1.SQL.Add('select ID FROM TESTORACLE WHERE ID = 1'); dmodul.quleer1.open; ---> Error --->>>>>>Operation can not be used dmodul.quleer1.Close; dmodul.quleer1.SQL.Clear; dmodul.quleer1.SQL.Add('select PRICE FROM TESTORACLE WHERE ID = 1'); dmodul.quleer1.open; ---> Error --->>>>>>Operation can not be used dmodul.quleer1.Close; dmodul.quleer1.SQL.Clear; dmodul.quleer1.SQL.Add('select CHANGED FROM TESTORACLE WHERE ID = 1'); dmodul.quleer1.open; ---> Error --->>>>>>Operation can not be used dmodul.quleer1.Close; dmodul.quleer1.SQL.Clear; dmodul.quleer1.SQL.Add('select PRICE2 FROM TESTORACLE WHERE ID = 1'); dmodul.quleer1.open; ---> Error --->>>>>>ORA-01036: Variable name/ Number is unvalid QC #: Date Reported: Area: 66242 8/30/2008 Install Description: Steps: [QC Short Description] Installer creates directories with both the Embarcadero and CodeGear name and one is empty Install Rad Studio Check that this empty directory exists: C:\Documents and Settings\All Users\Application Data\CodeGear [Note: The exact location depends on your Windows edition- the quoted path is for W2K] [QC Description] After the install completes, there are two directories under All Users, each with different company names: C:\Documents and Settings\All Users\Application Data\Embarcadero C:\Documents and Settings\All Users\Application Data\CodeGear The CodeGear one is empty, so it probably shouldn't even be created. The Embarcadero one has the license details. This is with a clean W2K VM, so it isn't leftovers from an old install. QC Entry 66242 QC #: Date Reported: Area: 66304 9/1/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] compiler allows bad inherited; call in generic consructors compile test code See that compilation w/o error. [QC Description] See that the code runs w/o failure. The following code will compile and run, despite the fact that the ancestor class has none of the constructors the line When generics are not being used the following error expected. inherited; should be calling. Error: E2008 Incompatible types [Tester Recommended] program BTS264944; {$APPTYPE CONSOLE} uses SysUtils, Generics.Collections; type TMyList<T> = class(TList<T>) constructor Create(const abool : Boolean); overload; constructor Create(const aStr : string); overload; constructor Create(const aFloat : double); overload; end; var thelist : TMyList<string>; { TMyList<T> } constructor TMyList<T>.Create(const aStr : string); begin inherited; //<--no such method end; constructor TMyList<T>.Create(const abool: Boolean); begin inherited; //<--no such method end; constructor TMyList<T>.Create(const aFloat: double); begin inherited; //<--no such method end; begin try { TODO -oUser -cConsole Main : Insert code here } thelist := TMyList<string>.Create(True); thelist.Free; WriteLn('PASS'); except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. QC #: Date Reported: Area: 66307 9/1/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Structure view does not recognize 'override' on generic methods open Generics.Collection in the IDE [QC Description] Opening unit Generics.Collections in the IDE shows 10 instances of an error stating that an overloaded method must be marked with the overload directive. The errors are found at the implementation declaration. The methods are marked as overloaded in the interface section. It appears that the structure view can't relate the implementation back to the interface declaration for this directive QC Entry 66307 QC #: Date Reported: Area: 66318 9/2/2008 Database\Core VCL\Lookup Description: Steps: [QC Short Description] DBExpress and ClientDataSet can't locate record with Chinese TDBXBugsTiburonBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_265035 ----- QC Entry 66318 1. add sqlconnection, sqltabel, datasetprovider, clientdataset, datasource, and dbgrid into form. 2. connect them to an interbase db. 3. add edit and button to the form. 4. write code: procedure TForm1.Button1Click(Sender: TObject); begin if ClientDataSet1.Locate('CHARFIELD', edit1.text, []) then showmessage('Found'); end; then run it. I used a table with an unicode column. I can see the date by DBGrid, and I can edit or insert it. But, ClientDataSet just can locate English string. can't work with Greek, Hebrew, and Chinese. I copy the string from DBGrid to Edit directly, but it can't work too. QC #: Date Reported: Area: 66366 9/3/2008 Database\DBExpress\TSQLStoredProc Description: Steps: [QC Short Description] Error using a TSQLStoredProc in Oracle 10g: ''Identifier (package.proc) must be declared' TDBXWeaverBugsSuite.Native.DB.test.exe connection=oracleconnection -s:TestRaid_265163 [QC Description] This error occur because there is a bug in dbExpress components. The solution is down, for anyone who is interested. When I call a procedure inside a package of another owner, using a TSQLStoredProc component, I always get a error 'Identifier (package.proc) must be declared' because It doesn´t put the owner of the package in front of the procedure calling, like OWNER.PACKAGE.PROCEDURE (I saw this in the TSQLMonitor component). If I remove the schema name property, I get a List index out of bounds (0) error. QC Entry 66366 Steve Axtell -- Possible solution: The problem occurs because of coding in TSQLStoredProc.PrepareStatement. Look for if FPackageName <> '' then SQLText := QuoteIdentifier(FPackageName + '.' + FNativeCommand, true); and replace it with if FPackageName <> '' then begin if FSchemaName <> '' then SQLText := QuoteIdentifier(FSchemaName + '.' + FPackageName + '.' + FNativeCommand, true) else SQLText := QuoteIdentifier(FPackageName + '.' + FNativeCommand, true); end; QC #: Date Reported: Area: 66374 9/3/2008 IDE\Dialogs\Project Options Description: Steps: [QC Short Description] Label at Checkbox to enable Versionsinformations is truncated in german loc open project settings go to version informations see the top label at the checkbox [QC Description] In Project settings the is a label truncated. the label is for the checkbox which enabled the versioninformations. German Text of the Label: Versionsinformationen in das Projekt übe last word is truncated maybe it is "übernehmen". QC Entry 66374 QC #: Date Reported: Area: 66403 9/4/2008 IDE\Class Completion Description: Steps: [QC Short Description] Class Completion fails if a variant record is in the unit interface 1. Load up the simple project in this attachment 2. In the PyroScripting unit, put cursor on one of the classes and try to do class completion 3. You will see the error I'm talking about 4. Comment out the TPyroScriptStackInfo record and go to #2, it will then work. [QC Description] If you invoke class completion in a unit that has a record with a variant part, it will display false error in the record. Comment out/remove the variant record and it works as expected. QC Entry 66403 QC #: Date Reported: Area: 66426 9/5/2008 Database\Data Aware Controls\TDBRichEdit Description: Steps: [QC Short Description] TDBRichEdit forces its DataSet to be in editing state when the application starts TDBXTiburonBugsSuite.managed.db.test.exe connection=BLACKFISHSQLCONNECTION s:TestRaid_265189 [QC Description] Hi, --or-- if the following conditions applies: 1. The DataSet is opened at design time. (ie. when we start the app, the DataSet is already Active). 2. We have on the form a TDBRichEdit visible /and/ already bound to a field from above DataSet... ...then the DataSet is already in the Edit state when the app starts. 1. Make a simple DB app with a TDataSet descendant. Put a TDBRichEdit on the main form and link it to one of the fields. Make sure that TDataSet instance is open by setting Active := True. 2. Run the application. Add some records. Commit if necesary. Close. 3. (Re)run the app. You'll see that the TDataSet's state is dsEdit. (You can see this by, eg. putting a TDBGrid and/or TDBNavigator on form or inspecting the property directly in code - something like if DataSet1.State=dsEdit then ShowMessage('problem');). The cause is that Note: The above behavior should be seen also at step 2, but I didn't tested it. a.) We have procedure TDBRichEdit.EMSetCharFormat(var Message: TMessage); begin BeginEditing; inherited; end; ...which is needed in order to save the DBRichEdit's formatting and b.) TCustomRichEdit (the ancestor of TDBRichEdit) has the nasty behavior to send to itself EM_SETCHARFORMAT as a result of its initialization process (if you have time, see TCustomRichEdit.CreateWnd for details). In fact the 'problematic' code is procedure TTextAttributes.SetAttributes(var Format: TCharFormat2); var Flag: Longint; begin if FType = atSelected then Flag := SCF_SELECTION else Flag := 0; if RichEdit.HandleAllocated then SendStructMessage(RichEdit.Handle, EM_SETCHARFORMAT, Flag, Format); end; ...which is called when TCustomRichEdit sets it's DefaultAttributes. Proposed fix: ---------------Add the following lines (marked bellow with //+) in TDBRichEdit's class interface: TDBRichEdit = class(TCustomRichEdit) private FCreatingWnd: integer; //+ ... protected procedure CreateWnd; override; //+ ... ...and in the class implementation add: procedure TDBRichEdit.CreateWnd; begin inc(FCreatingWnd); try inherited; finally dec(FCreatingWnd); end; end; ...as well as replace the old TDBRichEdit.EMSetCharFormat with: procedure TDBRichEdit.EMSetCharFormat(var Message: TMessage); begin if FCreatingWnd=0 then BeginEditing; inherited; end; -8<-------8<---- Implemented & tested in FT .3163 ...Of course you can declare FCreatingWnd as a Boolean but imho having an integer is a more flexible solution. HTH. QC Entry 66426 QC #: Date Reported: Area: 66432 9/5/2008 IDE\Object Inspector Description: Steps: [QC Short Description] Some object inspector dropdows extend beyond the screen edges. 1) File -> New -> VCL Forms Application (Delphi for Win32) 2) Select the form 3) Select the Cursor property in the OI 4) Click the dropdown for the Cursor property Notice how the dropdown list extends beyond the top or bottom of the screen. [QC Description] The maximum number of items in a dropdown in the OI was recently increased from 8 to 20. Unfortunately this causes some custom-drawn property lists with large items to extend beyond the edges of the screen. Example: TControl.Cursor. I recommend the maximum number of items in an OI dropdown to be reduced from 20 to 16. QC Entry 66432 QC #: Date Reported: Area: 66465 9/6/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] E2010 Incompatible types with an explizit Boolean array as member with itself as type - compile this test case //--- begin test case --- program E2010GenericsBooleanArraySelfRef; {$APPTYPE CONSOLE} type THashTreeNode<T> = class FalseTrueNode: array [Boolean] of THashTreeNode<T>; end; THashTree<T> = class public procedure UseSelfRef; end; procedure THashTree<T>.UseSelfRef; var Probe: THashTreeNode<T>; begin Probe := Probe.FalseTrueNode[True]; end; begin WriteLn('PASS'); end. //--- end test case --- - expected: it compiles - actual: with build 3163 and higher Error: E2010 Incompatible types: 'THashTreeNode<THashTree<T>.T>' and 'THashTreeNode<T>' with build 3155 and 3158 it compiles exchange "FalseTrueNode: array [Boolean] of THashTreeNode<T>" by "FalseTrueNode: array [0..1] of THashTreeNode<T>;" (Boolean -> 0..1) and "Probe := Probe.FalseTrueNode[True];" by "Probe := Probe.FalseTrueNode[1];" (True -> 1) - compile - expected: it doesn't compile if E2010 is by intention - actual: it compiles [QC Description] Since build 3163 using an explizit Boolean array as member with itself as type does produce E2010 type THashTreeNode<T> = class FalseTrueNode: array [Boolean] of THashTreeNode<T>; end; Note that it works with the following members FalseTrueNode: array [0..1] of THashTreeNode<T>; FalseNode: THashTreeNode<T>; -> see steps -> for more information see "[3168] Generic self-referencing tree node no longer compiles" in .tiburon.delphi.compiler (2008/09/05; Message-ID: <[email protected]>) QC Entry 66465 [Tester Recommended] QC #: Date Reported: Area: 66473 9/6/2008 IDE\File Handling Description: Steps: [QC Short Description] Search path to add unit: not work In build 3155, I try this: File, New, Package Then, in ProjectGroup1, Package1, right click, Add, and I see the dialog Add, Add Unit. I Browse to my directory of units, and insert my file. Then, if I want add another unit: ProjectGroup1, Package1, right click, Add, and I see the dialog Add, Add Unit. I see in Search path my previous directory, but, if I click on Browse, I start from ".....\RAD Studio\Projects". Expected: Browse in the path indicated. I not remember if this bug is present in previous build or version. If not, it can be a "nice to have". Request of QC from: [email protected] QC Entry 66473 QC #: Date Reported: Area: 66541 9/9/2008 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] Description of the function return for TSQLConnection.ExecuteDirect is incorrect [QC Description] Text from help: "ExecuteDirect returns 0 if the command was successfully executed. Otherwise, it returns a dbExpress error code." But as per sources: function TSQLConnection.ExecuteDirect(const SQL: WideString): Integer; ... Result := Integer(Command.RowsAffected); ... So it's the number of rows affected that is returned, not 0. QC Entry 66541 QC #: Date Reported: Area: 66549 7/29/1997 IDE\Code Editor Description: Steps: Delphi does not understand comments that are put by the end of the file (see Steps). Comment such as in the Create new form/module, add initialization code as below. example will invariably be pushed above new event handlers, instead of remaining with the initialization. In other words, Delphi is not parsing the unit correctly. [...] { This is a comment, belongs to the constructs below } initialization { stuff } finalization { stuff } end. Then add FormCreate. It will be inserted after the comment preceding the initialization part. { This is a comment, belongs to the constructs below } procedure TForm1.FormCreate(...); begin . . . end; QC #: Date Reported: Area: 66562 9/10/2008 Documentation Description: Steps: [QC Short Description] Generics.Collections is missing in help Try to find help for TPair<TKey,TValue>, TList<T>, TDictionary<TKey,TValue> in help. [QC Description] Unit Generics.Collections should be documented. QC Entry 66562 QC #: Date Reported: Area: 66572 9/10/2008 SOAP\WSDL Importer Description: Steps: [QC Short Description] enumerations contain values with same name 1. Import WSDL file with enumerations with values with same name. 2. Get compiler errors. [QC Description] When importing the Cisco Call Manager WSDL, the generated Pascal code contains multiple enumerations with values with the same name. Ie. XConnectedPBX = (None, ...); XFDLChannel = (..., None); Version 2.2 (rev 10138) of wsdlimp 2.2 named them None, None2, None3 etc. QC Entry 66572 QC #: Date Reported: 66597 9/10/2008 Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] Access Violation when using TRibbon in a frame 1) Start a new VCL Application 2) Add a new frame 3) Drop a TRibbon component on the frame 4) Add the frame to the applcation's default form 5) Run Application crashes with EAccessViolation. [QC Description] Please see steps. QC Entry 66597 QC #: Date Reported: Area: 66652 5/3/2008 IDE\Code Editor\Help Insight Description: Steps: [QC Short Description] Help Insight displays the wrong data types. 1) Create a new application. 2) Paste the following function in the implementation section: function Test: PChar; // <-- PAnsiChar var dest: PChar; // <-- PAnsiChar begin //function Utf8Encode(const WS: WideString): UTF8String; UTF8Encode(''); // <-- return type System.String //function UCS4StringToWideString(const S: UCS4String): WideString; UCS4StringToWideString(''); // <-- Parameter type System.$$8, return type System.String //function WideStringToUCS4String(const S: WideString): UCS4String; WideStringToUCS4String (''); // <-- Parameter type System.$$8, return type System.String //function UnicodeStringToUCS4String(const S: UnicodeString): UCS4String; UnicodeStringToUCS4String(''); // Parameter type Void Type, return type System.$$9, in the system unit the parameter type is still wrong and it says it overrides itself (System.UnicodeStringToUCS4String), may be because of magic though ;) //function PUCS4Chars(const S: UCS4String): PUCS4Char; PUCS4Chars(''); // Parameter type System.$$10 //function Utf8ToAnsi(const S: UTF8String): string; Utf8ToAnsi(''); // Parameter type System.String, no return type shown, and should this function really return a unicode string? the code inside it seems to be lacking //function AnsiToUtf8(const S: string): UTF8String; AnsiToUtf8(''); // Parameter type Void Type, return type System.String end; [QC Description] Help Insight doesn't seem updated with the new data types for PChar, widestring, UTF8String and UCS4String. The steps has a function with a list of examples with the type displayed in comments. The correct code is run and code completion displays the correct stuff, only help insight is wrong. I didn't include all as every single function with these data types displays the wrong info. Note that most of them do not show the wrong data type in system.pas, only outside it. QC Entry 61688 QC #: Date Reported: 66685 9/15/2008 11:23:14 AM Area: SOAP Description: Steps: [QC Short Description] Missing multiplication with SizeOf(Char) Search the whole sources folder for the substring "[1], Length(" [QC Description] I found occurences of this sort of construct : Any occurance that uses arrays containing anything wider than a byte (like UnicodeString) should be fixed, by adding a multiplication with SizeOf(elementtype). TStream.Write(UnicodeString[1], Length(UnicodeString)); As far as I understand, this misses the SizeOf(WideChar) multiplication. After I hit the first occurance, I searched the whole sources folder for the substring "[1], Length(", and look what I found : D:\Temp\CodeGear_RAD Studio_6.0_source_3168.2\Win32\soap\InvokeRegistry.pas 2400 FSourceStream.Write(Value[1], Length(Value)); D:\Temp\CodeGear_RAD Studio_6.0_source_3168.2\Win32\soap\OPToSOAPDomConv.pas 634 Stream.Write(Request[1], Length(Request) * 2); 1546 Stream.Write(Resp[1], Length(Resp)); D:\Temp\CodeGear_RAD Studio_6.0_source_3168.2\Win32\soap\SOAPAttach.pas 422 AStream.Write(AValue[1], Length(AValue)); 613 ADestStream.Write(SLine[1], Length(SLine)); 829 Stream.Write(Attachment.SourceString[1], Length(Attachment.SourceString)); QC Entry 66685 QC #: Date Reported: Area: 66685 9/15/2008 11:14:28 AM AddOn\Interbase components Description: Steps: [QC Short Description] Missing multiplication with SizeOf(Char) Search the whole sources folder for the substring "[1], Length(" [QC Description] I found an occurence of this sort of construct : TStream.Write(UnicodeString[1], Length(UnicodeString)); As far as I understand, this misses the SizeOf(WideChar) multiplication. After I hit the first occurance, I searched the whole sources folder for the substring "[1], Length(", and look what I found : Any occurance that uses arrays containing anything wider than a byte (like UnicodeString) should be fixed, by adding a multiplication with SizeOf(elementtype). D:\Temp\CodeGear_RAD Studio_6.0_source_3168.2\Win32\IBX\IBSQL.pas 2081 FFile.Write(st[1], Length(st)); 2102 BytesWritten := FFile.Write(st[1], Length(st)); QC #: Date Reported: Area: 66685 9/15/2008 11:10:30 AM Database\Data Aware Controls Description: Steps: [QC Short Description] Missing multiplications with SizeOf(Char) Search the whole sources folder for the substring "[1], Length(" [QC Description] I found an occurence of this sort of construct : Any occurance that uses arrays containing anything wider than a byte (like UnicodeString) should be fixed, by adding a multiplication with SizeOf(elementtype). TStream.Write(UnicodeString[1], Length(UnicodeString)); As far as I understand, this misses the SizeOf(WideChar) multiplication. After I hit the first occurance, I searched the whole sources folder for the substring "[1], Length(", and look what I found : D:\Temp\CodeGear_RAD Studio_6.0_source_3168.2\Win32\db\DBCtrls.pas 2019 if PasswordChar <> #0 then FillChar(S[1], Length(S), PasswordChar); QC #: Date Reported: Area: 66701 9/12/2008 Database\DBExpress\TSQLQuery Description: Steps: [Prism and Weaver] Error:No value for parameter. TDBXWeaverBugsSuite.Native.Db.Test.exe connection=mssqlconnection -s:TestRaid_265531 -or- [QC Description] Create 2 Fields in a database:fa integer,fb string.both can be Null. Code: SQLQuery1.Close; SQLQuery1.SQL.Clear; SQLQuery1.SQL.Add('insert into NEW_TABLE values(:pafa,:pafb)'); SQLQuery1.ParamByName('pafa').AsInteger := 1; SQLQuery1.ParamByName('pafb').Value := Null; SQLQuery1.ExecSQL; Error:No value for parameter 'pafb'. No error occer while use dbgo,or other none dbx controls. QC Entry 66701 Any Database,create a Table named "NEW_TABLE",and 2 fields: fa integer, fb string. this 2 fields can be null. use dbx connect to the database. use a TSQLQuery:SQLQuery1. if you run this code: SQLQuery1.Close; SQLQuery1.SQL.Clear; SQLQuery1.SQL.Add('insert into NEW_TABLE values(:pafa,:pafb)'); SQLQuery1.ParamByName('pafa').AsInteger := 1; SQLQuery1.ParamByName('pafb').Value := Null; SQLQuery1.ExecSQL; An error occur:No value for parameter 'pafb'. if you use dbgo(ADO),no error occur,other database connect controls not occur this error,but dbx occur this error. QC #: Date Reported: Area: 66703 9/12/2008 AddOn\IntraWeb Description: Steps: [QC Short Description] IWButton1AsyncClick transfer Unicode incorrectly. extract attached project and run [QC Description] put 2 controls on form:IWLabel1,IWButton1. if you write: procedure TIWForm1.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList); begin IWLabel1.Caption := 'abc'; end; It run OK! but if you write: procedure TIWForm1.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList); begin IWLabel1.Caption := '??'; //Chinese charactor:#20013#25991. end; It can not show correctly! If you save this web page,you will find that the html is coded in utf-8,but the javascript file is coded in ansi! TIWServerController.CharSet,only accept capital letter like "UTF-8",but "utf-8" cann't be accepted? QC Entry 66703 Once running: 1. Select Execute from file Menu. EXP: Webpage launched 2. Click on buttons Exp: No '?' marks, expect kanji and hiragana characters. QC #: Date Reported: Area: 66733 9/13/2008 IDE\Code Editor Description: Steps: [QC Short Description] Copy and Paste code editor bug 1. Create a new Delphi Win32 console application 2. Right-click into the editor 3. Main menu | Edit | Select All 4. Main menu | Edit | Copy 5. Main menu | Edit | Paste [QC Description] In some cases the editor appends clipboard data instead of overwrite selected text. The same happens in D2007 as well. See steps to reproduce. QC Entry 66733 QC #: Date Reported: Area: 66745 9/14/2008 Documentation\IDE Help Contexts Description: Steps: [QC Short Description] Missing documentation for FileAge [QC Description] The Description section (including Examples) describes the deprecated function parameters and return values; there is no information on the new function parameters and values (I can guess what FileDateTime parameter does, but what is the return value of the second function?). QC Entry 66745 QC #: Date Reported: Area: 66810 9/15/2008 VCL\Win 32 Controls\TTreeView Description: Steps: [QC Short Description] TTreeView.SaveToFile does not support TEncoding 1. Drop a TTreeView on a form. 2. Populate the tree with several nodes. Be sure that at least one node has Unicode characters in its caption. I suggest putting the Unicode characters in the first node as the problem will [QC Description] There is only one version of the TTreeView.SaveToFile method, and it does NOT take a TEncoding parameter. The problem with this is that if the tree nodes contain any Unicode characters in their captions, the resulting file cannot be successfully loaded back into the tree. be more obvious. 3. Drop a button on the form - Caption = Save. 4. Write an event handler for the button and call TreeView1.SaveToFile( ) specifying a file name. 5. Drop another button on the form - Caption = Load. 6. Write an event handler for the Load button and call TreeView1.LoadFromFile() specifying the same file name from step 4. 7. Run the program. Click the Save button. Check the resulting file. The text is readable by Notepad, but there is no BOM in the file. Next, Click the Load button. The nodes are not correctly loaded and the tree is corrupted. The root cause of the problem is in the TTreeStrings.SaveTreeToStream method. This method scans through the nodes of the tree basically creating a string for each node prefixed by a tab character for every level deep in the tree the node is, and followed by a CR-LF to indicate the end of line. Each string is then written to the stream. The correct number of bytes is written because the ByteLength( NodeStr) method is used. However, what is missing is that since no encoding is used, there is no BOM at the beginning of the file. So, when you go and use the TTreeView.LoadFromFile method, which calls TTreeStrings.LoadTreeFromStream, there is no BOM in the file, and so the load thinks the data is Ansi data, and this causes the file to be processed incorrectly. ---One way to solve this problem is to use a temporary string list inside the SaveTreeToStrings method instead of writing directly to the stream. That is, use the temporary string list to build up the list of node items (no need to use EndOfLine because it is in a string list.) Then at the end, use the TStringList.SaveToFile method to save the file. Of course, you would also have to add overloaded methods for TTreeView.SaveToFile and TTreeView.LoadFromFile to accept TEncoding parameters. But these would get passed to the string list method calls. The same is true for the LoadTreeFromStream method, but in that case, the method already uses a temp string list to load the file/stream. QC Entry 66810 QC #: Date Reported: Area: 66812 9/15/2008 VCL\Standard Controls\TComboBox Description: Steps: [QC Short Description] D2009 ComboBox not working with Lithuanian strings and ecUpperCase - Unzip attached project to its own directory - Start Delphi 2009 - Open the .dpr or .dproj file of the project - Pres Run {F9} Act: 'Access violation at address 7C80CF3A in module 'kernel32.dll'. Write of address 00465B38'. The error does not happen if Combobox1.CharSet is set to ecNormal. [QC Description] If combobox contains Lithuanian strings, say Items.Strings = ( 'NORD/LB' 'VB' 'SNORAS' 'SAMPO' #138'B' 'PAREX' 'HANSA' 'LITAS') and CharCase is set to 'ecNormal' then with ComboBox1 do begin Clear; AddItem( 'Test', NIL ); end; runs in 'Access violation at address 7C80CF3A in module 'kernel32.dll'. Write of address 00465B38'. QC Entry 66812 QC #: Date Reported: Area: 66856 9/16/2008 IDE\Object Inspector Description: Steps: [QC Short Description] Separator line of Object Inspector between property name and value not in the correct position when use customize desktop layout 1. Copy the attached Default Layout2.dst file into %APPDATA%\CodeGear\BDS\7.0 2. Start IDE with the Default Layout. 3. New VCL Forms application (to make OI show something) 4. Switch back and forth between Default Layout and Default Layout2. [QC Description] Separator line of Object Inspector between property name and value not in the correct position when use customize desktop layout. QC Entry 66856 When switching from Default Layout2 to Default Layout you'll will see the separator line of object Inspector not in correct position, column width of property name is large, proerty value is small. If you reload Default Layout (without switching), you'll see it use the correct position. QC #: Date Reported: Area: 66864 9/16/2008 SOAP Description: Steps: [QC Short Description] Add SOAP 1.2 support to importer and clients Try to import a SOAP v1.2 of WCF server in Delphi 2009. This will become more important, so please add support for this in Win32 clients. [QC Description] Although Win32 web service servers are currently marked as deprecated, it the web service clients are also falling behind with their lack of SOAP v1.2 support. Please add SOAP v1.2 support to the WSDL importer and Delphi Win32 SOAP clients, followed - if possible - by MTOM, the items that are lacking the most in Delphi's Win32 SOAP Framework in order to interoperate with other SOAP solutions/frameworks/stacks out there. QC Entry 66864 QC #: Date Reported: Area: 66867 9/17/2008 Internet\Indy Description: Steps: [QC Short Description] Problem sending emails with IdSMTP and TIdAttachment Create a new application, and place a TIdSMTP, and TIdMessage components, and a TButton. On the button click, place the following code, and change the Host / Email appropriatelly... procedure TForm1.Button1Click (Sender: TObject); begin IdSMTP.Host := 'smtp.somemailserver.com.au'; IdSMTP.Port := 25; IdSMTP.Connect; IdMessage.Clear; IdMessage.From.Address := '[email protected]'; IdMessage.Recipients.Add.Address := '[email protected]'; IdMessage.Body.Text := 'This is a sample message body!'; IdMessage.Subject := 'This is a sample subject!'; TIdAttachmentFile.Create(IdMessage.MessageParts, 'C:\Test_File_0001.txt'); IdSMTP.Send (IdMessage); IdSMTP.Disconnect; ShowMessage('Message Send Completed!'); end; [QC Description] In D2007, using Indy (TIdMessage), we had this code: TIdAttachmentFile.Create(IdMessage.MessageParts, 'C:\Test_File_001.txt'); When the file was received in Outlook - the attachment was named correctly "Test_File_001.txt". However, with D2009 - it appears it gives it a random name - such as "ATT00003.dat" / "ATT00008.dat" etc. More importantly, it changes the description to DAT - so if your original file was an excel, pdf etc - they all get changed to "*.dat" - making it impossible for user to open the attachment. QC Entry 66867 QC #: Date Reported: Area: 66869 9/17/2008 Midas Description: Steps: [QC Short Description] TDBXTiburonBugsSuite.Native.DB.Test.exe connection=MSSQLCONNECTION -s:oTestRaid_265351 TClientDataSet.SetOptionalParam is not working --[QC Description] We have use TClientDataSet.SetOptionalParam methods to add custom information to a data packet. However, var D: TClientDataSet; this function is not working at all in Delphi 2009. It is working fine in Delphi 2007 or below. V: variant; begin Please run the test case below to replay. D := TClientDataSet.Create(nil); QC Entry 66869 try D.FieldDefs.Add('Name', ftString, 20); D.CreateDataSet; D.SetOptionalParam('ID', 'A01', True); V := D.GetOptionalParam('ID'); CheckEquals('A01', V); D.SetOptionalParam('ID', '001', True); V := D.GetOptionalParam('ID'); CheckEquals('001', V); finally D.Free; end; end; QC #: Date Reported: Area: 66892 9/17/2008 VCL\Core VCL Classes\TApplication Description: Steps: [QC Short Description] Closing forms deactivates the application - make sure there's a program running (Windows Explorer, for example) - run the attached program - Click the button, Form 2 appears - Click the button on Form 2 --> Form3 appears - Close Form 3 - Close Form 2 Expected: the program is now still the active application (ie. it has focus) Observed: the program which was running before starting the test program is now active. [QC Description] Closing two forms in the test app deactives the program. Any other running app will become active. The test app now appears behind the "other" app. Tested on XP and Vista. It works fine with D2007. QC Entry 66892 QC #: Date Reported: 66908 9/17/2008 Area: Compiler\Delphi Description: Steps: [QC Short Description] I cannot debug because source lines which a debugger shows is illegal Open attached project [QC Description] I cannot debug because source lines which a debugger shows is illegal I can set a break point on comment line this sample. QC Entry 66908 QC #: Date Reported: 66910 9/17/2008 Ctrl-F9 Note that the blue dots in EnumeratorTest.pas appear on lines within the comment F8 to debug Note that the blue dots in EnumeratorTest.pas appear on lines within the comment Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Generic Type compile check is ambigous. Compile the attached application below. See that it compiles even though compile-time errors are expected. [QC Description] Though I do not implement Addref in Generic Type, a compilation error does not occur. QC Entry 66910 [Tester Recommended] program BTS265356; { Generics implementing interfaces do not produce expected errors } {##COMERR: Error: E2003 Undeclared identifier: 'QueryInterface'} {##COMERR: Error: E2003 Undeclared identifier: '_AddRef') {##COMERR: Error: E2003 Undeclared identifier: '_Release') {$APPTYPE CONSOLE} type TTest<T> = class(TObject, IInterface) end; begin WriteLn('FAIL - Compile-time error expected'); end. QC #: Date Reported: Area: 66961 9/18/2008 Documentation Description: Steps: [QC Short Description] ExtendedSelect is not documented Navigate to the ExtendedSelect property for the TListBox class. mshelp://borland.bds5/delphivclwin32/StdCtrls_TListBox_ExtendedSelect.html [QC Description] The ExtendedSelect property for TListBox is not documented. ms-help://borland.bds5/delphivclwin32/StdCtrls_TListBox_ExtendedSelect.html QC Entry 66961 QC #: Date Reported: 66969 9/19/2008 Area: Debugger\CPU Description: Steps: [QC Short Description] Go to address in disassembly view not honoured Go to the disassembly view in the middle of a long procedure, scroll up until disassembly gets out of sync. Try to resync with a go to address, nothing will happen. [QC Description] When in the CPU disassembly view, there is an option to go to an address, and disassemble there. In D7 and previous the disassembly view would jump to that address, no question asked. In D2009, the disassembly view doesn't change if the address is within the disassembly scope, meaning that if instruction disassembly got out of sync (after scrolling up f.i.) it won't resynchronize and disassemble the instruction at the goto address. QC Entry 66969 QC #: Date Reported: 67040 9/22/2008 Area: Compiler\Delphi\Execution Description: Steps: [QC Short Description] Attempting to build application with TPerlRegEx causes "Internal Error" 1. Download and install the TPerlRegEx component from http://www.regular-expressions.info/delphi.html (you may need to fix an invalid path that comes is already setup in the project options) EDIT: I also have the same problem with the version on the Partner DVD. [QC Description] Attemping to build an application using the TPerlRegEx component from http://www.regularexpressions.info/delphi.html causes Internal Error: L4077 QC Entry 67040 [Tester Recommended] (JJS: See attached .zip file previously downloaded) 2. Create a new VCL Forms applications. 3. Add the TPerlRegEx directory to your apps Search Path in the project options. 4. Add a TPerlRegEx component to your form and build your project. You should get an [DCC Fatal Error] F2084 Internal Error: L4077 error. QC #: Date Reported: Area: 67044 9/22/2008 Documentation Description: Steps: [QC Short Description] SysUtils.CharInSet help topic contains no information [QC Description] The help topic titled "SysUtils.CharInSet Function" contains the function prototype (which is good) but the description reads: This is function SysUtils.CharInSet. ... which is not at all helpful. QC Entry 67044 QC #: Date Reported: Area: 67102 9/23/2008 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Comparing PChar to single char literal fails in Delphi 2009 Enter this code into a new Delphi console project: program Project141; {$APPTYPE CONSOLE} uses SysUtils; procedure Test; var P: PChar; begin P := '@'; if P <> '@' then Writeln('@ <> @') else Writeln('@ = @'); end; begin try Test; Readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. And run it. Exp: output '@ = @' Act: output '@ <> @' [QC Description] If you do: var P: PChar; begin P := '@'; // all is fine, point PChar to literal if P <> '@' then // here it goes wrong etc... It appears that the comparison tries to compare a UnicodeString and a ShortString without any conversion of either of them. This does not happen if you use, say, 'Hello', instead of '@'. Take a look at the CPU view: Project141.dpr.12: P := '@'; 0040A915 B894A94000 mov eax,$0040a994 0040A91A 8945FC mov [ebp-$04],eax Project141.dpr.13: if P <> '@' then 0040A91D 8D45F8 lea eax,[ebp-$08] 0040A920 8B55FC mov edx,[ebp-$04] 0040A923 E850A9FFFF call @UStrFromPWChar 0040A928 8B45F8 mov eax,[ebp-$08] 0040A92B BA98A94000 mov edx,$0040a998 0040A930 33C9 xor ecx,ecx 0040A932 8A08 mov cl,[eax] 0040A934 41 inc ecx 0040A935 E8028BFFFF call @AStrCmp 0040A93A 741B jz $0040a957 As you can see, P is converted to a UnicodeString, and that is passed to AStrCmp as one of the parameters, which is incorrect! The other parameter, the string at address $0040a998, is a short string (bytes 01 40 00). QC Entry 67102 QC #: Date Reported: 67121 9/24/2008 Area: Database\DBExpress Description: Steps: [QC Short Description] D2009 dbExpress wrongly uses WideString where D20007 used String TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_265464 I can't know what you need to reproduce it because I don't know what mechanism dbExpress uses to decide if [QC Description] a database is Unicode. Our Oracle applications in D2007 use String for *all* fields of all tables and stored procedures, never WideString. I think it's very likely that if you create a Oracle10g database with characterset WE8ISO8859P15 and connect using this client: Just recompiling in D2009 *all* querys and stored procedures fail with type mismatch errors "expecting String actual WideString". http://download.oracle.com/otn/nt/instantclient/10204/instantclient-basic-win32-10.2.0.4.zip My guess is that D2009 is wrongly identifying our database as Unicode. I don't know how D2009 identifies if an Oracle10 database is Unicode-enabled or not, but in our case it must be doing it the wrong way. I think the right way should be something like: SELECT value FROM nls_database_parameters where parameter = 'NLS_CHARACTERSET' In our database that query returns WE8ISO8859P15. Unless that query returns UTF8, UTF16... you shouldn't force us to use Widestrings. For us using Widestrings throughout all our applications, combined with QC 4790 is a real showstopper. (An alternative solution would be to add a property SqlConnection.UseUnicode with values Always/Never/Default, so users could decide themselves if they want to use WideStrings). Example of a query in D2007: object ConexionOracle: TSQLConnection ConnectionName = 'Oracledesarrollo' DriverName = 'Oracle' GetDriverFunc = 'getSQLDriverORACLE' LibraryName = 'dbxora30.dll' Params.Strings = ( 'DriverName=Oracle' 'DriverUnit=DBXDynalink' 'DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver10' + '0.bpl' 'DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borla' + 'nd.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,Pu' + 'blicKeyToken=91d62ebb5b0d1b1b' 'MetaDataPackageLoader=TDBXOracleMetaDataCommandFactory,DbxReadOn' + 'lyMetaData100.bpl' you can reproduce it. 'MetaDataAssemblyLoader=Borland.Data.TDBXOracleMetaDataCommandFac' + 'tory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Cultur' + 'e=neutral,PublicKeyToken=91d62ebb5b0d1b1b' 'DataBase=DESARROLLO' 'User_Name=xxxx' 'Password=xxxxx' 'BlobSize=-1' 'ErrorResourceFile=' 'LocaleCode=0000' 'Oracle TransIsolation=ReadCommited' 'RowsetSize=20' 'OS Authentication=False' 'Multiple Transaction=False' 'Trim Char=False' 'Decimal Separator=,') TableScope = [tsSynonym, tsTable, tsView] VendorLib = 'OCI.DLL' Left = 88 Top = 24 end object QRoles: TSQLQuery MaxBlobSize = -1 Params = <> SQL.Strings = ( 'SELECT ROLE' 'FROM SESSION_ROLES' '') SQLConnection = ConexionOracle Left = 216 Top = 24 object QRolesROLE: TStringField FieldName = 'ROLE' Size = 30 end end As you can see, the field is returned as string. If I try to repeat that in D2009 I get this: object SQLConnection1: TSQLConnection ConnectionName = 'Oracledesarrollo' DriverName = 'ORACLE' GetDriverFunc = 'getSQLDriverORACLE' LibraryName = 'dbxora.dll' Params.Strings = ( 'drivername=ORACLE' 'database=DESARROLLO' 'user_name=XXXXX' 'password=XXXXX' 'blobsize=-1' 'localecode=0000' 'oracle transisolation=ReadCommited' 'rowsetsize=20' 'os authentication=False' 'multiple transaction=False' 'trim char=False' 'decimal separator=,') VendorLib = 'oci.dll' Connected = True Left = 128 Top = 80 end object SQLQuery1: TSQLQuery MaxBlobSize = -1 Params = <> SQL.Strings = ( 'SELECT ROLE' 'FROM SESSION_ROLES') SQLConnection = SQLConnection1 Left = 216 Top = 80 object SQLQuery1ROLE: TWideStringField FieldName = 'ROLE' Required = True Size = 30 end end QC Entry 67121 QC #: Date Reported: Area: 67146 9/24/2008 Documentation\Online Help\Main help Description: Steps: [QC Short Description] Missing Unicode documentation [QC Description] Project Options|Compiling has this: Long strings by default Delphi for Win32 only. This option (equivalent to the $H directive) controls the meaning of the reserved word string when used alone in a type declaration. The generic type string can represent either a long, dynamically-allocated string (the fundamental type AnsiString) or a short, statically allocated string (the fundamental type ShortString). By default, Delphi defines the generic string type to be the long AnsiString. All components in the component libraries are compiled in this state. If you write components, they should also use long strings, as should any code that receives data from component library string-type properties. The disabled (equivalent to {$H-}) state is mostly useful for using code from versions of Delphi that used short strings by default. You can locally override the meaning of string-type definitions to ensure generation of short strings. You can also change declarations of short string types to string[255] or ShortString, which are unambiguous and independent of the enabled option. Default = True Which needs updating for Unicode strings. QC Entry 67146 QC #: Date Reported: 67150 9/24/2008 Area: RTL Description: Steps: [QC Short Description] Incorrect Declaration for multiple functions in ACLAPI library Open the ACLAPI.pas and check the declarations of any of the functions. [QC Description] The function SetNamedSecurityInfoW - the file name (first parameter) is declared as PAnsiChar. So is the GetNameSecurityInfoW, and pretty much all of the other functions in the ACLAPI library... All the functions ending with W should be declared as PChar - not PAnsiChar. QC Entry 67150 QC #: Date Reported: Area: 67158 9/25/2008 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Incorrect declarations in AccCtrl.pas [QC Description] ACTRL_ACCESS_ENTRYW = packed record Trustee: TRUSTEE_W; fAccessFlags: ULONG; Access: ACCESS_RIGHTS; ProvSpecificAccess: ACCESS_RIGHTS; Inheritance: INHERIT_FLAGS; => lpInheritProperty: PAnsiChar; end; ACTRL_PROPERTY_ENTRYW = packed record => lpProperty: PAnsiChar; pAccessEntryList: PACTRL_ACCESS_ENTRY_LISTW; fListFlags: ULONG; end; TRUSTEE_ACCESSW = packed record => lpProperty: PAnsiChar; Access: ACCESS_RIGHTS; fAccessFlags: ULONG; fReturnedAccess: ULONG; end; And more... QC Entry 67158 QC #: Date Reported: Area: 67173 9/25/2008 Documentation\Online Help\VCL Description: Steps: [QC Short Description] TSQLConnection Properties missing DBXConnection Open help, index of TSQLConnection [QC Description] In the help file, the TSQLConnection list of properties is missing DBXConnection. QC Entry 67173 QC #: Date Reported: Area: 67193 9/26/2008 IDE\Dialogs\Environment Options Description: Steps: [QC Short Description] Cannot use environement variables in Shared Repository and Default project paths Start IDE Tools | Options | Environment Variables Click New button Variable name: FOOVAR Variable value: c:\ OK OK Tools | Options | Environment Options For "Default project" enter $(FOOVAR) OK [QC Description] I'm trying to use an environment variable in the IDE options dialog at: Environment Options - Directories - Shared Repository / Default project like: $(DELPHI120DATA) After pressing OK I first get this error: Error: Default project directory $(DELPHI120DATA)\ is invalid.. Details: [5001BE04]{rtl120.bpl } SysUtils.ForceDirectories (Line 6573, "SysUtils.pas" + 6) + $2 [..] Error The directory is not invalid. It exists on the harddisk and is accessible. When pressing the three bullet button on the right side of the edit, it correctly opens the location where the variable points to. After confirming this error dialog and pressing OK to close the options dialog, I get an AV: Error : Access violation at address 21092194 in module 'itecore120.bpl'. Read of address 00000008. Details: [21092194]{itecore120.bpl} ITEGridFont.TITEGridFonts.GetCount (Line 107, "ITEGridFont.pas" + 0) + $0 [210928EA]{itecore120.bpl} ITEGridFont.TITEGridFonts.Merge (Line 246, "ITEGridFont.pas" + 2) + $2 [..] Could you please check this? Michael QC Entry 67193 QC #: Date Reported: Area: 67207 9/26/2008 VCL\Graphics Description: Steps: [QC Short Description] TGifImage is saved incorrectly after assigning TIcon or TMetafile In attached file [QC Description] TGifImage contains wrong image (usually with large black areas) after assigning TIcon or TMetafile to it, saving to file and reloading. (This file already contains wrong image) QC Entry 67207 QC #: Date Reported: Area: 67220 9/26/2008 VCL\Win 32 Controls\TTreeView Description: Steps: [QC Short Description] TreeView doesn't load Unicode files Proposed solution (see also the Workaround for complete details): const Encoding: TEncoding = nil Add Encoding parameter to the following routines in ComCtrls.pas: TCustomTreeView.LoadFromFile (lines 1520 and 11414) Call LoadFromStream (line 11420) TCustomTreeView.LoadFromStream (lines 1521 and 11426) Call LoadTreeFromStream (line 11430) TTreeStrings.LoadTreeFromStream (lines 10015) The LoadFromFile would pass it to LoadFromStream which would pass it to LoadTreeFromStream which could then pass it on to the List.LoadFromStream (line 10027). I'm not sure if the same is also needed for the SaveToFile, since that seems to work fine. [QC Description] The TTreeview is unable to load itself from Unicode files. You can have nodes with Unicode Text, and save this correctly. But when you load them, they will be loaded as ASCII which shows garbage in the treeview of course. Cause: TTreeView LoadFromFile, implemented as TCustomTreeView.LoadFromFile has no Encoding parameter and calls TCustomTreeView.LoadFromStream which in turn calls TTreeStrings.LoadTreeFromStream, again passing no Encoding. LoadTreeFromStream uses a List.LoadFromStream, passing no Encoding (this is the place where an Encoding could be passed). QC Entry 67220 QC #: Date Reported: Area: 67233 9/26/2008 Database\dbExpressCore Description: Steps: [QC Short Description] AutoUnloadDriver is not working as is 1. Create a new VCL application 2. Drop a TSQLConnection (SQLConnection1) instance and define properties for Interbase connection. To enable AutoUnloadDriver, add a new param (AutoUnloadDriver=True) into SQLConnection.Params 3. Drop a TButton (Button1) and write OnClick event: SQLConnection1.Open; 4. Drop another TButton (Button2) and write OnClick event: SQLConnection1.Close; 5. Run the application in debug mode. Make sure you bring out a "Event Log" debug window to trace how the database connection dll is loaded and unloaded. 6. Press Button1 to open the database connection, the Event Log windows will show database connection library has loaded. 7. Press Button2 to Close the database connection, the event log windows show nothing about the database connection library. 8. Close the application will only unload the database connection library. [QC Description] In Delphi 2009 DBX4 framework, there is a new property TDBXPropertyNames.AutoUnloadDriver. This is state in the DBXCommon.pas about the property: "If set to true, dynalink drivers will automatically unload their dll, when there are no longer any open connections that use the driver." I expect setting the property to true will make the database connection library to be unloaded when connection is closed. However, I find no way to activate this function thru current DBX4 implementation. After tracing the DBX source code, I found the cause of the problem. The Dynalink Driver class has the following constructor: constructor TDBXDynalinkDriver.Create(DBXDriverDef: TDBXDriverDef; DBXDriverLoader: TDBXDynalinkDriverCommonLoaderClass); begin inherited Create(DBXDriverDef); FDriverLoaderClass := DBXDriverLoader; // '' makes this the default command factory. // AddCommandFactory('', CreateDynalinkCommand); if (DriverProperties = nil) or not DriverProperties.GetBoolean(TDBXPropertyNames.AutoUnloadDriver) then CacheUntilFinalization; end; To make AutoUnloadDriver work as it should, the clue is to avoid invoke CacheUntilFinalization in the constructor. In order to do that, we must make sure DriverProperties is not nil and AutoUnloadDriver property has value "True". QC Entry 67233 QC #: Date Reported: Area: 67235 9/26/2008 VCL\Standard Controls Description: Steps: [QC Short Description] Resize from Left or Top pushes the window with constraints. Create a form. Set the forms MinWidth and MinHeight constraints. Resize the form from either the top border or left border. Once you reach min constraints, the window will start pushing or moving in the direction of the drag. It looks like the code below is in TForm but limited by the FSizeChanging boolean that is not used anywhere. My guess is that FSizeChanging was suppose to be set during WMEnterSizeMove or something like that. Just a guess. This is my solution below that ignores that flag. procedure TsdForm.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); begin inherited; with Message.MinMaxInfo^, Constraints do begin with ptMinTrackSize do begin if MinWidth > 0 then X := MinWidth; if MinHeight > 0 then Y := MinHeight; end; with ptMaxTrackSize do begin if MaxWidth > 0 then X := MaxWidth; if MaxHeight > 0 then Y := MaxHeight; end; end; end; [QC Description] Resizing a from from the left or top sizer causes the form to move if the form has minimum constraints. QC Entry 67235 QC #: Date Reported: 67272 9/28/2008 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] TObjectList - Access violation Compile and run the attached application below. See the following program output indicating failure. [QC Description] When creating TObjectList<T> without Comparer, inherited Create to TList<T> is not called (don't know why) and Comparer is not created. It leads to Access violation when Comparer is called - e.g. in IndexOf, Remove, etc. QC Entry 67272 [Tester Recommended] FAIL - Exception=EAccessViolation/Access violation at address 00413531 in module 'BTS266107.exe'. Read of address 00000000 program BTS266107; {$APPTYPE CONSOLE} uses SysUtils, Generics.Collections; var List: TObjectList<TObject>; Obj: TObject; begin try try List := TObjectList<TObject>.Create; Obj := TObject.Create; List.Add(Obj); List.IndexOf(Obj); WriteLn('PASS'); finally List.Free; end; except On E: Exception do WriteLn('FAIL - Exception=', E.ClassName, '/', E.Message); end; end. QC #: Date Reported: 67276 9/28/2008 Area: Compiler Description: Steps: [QC Short Description] Error if you try to initialize an anonymous method when declared. write the code: type TMyAnomMethod = reference to procedure; var b: TMyAnomMethod = procedure() begin end; then try to compile + you get an internal error. Same happens if you do something a bit more complex: type TMyAnomMethod = reference to procedure; TMyRecord = record anomMethod: TMyAnomMethod; end; var c: TMyRecord = (anomMethod: procedure() begin end); The same Internal error occurs. [QC Description] If you try to initialize an anymous method where it is declared you get an error :[DCC Fatal Error] Unit39.pas(34): F2084 Internal Error: AV04A02FC9-W0000002C-1 If it's illegal it needs an error message, or if not, needs to compile properly. QC Entry 67276 QC #: Date Reported: 67327 9/30/2008 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Too strict privacy with generics Compile the attached program (copied below). //EXP: no error //ACT: [DCC Error] VeryStrictPrivacy.dpr(15): E2361 Cannot access private symbol TGenericObject<T>.DoSomethingPrivate program VeryStrictPrivacy; {$APPTYPE CONSOLE} type TGenericObject<T> = class(TObject) strict private procedure [QC Description] If generic classes define a method as strict private, they can't use it on parameters themselves. QC Entry 67327 DoSomethingPrivate; public procedure DoSomething(const Generic: TGenericObject<T>); end; procedure TGenericObject<T>.DoSomething(const Generic: TGenericObject<T>); begin Generic.DoSomethingPrivate; end; procedure TGenericObject<T>.DoSomethingPrivate; begin end; begin end. [Tester Recommended] QC #: Date Reported: Area: 67355 9/30/2008 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] TDictionary<TKey,TValue> leaks memory 1. Open and run the attached project Expected: No memory leak Actual: Two memory leaks. [QC Description] The TDictionary<TKey,TValue> class leaks the memory for the "Keys" and "Values" property. Once accessed the collection objects aren't released. QC Entry 67355 QC #: Date Reported: Area: 67376 10/1/2008 Internet\XML Description: Steps: [QC Short Description] XML Binding Wizard should use UnicodeString [QC Description] XML Binding Wizard generates Units using WideString for DOMString Property Type. I think XmlBinding Wizard should use UnicodeStrings because DomString = UnicodeString in Delphi 2009. QC Entry 67376 QC #: Date Reported: Area: 67377 10/1/2008 Documentation Description: Steps: [QC Short Description] Many classes, methods, properties, Events, procedures and function do not have descriptions in Delphi 2009 Help [QC Description] Many, Many, many classes, methods, properties, Events, procedures and functions do not have descriptions in Delphi 2009 Help. For Example, All Help Topics for AnsiStrings Unit has no descriptions. Why? QC Entry 67377 QC #: Date Reported: 67423 10/1/2008 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Forward declared classes cannot act as generic constraint If you try to compile the following code: TMyClass2=class; TMyClass1<T: TMyClass2> = class(TComponent) end; TMyClass2 = class(TComponent) end; You get error E2510 "Type "TMyClass2" is not a valid constraint", but if you reverse position of TMyClass1 & TMyClass2 it compiles ok. [QC Description] If you have a class that is positioned below a generic class (in the source file), but that acts as a constraint, you should be able to use a forward declaration to allow it to work, but it doesn't compile. QC Entry 67423 [Tester Recommended] QC #: Date Reported: Area: 67434 10/2/2008 Internet\XML Description: Steps: [QC Short Description] TXMLDocument can not pharse XML document with non-english characters. [QC Description] When the following codes are executing, an error poped up with message : "Invalid character in the document". There are some Chinese text encoded by UTF8 in the document, and the codes are: XMLDocument.XML.clear; XMLDocument.XML.LoadFromFile(XMLFilename); XMLDocument.Active := True; or XMLDocument.XML.clear; XMLDocument.XML.LoadFromFile(XMLFilename, TEncoding.UTF8); XMLDocument.Active := True; Once the XMLDocument.Active is set to True, the error poped up. I can image the problem is caused by TStrings and XMLDocument internal logic conflicted. Because classic XMLDocument used TStrings as AnsiString list, but TStrings were replaced with "TUnicodeString", so the XMLDocument logic will get unicode string to "DECODE" again..... Therefore this error will poped up..... Please fix it ASAP, because TXMLDocument is used very frequently. QC Entry 67434 QC #: Date Reported: Area: 67469 10/2/2008 IDE\Project Management Description: Steps: [QC Short Description] IDE is not able to open unit displayed in the contains section See attached files. Open package OldPackage.dpk and validate the convertion. In the project manager, double click on the MyUnit > you will get an exception. [QC Description] IDE is not able to open unit displayed in the contains section . Open package OldPackage.dpk with notepad and look at the contains level It specialy appears after converting pacakages having unit listed in the contains section without the .pas extension and / or without 'In <uniname.pas>' string contains MyUnit; <=== should be either MyUnit.pas or MyUnit in 'MyUnit.pas' This is a regression since this used to worked under Delphi version prior to D2009 Now open package OldPackage.dproj with notepad and check near the </DelphiCompile> QC Entry 67469 ... </DelphiCompile> <DCCReference Include="vcl.dcp"/> <DCCReference Include="rtl.dcp"/> <DCCReference Include="MyUnit"/> <=== unit name is stored without the .pas extention. Delphi 2009 doesn't like it ! ... Alternate Steps (from Mark E): 1) Open OldPackage.dpk 2) Open a file in another directory using File | Open Note: Step 2 forces the current directory to change 3) Press Ctrl-F12 and type MyUnit and press Enter. //exp: MyUnit opens. //act: MyUnit not found. QC #: Date Reported: Area: 67485 10/3/2008 Midas\TClientDataSet Description: Steps: [QC Short Description] Property TClientDataSet Filter does not support UNICODE TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_265735 [QC Description] Property TClientDataSet Filter does not support UNICODE (see attachment) QC Entry 67485 Note from Tomohiro Takahashi <<<<<<<< Please see comments at QC for more detail. >>>>>>>> QC #: Date Reported: Area: 67523 10/4/2008 IDE\Translation Tools\Resource DLL Wizard Description: Steps: description update>>> Delphi, Cpp. Error compiling resource DLL project if there are include files inside RC-file. 1. Create VCL form application 2. Add RC file with any include to project: for example, file Strings.rc >>> [QC Short Description] Error compiling resource DLL projects [QC Description] String resources, added to resource DLL projects are not compiled QC Entry 67523 ___Strings.rc___ #include "strings.h" STRINGTABLE { IDS_PROJNAME "TEST PROJECT" } ___Strings.h___ #define IDS_PROJNAME 2000 3. Add new language to project: Project->Languages->Add 4. Compile resource DLL with new language Result: compile error [Error] E1026 File not found 'Strings.res' // see on disk into localized project folder: only *.rc, *.rcn files are there; and path to *.h file is not changed into RC file, so it is not found Workaround: manually copy strings.h into localized project folder. Note: there is similar behaviour if RC file contains include file from standart include directory of RAD Studio: for reproduce e.g add #include <winresrc.h> into any rc file and execute same steps QC #: Date Reported: 67558 10/5/2008 Area: VCL Description: Steps: [QC Short Description] TDictionary<T,T> class's AddOrSetValue will generate access violation 1. Create TDictionary<T,T> object with capacity as 0, 2 Call AddOrSetValue to add <T, T> pair 3. AddOrSetValue will generate access violation 4. The pair enumerator is also wrong, it will access one more non-exist pair. for example the following code will generate access violation var aDIC : TDictionary<string, string>; aEnum : TDictionary<string, string>.TPairEnumerator; begin aDIC := TDictionary<string, string>.Create (0); try aDIC.AddOrSetValue('Test', '111'); aEnum := aDIC.GetEnumerator; while (aEnum.MoveNext) do begin ListBox1.Items.Add(aEnum.Current.Key + ' : ' + aEnum.Current.Value); end; finally aDIC.Free; end; end; Please see the attached example QC Entry 67558 Note from Tomohiro Takahashi <<<<<<<< In addition, MoveNext returns True twice. Please see comments at QC for more information. >>>>>>>> QC #: Date Reported: 67560 12/7/2005 Area: Debugger\Local Variables View Description: Steps: [QC Short Description] While monitoring arrays/lists in items if you expand they are collapsed on step Ive attached a project open the project and in the unit1, Ive added a comment. Place a break pointon the code that says big.items[i].items[j]:=j; Run the code, expand in the local variables view the big, then items, then (1) then items. press F8 watch it collapse QC Entry 22052 QC #: Date Reported: Area: 67596 10/6/2008 IDE\Code Editor Description: Steps: [QC Short Description] When use editor's Surround | tryf to reformat codes, all Chinese characters become meanless characters 1. Inside the editor write the following codes : aSL := TStringList.Create; aSL.Add('??'); aSL.Add('?????'); aSL.Add('??'); aSL.Add('???'); aSL.Add('???????'); aSL.Free; 2. Inside the editor selects all the above codes , right click the mouse and select surround | tryf to reformat the codes. 3. The editor will produce codes like the following try aSL := TStringList.Create; aSL.Add('???'); aSL.Add('????????); aSL.Add('???'); aSL.Add('?????); aSL.Add('???????????); aSL.Free; finally end;????'); aSL.Free; end; All TC/SC Chinese characters become meanless characters Please see the attached example QC Entry 67596 QC #: Date Reported: Area: 67603 10/7/2008 VCL\Standard Controls\TListBox Description: Steps: [QC Short Description] Problem with trancparency of PNG files in TImageList (black borders) I've attached a zip files which contains a screen shot of this problem for a quick review. Moreover, the subfolder IMG contains those images which do not work properly. But those are just sample files as others do not work either. I provided some units which show the problem after opening in the IDE: 1) Unit31 was given to me by Rudy Velthuis who tried to reproduce this issue. He used some PNG files from the GlyFX subfolder installed with D2009. You will noticed that there are no black borders on the top toolbar I've added a new image list (MyImageList) and added the files from the attached IMG subfolder and did get no black borders, too, as could be seen in the lower toolbar. 2) So I've created a new form (Unit32) and *copied* the image list (MyImageList) from Unit31 to it - no drawing issues either. 3) I've created a new form (Unit33), added a *new* image list, inserted the PNG files from IMG subfolder and voila, black border are there. So there is really no way to reproduce this problem for sure, however Rudy stated he got black borders in Unit33 on his machine, as well. I even tried to solve this on a different Windows installation with different graphics drivers, to no avail either. I also tried different PNG files, those from the GlyFX subfolder, but did get those black borders again. Of course, I mentioned it already in the description, I do have Themes enabled and have set the image size and color depth before adding any images. OTH, I have used exactly those images in Turbo Delphi Pro with a third party [QC Description] Hi, I'm adding some PNG files to a TImageList (24 x 24, ColorDepth cd32bit) to show them up in a TToolbar. After loading the image files into the image list, I noticed that all images have got a black border instead of a transparent area. Using Windows XP Pro, SP2/SP3. Themes are enabled for the application and in Windows of course. This has already been discussed in the CG newsgroups (non-tech, 'PNGComponents question') without any solution yet (Oct. 7 2008) QC Entry 67603 component TPngImageList and TPngObject (the unit CG has include into D2009 to add PNG support) which work without those issues. So I assume that the PNG files themselves are not buggy in any way. Just for the records: this issue is visible in the IDE *and* during runtime. Using one of those images with a TImage control works perfectly without any black borders. Michael QC #: Date Reported: Area: 67638 10/7/2008 Internet\XML Description: Steps: [QC Short Description] TXMLDocument.XML can't work with unicodestring XmlDocument1.XML.Text = Memo1.Text; then XmlDocument1.Active := True; it will rasie Exception if Text has Chinese Chars. [QC Description] When I do this XmlDocument1.XML.Text = Memo1.Text , it can't work. I look into VCL and found that TXMLDocument.LoadData use TStringStream.Create(FXMLStrings.Text) to cast unicodestring to ansistring again, why don't call LoadFromXML(s : string) directly without a casting? QC Entry 67638 QC #: Date Reported: 67644 10/7/2008 Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] Ribbon form's caption is flickering while resizing the form Open, compile and run RibbonDemo project Resize [QC Description] Ribbon form's caption is flickering while resizing the form QC Entry 67644 Act : Ribbon form's caption is flickering Expt : Ribbon form's caption shouldn't flicker // note: if you change the window's width by clicking at the left margin, you can see the form's caption flickering. If you use the right margin instead, this will not happen. QC #: Date Reported: Area: 67645 10/8/2008 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] DrawFrameControl() declaration wrong Example code: DrawFlags := DFCS_BUTTONPUSH or DFCS_ADJUSTRECT; if FState in [bsDown, bsExclusive] then DrawFlags := DrawFlags or DFCS_PUSHED; DrawFrameControl(Canvas.Handle, PaintRect, DFC_BUTTON, DrawFlags); The passed rectangle PaintRect is changed after the call to DrawFrameControl(), but the parameter is defined as const. [QC Description] The DrawFrameControl() function is wrong defined in the Windows.pas file. The second parameter (the rectangle) should be a LPRECT but is declared as const TRect. The WinAPI still changes the passed rectangle, but this is confusing because of the const declaration. The WinAPI can change the rectangle to exclude the regions drawn by the function by passing the DFCS_ADJUSTRECT parameter. Normally the LPVOID parameter are defined as var TRect, but not here. QC Entry 67645 QC #: Date Reported: Area: 67651 10/8/2008 Install Description: Steps: [QC Short Description] 'CodeGear\RAD Studio\6.0' folder is created on all user's application data folder, but not used. [QC Description] After installation of Delphi 2009/C++Builder 2009, "C:\Documents and Settings\All Users\Application Data\CodeGear\RAD Studio\6.0"(Win2K) folder is created by installer,but these folder tree is empty and not used. QC Entry 67651 QC #: Date Reported: Area: 67652 10/8/2008 Documentation\Online Help\Programmers guide Description: Steps: [QC Short Description] Typo in description of Anonymous Methods/Functions Help | CodeGear Help Navigate to URL: mshelp://embarcadero.rs2009/devcommon/anonymousmethods_xml.htm [QC Description] Hi, I've just found a small typo in the documentation of Anonymous Methods: ms-help://embarcadero.rs2009/devcommon/anonymousmethods_xml.html The first example coding says uses MakeAdder as function name: function MakeAdder(y: Integer): TFuncOfInt; but the explanation below tells us about MakeAddr (note the missing 'e'): "The function MakeAddr returns a function that it declares with no name: an anonymous method. " [..] A next section "Anonymous Methods Variable Binding", however, correctly uses the name MakeAdder. So please adjust either the first usage or the later one. QC Entry 67652 QC #: Date Reported: Area: 67665 10/8/2008 Internet\XML Description: Steps: [QC Short Description] TXMLDocument.SaveToXMLStrings bug with encoded documents Create the following xml document <?xml version="1.0" encoding="utf-8"?> <watermark> <storage> <caption><![CDATA[????????]]></caption> </storage> </watermark> Create a sample project with the following code xml:= TXMLDocument.Create(nil); xml.LoadFromFile('d:\temp\n.xml'); xml.active := true; xml.xml.text := xml.xml.text; xml.active := true; // EXCEPTION [QC Description] TXMLDocument.SaveToXMLStrings corrupts the xml strings.While in d2007 with ansistrings the result was a utf8 encoded string, now we end up with a unicode string causing the failure when settings the xml.active := true since the xmlstrings do not contains valid xml (eg utf-8 encoded ansi strings). The greek text should be utf-8 encoded and not plain unicode characters as they are now. I think that all TXMLDocument.SaveToXML methods needs to be rewritten since the result expected is actually ansi text (encoded or not) and not unicode text QC Entry 67665 QC #: Date Reported: Area: 67674 10/8/2008 AddOn\RAVE Description: [QC Short Description] Rave freezes when printing RTF [QC Description] When printing RTF data from a database with Rave Reports, Rave gives the impression it has frozen, however, Steps: when the Processes are checked the Memory Usage of Rave continues to rise until the process is killed. This worked fine under BDS2006, I set the project up twice to test, one under BDS2006 the other under D2009, the latter fails. QC Entry 67674 QC #: Date Reported: Area: 67694 10/8/2008 VCL\Dialog Controls\TPageSetupDialog Description: Steps: [QC Short Description] Printer dialogs shown for wrong printer 1. Set up two printers in Windows. 2. Drop a TPageSetupDialog component. 3. Run this code: Printer.PrinterIndex := 0; PageSetupDialog1.Execute; Printer.PrinterIndex := 1; PageSetupDialog1.Execute; Expected result: It should show two Page Setup dialogs in succession, one for the first printer, then another for [QC Description] the second printer. (Click the "Printer..." button to see which printer each dialog is associated with.) Actual Printer dialog components (e.g. TPageSetupDialog) do not respect Printer.PrinterIndex. This is a new regression result: It shows two Page Setup dialogs *for the same printer*. The setting of PrinterIndex is effectively ignored. in Delphi 2009. Cause: The GetPrinter function in Dialogs incorrectly initializes the Offset fields of the returned DeviceNames record as byte offsets, when, according to MSDN, they should be character offsets: "wDriverOffset Offset, in characters, from the beginning of this structure..." Fix: Replace Longint() casts with character pointer subtraction: wDriverOffset := Longint(Offset) - Longint(DevNames); -> wDriverOffset := Offset - PChar(DevNames); QC Entry 67694 QC #: Date Reported: 67700 10/9/2008 Area: Debugger\Evaluator View Description: Steps: [QC Short Description] Can't enter # in evaluate/modify dialog Open the dialog with Ctrl+F7 or menu, try typing in # via AltGr + 3 keys, or Ctrl+Alt+3 keys, nothing happens. [QC Description] The # character end a few others characters (at least the tild '~', opening accolade '{' and euro sign '€') can't be entered in the evaluate modify dialog (the Ctrl+F7). This is on an AZERTY keyboard. Other AltGr characters can be entered without issue (such as @, closing accolade {, ). QC Entry 67700 QC #: Date Reported: Area: 67709 10/9/2008 Midas\TClientDataSet Description: Steps: [QC Short Description] TClientDataSet.Locate memory leak detected Call TClientDataSet.Locate with MidasLib in uses list. Please refer to the attachment for further information. [QC Description] The application reports memory leak upon application termination whenever TClientDataSet.Locate function is being called, with MIDASLIB in uses list. There is no memory leak if MIDASLIB is not in uses list. QC Entry 67709 QC #: Date Reported: 67713 10/9/2008 Area: VCL\Win 32 Controls\TTreeView Description: Steps: [QC Short Description] OnHint event is missing (although documented) making Tooltips property useless 1) Put a TTreeView control on a form 2) Set Tooltips property to true 3) Try to write an OnHint event handler to change the tooltip for each item Expected: An OnHint event handler is available in the object inspector (or at least via code..) Actual: No such event is available. [QC Description] The TTreeView control implementation does not handle TVN_GETINFOTIP message and do not raise - nor implements an OnHint event, although the Tooltips documentation talks about that event. QC Entry 67713 QC #: Date Reported: Area: 67726 10/9/2008 RTL\Delphi\Thread support Description: Steps: [QC Short Description] AV on closing after calling CurrentThread drop a button on a VCL Forms application with this code: procedure TForm1.Button1Click(Sender: TObject); begin if TThread.CurrentThread.ThreadID = System.MainThreadID then ShowMessage('current thread = main thread'); end; Run the application, Click the button. On closing the application you get an AV: -------------------------- Application Error --------------------------- Exception EAccessViolation in module ntdll.dll at 0001B1FA. Access violation at address 7C91B1FA in module 'ntdll.dll'. Write of address 00000010. QC Entry 67726 QC #: Date Reported: Area: 67762 10/10/2008 Compiler\Delphi\Language Description: Steps: [QC Short Description] Class identifier is not recognized as class in type constraint in generics Compile the attached application below. program BTS266080; [QC Description] The very common task is to use object list with object of specified type. Usually it can be done by using TObjectList<TSomeClass>. There is the following declaration in Generics.Collections.pas: type TObjectList<T: class> = class(TList<T>) Here TObjectList is a TList descendant with more restrictive type constraint. Now, suppose that we need a list of objects with additional functionality. For example, new class can provide search by specific properties of the objects in the list: type TSomeClass = class(...) property SomeCoolProp: TSomeType; end; {$APPTYPE CONSOLE} uses Generics.Collections; type TSomeAbstractClass = class end; TSomeAbstractClassList<T: TSomeAbstractClass> = class(TObjectList<T>) end; begin WriteLn('PASS'); // PASS on compile // end. You'll get "[DCC Error] Unit1.pas(32): E2511 Type parameter 'T' must be a class type". TSomeClassList = class(TObjectList<TSomeClass>) function FindBySomeCoolProp(const AValue: TSomeType): TSomeClass; end; Expected result: the compilation will be successfull. And what if TSomeClass is actually some abstract class like TStrings? Real work will be implemented in it's descendants. And we need the list of TSomeClass's descendants. So it is naturally to make TSomeClassList to be some generic class: P.S. The generic type TObjectList has "class" constraint => T in TObjectList is required to be any class. "T: TSomeAbstractClass" explictly says that T is a class (it is TSomeAbstractClass class or one of it's descendants). type TSomeClass = class(...) property SomeCoolProp: TSomeType; end; TSomeClassList<T: TSomeClass> = class(TObjectList<T>) function FindBySomeCoolProp(const AValue: TSomeType): T; end; Here TSomeClassList is a TObjectList descendant with more restrictive type constraint. It is the same situation as "TList -> TList<T>" + "TObjectList -> TObjectList<T: class>". Just replaced TObjectList with TSomeClassList and TList with TObjectList. The problem is that the last declaration above will not compile - see steps to reproduce and a workaround. QC Entry 67762 [Tester Recommended] QC #: Date Reported: Area: 67766 10/10/2008 VCL\Additional Controls\TCategoryPanelGroup Description: Steps: [QC Short Description] TCategoryPanelGroup scrollbar painting issues Create a new VCL Application Add a TCategoryPanelGroup Add 3 panels to this TCategoryPanelGroup (so that a scroll is dislayed) Compile and run the project Move the app around the desktop including off screen act : the scroll bar for the category panel turns gray and fails to repaint until you hover the mouse over it. ext : the scroll bar should be correctly drawn [QC Description] The scroll bar for the category panel turns gray and fails to repaint when part of the CatregoryPanelGroup goes off screen QC Entry 67766 QC #: Date Reported: Area: 67866 10/13/2008 VCL Description: Steps: [QC Short Description] TImageList will hang IDE 1. Place a TImageList component on the form 2. Set TImageList's width and height properties to 300 3. Double click the ImageList 4. The IDE will hang QC Entry 67866 Theming off, and you might need to set the size to a much larger value. -TG QC #: Date Reported: Area: 67891 10/14/2008 Database\TField\TStringField\TWideStringField Description: Steps: [QC Short Description] TWideStringField.IsNull returns wrong result TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_265858 Run the attached sample and click Test. See how the AnsiStringIsNull and WideStringIsNull fields are filled. [QC Description] TWideStringField.IsNull method provides wrong results in Delphi 2009, and works differently in comparison to previous Delphi versions. The attached archive also contains screenshots with the results for different Delphi versions. When assigning an empty string to a WideStringField it returns True in 2009, but False in 2007. QC Entry 67891 QC #: Date Reported: Area: 67922 10/15/2008 IDE\Project Management Description: Steps: [QC Short Description] The Welcome page does not offer any option to maintain the listed projects [QC Description] Hi, the Welcome page in Delphi 2009 does not offer any option/tool to maintain the listed projects. Currently I've got some projects which are already deleted from harddisk and are still listed on the Welcome page under 'Recently Opened Projects' with the text 'File not found or access denied.' OTH I would like to remove one or another manually and cannot do this right now. While the Favorites section offer such an option it would be helpful to have a similar option for the 'Recently Opened Projects'. Michael QC Entry 67922 QC #: Date Reported: Area: 67993 10/16/2008 AddOn\Interbase components Description: Steps: [QC Short Description] TIBDatabaseInfo.Version and TIBDatabaseinfo.DBSiteName cause AV 1. Place TIBDatabase and TIBDatabaseInfo components on form 2. Connect TIBDatabase to some database 3. Connect TIBDatabaseInfo to TIBDatabase 4. Execute TIBDatabase.Version and TIBDatabase.DBSiteName, each cause an AV [QC Description] Calling TIBDatabaseInfo.Version or TIBDatabaseinfo.DBSiteName results in AV in Kernel32. Fix1: in function TIBDatabaseInfo.GetDBSiteName change result := AnsiString(PByte(@local_buffer[6 + Int(local_buffer[4])])); to result := AnsiString(PAnsiChar(@local_buffer[6 + Int(local_buffer[4])])); Fix 2: in function TIBDatabaseInfo.GetVersion change result := AnsiString(PByte(@local_buffer[5])); to result := AnsiString(PAnsiChar(@local_buffer[5])); QC Entry 67993 QC #: Date Reported: Area: 68007 10/17/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Internal Error URW1023 (overload + inline) Compile the attached application below with the following command-line. dcc32 -b BTS265985.dpr [QC Description] Please see attached project: See the following compile-time error indicating failure. TPluginModules = class abstract(TInterfacedObject, IRegisterPluginV1) ... function Add(const AModule: TPluginModule): Integer; overload; inline; ... function Add(const AFileName: String): TPluginModule; overload; inline; ... end; Fatal: F2084 Internal Error: URW1135 ... uses uBTS265985b; program BTS265985; {$APPTYPE CONSOLE} _Plugins.Add('C:\TestPlugin.dll'); begin There is a problem with the second version of Add method. You will get internal error for this code. If you remove WriteLn('PASS'); "inline" from second Add -> compilation will be successfull. end. QC Entry 68007 [Tester Recommended] unit uBTS265985a; interface uses Generics.Collections; type TPluginModules = class(TObject) FList: TList<Integer>; procedure Add; inline; end; implementation procedure TPluginModules.Add; var Plugin: Integer; begin for Plugin in FList do; end; end. unit uBTS265985b; interface uses uBTS265985a; implementation procedure Test; begin TPluginModules(nil).Add; end; end. QC #: Date Reported: Area: 68024 10/17/2008 RTL\Delphi\Other RTL Description: [QC Short Description] TList<T>.Exchange() and TList<T>.Move() Missing [QC Description] The TList<T>.Exchange() method is missing in Delphi 2009. There are 2 primary reasons why this is a highly visible problem: 1. It means that TList<T> lacks source-level interface compatibility with TList. Anyone wanting to migrate their code from TList to TList<T> will end up needing to reimplement these missing methods. (Aside: Exchange() and Move() aren't the only missing methods, there's others. And it'd be nice if the new methods from TList<T> could be implemented in TList.) 2. This is the real deal-breaker. Anyone trying to reimplement Exchange() or Move() in TList<T> themselves will end up triggering notifications that didn't occur with TList. This is particularly problematic with anyone using TObjectList<T> with OwnsObjects = True (which it is by default). The common idiom of procedure TMyObjectList<T>.Exchange(const Index1, Index2: T); var Tmp: T; begin Tmp := Items[Index1]; Items[Index1] := Items[Index2]; Items[Index2] := Tmp; end; is going to cause Notify() to be called and trigger the freeing of the objects being exchanged. For the particular case of TObjectList<T> one could cache the current value of OwnsObjects and make sure to turn it off before doing the swap. However, this doesn't help anyone who might be using something from the TList heirarchy to do more complex notifications, whether it be by subclassing TList with a custom Notify implementation or using the new OnNotify property afforded by TList<T>. What's more, this apparently can't be implemented via class helpers, as the following code will cause the compiler to throw the following error: [Pascal Error] afGenerics.pas(9): E2508 type parameters not allowed on this type type TListHelper<T> = class helper for TList<T> procedure Exchange(Index1, Index2: Integer); Steps: procedure Move(CurIndex, NewIndex: Integer); end; QC Entry 68024 QC #: Date Reported: Area: 68031 10/17/2008 Midas\TClientDataSet Description: Steps: [QC Short Description] ftWideMemo data loss Run the attached application. [QC Description] When Loading an ftWideMemo field from an xml file, if the field contains unicode characters followed by ansi characters the last ansicharacter is truncated. This code illustrates the problem. var f : tfielddef; s : string; cds : tclientdataset; begin cds := tclientdataset.Create(nil); f := cds.FieldDefs.AddFieldDef; f.Name := 'field1'; f.DataType := ftWideMemo; cds.CreateDataSet; s := #964#949#963#964 + 'x'; cds.Open; cds.Append; cds['field1'] := s; cds.Post; //saving using any encoding is OK - the problem is during loading of data cds.SaveToFile('test.xml', dfxml); //cds.SaveToFile('test.xml', dfXMLUTF8); //cds.SaveToFile('test.xml', dfBinary); cds.loadfromfile('test.xml'); //PROBLEM HERE cds.open; if s = cds['field1'] then showmessage('OK') //EXPECTED RESULT else showmessage( cds['field1'] + ' <> ' + s); //ACTUAL RESULT end; QC Entry 68031 QC #: Date Reported: Area: 68045 10/18/2008 Database\ADO Description: Steps: [QC Short Description] TADOQuery/Table converts empty string to null TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_265947 ==or== [QC Description] The command adotable1['varchar_field'] := ''; converts the empty string to null Connect a TADOTable to any table (e.g. MS Access, MS SQL Server) that has at least a varchar field and one row. Open the table, edit the varchar field and assign an empty string to it. This is not desirable and it is different from D7 and D2007. QC Entry 68045 e.g. adotable1.open; adotable1.edit; adotable1['varchar_field'] := ''; adotable1.post; if adotable1['varchar_field'] = '' then showmessage('OK') //expected else showmessage('PROBLEM') //actual QC #: Date Reported: Area: 68068 10/18/2008 VCL\Standard Controls\TListBox Description: Steps: [QC Short Description] Missing test in TListBoxStrings.Insert, causes the box to lose object - Select File -> New -> VCL Forms Application from the menu. - Put a ListBox on the form. - Insert this code to the OnCreate event handler of the form. ListBox1.Items.InsertObject(-1, 'SomeString', Self); Assert (ListBox1.Items.Objects[ListBox1.Items.IndexOf('SomeString')] <> nil, 'Object is nil'); Expected: nothing happens Actual: assertion fails. [QC Description] If you execute code like "aListBox.Items.InsertObject(-1, 'SomeString', aObject)" the string 'SomeString' is happily inserted to the list box but the object is lost. The cause for this is ; TListBoxStrings.Insert does not test for a condition of Index being -1, since it is perfectly legal to send LB_INSERTSTRING with -1. But TListBoxStrings.PutObject tests if Index is -1 and silently exits if it is. (It is still legal to send LB_SETITEMDATA with -1, but I think the programmer would have thought this would have an undesirable outcome). The correct approach should be to override InsertObject and make the "-1" test there, or, allow "-1" to be Item Index as there is nothing wrong with this with WinApi. It is not common to call InsertObject with -1 but it occurs with drag-drop list boxes if you drop an item too near to the bottom of the box. Note: Hunting for bugs like this is really difficult as it really occurs very infrequently and seemingly randomly, _and_ however you are prepared for error logs and else you won't have any logs of mouse coordinates or visuals when the exception log is posted to you. This one has haunted me a little too long. More Info: I further pursued the matter, and found out that the reason of the bug is exactly as I commented to Mr. Tomohiro Takahashi. To duplicate it here; While you are dragging an object, the existence of a valid drop target is determined by controls.DragFindTarget. DragFindTarget calls DragFindWindow, and it calls "WindowFromPoint" with the current mouse coordinates. So if you have a WinControl under the pointer, you have a valid Target. Since we are inserting an object to a ListBox we call ItemAtPos function of the ListBox to find out the position to insert. We pass False to Existing, since -the documentation states"If Existing is set to false, ItemAtPos returns the index of the last item in the list box plus one." Even if there are no items in the box it will return 0. Fine, we can insert there. TCustomListBox.ItemAtPos executes a test in the very beginning of the procedure and returns -1 if the test fails. This test is "if PtInRect(ClientRect, Pos) then". Notice the "ClientRect" in the test. A standard List Box has *2* pixels width/height of NonClientArea at its edges. (This is on W2K, other OS or theming can slightly change the area). So it is perfectly possible, though rare, a user at times can drop his item at the very edge; where we have a valid Target, but ItemAtPos, despite the documentation and design, returns -1. And, when we execute ListBox.Items.InsertObject, we have our string inserted, but not our *Object*. I have attached a project which clearly demonstrates the bug at large. (Please don't run it in a VM. At least Virtual PC does seem to override the default mouse behaviour.) Regards. QC Entry 68068 QC #: Date Reported: Area: 68103 10/20/2008 AddOn\Interbase components Description: Steps: [QC Short Description] IBX and Char field - "Division by zero" Create database in Interbase with one table. In table create two columns - first Integer with autoinc and second VarChar 20 Charset WIN1250 Collate PXW_PLK Add few rows in column with test data. Create sample VCL aplication in Delphi 2009 with TIBDatabase, TIBQuery and TIBTransaction. Connect TIBDatabase to created database and set active to true. In TIBQuery set SQL property to "select * from table" and try set active to true. [QC Description] In table with any string field - for example VarChar, when Charset is set to WIN1250 and Collate is set to PXW_PLK - when I try to set active to True I get error: "Division by zero" I found that when collate is PXW_PLK IBCustomDataset return always zero as lenght of field - but I don't know why. QC Entry 68103 QC #: Date Reported: Area: 68147 10/21/2008 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] SM_MEDIACENTER constant in Windows.pas has invalid value GetSystemMetrics(SM_MEDIACENTER) always returns 0 on Windows Media Center Edition, but should return nonzero. GetSystemMetrics(87) works as expected, returning non-zero on Windows Media Center. [QC Description] SM_MEDIACENTER constant is defined in windows.pas as $87 but should be 87. In Microsoft WinUser.h it is defined as: #define SM_MEDIACENTER 87 In Windows.pas it is defined as: SM_MEDIACENTER = $87 ; QC Entry 68147 QC #: Date Reported: Area: 68155 10/22/2008 Documentation Description: Steps: [QC Short Description] Help on TStrings.LoadFromFile does not tell anything about Encoding parameter [QC Description] The help on TStrings / TStringList (..) LoadFromFile does not tell anything about the encoding parameter: ms-help://embarcadero.rs2009/delphivclwin32/[email protected] This should be added for completeness and of course for first time users of the help and D2009 IDE. The example used on this page should alos be updated to show the usage of the encoding parameter! Found in the English version of D2009 help. QC Entry 68155 QC #: Date Reported: Area: 68176 10/22/2008 Internet\Controls\TClientSocket Description: Steps: [QC Short Description] TCustomWinSocket.ReceiveText failure by result string type [QC Description] I think The result type of TCustomWinSocket.ReceiveText should be 'AnsiString', but declared as 'string'. ReceiveText sets result string length by internally called ReceiveBuf, and ReceiveBuf returns byte length, not Char length. By this wrong type of ReceiveText result, the data read from ReceiveText is broken. In case of SendText, the param type is AnsiString, there seems no problem. QC Entry 68176 QC #: Date Reported: Area: 68274 10/25/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Generics: Compiler generates ill-formed assembler code "lea eax,ah" / "lea eax,quiet_dl" Compile and run the attached application below. See the following exception error at runtime when the code generated for the line marked #1 executes. [QC Description] The compiler generates ill-formed assembler code "lea eax,ah" and "lea eax,quiet_dl" when doing some generic FAIL ExceptionEExternalException: External exception C000001D tricks to overcome the "class constraint is no TObject" bug. QC Entry 68274 A similar case where "lea eax, quiet_dl" is generated is attached. [Tester Recommended] program BTS266163A; {$APPTYPE CONSOLE} uses SysUtils, Contnrs; type TItem = class(TObject) S: string; end; TMyList<TKey: class> = class(TObjectList) private procedure SetItem(Index: Integer; const Value: TKey); public property Items[Index: Integer]: TKey write SetItem; end; var { This must be a global variable } l: TMyList<TItem>; function KeyAsObject(const Key): TObject; begin Result := TObject(Key); end; procedure TMyList<TKey>.SetItem(Index: Integer; const Value: TKey); begin inherited Items[Index] := KeyAsObject(Value); //#1 => lea eax,ah end; begin try l := TMyList<TItem>.Create; l.Add(nil); l.Items[0] := TItem.Create; l.Free; WriteLn('PASS'); except on E:Exception do Writeln('FAIL Exception', E.Classname, ': ', E.Message); end; end. QC #: Date Reported: Area: 68284 10/26/2008 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] Obsolete FPU Fix in System.pas [QC Description] Obsolete functions in RTL (here System.pas) should be removed. Delphi 2009 is not supporting Win9x anymore and in this case _FpuMaskInit as a fix for a Japanese Win95 bug is deprecated. This applies for the following functions in System.pas: function GetKeyboardType(nTypeFlag: Integer): Integer; stdcall; function _isNECWindows: Boolean; procedure _FpuMaskInit; QC Entry 68284 QC #: Date Reported: Area: 68305 10/27/2008 AddOn\RAVE Description: Steps: [QC Short Description] Rave print Setup button caused access violation Add a TRvSystem component and a TButton to a form. Add "rvsystem1.Execute;" to the button's onclick event. Run the program. Click the button Hit "Setup" [QC Description] If I execute a TRvSystem component and then hit "Setup" I get an access violation. QC Entry 68305 QC #: Date Reported: Area: 68336 10/28/2008 AddOn\Interbase components Description: Steps: [QC Short Description] TIBEvents does not work with Delphi 2009 IBEvents.Events.Clear; IBEvents.Events.Add('USAGE_OUT'); IBEvents.Registered := TRUE; [QC Description] Compiling on Vista, TIBEvents does not work. Works fine on the same source code compiled using Delphi 2007. QC Entry 68336 -Reported fix from newsgroups: unit IBEvents.pas [..] function EBP(Index: Integer): PByte; var Event : AnsiString; begin Inc(Index, (EventGroup * IB_MAX_EVENT_BLOCK)); if (Index > Parent.FEvents.Count) then Result := nil else begin Event := Parent.FEvents[Index - 1]; Result := PByte(Event); end; end; QC #: Date Reported: Area: 68349 10/28/2008 Compiler\Delphi\Anonymous Methods Description: Steps: [QC Short Description] Internal error : AV21B9CC2E-W00000002-1 program BTS266182; {$APPTYPE CONSOLE} [QC Description] Any non-whitespace text ahead of the keywords procedure or function in the declaration of an anonymous method causes an internal error at compile-time. QC Entry 68349 [Tester Recommended] uses SysUtils; type // TObjectProc = reference to procedure(x: Integer) of object; Erreur E2029 TObjectProc = reference to class procedure(x: Integer); var V: TObjectProc; begin try V := procedure(Sender: TObject) begin WriteLn('FAIL - Compile-time error expected; end; except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. QC #: Date Reported: Area: 68362 10/28/2008 IDE\Dialogs\Project Options Description: Steps: [QC Short Description] Dialog is to big for the screen Windows XP sp2 Clasic look (win 2000 like) 24" Screen 1920x1200 Extra large font 144DPI Open the dialog more then onece. [QC Description] The first time the dialog is opened it has the right size, but the second time it is opened it is to big for the screen. QC Entry 68362 QC #: Date Reported: Area: 68368 10/28/2008 Documentation Description: Steps: [QC Short Description] TDrawItemEvent contains documentation for TScrollEvent TDrawItemEvent is documented at this link mshelp://embarcadero.rs2009/delphivclwin32/StdCtrls_TDrawItemEvent.html TScrollEvent is documented at the following link ms-help://embarcadero.rs2009/delphivclwin32/StdCtrls_TScrollEvent.html [QC Description] The documentation for TDrawItemEvent actually contains the help content for TScrollEvent. There is no documentation for TScrollEvent at all. QC Entry 68368 QC #: Date Reported: Area: 68377 10/29/2008 AddOn\Interbase components Description: Steps: [QC Short Description] TIBQuery and TClientDataSet Connect a TDataSetProvider to a TIBSQL and the TDataSetProvider to a TClientDataSet. Make some changes to the data in the TClientDataSet. Then call TClientDataSet.ApplyUpdates(0). [QC Description] Applying updates to a ClientDataSet connected to a TIBSQL through a TDataSetProvider will give the following error message in Delphi 2009: "Project ... raised exception class EIBClientError with message Unsupported feature". added by Sysop <<<< ... a TIBSQL through a ... should be ... a TIBQuery through a ... >>>> QC Entry 68377 QC #: Date Reported: Area: 68400 10/29/2008 Documentation Description: Steps: [QC Short Description] Controls.TDragMessage is not documented [QC Description] Controls.TDragMessage is not documented ms-help://borland.bds5/delphivclwin32/Controls_TDragMode.html QC Entry 68400 QC #: Date Reported: Area: 68435 10/30/2008 Documentation Description: Steps: [QC Short Description] The IDesignerHook.PaintMenu method is not documented [QC Description] The IDesignerHook.PaintMenu method is not documented. Here: ms-help://borland.bds5/delphivclwin32/!!MEMBEROVERVIEW_Forms_IDesignerHook.html And: ms-help://borland.bds5/delphivclwin32/Forms_IDesignerHook_PaintMenu.html QC Entry 68435 QC #: Date Reported: Area: 68462 10/31/2008 Compiler Description: Steps: [QC Short Description] Using Old Style Objects causes AV errors at runtime. Compile and run the attached test case. See the following program output indicating failure. [QC Description] After defining a type as object with virtual procedures, any object derived from that fails to call own or virtual procedures. Class works fine. QC Entry 68462 FAIL #1 FAIL #2 Failure occurs in uBTS266268A.pas on the lines marked #1 and #2. unit uBTS266268A; interface uses SysUtils, uBTS266268B; procedure DoIt; type DrvdObj = object(myBaseObj) constructor Init(myName : String; myLen : Word); destructor Done; virtual; function SomeFunc ( Var Rec ) : Boolean; virtual; final; end; SomeRecType = Record abc : Array [1..111] of Byte; end; var A : Integer; Counter: Integer; implementation Constructor DrvdObj.Init(myName : String; myLen: Word); Begin myBaseObj.Init(myName, Sizeof(SomeRecType),338); a := 1; end; Destructor DrvdObj.Done; begin myBaseObj.done; a := 0; end; Function DrvdObj.SomeFunc ( Var Rec ) : Boolean; Begin Vari := 321; Result:=True; End; procedure DoIt; Var DrvdObjPntr : ^DrvdObj; SomeRec : SomeRecType; begin new(DrvdObjPntr,init('',0)); try DrvdObjPntr^.SomeFunc(SomeRec); //#1 except on E: Exception do WriteLn('FAIL #1'); end; try dispose(DrvdObjPntr,done); //#2 except on E: Exception do WriteLn('FAIL #2'); end; end; end. Here's uBTS266268b.pas with the base object declaration. unit uBTS266268B; interface type myBaseObj = Object private public Vari : Integer; constructor Init(myName : String; myLen, myID : Word); destructor done; virtual; Function SomeFunc ( Var Rec ) : Boolean; virtual; end; implementation constructor myBaseObj.Init(myName : String; myLen, myID : Word); begin Vari := 555; End; destructor myBaseObj.Done; begin Vari := 777; End; Function myBaseObj.SomeFunc ( Var Rec ) : Boolean; begin Vari := 123; Result := False; End; end. QC #: Date Reported: Area: 68473 10/31/2008 IDE\Project Management Description: Steps: [QC Short Description] AV on IDE startup when default project options contains a reference to a named option set. New VCL Forms application Project | Configuration Manager Select the project, right click, and choose "new OptionSet..." Name and save it Close Configuration Manager Project | Options Click "default" radio button Click OK Restart IDE [QC Description] AV on IDE startup when default project options contains a reference to a named option set. --- Original Automated Report Follows --Access violation at address 21560F69 in module 'delphicoreide120.bpl'. Read of address 00000000. I have installed ReportBuilder 11 and MyDac 570. I made one build options file and deleted some runtime libraries from Windows System related to ReportBuilder. QC Entry 68473 QC #: Date Reported: Area: 68492 11/1/2008 Database\ADO Description: Steps: [QC Short Description] Assign TParam to TParameter TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_266288 ==or= [QC Description] Exception occurs if TParam (DataType = ftInteger and Value = 1) assign to TParameter. Error Message: "Arguments are the wrong type, are out of accetable range, or are in conflict with one another". This error occurs in TDataSetProvider and i can't migrate our project from D2007 to D2009. We have multitier application with TClientDataSet -> TRemoteDataModule -> TDataSetProvider -> TADOQuery. TClientDataSet doesn't open if CommandText has params like as 'EXEC spProcedure :PARAM' and param's DataType is ftInteger and Value is 1) I have developed simple example project. QC Entry 68492 procedure TForm1.Button1Click(Sender: TObject); var c1: TParams; c2: TParameters; p1: TParam; p2: TParameter; begin c1 := TParams.Create(TParam); try p1 := c1.CreateParam(ftInteger, 'TEST', ptInput); p1.Value := 1; c2 := TParameters.Create(ADOCommand1, TParameter); try p2 := TParameter.Create(c2); p2.Assign(p1); // Exception!!!! finally c2.Free; end; finally c1.Free; end; end; QC #: Date Reported: 68551 11/4/2008 Area: Database\DataSnap Description: Steps: [QC Short Description] TDSServerModule can not export public Chinese named procedure/function correctly 1. Create a VCL Application 2. Create a Server Mdoule. 3. Inside Server Module's public interface declare two functions, one in English and the other in Chinese as follows : function GetSpeaker : TDataSet; //This funciton is the same as GetSpeaker, //Tt is just that the function name is in Traditional Chinese function ????? : TDataSet; 4. Use DSServer, DSTCPServerTransport and DSServerClass export the Server Module 5. Create a VCL Client Application, use SQLConnection connect to the DataSnap Server 6. Drop a SqlServerMethod on the form, select its ServerMethodName property 7. The ServerMethodName property Editor shows all exported Server Methods 8. The Server Method ????? become meanless characters 9. Click SQLConnection , select Generate DataSnap client classes, it will also generate wrong codes and can not compile like the followings: function Tdssm???Client.???????: TDataSet; begin if F???????Command = nil then begin F??????? Command := FDBXConnection.CreateCommand; F???????Command.CommandType := TDBXCommandTypes.DSServerMethod; F???????Command.Text := 'Tdssm???.???????'; F??????? Command.Prepare; end; F???????Command.ExecuteUpdate; Result := TCustomSQLDataSet.Create(nil, F???????Command.Parameters[0].Value.GetDBXReader(False), True); Result.Open; if FInstanceOwner then F???????Command.FreeOnExecute(Result); end; QC Entry 68551 QC #: Date Reported: Area: 68606 11/5/2008 VCL\Graphics Description: Steps: [QC Short Description] I can't compile jpeg.pas This project does not compile program Project1; {$APPTYPE CONSOLE} uses Jpeg in 'C:\Program Files\CodeGear\RAD Studio\6.0\source\Win32\vcl\Imaging\JPGImage\Jpeg.pas'; begin end. even if I add $(BDS)\source\Win32\vcl\Imaging\JPGImage\obj to the project search path. [QC Description] This .dpr does not compile program Project1; {$APPTYPE CONSOLE} uses Graphics in 'C:\Program Files\CodeGear\RAD Studio\6.0\source\Win32\vcl\Graphics.pas', Jpeg; begin end. It fails with the error F2051, jpeg unit was compiled with a different version of Graphics.Tgraphic.Equals This happens too if I don't specify the path for Graphics.pas but add $(BDS)\source\Win32\vcl to the project search path. I tried to change the project to program Project1; {$APPTYPE CONSOLE} uses Graphics in 'C:\Program Files\CodeGear\RAD Studio\6.0\source\Win32\vcl\Graphics.pas', Jpeg in 'C:\Program Files\CodeGear\RAD Studio\6.0\source\Win32\vcl\Imaging\JPGImage\Jpeg.pas'; begin end. but it fails too because it cannot find .obj files, even if I add $(BDS)\source\Win32\vcl\Imaging\JPGImage\obj to the project search path. The only workaround I found is to copy all the .obj files from $(BDS)\source\Win32\vcl\Imaging\JPGImage\obj to $(BDS)\source\Win32\vcl\Imaging\JPGImage Michel Terrisse QC Entry 68606 QC #: Date Reported: 68616 11/5/2008 Area: Database\ADO Description: Steps: [QC Short Description] TAdoStoredProc returns parameter's value without decimal places TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_266369 1. create a simple stored proc in mssqlserver which returs a numeric value [QC Description] TAdoStoredProc invokes simple stored proc in MsSqlServer which returns a decimal value (ex. 150.55) In D2009 TAdoStoredProc returns 15055 instead of 150.55. create procedure [dbo].[test] (@t1 numeric(12,2), @t2 numeric(12,2) output) as begin set @t2 = @t1 + 0.55; end; In D2007 TAdoStoredProc returns correct value (ex. 150.55) 2. Create a simple form with two TEdit and one TButton object QC Entry 68616 3. Attach this code in Tbutton.OnClick event Note from Tomohiro Takahashi <<<<<<<<<< Please see comment and workaround at QC. If a instance of TAdoStoredProc is created at Design Time, we get correct value. >>>>>>>>>> procedure TForm1.Button1Click(Sender: TObject); var SP: TAdoStoredProc; begin SP := TAdoStoredProc.Create(Self); SP.Connection := AdoConnection1; SP.ProcedureName := 'Test'; SP.Parameters.Refresh; SP.Parameters.ParamByName('@t1').Value := StrToFloat(Edit1.Text) ; SP.Parameters.ParamByName('@t2').Value := null; SP.ExecProc; Edit2.Text := SP.Parameters.ParamByName('@t2').Value; SP.Free; end; 4. run the project . Enter value in Edit1. (ex. 150) Press the button. Edit2 shows 15055 instead of 150.55 ! QC #: Date Reported: Area: 68627 11/5/2008 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] Cant alter position of files in project (build order) try to drag any item in the project manager to a new place. The IDE does not allow it to be dropped. [QC Description] There is no way to change the build order of files inside a project. The drag and drop functionality has been broken. QC Entry 68627 QC #: Date Reported: Area: 68635 11/5/2008 IDE\Code Editor Description: Steps: [QC Short Description] Typed after dot characters do not appear in editor Go to the implementation of some method, type the name of some object, type in dot, wait half a second until mouse pointer changes to hourglass (code insight kicks in) and at this moment continue typing. You will notice that characters you were typing while mouse pointer was hourglass do not appear in the editor. Perhaps you need to have a large project open so that it takes significant time for code insight to build the list of identifiers. None of previous Delphi versions had this gotcha and this one is quite annoying. [QC Description] If you have code insight active and are typing in the editor, quite often straight after you type in dot and continue typing, a few characters that were supposed to appear after dot, do not appear. QC Entry 68635 QC #: Date Reported: 68666 11/6/2008 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 / Internal error : AV04D9B00D-R00000000-0 on generics with an internal enumeration type Compile the attached application below, see the following error at compile-time indicating failure. Fatal: F2084 Internal Error: AV004356ED-R00000000-0 [QC Description] The following code will fail to compile with F2084 / Internal error : AV04D9B00D-R00000000-0. QC Entry 68666 program BTS266380; {$APPTYPE CONSOLE} [Tester Recommended] TYPE G<T> = CLASS PUBLIC Type Argh = (a,b); PROCEDURE InternalError; END; procedure G<T>.InternalError; var x : Argh; begin x := b; end; begin WriteLn('PASS'); //PASS on compile// end. QC #: Date Reported: 68685 11/7/2008 Area: Database\dbExpressCore Description: Steps: [QC Short Description] TDBXDriverRegistry.UnregisterDriverClass is malfunction TDBXTiburonBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_267173 ==or== [QC Description] A method "TDBXDriverRegistry.UnregisterDriverClass" in unit DBXCommon.pas isn't programming correctly: Run the following code to show the error: class procedure TDBXDriverRegistry.UnregisterDriverClass(DriverName: String); var Index: Integer; begin if DBXDriverRegistry.FDriverClasses.Find(DriverName, Index) then begin DBXDriverRegistry.FDriverClasses.Delete(Index); end; end; var S: TStringList; begin // Using memory connection factory TDBXConnectionFactory.SetConnectionFactory(TDBXMemoryConnectionFactory.Create); FDriverClasses.Find will only function well if the string list is sorted. However, FDriverClasses never get sorted. // Display Registered Classes S := TStringList.Create; try TDBXConnectionFactory.GetConnectionFactory.GetRegisteredDriverNames(S); ShowMessage(S.Text); finally S.Free; end; QC Entry 68685 // Register driver classes TDBXDriverRegistry.RegisterDriverClass('C', TDBXDynalinkDriverNative); TDBXDriverRegistry.RegisterDriverClass('B', TDBXDynalinkDriverNative); TDBXDriverRegistry.RegisterDriverClass('A', TDBXDynalinkDriverNative); // Unregister driver classes TDBXDriverRegistry.UnregisterDriverClass('C'); TDBXDriverRegistry.UnregisterDriverClass('B'); TDBXDriverRegistry.UnregisterDriverClass('A'); // Display Registered Classes again (expected empty) S := TStringList.Create; try TDBXConnectionFactory.GetConnectionFactory.GetRegisteredDriverNames(S); ShowMessage(S.Text); finally S.Free; end; end; The example purposely register the driver name in unsorted manner to show the problem. If the name are registered in order (e.g.: A, B, C), it works fine. QC #: Date Reported: 68693 11/7/2008 Area: Debugger\CPU Description: Steps: [QC Short Description] SSSE3 Instructions PMULHRSW is Disassembled Incorrectly Make a new Win32 Delphi VCL project and add this code. TWord128 = packed record I1,I2,I3,I4,I5,I6,I7,I8 : SmallInt; end; function SSSE3_PMULHRSW(var Word128a, Word128b : TWord128) : TWord128; asm movupd xmm0, [Word128a] movupd xmm1, [Word128b] pmulhrsw xmm0, xmm1 movupd [Result], xmm0 end; procedure TForm1.Button3Click(Sender: TObject); var Word128a, Word128b, ResWord128 : TWord128; begin Word128a.I1 := 1 shl 8; Word128a.I2 := 2 shl 8; Word128a.I3 := 3 shl 8; Word128a.I4 := 4 shl 8; Word128a.I5 := 5 shl 8; Word128a.I6 := 6 shl 8; Word128a.I7 := 7 shl 8; Word128a.I8 := 8 shl 8; Word128b.I1 := 1 shl 8; Word128b.I2 := 2 shl 8; Word128b.I3 := 3 shl 8; Word128b.I4 := 4 shl 8; Word128b.I5 := 5 shl 8; Word128b.I6 := 6 shl 8; Word128b.I7 := 7 shl 8; Word128b.I8 := 8 shl 8; ResWord128 := SSSE3_PMULHRSW(Word128a, Word128b); end; [QC Description] The SSSE3 instruction PMULHRSW is disassembled incorrectly. Unit1.pas.112: pmulhrsw xmm0, xmm1 660F380BC166 palignr xmm0,xmm1,$66 The Intel reference manual http://download.intel.com/design/processor/manuals/253667.pdf p. 4-184 Opcode Instruction 64-Bit Mode Compat/ Leg Mode Description 0F 38 0B /r PMULHRSW mm1, mm2/m64 Valid Valid Multiply 16-bit signed words, scale and round signed doublewords, pack high 16 bits to MM1. 66 0F 38 0B /r PMULHRSW xmm1, xmm2/m128 Valid Valid Multiply 16-bit signed words, scale and round signed doublewords, pack high 16 bits to XMM1. It looks like the opcode is correct and the bug is in the CPU view disassembler. The version operating on MMX registers has the same problem Unit1.pas.115: pmulhrsw mm0, mm1 00465FE8 0F380BC10F palignr xmm0,xmm1,$0f QC Entry 68693 QC #: Date Reported: 68694 11/7/2008 Area: Debugger\CPU Description: Steps: [QC Short Description] SSSE3 Instructions PHSUBD is Disassembled Incorrectly Make a new Delphi Win32 project and add this code type TInt128 = packed record I1,I2,I3,I4 : Integer; end; function SSSE3_PHSUBD(var Int128a, Int128b : TInt128) : TInt128; asm movupd xmm0, [Int128a] movupd xmm1, [Int128b] phsubd xmm0, xmm1 movupd [Result], xmm0 end; var Int128a, Int128b, ResInt128 : TInt128; begin ResInt128 := SSSE3_PHSUBD(Int128a, Int128b); end; [QC Description] phsubd is disassembled into phsubsd Unit1.pas.132: phsubd xmm0, xmm1 00466010 660F3806C1 phsubsd xmm0,xmm1 There exist no instruction called phsubsd. Best regards Dennis QC Entry 68694 QC #: Date Reported: Area: 68730 11/8/2008 VCL\Win 32 Controls\TPageControl Description: Steps: [QC Short Description] TLabel is not painted on a themed, double-buffered TTabSheet in Vista 1) Create a new project, make runtime themes enabled in Project Options. 2) Add a TPageControl on the form. 3) Add one TTabSheet to the page control. Set TTabSheet.DoubleBuffered := True; 4) Drop TLabel on the TTabSheet. TLabel will not be visible. Setting DoubleBuffered to False makes the label visible again. [QC Description] In Windows Vista, when enabling runtime themes in a project, all labels placed directly on a TTabSheet control which has DoubleBuffered property set to True will be invisible. I'm not an expert on internals of VCL, but looking at WM_PAINT handler of TWinControl, there is the following code: if not FDoubleBuffered or (Message.DC <> 0) then ... else begin if DwmCompositionEnabled then begin // Use DWM methods when in Vista DC := BeginPaint(Handle, PS); try PaintBuffer := BeginBufferedPaint(DC, PS.rcPaint, BPBF_COMPOSITED, nil, MemDC); if PaintBuffer <> 0 then try Perform(WM_ERASEBKGND, MemDC, MemDC); Perform(WM_PRINTCLIENT, MemDC, PRF_CLIENT); if not (Self is TCustomForm) then BufferedPaintMakeOpaque(PaintBuffer, PS.rcPaint); finally EndBufferedPaint(PaintBuffer, True); end; finally EndPaint(Handle, PS); end; end else begin // Draw in memory when not in Vista // .. Perform(WM_ERASEBKGND, MemDC, MemDC); Message.DC := MemDC; WMPaint(Message); Message.DC := 0; // ... end; end; So when not in Vista, WM_ERASEBKGRD and WM_PAINT messages are sent while in other OSes WM_ERASEBKGRD and WM_PRINTCLIENT are sent. As I understand, child controls are drawn in WM_PAINT, not in WM_PRINTCLIENT so TLabel is never drawn. QC Entry 68730 QC #: Date Reported: Area: 68743 11/9/2008 IDE Description: Steps: [QC Short Description] Resource Manager loses assigned resource names In a new project [QC Description] Resource names assigned to newly added resources are lost QC Entry 68743 1) open the Resource Manager 2) click Add Resource 3) Change assigned name of resource 4) Click OK to exit Resource Manager Re-Open the Resource Manager - the assigned resource identifier names are lost. 1) Change the resource identifier names again 2) Click OK to exit Resource Manager Re-Open the Resource Manager - assigned resource identifier names are now stored correctly. NOTE: If you save the project after step 4, then the name is saved. QC #: Date Reported: 68752 11/10/2008 Area: Database\TParams Description: Steps: [QC Short Description] TParam.GetDataSize return incorrect value for Blob data type TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_266480 Run the following in Delphi 2009: [QC Description] If we have a TParam object (Q) of ftBlob and we assign a string to it: Q.Value := 'TEST'; Invoke Q.GetDataSize will return 4. But if invoke TParams.AsBytes it would return a TBytes of length 8. This create a problem in procedure SetQueryProcParams of SqlExpr.pas: procedure SetQueryProcParams(const Sender: TSQLConnection; const Command: TDBXCommand; const Params: TParams; ProcParams: TList = nil); begin ... ftBlob, ftGraphic..ftTypedBinary,ftOraBlob,ftOraClob: begin Buffer := TDBByteBuffer.Create(Param.GetDataSize); Buffer.Append(Param.AsBytes); ExtractedBytes := Buffer.GetBytes; Value.SetDynamicBytes(0, ExtractedBytes, 0, Length(ExtractedBytes)); end; ... end; var P: TParams; Q: TParam; i, j: integer; begin P := TParams.Create; try Q := P.CreateParam(ftBlob, 'Blob', ptInput); Q.Value := 'TEST'; i := Q.GetDataSize; j := Length(Q.AsBytes); finally P.Free; end; end; variable i return 4 variable j return 8 Invoke "Buffer.Append(Param.AsBytes)" will always raise ERangeError exception with message 'CheckSpace'. The reason is simple. Buffer is allocated 4 bytes of space but we later append 8 bytes of data to it and thus the ERangeError was raised. I am not sure if this is a bug or it is by design. Should we let the program decide the encoding of string data store into a blob field? If we let the program decide, the blob field data may not accessible by legacy program that always treat the blob field string data as ANSI encoding. QC Entry 68752 QC #: Date Reported: Area: 68763 11/10/2008 VCL\Core VCL Classes Description: Steps: [QC Short Description] UTF8String published properties corrupts their text 1) Load and install MyPackage.dpk 2) Create a new VCL Win32 application 3) Add a TMyComp to the form 4) Try to enter text *not* in the active codepage (e.g. Chinese) into the MyProp property of the component Expected: The Chinese text is accepted and displays correctly. Actual: The Chinese characters are replaced with question marks. [QC Description] Attempting to type any characters outside the active codepage into a UTF8String property in the object inspector corrupts the text, and replaces the characters with question marks. It appears that the RTL is unable to stream UTF8String published properties to and from form resources. See attachments in conjunction with "Steps" for an example. QC Entry 68763 QC #: Date Reported: Area: 68766 11/10/2008 VCL\Core VCL Classes\TWinControl Description: Steps: [QC Short Description] SetImeCompositionWindow doesnt work on Vista uses imm procedure TForm1.FormCreate(Sender: TObject); begin SetImeMode(Handle,imHira); SetImeCompositionWindow(Font,0,0); //type key with IME(japanese) end; the newest sample can download from this link http://hp.vector.co.jp/authors/VA015390/delphi/zip/imm32bug.zip [QC Description] SetImeCompositionWindow doesnt support Font effect. it seems that Imm32SetCompositionFont has bug. if it change to ImmSetCompositionFont(w), it works well. QC Entry 68766 QC #: Date Reported: Area: 68785 11/10/2008 AddOn\TChart\TChart Description: Steps: [QC Short Description] TBarSeries (part of TChart) do not work at all! ->Create new project ->Add a TChart to project -> add a TBarseries to TChart -> Do sth. like [QC Description] An endless loop of EInvalidOp "invalid floationg point operation" is raised when working with the included TChart Series1.Clear; and a TBarSeries. Series1.AddXY(4,5,'',clYellow); Series1.AddXY(5,6,'',clYellow); This is VERY annoying because we have several old projects that use a TBarSeries, an update of TChart in ->Try to zoom into the TChart Update 2 would be appreciated! -> Now, endless loop of Exceptions is raised QC Entry 68785 To zoom: To zoom in on a Chart, press the right mousebutton at the top left hand corner of the area you wish to zoom in on and, maintaining the mousebutton pressed, drag out the rectangle to the bottom righthand corner of the zoom area. Releasing the mousebutton will force the Chart to redraw the area selected. QC #: Date Reported: Area: 68899 11/13/2008 Internet\Indy Description: Steps: [QC Short Description] TIdTCPStream.Read() doesn't work [QC Description] There is a buggy line in TIdTCPStream.Read (Indy 10): Move(TempBuff,Buffer,Count); wich gives you the address of the TempBuff dynamic array and some random memory garbage instead of content. It should be Move(TempBuff[0],Buffer,Count); or something like that. QC Entry 68899 QC #: Date Reported: Area: 68906 11/13/2008 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] sizeof for old style static objects is broken Compile the attached application below. See the following program output indicating failure. [QC Description] The built-in function sizeof crashes with old style static objects, if the object is derived from an other object in an other type section (or an other unit). Likewise, an assignment of one instance of such an object to another crashes, too. QC Entry 68906 4 4 FAIL Exception=EAccessViolation/Access violation at address 0040AA63 in module 'bts266670.exe'. Read of address FFFFFFF8 program bts2666670; {$APPTYPE CONSOLE} uses SysUtils; type basic = object id : integer; end; type {<- this is the offending statement} obj = object (basic) end; var o : obj; x : record o : obj; end; o1, o2 : obj; procedure DoIt; begin try writeln (sizeof (obj)); {works as expected} writeln (sizeof (x)); {works as well} writeln (sizeof (o)); {crashes} o1 := o2; {crashes too} WriteLn('PASS'); except on E: Exception do WriteLn('FAIL Exception=', E.ClassName, '/', E.Message); end; end; begin DoIt; end. QC #: Date Reported: Area: 68924 11/14/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: AV04C854E9-R00000000-0 program bts266671; {$APPTYPE CONSOLE} [QC Description] I've got this message uses SysUtils; [DCC Fatal Error] Unit43.pas(42): F2084 Internal Error: AV04C854E9-R00000000-0 when trying to compile the following code: see "Steps to Reproduce Section" The interesting part is that if I comment this line. TMonitorList = TRecordList<Integer>; it compiles just fine. QC Entry 68924 type TRecordList<T> = class public type PT = ^T; private FItems: array of T; function GetItem(Index: Integer): PT; procedure SetItem(Index: Integer; const Value: PT); protected public property Items[Index: Integer]: PT READ GetItem WRITE SetItem; DEFAULT; end; [Tester Recommended] TMonitorList = TRecordList<Integer>; // #1 // { TRecordList<T> } function TRecordList<T>.GetItem(Index: Integer): PT; begin Result := @FItems[Index]; end; procedure TRecordList<T>.SetItem(Index: Integer; const Value: PT); begin FItems[Index] := Value^; end; begin WriteLn('PASS'); //PASS on compile // end. QC #: Date Reported: Area: 68942 11/14/2008 IDE\Form Designer Description: Steps: [QC Short Description] IDE should tell what form the non available component was Create a Delphi VCL app and drop a button on the form Save all and close the project In an external editor, edit the unit's .pas and .dfm files [QC Description] -- In both the .pas and the .dfm, change "TButton" to "TNonExistentComponent" If the IDE tries to laod a project at startup (possibly also when the IDE was already running) and this project -- Save the files contains a component for which the IDE thinks it's not available some error message with ignore, cancel abotr or Back in the IDE, reopen the project so occurs. This dialogue names the not avaliable component, but doesn't say in which form. Note the "Error Reading Form" message: If would be great to also mention the form containing this component QC Entry 68942 "Class TNonExistentComponent not found....." This error message doesn't tell you which form was being loaded. QC #: Date Reported: Area: 69029 11/17/2008 Debugger\CPU Description: Steps: [QC Short Description] SSE4 Instructions ROUNDSD is Disassembled Incorrectly Create a new Win32 Delphi project and add this code function SSE4_ROUNDSD(X : Double) : Double; asm movsd xmm1, [X] roundsd xmm0, xmm1, 1 movsd [Result], xmm0 end; SSE4_ROUNDSD(7); [QC Description] roundsd is disassembled into rounsd Unit1.pas.358: roundsd xmm0, xmm1, 1 0046623F 660F3A0BC101 rounsd xmm0,xmm1,$01 There exist no instruction called rounsd. Best regards Dennis Christensen QC Entry 69029 QC #: Date Reported: Area: 69054 11/18/2008 VCL\Additional Controls Description: Steps: [QC Short Description] TTrayIcon BalloonHint problem 1. Put a TTrayIcon on the form 2. Set a timeout value of 3000 3. Call ShowBalloon. Note that the icon must be active. [QC Description] TTrayIcon' Balloon hint will never time out. No matter what the interval it will never automatically close. It will dissappear after a random amount of time (usually after 10 seconds), no matter the value of BalloonTimeout. QC Entry 69054 QC #: Date Reported: Area: 69062 11/18/2008 Internet\Controls\TWebBrowser Description: Steps: [Weaver only] (JJS: See attached project file) [QC Short Description] When using the TWebBrowser.OnFileDownload event, you will get an access violation. All of the times. 1. Start with a fresh VCL Forms application. 2. Drop a TButton and a TWebBrowser 3. Hook this code to the Button1.OnClick event: [QC Description] --------------------------Debugger Exception Notification --------------------------Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 004734C0 in module 'Project1.exe'. Read of address 0000FFFF'. --------------------------Break Continue Help --------------------------This bug is present at least in Delphi 2007 and Delphi 2009. QC Entry 69062 procedure TForm1.Button1Click(Sender: TObject); begin WebBrowser1.Navigate('http://www.codegear.com/images/em/embarcadero.gif'); end; 4. Hook this code to the WebBrowser.OnFileDownload event: procedure TForm1.WebBrowser1FileDownload(ASender: TObject; var Cancel: WordBool); begin try Caption := IntToStr(Ord(Cancel)); except on E: Exception do Caption := Format('%s:%s', [E.ClassName, E.Message]); end; end; 5. Run the application. 6. Press the button The access violation is caused because the method entry code generated for TForm1.WebBrowser1FileDownload is wrong. QC #: Date Reported: Area: 69065 11/18/2008 VCL\Ribbon Controls Description: Steps: [QC Short Description] Ribbon control conflicts with Rave and DB Units Create new VCL Forms Application Add TRibbon, TButton and TRvProject components Set ProjectFile property to simple, single page .rav file (no data components) add button click handler to execute report Project runs as expected Add DbGrids to main form uses clause Project now crashes with EAccessViolation 'at address 0040D3A0 in module Project1.exe. Read of address 006B0073' [QC Description] Adding a TRibbon control (no panels/groups etc) to a single form application that contains an ActionManager component raises an access violation exception when attempting to execute a rave report. The error may also be dependent on the presence of a network printer (in my case called: 'LaserJet 1329 on ARGSRV1'). I have seen other reports relating to Rave failures and printers (mainly concerning a crash when trying to invoke the rave editor). However, this problem can be rectified by removing the ribbon component and the ribbon units from the uses clause. NB. Just deleting the Ribbon and setting the ActionManager style back to standard does not remove the problem. To remove the problem, the Ribbon and RibbonLunaStyleActnCtrls units must also be removed from the uses clause. Also: a simple application with only a single ribbon control, a rave project component and a button (to action the report) will allow the rave report to execute correctly, even if the network printer is in place. However, if I add DBGrids into the main form uses clause, the same access violation exception occurs. It seems to me that a conflict is occurring at a fairly fundamental level. QC Entry 69065 QC #: Date Reported: Area: 69086 11/19/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Error insight undeclared identifier on working generic list See attached project. Open the project and open the unit named 'data.tabelliste.pas'. Please note that the project must be open! If you open the unit by itself, no errors are visible! [QC Description] Attached project contains a generic list using a record as template. The added methods of the list generates several errors in error insight but the code compiles and works fine. QC Entry 69086 QC #: Date Reported: Area: 69112 11/19/2008 VCL\Additional Controls\TSpeedButton Description: Steps: [QC Short Description] TSpeedButton is painted black on a panel on a sheet of glass 1. Extract the attached project 2. Compile and start it under Vista Expected: Both speed buttons are painted correctly Actual: SpeedButton1 has a black border and SpeedButton2 is black. [QC Description] If you put a TSpeedButton on a double buffered panel that is on a sheet of glass form, the SpeedButton is painted with a black border. And if you set the SpeedButton to Flat=True, the whole button is painted as a black filled rectangle. This is because "csGlassPaint in ControlState" returns true even if the control is painted on an opaque panel. QC Entry 69112 QC #: Date Reported: Area: 69116 11/19/2008 ActiveX\Type Library Editor Description: Steps: [QC Short Description] Adding a new ActiveForm to a ActiveX Library adds strange Aliases New ActiveX Library New ActiveForm You will see down the bottom of the type library that there is an Alias PPUserType1 and sometimes PPUserType2. Hit refresh you will see PPUserType3. [QC Description] Adding a new ActiveForm to a ActiveX Library adds Alias "PPUserType1" to the Type Library. It has Type = IFontDisp** and Guid = 0 This also happens when I hit refresh on my existing type library. This is alot more annoying as it never stops adding these Aliases. I just manually removed 50 "PPUserTypeXXX" from my type library. QC Entry 69116 //regression in behavior QC #: Date Reported: Area: 69119 11/19/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Overloaded procedure TMonitor.Enter not marked as overloaded in System unit I have a ZeroMemory call in one of my own units. I clicked "Find Declaraction" on that, then on the FillChar in the ZeroMemory routine. I then noticed the overload error message in the Structure treeview. [QC Description] Viewing System.pas the Structure view displays the message "Overloaded procedure 'TMonitor.Enter' must be marked with the 'overload' directive at line 10698(10698:16)". QC Entry 69119 QC #: Date Reported: Area: 69120 11/19/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Expected ; but recieved 'stdcall' on TThreadStartRoutine and TWaitOrTimerCallback in Windows unit added by Sysop. <<<<< ; is missing at declarations for TThreadStartRoutine TWaitOrTimerCallback TFNHookProc stdcall appears twice and ; is missing at declaration for TFNAbortProc >>>>> [QC Description] Viewing the Windows unit, four error messages display in the Structure treeview: Expected ; but recieved an identifier 'stdcall' at line 1818(1818:71). Expected ; but recieved an identifier 'stdcall' at line 1819(1819:73). Expected ; but recieved an identifier 'stdcall' at line 16835(16835:56). Expected ; but recieved an identifier 'stdcall' at line 18653(18653:83). QC Entry 69120 QC #: Date Reported: Area: 69124 11/19/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Expected ; but recieved an identifier 'stdcall' in Dialogs unit [QC Description] When viewing Dialogs unit, one error message is reported in Structure pane as below. Expected ; but recieved an identifier 'stdcall' at line 1385 (1385:48) This is due to lack of ; at declaration of TDialogFunc = function(var DialogData): Bool stdcall; QC Entry 69124 QC #: Date Reported: Area: 69149 11/20/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Delphi 2009 compiler can hang when using generics (JJS: Simplified test case from Uwe Schuster) Compile the following, see that compilation hangs. [QC Description] when adding line after a source with generics IDE hangs. program BTS266866; QC Entry 69149 {$APPTYPE CONSOLE} [Tester Recommended] uses Generics.Collections; type TSynZeilen = TList<array [0..0] of TList<TObject>>; begin WriteLn('PASS'); //PASS on compile end. I played a little bit more with it and when I exchange TList<T> in the example with TList<T> = class(TObject); then I get F2084 Internal Error: G7198 //--program Project2; {$APPTYPE CONSOLE} type TList<T> = class(TObject); TSynZeilen = TList<array [0..0] of TList<TObject>>; begin WriteLn('PASS'); end. //--Steps: - dcc32 project2.dpr expected: it compiles actual: project2.dpr(9) Fatal: F2084 Internal Error: G7198 (Original Steps) new project: ----------------------------------------------program Project1; {$APPTYPE CONSOLE} uses SysUtils, Classes, Generics.Collections; type TDingsNr = 1..4; TSynErgebnis = class end; TSynErgebnisse = TList<TSynErgebnis>; TSynWort = class end; TSynFeld = TList<TSynWort>; TSynZeile = array[TDingsNr] of TSynFeld; TSynZeilen = TList<TSynZeile>; //when adding a "(" the next line or compile die IDE hangs begin try { TODO -oEntwickler -cKonsole Main : Hier Code einfügen } except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; Writeln('Ende'); end. ----------------------------------------------when adding a "(" afer line 28 or compile die IDE hangs QC #: Date Reported: Area: 69175 11/20/2008 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Expected ; but recieved =, and expected EOF but recieved 'FindClose' in SysUtils Open SysUtils or select "Find Declaration" on a SysUtils identifier in a uses list of another unit. [QC Description] Viewing the SysUtils source the Structure treeview displays two errors: Expected ; but recieved = at line 6416(6416:48). Expected the end of file but recieved an identifier 'FindClose' at line 6427(6427:13). QC Entry 69175 QC #: Date Reported: Area: 69214 11/22/2008 Debugger\CPU Description: Steps: [QC Short Description] SSE4.2 instruction CRC32 is unknown (disassembled as DB $...) - start Delphi 2009 - create a new console application - paste the following code into the .dpr source program ProjectCRC32Test; {$APPTYPE CONSOLE} begin asm CRC32 eax, ebx end; end. - put a breakpoint on the CRC32 line (7) - run (the debugger should now stop on the CRC32 line) - show the CPU View (CTRL+ALT+C) or the Disassembly View (CTRL+ALT+D) - have a look at the highlighted lines expected: <source file>.<line>: CRC32 eax, ebx <address> <opcode> crc32 eax, ebx actual: <source file>.<line>: CRC32 eax, ebx <address> <opcode> db $f2 $0f $38 $f1 [QC Description] The SSE4.2 instruction CRC32 does compile, but the CPU View does not know it - it get disassembled as DB $... The CPU View show this: ProjectCRC32Test.dpr.7: CRC32 eax, ebx 004040C8 F20F38F1 db $f2 $0f $38 $f1 QC Entry 69214 QC #: Date Reported: 69242 11/24/2008 Description: [QC Short Description] TComponent missing documentation Area: Documentation\Online Help\VCL Steps: [QC Description] The documentation is missing for the following members of TComponent ms-help://embarcadero.rs2009/delphivclwin32/!!MEMBEROVERVIEW_Classes_TComponent.html Public methods ExecuteAction HasParent UpdateAction Protected methods GetChildren ReadState SetAncestor SetChildOrder SetParentComponent WriteState Protected fields FComponentStyle Topic urls ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/Classes_TComponent_HasParent.html ms-help://embarcadero.rs2009/delphivclwin32/[email protected] mshelp://embarcadero.rs2009/delphivclwin32/Classes_TComponent_GetChildren@[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/Classes_TComponent_SetChildOrder@[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/Classes_TComponent_FComponentStyle.html QC Entry 69242 QC #: Date Reported: Area: 69278 11/24/2008 RTL Description: Steps: [QC Short Description] Function comobj.GetRegStringValue returns incorrectly sized String [QC Description] Function GetRegStringValue within comobj.pas calls the windows API RegQueryValueEx which returns a number of bytes not the length of the string. This means that the result needs to be adjusted by the SizeOf (Char). The workaround shows the mended code. QC Entry 69278 QC #: Date Reported: Area: 69294 11/25/2008 VCL\Win 32 Controls\TProgressBar Description: Steps: [QC Short Description] TProgressBar fails with PBS_MARQUEE and disabled Themes 1) Create a new vcl form project (with manifest) 2) Drop TProgressBar on the form 3) Set style to pbstMarquee Run the application e.g. under Vista with designed themes (Aero). Marquee is working fine. Now set the Vista style to "Classic themes" or click on the executable to disable theming using the Application Compatibility Layer. Expected: Marquee still working Currently: Empty ProgressBar shown [QC Description] The TProgressBar fails with Style pbstMarquee and disabled Themes where it is supported natively. Verified a manual PBS_MARQUEE to be working with "Classic Theme" in Vista and D2006. Only Manifest and ComCtrls 6 are needed but not the enabled Visual Styles as implemented in VCL. QC Entry 69294 QC #: Date Reported: Area: 69303 11/25/2008 VCL Description: Steps: [QC Short Description] Bugs in TClipboard.SetBuffer() Clipboard.AsText := 'some really long string that causes a memory error, say 40+MB in size'; If SetClipboardData() fails, the clipboard is not updated, and no error is raised. [QC Description] TClipboard.SetBuffer() does not check the return value of SetClipboardData(). If SetClipboardData() fails, such as when GetLastError() returns ERROR_NOT_ENOUGH_MEMORY, the allocated memory is not freed and no Exception is raised to the caller. QC Entry 69303 QC #: Date Reported: Area: 69334 11/26/2008 Documentation\Online Help\VCL Description: [QC Short Description] TContainedAction missing documentation [QC Description] Some of the members of the TContainedAction are not documented. Url to member list overview: ms-help://embarcadero.rs2009/delphivclwin32/!!MEMBEROVERVIEW_ActnList_TContainedAction.html The following members are not documented. Protected methods ReadState Public methods SetParentComponent Individual topic urls: ms-help://embarcadero.rs2009/delphivclwin32/[email protected] Steps: mshelp://embarcadero.rs2009/delphivclwin32/[email protected] QC Entry 69334 QC #: Date Reported: Area: 69409 11/28/2008 Database\Data Access Controls\TDatabase Description: Steps: [QC Short Description] Getting or Setting TDatabase Directory property fails Drop a TDatabase, TTable and a TButton on a form Set the TDatabse DatabaseName to 'LocalDB' Set the TDatabase AliasName to a DBDEMOS Set the TTable DatabaseName to 'LocalDB' and set it's TableName to customer.db In the Buttons OnClick event add this code Table1.Open; ShowMessage(Database1.Directory); Run it and click the button. The table is opened but the message dialog (Ctrl C copied to paste here) shows -------------------------- Project1 --------------------------- ??????????????????????????????????????????????????" << note: this was originally chinese, wingdings type characters --------------------------- OK --------------------------- If you also add an AfterConnect event handler on the TDatabase and add the following code Database1.Directory := 'C:\Program Files\Common Files\CodeGear Shared\Data'; You still get a similar result as before when clicking the button So you can't read or write the Directory property. Note: After initial submission of this report, the strange characters (some chinese, wingdings type stuff etc.) changed to all question marks [QC Description] There are string handling issues with TDatabase GetDirectory and SetDirectory. Attempting to read the Directory property returns what appears to be an uninitialized string of characters. Setting the property to a known path and subsequently reading it back gives the same obscure results. This worked fine under D2007 QC Entry 69409 QC #: Date Reported: Area: 69413 11/28/2008 Database\Data Access Controls\TTable Description: Steps: [QC Short Description] TTable.Exists always returns False Drop a TDatabase, TTable and a TButton on a form Set the TDatabse DatabaseName to 'LocalDB' Set the TDatabase AliasName to a DBDEMOS Set the TTable DatabaseName to 'LocalDB' and set it's TableName to customer.db In the Buttons OnClick event add this code ShowMessage('Table1.Exists = ' + BoolToStr (Table1.Exists, True)); Run it and click the button. It always results in Table1.Exists = False A lot of conditional opening of tables is based on this and it's a complete showstopper for me. [QC Description] This is related to QC report number 69409 because the code in TTable.GetFileName relies on the database Directory property which does not contain a valid string. This worked fine under D2007 See also Raid# 266976, which causes this bug too. QC Entry 69413 QC #: Date Reported: Area: 69432 11/29/2008 Database\Data Access Controls\TTable Description: Steps: [QC Short Description] Error opening table when field has a DefaultExpression I tried the following The GetPAnsiChar is as follows function GetPAnsiChar(const S: string): PAnsiChar; begin if S <> '' then Result := PAnsiChar(AnsiString(S)) else Result := ''; end; But if I replace the original line with this: StrCopy(ADataSources.szSQLExprImport, PAnsiChar(AnsiString(Field.DefaultExpression))); Then the error doesn't occur any more and ADataSources.szSQLExprImport always contains a valid value (FALSE in my case) Now, this looks to me to be doing exactly the same thing but I think something is going wrong when calling GetPAnsiChar instead which causes it to return the corrupt string. I've spent ages trying to replicate it outside the main application but cannot do so. It only raises the error when I run the big application with lots of tables/queries open If pushed I could probably send you a screen vid of the situation happening in the debugger. [QC Description] There seems to be an issue with the GetDefaultExpression function in the TBDEDataSet.ConstraintCallBack function in the DBTables unit. I was getting the following error when opening the TTable which has persistent fields and two of them (TBooleanFields) have a DefaultExpression set to FALSE. "Preparation of field default failed. Token not found. Token: â‚¬â‚¬â‚¬â‚¬â‚¬â‚¬Ì << these look like euro symbols and accented characters Line Number: 1" I traced into the above function and found that after calling this line: StrCopy(ADataSources.szSQLExprImport, GetPAnsiChar(Field.DefaultExpression)); The value in ADataSources.szSQLExprImport is all corrupt characters. If I remove the DefaultExpressions from the two fields, the table opens without error. I cannot replicate this in a simple test project but within a large application with several tables, queries, datamodules, etc. the error happens every time. The strange characters can vary each time though. This worked fine under D2007 QC Entry 69432 QC #: Date Reported: Area: 69438 11/29/2008 AddOn\Interbase components Description: Steps: [QC Short Description] Incorrect FieldByName().AsString length Create Interbase Database Application with TIBDataBase TIBQuery Query is : SELECT RDB$DEPENDENCIES.RDB$DEPENDENT_NAME AS TRIGGER_NAME, RDB$DEPENDENCIES.RDB$DEPENDED_ON_NAME AS TRIGGER_TABLE, RDB$DEPENDENCIES.RDB$FIELD_NAME AS TRIGGER_FIELD, RDB$TRIGGERS.RDB$TRIGGER_SOURCE AS TRIGGER_DDL FROM RDB$DEPENDENCIES INNER JOIN RDB$TRIGGERS ON (RDB$DEPENDENCIES.RDB$DEPENDENT_NAME = RDB$TRIGGERS.RDB$TRIGGER_NAME) WHERE (RDB$TRIGGERS.RDB$FLAGS = 1) AND (RDB$TRIGGERS.RDB$TRIGGER_TYPE = 1) In Delphi 2006/2007, FieldByName ('TRIGGER_TABLE').AsString give correct result (length of string >= 20), with Delphi 2009 FieldByName ().AsString return only 10 car. QC Entry 69438 QC #: Date Reported: Area: 69440 11/29/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: L2084 with "array of no T" as field in a generic class Compile the attached application below. expected: it compiles [QC Description] actual: Fatal: F2084 Internal Error: L2084 It seems that it is not possible to use a dynamic array of a concrete type (for exam. Integer or string) as field in a generic class Note if you turn it into a normal class it compiles. TRangeCheckGenericClassTest<T> = class(TObject) FNormalFieldArray: array of Integer; //<- leads to L2084 end; program BTS266956; -> see steps QC Entry 69440 type TRangeCheckGenericClassTest<T> = class(TObject) private FNormalFieldArray: array of Integer; end; (JJS: Expected to fail with Update3 unless a new solution devised per Barry) {$APPTYPE CONSOLE} [Tester Recommended] begin TRangeCheckGenericClassTest<Integer>.Create; WriteLn('PASS'); end. QC #: Date Reported: Area: 69456 11/30/2008 IDE\Code Editor Description: Steps: [QC Short Description] IDE Deadlock when updating the the editor views Thread stacktrace (reconstructed): TGraphicObject.Lock <= Deadlock TFont.SetStyle EditorBuffer.TEditBuffer.UpdateViews :20835992 coreide120.@Editorbuffer@TEditBuffer@DoCheckSetBreakpointables$qqro + 0x1a :20836413 coreide120.@Editorbuffer@TEditBuffer@ProjectStateChanged$qqrp14System@TObject + 0x2b :20b86e94 TEvent.Send + $28 :2077801a coreide120.@Projectmodule@TBaseProject@SetProjectState$qqr50System@% Set$t22Codemgr@TProjectStates$iuc$0$iuc$6% + 0x32 :207790a7 coreide120.@Projectmodule@TCustomCodeIProject@SetProjectState$qqr50System@% Set$t22Codemgr@TProjectStates$iuc$0$iuc$6% + 0x13 :2161dfa2 delphicoreide120.SetKibitzedSinceCompiled + 0xaa .NET Code [QC Description] The TEditorBuffer.UpdateViews method is called from the background thread but accesses the editor's canvas. The dead lock occurs because the main thread is blocked by the lock that the background parser owns. QC Entry 69456 QC #: Date Reported: Area: 69461 11/30/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Generic type incompatible with itself across units. Compile the attached application below. [QC Description] 've got a TDictionary that stores a bunch of objects indexed by name, and I'd like to be able to examine all of the objects. So I tried this: See the following compile-time error indicating failure. var enumerator: TMyObject; begin for enumerator in myDictionary do BTS266981.dpr(19) Error: E2010 Incompatible types: 'TPair<System.string,uBTS266981.TMyObject>' and 'TPair<System.string,TMyObject>' But that wouldn't compile. "Incompatible types: 'TMyObject' and 'TPair' unit uBTS266981; So I tried it a bit differently: interface var enumerator: TPair<string, TMyObject>; uses Generics.Collections; That didn't compile either. This error message is even stranger: Incompatible types: 'TPair<string, TMyObject>' and 'TPair<string, MyUnit.TMyObject>'. type It gets worse. I tried to create a wrapper class around the dictionary that would handle the data retrieval internally. But now I can't call any of its methods. Any method call, even ones with no parameters, gets this: TMyObject = class(TObject) private [DCC Error] E2010 Incompatible types: FIntValue: Integer; 'TMyDictionary<MyUnit.TMyDictionary<TKey,TIndex,TValue>.TKey,MyUnit.TMyDictionary<TKey,TIndex,TValue>.TIndex,MyUnit.TMyDictionary<TKey,TIndex,TValue>.TValue>' public and 'TMyDictionary<System.string,System.string,turbu_characters.TMyObject>' constructor Create(AValue: Integer); property IntValue: Integer read FIntValue; This is a complete show-stopper. Anyone know how to fix this? end; QC Entry 69461 TMyDictionary = TDictionary<string, TMyObject>; TMyContainer = class(TObject) private FDictionary: TMyDictionary; public constructor Create; property Dictionary: TMyDictionary read FDictionary; end; implementation constructor TMyContainer.Create; begin inherited Create; FDictionary := TMyDictionary.Create; end; constructor TMyObject.Create(AValue: Integer); begin FIntValue := AValue; end; end. program BTS266981; {$APPTYPE CONSOLE} uses SysUtils, Generics.Collections, uBTS266981; var Pair: TPair<string, TMyObject>; MyObject: TMyObject; myContainer: TMyContainer; begin myContainer := TMyContainer.Create; myContainer.Dictionary.Add('One', TMyObject.Create(1)); myContainer.Dictionary.Add('Two', TMyObject.Create(2)); myContainer.Dictionary.Add('Three', TMyObject.Create(3)); for Pair in myContainer.Dictionary do Writeln('Key=' + Pair.Key + ' IntValue=' + IntToStr(Pair.Value.IntValue)); for MyObject in myContainer.Dictionary.Values do Writeln('IntValue=' + IntToStr (MyObject.IntValue)); WriteLn('PASS'); // PASS on compile end. QC #: Date Reported: Area: 69462 11/30/2008 SOAP\Client Applications Description: Steps: [QC Short Description] Midas raise "variant or safe array is locked" error in demo project OS : Windows XP SP3 1. Start delphi 2009 IDE (with update1). 2. Open SOAP Datamodule Demo project group, for example : C:\Documents and Settings\All Users\Documents\RAD Studio\6.0\Demos\DelphiWin32 \VCLWin32\WebServices\SOAPDataModule\SOAPDataModule.groupproj 3. Build server application (SOAPDMServerWAD.exe) 4. Start "Web App debugger" application from menu (tools->Web App debugger) QC Entry 69462 and change service port to 1024, then start the service. 5. start server Application (SOAPDMServerWAD.exe) from Windows file manager. 6. Build and run client application (SOAPDMClient.exe), click "Connect" button. Delphi IDE debuger will raise a access violation error ( from module midas.dll ) and error message string is "Variant or safe array is locked". Note : I have been tried to use "midaslib" unit in both projects to avoid the discrepancy of midas.dll, but still not work. QC #: Date Reported: 69477 12/1/2008 Area: Compiler\Delphi Description: Steps: [QC Short Description] F2084 Internal Error: C4539 with -$R+ and a "array of T" as field in a generics class and a special code construct Compile the attached program below. [QC Description] While doing some "array of T" range check tests I found the attached extrem corner case which leads to a C4539 error. expected: it compiles actual: Fatal: F2084 Internal Error: C4539 Note that range checking {$R+} is enabled. Note it compiles with one of the following modification: - no range checks - changing FGenericsFieldArray[0] := ASingleValue; into FGenericsFieldArray[0] := FGenericsFieldArray[1]; - removing the call of DoSomethingWithFieldArray - removing the parameter of DoSomethingWithFieldArray - using a local array - using an array with a fixed size - using string or AnsiString (not ShortString!) as type means TRangeCheckGenericClassTest<string>.Create; instead of TRangeCheckGenericClassTest<Integer>.Create; -> see steps QC Entry 69477 [Tester Recommended] Futhermore calling SetLength in a constructor or the method has no influence. {$R+} program BTS266970; {$APPTYPE CONSOLE} type TRangeCheckGenericClassTest<T> = class(TObject) private FGenericsFieldArray: array of T; procedure DoSomethingWithFieldArray(AValue: array of T); public procedure GenericsRangeCheckWithFieldArray(ASingleValue: T); end; procedure TRangeCheckGenericClassTest<T>.DoSomethingWithFieldArray(AValue: array of T); begin end; procedure TRangeCheckGenericClassTest<T>.GenericsRangeCheckWithFieldArray(ASingleValue: T); begin DoSomethingWithFieldArray(FGenericsFieldArray); FGenericsFieldArray[0] := ASingleValue; end; begin TRangeCheckGenericClassTest<Integer>.Create; WriteLn('PASS'); end. QC #: Date Reported: 69497 12/1/2008 Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] End Ellipsis setting doesn't work for csText type commands on the ribbon Refer to description for problem location and fix. [QC Description] There is a typo in the TRibbonTextControl.DrawText method of the RibbonActnCtrls.pas unit. The following case statement: case LTextProps.EllipsisPosition of epPathEllipsis: LFlags := LFlags or DT_PATH_ELLIPSIS; epEndEllipsis: LFlags := LFlags or DT_PATH_ELLIPSIS; epWordEllipsis: LFlags := LFlags or DT_WORD_ELLIPSIS; end; should be: case LTextProps.EllipsisPosition of epPathEllipsis: LFlags := LFlags or DT_PATH_ELLIPSIS; epEndEllipsis: LFlags := LFlags or DT_END_ELLIPSIS; // FIX HERE epWordEllipsis: LFlags := LFlags or DT_WORD_ELLIPSIS; end; QC Entry 69497 QC #: Date Reported: 69498 12/1/2008 Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] Incorrect group alignment caused by csText controls on a ribbon Run the Ribbon Demo Application Change to the Control Types tab Resize the form so that the Spin Edit group becomes collapsed Resize the form so that the Spin Edit group is expanded Resize the form so that the Spin Edit group becomes collapsed Resize the form so that the Spin Edit group is expanded exp: Spin Edit group is still aligned correctly act: It isn't aligned correctly [QC Description] If the ribbon has csText controls on it, such as the Control Types tab in the shipped Ribbon Demo application, then resizing the form can cause the group to misalign. The fix is to add the following line (as last line in method) to the TRibbonTextControl.CalcBounds method. Height := 22; NOTE: This fix is not Large Font supportive, however the ribbon doesn't support large fonts so this isn't an issue (until the next major release perhaps). NOTE: This is an item first mentioned in the following report (which actually contains three separate items). Report No: 67923 Status: Reported Bug in Ribbon and fade in fade out missed http://qc.codegear.com/wc/qcmain.aspx?d=67923 QC Entry 69498 QC #: Date Reported: Area: 69533 12/2/2008 VCL\Dialog Controls\TOpenPictureDialog Description: Steps: [QC Short Description] TOpenPictureDialog raises EInvalidGraphic on selecting a LNK file (single click) Create a new VCL forms project, add a TOpenPictureDialog and a button. Execute the open dialog from the button. Run the application, click the button, use the open dialog to browse to a *.lnk file and single-click that file. You should now get a EInvalidGraphic exception. [QC Description] I get a "Debugger Exception Notification" dialog when selecting or highlighting a *.LNK link file in a TOpenPictureDialog dialog. Exception notification message: Project Project1.exe raised exception class EInvalidGraphic with message 'Unknown picture file extension (.lnk)'. Open dialog options seem to be ignored, such as the ofNoReadOnlyReturn option. Same exception regardless of options. If I click Continue on the exception notification dialog, my application continues as if nothing had happened. I have to select the LNK file again to reach its target, which happens without any further exceptions. The preview feature of TOpenPictureDialog may be what causes the exception. QC Entry 69533 (SB) Note: The exception only occurs when debugging, not at runtime. QC #: Date Reported: 69555 12/3/2008 Area: Database\DataSnap\Server Description: Steps: [QC Short Description] "Invocation" life cycle leaks memory 1. Create a datasnap 2009 application 2. use the invocation lifecycle 3. enable reportmemoryleaksonshutdown or debug the application [QC Description] If you use the "Invocation" life cycle in a Datanspa 2009 server, the destruction code doens't free the object (created for each request) unless you manually handle the OnDestroyInstance event handle of the Server class and destroy the instance. I have a demo (also in my book) that shows this. This is quite significant: every single invocation leaks the server side object (which can as well be a data module!) QC Entry 69555 QC #: Date Reported: 69571 12/3/2008 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Missing high bound range checks with non var "array of" as method parameter in a generic class Compile and run the attached application. See the following program output indicating failure. [QC Description] In a generics class high bound range checks does not exist for non var "array of" method parameters although the same does work in a normal class. procedure TRangeCheckNormalClassTest.NormalRangeCheckWithArrayAsParam(AValue: array of Integer; ASingleValue: Integer); begin AValue[1024] := ASingleValue; //<- high bound check does work here end; procedure TRangeCheckGenericClassTest<T>.NormalRangeCheckWithArrayAsParam(AValue: array of Integer; ASingleValue: Integer); begin AValue[1024] := ASingleValue; //<- missing high bound check here end; -> see steps QC Entry 69571 FAIL #3 FAIL #5 FAIL In the attached test case, the code below establishes a dynamic array of 1024 elements. The methods NormalMethod and GenericMethod are expected to generate an ERangeError. The failure output noted indicates that range errors are not generated for methods of a generic class, but do occur as expected for classes not involving generics. function DoTest: Boolean; var MyClass: TMyClass; GenericClass: TGenericClass<Integer>; IntegerArray: array of Integer; TestValue: Integer; begin SetLength(IntegerArray, 1024); TestValue := 4096; [Tester Recommended] MyClass := TMyClass.Create; try try MyClass.NormalMethod(IntegerArray, TestValue); WriteLn('FAIL #1'); except on E: Exception do if E is ERangeError then Inc(Counter) else WriteLn('FAIL #2 - E=', E.ClassName, '/', E.Message); end; finally MyClass.Free; end; GenericClass := TGenericClass<Integer>.Create; try try GenericClass.NormalMethod(IntegerArray, TestValue); WriteLn('FAIL #3'); except on E: Exception do if E is ERangeError then Inc(Counter) else WriteLn('FAIL #4 - E=', E.ClassName, '/', E.Message); end; try GenericClass.GenericMethod(IntegerArray, TestValue); WriteLn('FAIL #5'); except on E: Exception do if E is ERangeError then Inc(Counter) else WriteLn('FAIL #6 - E=', E.ClassName, '/', E.Message); end; finally GenericClass.Free; end; QC #: Date Reported: 69583 12/4/2008 Description: Area: Compiler\Delphi\Generics Steps: [QC Short Description] Generics.Collections: TList<T>.Delete crashes for records Compile and run the attached application below. See the following program output indicating failure. (JJS: See also RAID 267603 related to TStack<>) [QC Description] If the generic list is used with a record type, it will crash when Delete() is called. A very simple example would be: type TSomething = record Value: Integer; end; TSomethingList = class(TList<TSomething>) end; procedure RunTest(); var LList: TSomethingList; LSomething: TSomething; begin LList := TSomethingList.Create(); LList.Add(LSomething); LList.Delete(0); LList.Free(); end; An Access Violation will occur in TList<T>.DoDelete, in line 765, where FItems[Index] := Default(T); The Default method is either not documented, or documented somewhere I can't find. Either way, the code would work if this call was not there. QC Entry 69583 FAIL - Exception=EAccessViolation/Access violation at address 00414CAC in module 'BTS267070.exe'. Write of address 00000000 program BTS267070; { Generics.Collections: TList<T>.Delete crashes for records } {$APPTYPE CONSOLE} uses Generics.Collections, SysUtils; type TSomething = record Value: Integer; end; TSomethingList = class(TList<TSomething>) end; procedure RunTest(); var LList: TSomethingList; LSomething: TSomething; begin LList := TSomethingList.Create(); try LList.Add(LSomething); WriteLn('Added'); LList.Delete(0); WriteLn('PASS - Deleted'); finally LList.Free(); end; end; begin try RunTest(); except on E: Exception do WriteLn('FAIL - Exception=', E.ClassName, '/', E.Message); end; end. QC #: Date Reported: Area: 69696 12/8/2008 IDE\Search\Find in Files Description: Steps: [QC Short Description] Using Find in Files sometimes generates AV's and List Index errors. Use find in files. Bug logged in response to discussion in thread: [QC Description] Find in Files fails after using it a few times and doesn't work again until you restart Delphi. QC Entry 69696 https://forums.codegear.com/thread.jspa?threadID=6208&tstart=0 Stack traces given (attached) and also here: https://forums.codegear.com/message.jspa?messageID=47888#47888 QC #: Date Reported: Area: 69700 12/8/2008 Database\TField Description: Steps: [QC Short Description] New field types added in Delphi 2009 are not registered. This includes TLongWordField, TShortintField, TByteField, and TExtendedField. Examine DBReg.pas and look for these new field types in the RegisterFields call: [QC Description] TByteField, arguably the most useful field for storing enumerated types, is not registered. QC Entry 69700 RegisterFields([TStringField, TIntegerField, TSmallintField, TWordField, TFloatField, TCurrencyField, TBCDField, TFMTBcdField, TBooleanField, TDateField, TVarBytesField, TBytesField, TTimeField, TDateTimeField, TSQLTimeStampField, TBlobField, TMemoField, TGraphicField, TAutoIncField, TLargeIntField, TADTField, TArrayField, TDataSetField, TReferenceField, TAggregateField, TWideStringField, TVariantField, TGuidField, TInterfaceField, TIDispatchField, TWideMemoField]); QC #: Date Reported: Area: 69717 12/8/2008 IDE Description: Steps: [QC Short Description] Tools menu loses sort order Tools | Configure Tools Add For Title give "abc" For Program, give "abc" Click OK Note that the "abc" tool is at the bottom of the list Click Close Look at the Tools menu in the IDE Note that the "abc" tool is at the bottom of the menu Shut down and restart the IDE Look at the Tools menu in the IDE Note that the "abc" tool is no longer at the bottom of the menu [QC Description] When you add tools in the Configure Tool window and arrange them in a particular order for convenience they always appear sorted alphabetically when the IDE is restarted. QC Entry 69717 This is a regression QC #: Date Reported: Area: 69752 12/9/2008 RTL\Delphi Description: Steps: [QC Short Description] ToUpper and ToLower with NullString Compile and run the attached application below. See the following program output indicating failure. [QC Description] The new functions ToUpper() and ToLower() (from the Character unit) raise an exception if the input is an empty or null string. A better behavior would be to return an empty string, just the way the older UpperCase() and LowerCase() functions work. QC Entry 69752 FAIL #1 - ToUpper Exception=EOSError/System Error. Code: 87. The parameter is incorrect FAIL #2 - ToLower Exception=EOSError/System Error. Code: 87. The parameter is incorrect program BTS267234; {$APPTYPE CONSOLE} uses SysUtils, Character; var Counter: Integer = 0; procedure DoIt; begin try ToUpper(''); Inc(Counter); except on E: Exception do WriteLn('FAIL #1 - ToUpper Exception=', E.ClassName, '/', E.Message); end; try ToLower(''); Inc(Counter); except on E: Exception do WriteLn('FAIL #2 - ToLower Exception=', E.ClassName, '/', E.Message); end; if Counter = 2 then WriteLn('PASS'); end; begin DoIt; end. QC #: Date Reported: Area: 69799 12/11/2008 Internet\Controls\TXMLDocument Description: Steps: [QC Short Description] run the code below (it is also in the attachment) expected: EXMLDocError: Element "foo" does not contain a TXMLNode.CheckTextNode passes DOMNode.nodeName to SNotSingleTextNode but the nodeName does not single text node actual: EXMLDocError: Element does not contain a single text node program appear in the error message SNotSingleTextNodeProject; {$APPTYPE CONSOLE} uses ComObj, SysUtils, XMLDoc, XMLIntf; type TLogic = class(TObject) public class procedure Logic; static; end; const SFoo = 'foo'; SBar = 'bar'; class procedure [QC Description] TLogic.Logic; var XmlDocument: IXMLDocument; FooNode: IXMLNode; Bar1Node: IXMLNode; Bar2Node: TXMLNode.CheckTextNode passes DOMNode.nodeName to SNotSingleTextNode but the nodeName does not IXMLNode; FooText: string; begin // setup an XmlDocument of which the root node cannot get provide the Text appear in the error message. property XmlDocument := TXMLDocument.Create(nil); XmlDocument.Active := True; FooNode := XmlDocument.AddChild(SFoo); // by adding two elements to the FooNode, FooNode.Text becomes invalid The reason is that the SNotSingleTextNode format mask does not contain any parameters; Bar1Node := FooNode.AddChild(SBar); Bar2Node := FooNode.AddChild(SBar); // since FooNode.Text is the passed nodeName therefore does not end up in the error message. invalid, an EXMLDocError will be thrown, using SNotSingleTextNode as format mask. // check if that EXMLDocError contains the name of FooNode which is passed by TXMLNode.CheckTextNode FooText := So SNotSingleTextNode should be changed from FooNode.Text; end; begin try try // COM needs to be initialized, so: // Manually call InitProc as only WebBroker SNotSingleTextNode = 'Element does not contain a single text node'; and Forms do this automatically if InitProc <> nil then TProcedure(InitProc); TLogic.Logic(); // throw the to exception except { expected: EXMLDocError: Element "foo" does not contain a single text node actual: SNotSingleTextNode = 'Element "%s" does not contain a single text node'; EXMLDocError: Element does not contain a single text node TXMLNode.CheckTextNode passes DOMNode.nodeName to SNotSingleTextNode but the nodeName does not appear in the error message. The This can be done, as TXMLNode.CheckTextNode is the only place in the VCL where SNotSingleTextNode is reason is that the SNotSingleTextNode format mask does not contain any parameters; the passed nodeName used. therefore does not end up in the error message. So SNotSingleTextNode should be changed from SNotSingleTextNode = 'Element does not contain a single text node'; to SNotSingleTextNode = 'Element "%s" QC Entry 69799 does not contain a single text node'; This can be done, as TXMLNode.CheckTextNode is the only place in the VCL where SNotSingleTextNode is used. } on E: Exception do Writeln(E.Classname, ': ', E.Message); end; finally Write('Press the <Enter> key...'); Readln; end; end. QC #: Date Reported: Area: 69812 12/11/2008 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] Error in documentation for function StartsStr in unit StrUtils [QC Description] The url for the page in question is: ms-help://embarcadero.rs2009/delphivclwin32/StrUtils_StartsStr.html At the top of the page the header contains the following text: "Enter a short sentence, starting with a verb, that states the basic purpose of the property." I expected to find something along the lines of: "StartsStr determines if the substring ASubText begins the string AText using a case sensitive algorithm. If ASubText matches the beginning of AText, the result is true, otherwise it is false." That would be consistent with the documentation for StartsText. (I just copy and pasted it and changed case insensitive to read case sensitive and fixed a small typo.) QC Entry 69812 QC #: Date Reported: Area: 69859 12/12/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] unsafe implict type cast in generic classes Compile the attached program below. See that it unexpectedly compiles successfully. [QC Description] see steps QC Entry 69859 Note that Line #1 is accepted even though the FObj field may not be a TItem, the result type of GetAsItem. program BTS267319; [Tester Recommended] {$APPTYPE CONSOLE} uses SysUtils; var Caption: String; type TForm = class Name: String; end; type TList<T: class> = class(Tobject) FObj: T; end; TItem = class i: Integer; S: string; end; TOtherClass<T: class> = class class function GetAsItem(L: TList<T>): TItem; end; class function TOtherClass<T>.GetAsItem(L: TList<T>): TItem; begin //!!!!!! it's unsafe cast. Error expected. // L.FObj - may be not inherits from TItem; Result := L.FObj; //#1// end; procedure DoIt; var L: TList<TForm>; Item: TItem; begin L := TList<TForm>.Create; try L.FObj := TForm.Create; //(nil); L.FObj.Name := 'MyFormName'; Item := TOtherClass<TForm>.GetAsItem(L); Caption := Item.S; // #2 // WriteLn('FAIL #1 - Caption=(', Caption,')'); finally L.FObj.Free; L.Free; end; end; begin try DoIt; except on E: Exception do WriteLn('FAIL - Exception=', E.ClassName, '/', E.Message); end; end. QC #: Date Reported: Area: 69878 12/14/2008 AddOn\Interbase components Description: Steps: [QC Short Description] Exception EOutOfMemory when connected with Firebird Hello, I think, there is a bug. I can not mirgrate my Delphi program vom RAD Studio Delphi 2007 to RAD Studio 2009 Update 1. With RAD Studio Delphi 2007 it runs. Some tables are open and one table i got the error Exception EOutOfMemory with 50 records. !!! procedure TForm3.Button1Click(Sender: TObject); begin IDSPo.Active := True; end; Under windows XP SP3 To reproduce the error : 1. Install Firebird-2.0.3.12981-1Win32.exe (standard install with no modification) sysdba masterkey 2. Create a directory c:\avfb and store AVFB.GDB and others change PC05:C:\avfb\AVFB.GDB in TIBDatabase to your Computer 3. Run the testprogram EXception EoutOfMemory occurs What can I do ? Best regards Frank [QC Description] added by Sysop <<<<<<<<<<< Same fatal error occurs with InterBase 2009. >>>>>>>>>>> QC Entry 69878 QC #: Date Reported: Area: 70019 12/18/2008 RTL\Delphi Description: Steps: [QC Short Description] On Japanese OS, EraNames array for Japanese locale are corrupted. 1. launch Delphi 2009 on Japanese OS 2. create VCL form application 3. add ComboBox and Button 4. add OnCLick event handler for the button as below -------- procedure TForm1.Button1Click(Sender: TObject); begin ComboBox1.Items.Add(EraNames[1]); ComboBox1.Items.Add(EraNames[2]); ComboBox1.Items.Add (EraNames[3]); ComboBox1.Items.Add(EraNames[4]); end; -------- 5. Era names for Japanese locale are corrupted... Please see attached screenshot. [QC Description] On Japanese OS, EraNames array for Japanese locale are corrupted. Please see Steps and screenshot. QC Entry 70019 QC #: Date Reported: Area: 70022 12/19/2008 RTL\Delphi\ConvUtils Description: Steps: [QC Short Description] System.Val (floating point version) incorrectly sets the code parameter to 0 when the supplied string is empty This function should return 1 but instead returns 0: function ValBlankStringBug:Integer; var N:Double; ValCode:Integer; begin Val('',N,ValCode); Result:=ValCode; end; [QC Description] The method System.Val should set the Code output parameter to 1 if the supplied string is empty. However since Unicode was introduced (Delphi 2009) the floating point version of Val now sets the code parameter to 0 - implying that the string is a valid number, which it is not. I've marked this type 'B' because it has caused us dozens of bugs, including databases returning invalid reports because the user input was misinterpreted. I believe that the bug is in _ValExt in System.pas line 9252 (just after @@Empty label). INC ESI should be replaced by: {$IFNDEF UNICODE} INC ESI {$ELSE} ADD ESI, 2 {$ENDIF} QC Entry 70022 QC #: Date Reported: Area: 70102 12/23/2008 Database\DBExpress\TSqlTimeStamp Description: Steps: [QC Short Description] Zero is null in TSQLTimeStampField See attached project. [QC Description] I have a required TSQLTimeStampField where I want to store 0 (zero), but I get and exception that this field is required. The field should accept zero as not null. After more tests, I noticed that the problem only occurs if you use the .AsDateTime, because the setter clears the field when the value being set is zero. QC Entry 70102 QC #: Date Reported: Area: 70135 12/26/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Local procedures in generics fail to compile Try to compile this: ----------------------- program Project1; {$APPTYPE CONSOLE} type TGeneric<T> = class procedure Method; end; procedure TGeneric<T>.Method; procedure Local; begin // Note that it's not even using T end; begin end; begin end. [QC Description] Local procedure and generics don't work together. You always get [DCC Error] Project1.dpr(12): E2528 Type parameters not allowed on this method Since there is no help entry for this error, I'm not shure if this is intentional. But in any case it's very annoying and I don't see why local procedures shouldn't work for generics. QC Entry 70135 [Tester Recommended] QC #: Date Reported: Area: 70148 12/27/2008 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Generic class type constraint crashes compiler and IDE Build the following program. The compiler stops and reports error code 1. Then try to build it again. The IDE will terminate without warning. Note: Syntactically, using a generic class type constraint seems valid. The compiler accepts it: the example will compile without errors, if you simply comment out this line var Coll: TCollection<Integer, TInitializer<Integer>>; ----------------------- program Project1; {$APPTYPE CONSOLE} type TInitializer<TValue> = class procedure SomeMethod( const Value: TValue ); end; TCollection<TValue; TValueInitializer: TInitializer<TValue>> = class end; procedure TInitializer<TValue>.SomeMethod( const Value: TValue); begin end; var Coll: TCollection<Integer, TInitializer<Integer>>; begin end. [QC Description] I tried to constrain a generic class type with another generic class. This not only crashes the compiler, but also the IDE in complete. See Steps. QC Entry 70148 [Tester Recommended] QC #: Date Reported: Area: 70183 12/30/2008 Documentation\Online Help\VCL Description: Steps: [QC Short Description] Documentation is missing for these TApplication members [QC Description] Complete member list url: ms-help://embarcadero.rs2009/delphivclwin32/!!MEMBEROVERVIEW_Forms_TApplication.html The following members are not documented. public methods AddPopupForm HookSynchronizeWakeup RemovePopupForm public properties DefaultFont EnumAllWindowsOnActivateHint ModalLevel ModalPopupMode PopupControlWnd public events OnGetActiveFormHandle OnGetMainFormHandle protected methods Idle IsDlgMsg IsHintMsg IsKeyMsg IsMDIMsg IsPreProcessMessage IsShortCut Using the above order, the individual topic urls are as follows: ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_HookSynchronizeWakeup.html ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_DefaultFont.html ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_EnumAllWindowsOnActivateHint.html ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_ModalLevel.html ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_ModalPopupMode.html ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_PopupControlWnd.html ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_OnGetActiveFormHandle.html ms-help://embarcadero.rs2009/delphivclwin32/Forms_TApplication_OnGetMainFormHandle.html ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] ms-help://embarcadero.rs2009/delphivclwin32/[email protected] QC Entry 70183 QC #: Date Reported: Area: 70184 12/30/2008 Debugger\CPU Description: Steps: [QC Short Description] SSE4.1 instruction INSERTPS is disassembled incorrectly Add the following code to a Delphi 2009 project, and view the compiled code in CPU view: asm jmp @x INSERTPS xmm0, xmm1, 7h @x: end; CPU view for the INSERTPS instruction above shows: “<address> 660F3A21C107 insertps xmm0,ecx,$07”, where “ECX” is displayed instead of “XMM1”. [QC Description] In CPU view, the SSE4.1 instruction INSERTPS (Insert Packed Single Precision Floating-Point Value) is disassembled incorrectly. Correct instructions are expected to be of the format: INSERTPS xmm1,xmm2/m32,imm8 Opcode: 66 0F 3A 21 /r ib Reference: "Intel 64 and IA-32 Architectures Software Developer's Manual" (September 2008 version, http://www.intel.com/products/processor/manuals/), Volume 2A. QC Entry 70184 QC #: Date Reported: Area: 70188 VCL\Core VCL Classes\Streaming 12/30/2008 Description: Steps: [QC Short Description] TStreamReader cannot read unicode text files program Bug; {$APPTYPE CONSOLE} uses SysUtils, Classes, StrUtils; var I, J: Integer; SL: TStringList; MS: TMemoryStream; SR: TStreamReader; S, T: string; Encoding: TEncoding; Pass: Boolean; const MyString = 'Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test '; MyString2 = [QC Description] #955#955#955#955#955#955#955#955#955#955'Test'#228#228#228#228#228#955#955#955#955#955#955#955#955#955#955#968#968#968#968#968; TStreamReader cannot be used to read a Unicode Textfile line by begin for J := 0 to 9 do begin try case J mod 5 of 0: Encoding := TEncoding.Default; 1: Encoding := TEncoding.UTF8; 2: Encoding := TEncoding.UTF7; 3: line. It's definitely going to challenge your skills of Chinese unless Encoding := TEncoding.Unicode; 4: Encoding := TEncoding.BigEndianUnicode; else raise Exception.Create('Bug in Testprogram'); end; if J <= 4 then T := the file is very small. MyString else T := MyString2; Pass := True; MS := TMemoryStream.Create; try SL := TStringList.Create; try for I := 0 to 1000 do SL.Add(T); SL.SaveToStream(MS, Encoding); finally SL.Free; end; MS.Position := 0; SR := TStreamReader.Create(MS, True); try while not SR.EndOfStream do begin Let's say I have a TextFile with a Unicode BOM and content similar S := SR.ReadLine; if J = 5 then if S = T then Pass := False; if (S <> T) and (J <> 5) then Pass := False; end; finally SR.Free; end; if Pass then Writeln('PASS to ' + Encoding.ClassName + ' ' + IfThen(J < 4, 'MyString', 'MyString2')) else Writeln('FAIL ' + Encoding.ClassName + ' ' + IfThen(J < 4, 'MyString', 'MyString2')); this: finally MS.Free; end; except on E: Exception do WriteLn('FAIL - Exception=', E.ClassName, '/', E.Message); end; end; end. Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test [...] Then TStreamReader reads something like this: Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test [...] Te? ???? ???? ???? ??? ?? ???? ???? ???? ???? ??? ???? ???? ???? ???? ???? ???? ???? ???? ??? ???? ???? ???? ???? ??? ???? ???? ???? ?? You may also get a "List index out of bounds (1023)" exception. Output of the demo program: PASS TMBCSEncoding MyString PASS TUTF8Encoding MyString PASS TUTF7Encoding MyString FAIL - Exception=ERangeError/List index out of bounds (1023) FAIL - Exception=ERangeError/List index out of bounds (1023) PASS TMBCSEncoding MyString2 FAIL TUTF8Encoding MyString2 FAIL TUTF7Encoding MyString2 FAIL TUnicodeEncoding MyString2 FAIL TBigEndianUnicodeEncoding MyString2 QC Entry 70188 QC #: Date Reported: Area: 70197 12/30/2008 VCL Description: Steps: [QC Short Description] When adding a TCategoryPanel by using CreatePanel to a TCategoryPanelGroup it is inserted in the wrong position 1) Create e new VCL application 2) Drop a TCategoryPanelGroup in the form 3) Add three or more CategoryPanels (rightclick -> New Panel) 4) Add a button and add the following code. procedure TForm1.Button1Click(Sender: TObject); var CategoryPanel: TCategoryPanel; begin CategoryPanel := CategoryPanelGroup1.CreatePanel(Self) as TCategoryPanel; CategoryPanel.Caption := 'CategoryPanel' + IntToStr(CategoryPanelGroup1.Panels.Count); end; 5) Compile and run and press the button Actual result: CategoryPanel1 CategoryPanel2 CategoryPanel4 CategoryPanel3 Expected result: CategoryPanel1 CategoryPanel2 CategoryPanel3 CategoryPanel4 [QC Description] When adding a TCategoryPanel by using CreatePanel to a TCategoryPanelGroup one expects that the newly created is added to the end (below) the already existing panels, instead it is inserted before the last panel. Further more there is a check in that function ... 10574: if FPanels.Count = 0 then ... which is pointless because a Panel was just added to the list and Count will always be > 0. A corrected version should look something like this: procedure TCustomCategoryPanelGroup.InsertPanel(Panel: TCustomCategoryPanel); var LPanel: TCustomCategoryPanel; begin FPanels.Add(Panel); Panel.FPanelGroup := Self; if FPanels.Count = 1 then // Modified was 0 Panel.Top := 0 else begin LPanel := TCustomCategoryPanel(FPanels[FPanels.Count - 2]); // Modified was [FPanels.Count - 1] Panel.Top := LPanel.Top + LPanel.Height + 1; end; Panel.Left := 0; Panel.Align := alTop; Panel.Alignment := FHeaderAlignment; if not (csLoading in ComponentState) then AutoScrollInView(Panel); end; [Edit1] Note that the current sort/compare function inverts the list of CategoryPanels. {$IF DEFINED(CLR)} function ComparePanels(Item1, Item2: TObject): Integer; {$ELSE} function ComparePanels(Item1, Item2: Pointer): Integer; {$IFEND} begin Result := TCustomCategoryPanel(Item2).Top - TCustomCategoryPanel(Item1).Top; if Result > 0 then TCustomCategoryPanel(Item2).PanelGroup.FReorderPanels := True; end; To make the above change of InsertPanel() more reliable the "compare line" should be changed to ... Result := TCustomCategoryPanel(Item1).Top - TCustomCategoryPanel(Item2).Top; ... first reaction is that the following line should also be changed to ... if Result < 0 then ... but without further testing that complete statement looks a little strange in a QuickSort algorithm ;-) QC Entry 70197 QC #: Date Reported: Area: 70221 1/2/2009 SOAP Description: Steps: [QC Short Description] SOAP attachments broken/not working -> demo echoservice crashes 1. Build the demo 2. Run the Web App debugger 3. Run the client, 4. In Register Attachment, 5. Update File List, 6. Select a file and download -> Hang. [QC Description] The demo echoservice ($(BDS)\Demos\DelphiWin32\VCLWin32\WebServices\EchoService is revealing a total failure with soap attachments. The client hangs, consumes all of the virtual memory until a crash out-of-memory occurs. Hint: The Getheaders Procedure in SoapAttach.pas loops endless. There seems to be a broken conversion to unicode enabling. The demo in Delphi 2006 works. QC Entry 70221 QC #: Date Reported: Area: 70249 1/4/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: URW1135 with Inline Auto + generic class with virtual method Compile the attached application below with the following command line. dcc32 -b --inline:auto BTS267521.dpr [QC Description] Description by Uwe Schuster: It seems that it is not possible to use Code inline control = Auto if you have generics classes with virtual methods, because this leads to an URW1135 error. See the following compile-time error indicating failure. Fatal: F2084 Internal Error: URW1135 (JJS: code inline control is auto by default in the IDE) -> see steps unit uBTS267521; interface QC Entry 70249 type TAGenericBaseType<T> = class(TObject) public procedure AMethod; virtual; end; [Tester Recommended] //this is just to force an instantiation (other option is to create //just an instance of TAGenericBaseType<something>) TByteDerivedType = class(TAGenericBaseType<Byte>); implementation procedure TAGenericBaseType<T>.AMethod; begin end; end. program BTS267521; {$APPTYPE CONSOLE} uses uBTS267521; begin WriteLn('PASS'); // Pass on compile end. QC #: Date Reported: Area: 70261 1/4/2009 IDE\Search\Find in Files Description: Steps: [QC Short Description] [Regression] Regular expressions result representation differs from "Find" representation in editor 0. start Delphi 2009 1. create a new Delphi Win32 console application (or use the attached file FindInFilesRegExTest.dpr and go to step 3.) 2. paste the following code into the project source const cProductInf = ' © 2002-2008 JEDI VCS (http://jedivcs.sf.net) - '; SomeTextConst1 = 'program begin something end'; SomeTextConst2 = 'begin something end'; SomeTextConst3 = 'beginsomethingend'; 3. search with "Find" for '.*2008.*' or '{.*}2008{.*}' (enable [x] Regular expressions!) expected: the whole string of the constant cProductInf is selected actual: as expected 4. do the same with "Find in Files" expected: the whole string of the constant cProductInf is bold actual: - with '.*2008.*' is the part "2002-2" bold (html like -> ...cProductInf = ' © <b>2002-2</b>008 JEDI VCS...) see FiF2008V1Results.png for the result with Delphi 2009 and RAD Studio 2007 - with '{.*}2008{.*}' is the part "2002-2008" bold (html like -> ...cProductInf = ' © <b>2002-2008</b> JEDI VCS...) see FiF2008V2Results.png 5. repeat 3. and 4. with the following expressions and compare the results of 3. and 4. expressions: begin{.*}end' -> results see FiFBeginEndV1Results.png 'begin{.*}end' -> results see FiFBeginEndV2Results.png '{.*}begin{.*}end' -> results see FiFBeginEndV3Results.png [QC Description] Some days ago I replaced 2008 by 2009 in the JVCS copyright string. I thought afterwards "How could I find 2008 occurrences in strings?" (just searching for 2008 would find almost only comments). I tried regular expressions, that worked, but I didn't understand how "Find in Files" highlights the results. I compared it with RAD Studio 2007, noticed that there it is highlighted as expected and so this is regression. -> see steps and attached pictures QC Entry 70261 QC #: Date Reported: Area: 70291 1/5/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: AV00448B63-RFFFF8003-0 with Inline Auto and generic class with constructor/destructor - save the attached file GenericsAVConstructorInlineAuto.dpr or the following code - dcc32 --inline:auto GenericsAVConstructorInlineAuto.dpr expected: it compiles actual: Fatal: F2084 Internal Error: AV00448B63RFFFF8003-0 If you turn "constructor Create" into "procedure Create1" then the error disappears, but if you turn it into a destructor then the error appears too. - save the attached file GenericsAVDestructorInlineAuto.dpr or the following code - dcc32 --inline:auto GenericsAVDestructorInlineAuto.dpr expected: it compiles actual: Fatal: F2084 Internal Error: AV00448B63-RFFFF8003-0 - save the attached file GenericsAVAfterDelay.dpr or the following code - copy ..\RAD Studio\6.0\source\Win32\rtl\common\Generics.Collections.pas into the directory where you've saved GenericsAVAfterDelay.dpr - dcc32 --inline:auto GenericsAVAfterDelay.dpr expected: it compiles actual: Generics.Collections.pas(1866) GenericsAVAfterDelay.dpr(11) and after some seconds Fatal: F2084 Internal Error: AV00448B63-RFFFF8003-0 //--- GenericsAVConstructorInlineAuto.dpr --program GenericsAVConstructorInlineAuto; {$APPTYPE CONSOLE} type TDictionary<TKey> = class(TObject) public constructor Create; end; constructor TDictionary<TKey>.Create; begin end; begin TDictionary<Byte>.Create; WriteLn('PASS'); end. //--- GenericsAVDestructorInlineAuto.dpr --- program GenericsAVDestructorInlineAuto; {$APPTYPE CONSOLE} type TDictionary<TKey> = class(TObject) public destructor Destroy; override; end; destructor TDictionary<TKey>.Destroy; begin end; begin TDictionary<Byte>.Create; WriteLn('PASS'); end. //--- GenericsAVAfterDelay.dpr --- program GenericsAVAfterDelay; {$APPTYPE CONSOLE} uses Generics.Collections; begin TDictionary<Byte, [QC Description] I tried to compile source\Win32\rtl\common\Generics.Collections.pas with "Code inlining control"=Auto, but that leads to an internal error. -> see steps QC Entry 70291 [Tester Recommended] Byte>.Create; WriteLn('PASS'); end. QC #: Date Reported: Area: 70297 1/5/2009 VCL\Additional Controls\TSpeedButton Description: Steps: [QC Short Description] First character of caption is clipped Place a TSpeedButton on a form and set its caption to U+00EF using Tahoma as a font, size 8. Note that the left hand side of the diaeresis is clipped off. [QC Description] The left of the first character is often clipped. The error is generally only one pixel, but it can be a problem especially with charcters with diacriticals. The problem is also present in TBitBtn. A standard capital T in Tahoma at 8 point is visibly assymetrical. A character that demonstrates the issue well is a lower case latin small letter I with diaeresis (U+00EF). The left hand dot above the vertical line is generally lost. The effect is visible with or without themes. The code measures the required size for the text using the OS DrawText call, and uses the returned rectangle to set the size of a clipping rectangle when displaying it. It seems the OS clips the text. From the SDK documentation for DrawText: "Note that text with significant overhang may be clipped, for example, an initial "W" in the text string or text that is in italics." There is no matching comment in DrawThemeTextEx which is also used in some circumstances, but it seems to have the same issues as DrawText. Standard Windows buttons do not suffer the effect. Possible solutions would be to expand the measured rectangle slightly or to add a DT_NOCLIP flag in the DoDrawText calls in TButtonGlyph.DrawButtonText (Buttons.pas). The problem was present back in Delphi 7, but was not generally seen because it depends on the font. D7 normally uses MS Sans Serif - and the fault does not show with that, but changing the font to Tahoma makes it perform just the same as current versions of Delphi. QC Entry 70297 QC #: Date Reported: 70414 1/11/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Interface delegation does not compile within generic classes 1. start Delphi 2009 2. create a new Console Application and paste the following code //--InterfaceDelegation.dpr --- program InterfaceDelegation; {$APPTYPE CONSOLE} type ISomething = interface end; TDelegation = class(TInterfacedObject, ISomething) private type TSomething = class(TInterfacedObject, ISomething) end; private FSomething: TSomething; public property SomethingIntf: TSomething read FSomething implements ISomething; end; begin WriteLn('PASS'); end. //--- 3. compile expected: it compiles actual: it compiles 4. turn "TDelegation" into "TDelegation<T>" TDelegation = class(TInterfacedObject, ISomething) -> TDelegation<T> = class(TInterfacedObject, ISomething) 5. compile again expected: it compiles actual: [DCC Error] InterfaceDelegation.dpr(17): E2259 Implements clause only allowed for properties of class or interface type [QC Description] I tried to use interface delegation (implements) inside a generic class as workaround for another problem, but it does not compile - I get the error [DCC Error] InterfaceDelegation.dpr(17): E2259 Implements clause only allowed for properties of class or interface type -> see steps QC Entry 70414 [Tester Recommended] QC #: Date Reported: Area: 70421 1/11/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Fileattribute FILE_ATTRIBUTE_VIRTUAL missing from windows.pas function FileIsVirtual(FileName: string): Boolean; // returns true if file has been virtualized by Vista var Attr: Cardinal; begin Attr := FileGetAttr(FileName); if Attr <> INVALID_FILE_ATTRIBUTES then Result := Attr and FILE_ATTRIBUTE_VIRTUAL <> 0 else Result := False; end; [QC Description] Please add FILE_ATTRIBUTE_VIRTUAL = $10000; to windows.pas WinNT.h: #define FILE_ATTRIBUTE_VIRTUAL 0x00010000 FILE_ATTRIBUTE_VIRTUAL can be used to detect if a file has been virtualized by Vista. In that case the file is stored in the VirtualStore folder. QC Entry 70421 QC #: Date Reported: 70489 1/13/2009 Description: Area: Compiler\Delphi Steps: [QC Short Description] Typo in DE translation of the message for the compiler error E2431 - start Delphi 2009 - save the attached file ErrorE2431Test.dpr or the following code - compile expected: ...nicht zugegriffen... [DCC Fehler] ErrorE2431Test.dpr(20): E2431 for-in-Anweisung arbeitet nicht mit Kollektionstyp 'TSomething', weil 'TSomething' kein Element für 'GetEnumerator' enthält oder darauf nicht zugegriffen werden [QC Description] kann actual: ...nicht zugegirffen... [DCC Fehler] ErrorE2431Test.dpr(20): E2431 for-in-Anweisung arbeitet nicht The translation of mit Kollektionstyp 'TSomething', weil 'TSomething' kein Element für 'GetEnumerator' enthält oder darauf nicht zugegirffen werden kann - dcc32 ErrorE2431Test.dpr expected: ...nicht zugegriffen... ErrorE2431Test.dpr(20) "E2431 for-in statement cannot operate on collection type '%s' because '%s' does not contain a member for '%s', Fehler: E2431 for-in-Anweisung arbeitet nicht mit Kollektionstyp 'TSomething', weil 'TSomething' kein Element or it is inaccessible" für 'GetEnumerator' enthält oder darauf nicht zugegriffen werden kann actual: ...nicht zugegirffen... ErrorE2431Test.dpr(20) Fehler: E2431 for-in-Anweisung arbeitet nicht mit Kollektionstyp 'TSomething', weil has a typo at the end in the translation of inaccessible 'TSomething' kein Element für 'GetEnumerator' enthält oder darauf nicht zugegirffen werden kann program ErrorE2431Test; {$APPTYPE CONSOLE} type TSomething = class(TObject) private function GetEnumerator: "E2431 for-in-Anweisung arbeitet nicht mit Kollektionstyp '%s', weil '%s' kein Element für '%s' enthält oder darauf IEnumerator; end; function TSomething.GetEnumerator: IEnumerator; begin Result := nil; end; var Something: nicht zugegirffen werden kann" TSomething; I: Integer; begin for I in Something do; end. -> see steps QC Entry 70489 QC #: Date Reported: Area: 70499 1/14/2009 Database\TField\TNumericField\TIntegerField Description: Steps: [QC Short Description] Easy to fix in VCL: Using wrongly sized TSmallIntField in stead of TIntegerField causes memory overwrite TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_267657 -or- [QC Description] This QC shows how calling IsNull on a the result field of the query below can result in a memory overwrite. 1. Compile and run the attached application. 2. Click the button "Bad IsNull" The normal memory manager does not detect this, so you will see spurious artifacts in your applications. Only the FastMM memory manager in full debug mode detects it reliably. Expected: no error This bug occurs frequently when the datasizes of the underlying DB have changed, but the persistent fields in the application have not yet been corrected yet. As the IDE has no way of automatically correcting the datatypes of persistent fields, and this error is hard to detect, I have rated it quite high to fix. The attached application reproduces the issue. It includes FastMM as that is the only way to reproduce it. Actual: FastMM has detected an error during a FreeMem operation. The block footer has been corrupted. Notes: A. the buttons "Good Value" and "Good IsNull" are to demonstrate that using a persistent TIntegerField works fine The queries in the application accesses the employee.gdb demo database that ships with any Interbase version: B. the button "Bad Value" is to demonstrate that using a persistent TSmallintField for obtaining the Value works fine too Select Max(SALES.QTY_ORDERED) From SALES The bug can be reproduced with any query returning an integer field; this particular example is just to make it easy to reproduce. The bug manifests itself when you use Persistent Fields that are of the wrong size. The expected behaviour is to get some kind of size warning, or an overflow. The actual behaviour is a memory overwrite that can be detected by FastMM. The solution to resolve the issue is simple The accompanying application contains two queries: BadSQLQuery and GoodSQLQuery both contain persistent fields: object BadSQLQueryMAX: TSmallintField FieldName = 'MAX' end object GoodSQLQueryMAX: TIntegerField FieldName = 'MAX' end Behaviour: - obtaining BadSQLQueryMAX.Value: value will overflow - obtaining BadSQLQueryMAX.IsNull: memory overwrite occurs The cause of the memory overwrite is that: - TField.GetIsNull calls GetData(nil) - The actual field now allocates a buffer that is too short - The actual TDataSet now overwrites this buffer with a value of the native size Obtaining BadSQLQueryMAX.Value does not generate a memory overwrite because: - TSmallintField is derived from TIntegerField - TIntegerField.GetAsInteger calls GetValue(Result) - the Result os if size LongInt which is large enough to hold the result Hence the proposed workaround is to introduce TIntegerField.GetIsNull that mimics TIntegerField.GetAsInteger behaviour: { Proposed workaround: add the below GetIsNull method to TIntegerField //MMWIN:MEMBERSCOPY unit _MM_Copy_Buffer_; interface type TIntegerField = class(TNumericField) protected function GetIsNull: Boolean; override; end; implementation function TIntegerField.GetIsNull: Boolean; var Dummy: LongInt; begin Dummy := -1; Result := not GetValue(Dummy); end; end. } QC Entry 70499 QC #: Date Reported: Area: 70521 1/14/2009 Database\Data Aware Controls\TDBGrid Description: Steps: [QC Short Description] DBGrid-InplaceEditor ignores pasted text 1. Open the attached project 2. Start the project (This will copy '12.12.08' into the clipboard) 3. Click into the FLD_DATE field in the grid (show inplace editor) 4. Paste the clipboard text into the control by pressing Ctrl+V 5. Use TAB, ENTER or the mouse to leave the edit mode Expected: '12.12.08' is now in the field. Actual: The field is still empty. [QC Description] The DBGrid InplaceEditor ignores text that was pasted from the clipboard if the field has an EditMask. This is because the TCustomMaskEdit overrides the WM_PASTE (and WM_CUT) message handler and if as mask is specified, the default handler isn't called. The default handler sends a WM_COMMAND(EN_CHANGE) to the parent but without calling the default handler this message isn't sent to the DBGrid and the content of the edit is never copied to the internal InplaceEdit text field. QC Entry 70521 QC #: Date Reported: Area: 70551 1/15/2009 Internet\Indy Description: Steps: [QC Short Description] random name assigned to attachment file names Added by Sysop <<<<<<<<<<<<<<< sample project is found in the demo folder as '\MailClient\MailDemo.dproj'. >>>>>>>>>>>>>>> [QC Description] a random name is assigned to attachment file names. DSC004.jpg is changed to ATT00242.dat. The file name change renders the attachment unreadable allthough saving the dat file and changing the extension shows the jpg. QC Entry 70551 QC #: Date Reported: Area: 70553 RTL\Delphi\Other Classes\TStreamReader/TStreamWriter 1/15/2009 Description: Steps: [QC Short Description] TStreamReader hangs in an endless loop program Bug; {$APPTYPE CONSOLE} uses SysUtils, Classes, StrUtils; var I, J: Integer; SL: TStringList; MS: TMemoryStream; SR: TStreamReader; S, T: string; Encoding: TEncoding; Pass: Boolean; const MyString = 'Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test '; MyString2 = #955#955#955#955#955#955#955#955#955#955'Test'#228#228#228#228#228#955#955#955#955#955#955#955#955#955#955#968#968#968#968#968; begin for J := 0 to 7 do begin try case J mod 4 of 0: Encoding := TEncoding.Default; 1: Encoding := TEncoding.UTF8; 2: Encoding := TEncoding.Unicode; 3: Encoding := TEncoding.BigEndianUnicode; else raise Exception.Create('Bug in Testprogram'); end; if J <= 3 then T := MyString else T := MyString2; Pass := True; MS := TMemoryStream.Create; try SL := TStringList.Create; try for I := 0 to 1000 do SL.Add(T); SL.SaveToStream(MS, Encoding); finally SL.Free; [QC Description] If a TStreamReader is created with an encoding that does not match the encoding of the stream, TStreamReader hangs in an endless loop. I haven't tested if the crash also happens if a stream is broken. SR := TStreamReader.Create(MS, TEncoding.UTF8); end; MS.Position := 0; SR := TStreamReader.Create(MS, TEncoding.UTF8); try while not SR.EndOfStream do begin S := SR.ReadLine; if J = 4 then if S = T then Pass := False; if (S <> T) and (J <> 4) then Pass := False; end; finally SR.Free; end; if Pass then Writeln('PASS ' + Encoding.ClassName + ' ' + IfThen(J < 4, 'MyString', 'MyString2')) else Writeln('FAIL ' + Encoding.ClassName + ' ' + IfThen(J < 4, 'MyString', 'MyString2')); finally MS.Free; end; except on E: Exception do WriteLn('FAIL - Exception=', E.ClassName, '/', E.Message); end; end; end. It also hangs when reading a Unicode stream with DetectBom = False: SR := TStreamReader.Create(MS, False); Try changing MyString in the steps to: MyString2 = #$1FFFF + mystring; This does not hang indefinitely, but takes very long to read. This is probably invalid for UTF8, but it should come to that conclusion much sooner. QC Entry 70553 QC #: Date Reported: 70622 1/19/2009 Area: Debugger\Local Variables View Description: Steps: [QC Short Description] Delphi crash if hover mouse over the plus in "Local variable Window" on 144 dpi 1. Change DPI to 150% 2. Reboote 3. Start RS2009 4. Creat test app following instructions: a) Create New project. b) Double Click on empty form to create OnCreate event. ?) Set breakpoint here (see below) and press F9 - we need to work with local variable debug window (on the left). procedure TForm1.FormCreate(Sender: TObject); begin // << don't forget end; << breakpoint here 5. Hovered mouse over the plus (Look to the screenshot here http://img155.imageshack.us/img155/4672/12531078hj0.png) 6. Wait just a few seconds and receive the stack overflow message or full crash without any message. QC Entry 70622 QC #: Date Reported: Area: 70683 1/20/2009 Install\Files Description: Steps: [QC Short Description] source\Win32\vcl\RibbonConsts.pas is not translated - open <base path>\source\Win32\vcl\RibbonConsts.pas - have a look at the resource strings expected: the resource strings are translated actual: the resource strings are in english - save the example at the end as RibbonConstsRSTest.dpr - dcc32 -u<base path>\source\Win32\vcl RibbonConstsRSTest.dpr - execute RibbonConstsRSTest.exe expected: PASS actual: FAIL - dcc32 --no-config -u<base path>\lib RibbonConstsRSTest.dpr - execute RibbonConstsRSTest.exe expected: PASS actual: PASS - dcc32 --noconfig -u<base path>\lib\debug RibbonConstsRSTest.dpr - execute RibbonConstsRSTest.exe expected: PASS actual: PASS //--- RibbonConstsRSTest.dpr --- program RibbonConstsRSTest; {$APPTYPE CONSOLE} uses RibbonConsts; begin if (SRecentDocuments <> 'Recent Documents') and (SMinimizeTheRibbon <> 'Minimize the Ribbon') then WriteLn('PASS') else Writeln('FAIL'); end. [QC Description] The resource strings in source\Win32\vcl\RibbonConsts.pas are not translated although lib\RibbonConsts.dcu and lib\debug\RibbonConsts.dcu are translated. -> see steps QC Entry 70683 // Files comes from clr\vcl\Ribbon\i18n\[de,fr,ja] QC #: Date Reported: Area: 70705 1/21/2009 Documentation Description: Steps: [QC Short Description] NaN behaviour not documented for FloatToStrF [QC Description] ms-help://borland.bds5/delphivclwin32/[email protected] doesn't document the behaviour for NaN values but FloatToStrF does! QC Entry 70705 QC #: Date Reported: Area: 70727 1/21/2009 Install\Files Description: Steps: [QC Short Description] source\Win32\IBX\IBVisualConst.pas is not translated - open <base path>\source\Win32\IBX\IBVisualConst.pas - have a look at the resource strings expected: the resource strings are translated actual: the resource strings are in english - save the example at the end as IBVisualConstRSTest.dpr - dcc32 -u<base path>\source\Win32\IBX IBVisualConstRSTest.dpr - execute IBVisualConstRSTest.exe expected: PASS actual: FAIL - dcc32 --no-config -u<base path>\lib IBVisualConstRSTest.dpr - execute IBVisualConstRSTest.exe expected: PASS actual: PASS - dcc32 --noconfig -u<base path>\lib\debug IBVisualConstRSTest.dpr - execute IBVisualConstRSTest.exe expected: PASS actual: PASS //--- IBVisualConstRSTest.dpr --- program IBVisualConstRSTest; {$APPTYPE CONSOLE} uses IBVisualConst; begin if (SIBFilterBeginning <> 'Partial match at beginning') and (SIBFilterRange <> 'Match Range') then WriteLn('PASS') else Writeln('FAIL'); end. [QC Description] The resource strings in source\Win32\IBX\IBVisualConst.pas are not translated although lib\IBVisualConst.dcu and lib\debug\IBVisualConst.dcu are translated. -> see steps QC Entry 70727 QC #: Date Reported: Area: 70728 1/21/2009 Install\Files Description: Steps: Please add following files to DDM: TP\intermediate\[release,debug]\lib\[de,fr,ja]\IndySockTransport.dcu TP\internet\i18n\[de,fr,ja]\IndySockTransport.pas 1. open <base path>\source\Win32\internet\IndySockTransport.pas 2. have a look at the resource strings (they are in the implementation section) expected: the resource strings are translated actual: the resource strings are in english 3. open <base path>\lib\IndySockTransport.dcu with a hex editor 4. look for sNoHost and sSocketReadError expected: the symbols are followed by a translated versions of "N o h o s t" and "S o c k e t r e a d e r r o r" actual: followed by "N o h o s t" and "S o c k e t r e a d e r r o r" 5. if <base path>\lib\debug\IndySockTransport.dcu exists (it doesn't in my installation) then repeat steps 3. and 4. with that file BTW, a compilable test is not really possible, because the strings are private. By calling TIndyTCPClientTransport.SetConnected with an instance of an inherited class you could force an ESocketConnectionError and compare the exception message with sNoHost, but it is not worth to write such a test. Original report: [QC Short Description] IndySockTransport.pas is not translated [QC Description] The two resource strings (one is in use) in IndySockTransport are not translated affected are: - source\Win32\internet\IndySockTransport.pas - lib\IndySockTransport.dcu Note lib\D E B U G\IndySockTransport.dcu does not exist -> see steps QC Entry 70728 QC #: Date Reported: Area: 70739 1/21/2009 SOAP\WSDL Importer Description: Steps: [QC Short Description] Borland instead of CodeGear in version message - have a look at the version info of WSDLImp.exe and see that description/product name is "CodeGear WSDL Import Utility" Copyright is "Copyright (c) 1998-2008 Embarcadero..." - check the version output of the US version call bin\WSDLImp.exe -- expected: CodeGear WSDLIMP Version 2.3 - $Rev: 16699 $ Copyright (c) 2008 CodeGear *Error*: Invalid option -- Please run 'WSDLImp -?' for help with options Note: Since the Copyright in the version output of for exam dcc32, tlibimp or tdump is "Copyright...CodeGear" I expect "Copyright...CodeGear" and not "Copyright...Embarcadero..." for WSDLImp.exe too. actual: Borland WSDLIMP Version 2.3 - $Rev: 16699 $ Copyright (c) 2008 Borland Software Corporation *Error*: Invalid option -- Please run 'WSDLImp -?' for help with options (or contact a stockbroker) BTW, Should "(or contact a stockbroker)" be funny? If yes, then try to find something identical for the DE version. It is the resource string OptionError in source\Win32\soap\wsdlimporter\WSDLImp.dpr - check the version output of the DE version (make sure that bin\WSDLImp.de is present) call bin\WSDLImp.exe -- expected: CodeGear WSDLIMP Version 2.3 - $Rev: 16699 $ Copyright (c) 2008 CodeGear *Fehler*: Ung·tige Option -- Bitte f·ren Sie 'WSDLImp -?' aus, um Hilfe [QC Description] The version message of WSDLImp.exe does still use Borland although the version info resource is correct -> see steps QC Entry 70739 zu den Optionen anzuzeigen actual: Borland WSDLIMP Version 2.3 - $Rev: 16699 $ Copyright (c) 2008 Borland Software Corporation *Fehler*: Ung·tige Option -- Bitte f·ren Sie 'WSDLImp -?' aus, um Hilfe zu den Optionen anzuzeigen - open source\Win32\soap\wsdlimporter\WSDLImp.dpr - look for the resource strings in the DE version expected: translated actual: not translated - look for SignOn expected: SignOn = 'CodeGear WSDLIMP Version %d.%d %s' + #13#10 + 'Copyright (c) 2008 CodeGear' + #13#10; actual: SignOn = 'Borland WSDLIMP Version %d.%d %s' + #13#10 + 'Copyright (c) 2008 Borland Software Corporation' + #13#10; - look for OptionError expected: ... for help with options (or contact a stockbroker) actual: ... for help with options QC #: Date Reported: 70777 1/23/2009 Area: VCL Description: Steps: [QC Short Description] MATH.PAS contains wrong copyright text regarding RoundTo function. Open math.pas, goto line 501 [QC Description] The VCL file math.pas now contains a RoundTo function from the FastCode project. Addeby Sysop <<<<<<<<<< This license issue still exists in Build 12.0.3210.17555. >>>>>>>>>> However, the licence block above RoundTo in math.pas refers to CompareText, not RoundTo (* ***** BEGIN LICENSE BLOCK ***** * * The function CompareText is licensed under the CodeGear license terms. * * The initial developer of the original code is Fastcode * * Portions created by the initial developer are Copyright (C) 2002-2004 * the initial developer. All Rights Reserved. * * Contributor(s): John O'Harrow * * ***** END LICENSE BLOCK ***** *) The function name, copyright dates and Contributors may *all* be incorrect. QC Entry 70777 QC #: Date Reported: Area: 70794 1/23/2009 Install Description: Steps: [QC Short Description] D2009 Update 2 kill dbexpress120.bpl Added by Tomohiro Takahashi: <<<<<<<< [QC Description] We have gotten a report about the exact same problem from Japanese customer who installed Update2... By the installation of update 2 the file dbexpress120.bpl will killed from the harddisk. the update 2 will be marked >>>>>>>> as installed and the IDE dosn't run anymore. build number can't be reported, because the IDE dosn't run. QC Entry 70794 QC #: Date Reported: 70845 1/25/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Compiler crashes when generating *.lib file with generics in unit 1. Open the attached project 2. Open the project in the IDE 3. Build the project 4. Make the project [QC Description] The compiler crashes (interal error LA33) when it generates the *.lib file for a Delphi Package (*.dpk) [Generate all C++ files, "-JL") and this package contains a unit that has a generic type in the interface section. The Command line compiler throws an access violation. QC Entry 70845 Expected: Both "Build" and "Make" work Actual: "Build" works while the followed "Make" crashes with an Internal Error LA33 [Tester Recommended] You can also use the "test.bat" in the zip file to see the access violation in the command line compiler. (JJS: The following command-line will produce the problem. dcc32 -M -JL TestPackage.dpk See all comments from Uwe Schuster) QC #: Date Reported: Area: 70869 1/26/2009 IDE\Object Inspector Description: Steps: [QC Short Description] Scrollbars in Object Inspector missing or imcomplete scroll range 1. make sure that the IDE is using the "Default Layout" (Docked) 2. Make sure that the object inspector is showing scrollbars 3. File -> New VCL Forms application 4. Put a TImage on the form 5. Select the TImage 6. Press F9 to run the application 7. Close the application ==> The Object Inspector doesn't have scrollbars [QC Description] anymore; not all items are visible Repeat the steps from above, but now use a TEdit instead ==> The object This is a regression in Build #3300, it worked fine in Update 2 (verified). inspector for the TEdit has scrollbars, but you can only scroll until PopupMenu. The text property is not visible at all. You cannot access the text property unless you resize the Object Inspector. It is not enough to just select When selecting a control and then running an application, the scrollbars will be missing from the object inspector the Form, and then select the TEdit again. when the application exits. I'm using Vista 64 with a screen resolution of 1680x1050. QC Entry 70869 QC #: Date Reported: Area: 70899 1/27/2009 VCL\Printing Description: Steps: [QC Short Description] Possible buffer overrun in GetDefaultPrinter procedure TPrinter.SetToDefaultPrinter; var [...] DefaultPrinter: array[0..1023] of Char; [...] I := SizeOf (DefaultPrinter); GetDefaultPrinter(DefaultPrinter, I); Possible solution: I := Length(DefaultPrinter); if not GetDefaultPrinter(DefaultPrinter, I) then FillChar(DefaultPrinter, SizeOf(DefaultPrinter), #0); [QC Description] There is a possible buffer overrun in the call to GetDefaultPrinter. Apart from memory corruption, this could crash the application with a DEP (data execution prevention) error. GetDefaultPrinter expects the Length of the buffer in TChars. The current implementation is passing the *size* of the buffer. Therefore change the following line in Printers.pas I := SizeOf(DefaultPrinter); to I := Length(DefaultPrinter); Also the result of DefaultPrinter must be checked. If the function fails, the content of DefaultPrinter is undefined. In this case there is not even a guarantee that there is a terminating #0 character. DefaultPrinter returns an error if there is no printer installed (as expected). [Update] The documentation of GetDefaultPrinter in the Windows SDK says that the size is in "characters". This would have been clearer if it had said "tchars", because that is what the function expects. A little test confirms that characters refers to tchars indeed. QC Entry 70899 QC #: Date Reported: 70905 1/27/2009 Area: Database Description: Steps: [QC Short Description] TVarData.VString interpreted as UnicodeString, while it contains a pointer to an AnsiString Search in the RTL/VCL code for all 'VString' occurances. Notice that in Variant.pas all TVarData.VString are cast to an AnsiString. Now notice that DBCommon (and other units) do a cast to 'string', which effectively means a cast to 'UnicodeString'. [QC Description] A search in DBCommon for the symbol 'VString' (a member of TVarData), results in 8 occurances of this construct : "string(TVarData(Value).VString)". Since 'string' now means UnicodeString, this construct interprets an AnsiString as UnicodeString, without any compiler magic in between. Possibly the new string-header helps preventing errors, but at the very least this is a syntactic error. PS: Don't mix this up with TVarRec.VString: PShortString, it's TVarData.VString: Pointer that's handled wrong. QC Entry 70905 QC #: Date Reported: 70945 1/28/2009 Area: Compiler\Delphi\BASM Description: Steps: [QC Short Description] Every i value is accepted for operand ST(i) in x87 instructions - start Delphi 2009 - create a new Console Application and paste the following code - compile expected: it does not compile and reports a lot error messages like [DCC Error] Projectx87STOperandTest.dpr(<line>): E2116 Invalid combination of opcode and operands actual: it compiles without errors - put a breakpoint on the x87 instruction (FCMOVB on line 7) - run (the debugger should now stop on the FCMOVB line) - show the CPU View (CTRL+ALT+C) or the Disassembly View (CTRL+ALT+D) - have a look at the highlighted lines Note the expectation and actual result are affected by Report No: 19843 (RAID: 232646) Status: Open ST(0) is omitted in x87 instructions disassembly http://qc.codegear.com/wc/qcmain.aspx?d=19843 expected: <source file>.<line>: FCMOVB ST(0), ST(8) <address> <opcode> fcmovb st(8) actual: <source file>.<line>: FCMOVB ST(0), ST(8) <address> <opcode> fcmove st(0) You see that due the higher number fcmovb st(0), st(8) becomes fcmove st(0), st(0) ...movB -> ...movE //--- Projectx87STOperandTest.dpr --- program Projectx87STOperandTest; {$APPTYPE CONSOLE} begin asm FCMOVB ST(0), ST(8) FCMOVE ST(0), ST(8) FCMOVBE ST(0), ST(8) FCMOVU ST(0), ST(8) FCMOVNB ST(0), ST(8) FCMOVNE ST(0), ST(8) FCMOVNBE ST(0), ST(8) FCMOVNU ST(0), ST(8) FCOMI ST(0), ST(8) FUCOMI ST(0), ST(8) FCOMIP ST(0), ST(8) FUCOMIP ST(0), ST(8) FADDP ST(8), ST(0) FSUBP ST(8), ST(0) FSUBRP ST(8), ST(0) FMULP ST(8), ST(0) FDIVP ST(8), ST(0) FDIVRP ST(8), ST(0) FADD ST(0), ST(8) FADD ST(8), ST(0) FADD ST(0), ST(8) FADD ST(8), ST(0) FSUB ST(0), ST(8) FSUB ST(8), ST(0) FSUBR ST(0), ST(8) FSUBR ST(8), ST(0) FMUL ST(0), ST(8) FMUL ST(8), ST(0) FDIV ST(0), ST(8) FDIV ST(8), ST(0) FDIVR ST(0), ST(8) FDIVR ST(8), ST(0) end; end. [QC Description] It seems that the compiler accepts every value for i in ST(i) in x87 instructions although Intel's manual clearly says that i can be between 0 and 7. This information can be found in http://download.intel.com/design/processor/manuals/253666.pdf Section 3.1.1.1 "Opcode Column in the Instruction Summary Table" +i - A number used in floating-point instructions when one of the operands is ST(i) from the FPU register stack. The number i (which can range from 0 to 7) is added to the hexadecimal byte given at the left of the plus sign to form a single opcode byte. -> see steps The source for this report is: Disassembly wrong for x87 instructions https://forums.codegear.com/thread.jspa?threadID=11039&tstart=0 Message-ID: <[email protected]> .delphi.language.basm QC Entry 70945 [Tester Recommended] QC #: Date Reported: Area: 70959 1/28/2009 Database\Data Aware Controls\TDBEdit Description: Steps: [QC Short Description] Data aware controls are not respecting the TDataSource AutoEdit property Run the attached example and see that you can enter text and get the errors. [QC Description] When a datasource has it's AutoEdit property set to false, various edit controls (TDBMemo, TDBEdit, etc) are not respecting the AutoEdit setting. With AutoEdit = false: Upon entering text (which they shouldn't allow you to do without first going into edit mode), they do not put the dataset into edit state (as expected) but they do allow you to enter text (not expected). Then, moving focus to another control raises a 'Dataset not in edit or insert mode' exception. I've tried the attached example code under D2007 and it behaves as expected. QC Entry 70959 QC #: Date Reported: Area: 71023 2/1/2009 VCL Description: Steps: [QC Short Description] TTreeView tooltips doesn't work. ComCtrls.pas, at line 11518: procedure TCustomTreeView.WMNotify(var Message: TWMNotify); ... if (Node = nil) or (Node.Text = '') or {$IF DEFINED(CLR)} (ToolTipText.uFlags and TTF_IDISHWND = 0) then {$ELSE} (PToolTipTextW(NMHdr)^.uFlags and TTF_IDISHWND = 0) then Exit; {$IFEND} Exit; [QC Description] ComCtrls.pas, at line 11518: procedure TCustomTreeView.WMNotify(var Message: TWMNotify); ... if (Node = nil) or (Node.Text = '') or {$IF DEFINED(CLR)} (ToolTipText.uFlags and TTF_IDISHWND = 0) then {$ELSE} (PToolTipTextW(NMHdr)^.uFlags and TTF_IDISHWND = 0) then Exit; {$IFEND} Exit; An extra Exit makes the Tooltip doesn't work. Please fix it. Thank you. QC Entry 71023 QC #: Date Reported: Area: 71076 2/2/2009 Compiler\Delphi\Language\Dynamic Arrays Description: Steps: [QC Short Description] Dynamic String Arrays fail to convert to Variant This example code works in Delphi 2006 but not in Delphi 2009 Update 1. procedure TForm2.Button1Click (Sender: TObject); var LStrArray: array of string; LVar: Variant; begin SetLength(LStrArray, 2); LStrArray[0] := 'dynamic'; LStrArray[1] := 'array'; LVar := LStrArray; <-========== Exception raised here. end; Note: other [QC Description] Delphi 2009 raises an exception... dynamic array types work, like AnsiString, Integer, etc. as they did in the past. --------------------------Debugger Exception Notification --------------------------Project Project2.exe raised exception class EVariantTypeCastError with message 'Invalid variant type conversion'. --------------------------... when assigning a dynamic string array to a variant in any way. QC Entry 71076 QC #: Date Reported: Area: 71082 2/3/2009 Database\DataSnap\Server Description: Steps: [QC Short Description] TDataSetProvider.OnDataRequest fails with variant error UnitTest: http://dtgsvn/svn/bdstests/trunk/UnitTest/projects/database/datasnap/rdm/native32/DataSnapRDM.Native.DB.Test.dpr QC Entry 71082 -sTest_AS_DataRequest. Server: Setup a basic DataSnap server with a TSQLConnection, TSQLDataSet, and TDataSetProvider (and TDSServer, TDSServerClass, TDSTCPServerTranspot for DataSnap 2009 connectivity). Add an event handler for TDataSetProvider.OnDataRequest to do something simple, like setting the result to the input parameter. Client: Setup a basic DataSnap client with a TSQLConnection, TDSProviderConnection, and TClientDataSet. Hook everything up so the data set gets data from the data set in the server. Call TClientDataSet.DataRequest. The server will throw a variant exception. Cause: The problem appears to be in DSServer.pas:TDSProviderDataModuleAdapter.AS_DataRequest. The local Data: OleVariant variable is being assigned DataStream.AsVariant. The problem is that DataStream is already an OleVariant, and Variants evidently don't know how to convert themselves to a Variant. :) Seriously though, this results in Variants.pas:_DispInvoke being called against the DataStream variant. _DispInvoke doesn't know how to handle basic variant types (like varInteger and VarOleStr), so FindCustomVariantType fails to find a handler, and VarInvalidOp is called. The problem is solved by changing this line in DSServer.pas from: Data := DataStream.AsVariant; to Data := DataStream; Or, alternatively, remove the local Data variable completely and change this line: Result := FProviderDataModule.Providers[ProviderName].DataRequest(Data); to Result := FProviderDataModule.Providers[ProviderName].DataRequest(DataStream); I did the latter and saved a copy in my project folder, rebuilt the server, and the error was resolved. QC #: Date Reported: Area: 71096 2/3/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] TQueue<T> failes for TrimExcess The program should demonstrate the problem. Might require multiple iterations. Compile the attached application below. [QC Description] It seems that after calling the Extract method, TrimExcess will corrupt the internals of the queue. QC Entry 71096 See the program BTS268049; [Tester Recommended] {$APPTYPE CONSOLE} uses SysUtils, Generics.Collections; procedure DoIt; var Queue: TQueue<String>; begin { Create a new Queue } Queue := TQueue<String>.Create(); { Enqueue some items up the Queue } Queue.Enqueue('John'); Queue.Enqueue('Mary'); Queue.Enqueue('Bob'); Queue.Enqueue('Anna'); Queue.Enqueue('Erica'); { Extract the top element: "Erica" } Queue.Extract(); { Reduce the capacity } Queue.TrimExcess(); // <-- EXCEPTION IS THROWN HERE { Destroy the Queue completely } Queue.Free; end; begin try DoIt; WriteLn('PASS'); except on E: Exception do WriteLn('FAIL - Exception (', E.ClassName, '/', E.Message, ')'); end; end. QC #: Date Reported: Area: 71121 2/3/2009 Documentation Description: Steps: [QC Short Description] The TControlScrollBar.ThumbSize property is not documented. 1. Open Delphi 2009 help 2. Enter the following URL mshelp://embarcadero.rs2009/delphivclwin32/Forms_TControlScrollBar_ThumbSize.html exp: Topic is documented act: Topic is not documented QC Entry 71121 QC #: Date Reported: Area: 71127 2/3/2009 Midas\TClientDataSet Description: Steps: [QC Short Description] Fail when assign XML string contain unicode character to ClientDataSet TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_267993 -or- [QC Description] I create a TClientDataSet instance in Delphi 2009: Run the following code or extract from attachment: var D: TClientDataset; Y: string; begin D := TClientDataSet.Create(Self); var D: TClientDataset; Y, Z: string; begin D := TClientDataSet.Create(Self); D.FieldDefs.Add('F1', ftWideString, 20); D.CreateDataSet; D.AppendRecord(['test ??']); Y := D.XMLData; end; D.FieldDefs.Add('F1', ftWideString, 20); D.CreateDataSet; D.AppendRecord(['test ??']); Memo1.Lines.Add(D.Fields[0].AsString); Memo1.Lines.Add(''); Y := D.XMLData; Memo1.Lines.Add(Y); Memo1.Lines.Add(''); The string field F1 has value of "test ??" and variable Y will content the following XML string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET Version="2.0"><METADATA><FIELDS><FIELD attrname="F1" fieldtype="string.uni" WIDTH="40"/></FIELDS><PARAMS CHANGE_LOG="1 0 4"/></METADATA><ROWDATA><ROW RowState="4" F1="test &# 20013;&# 22830;"/></ROWDATA></DATAPACKET> Z := FormatXMLData(Y); Memo1.Lines.Add(Z); Memo1.Lines.Add(''); D.Close; Please note that the string is using ampersand entity presentation for 2 unicode character (I purpose put a space D.XMLData := Z; between &# and numeric code point or else browser will interpret it as unicode character. Memo1.Lines.Add(D.Fields[0].AsString); Memo1.Lines.Add(''); I then use FormatXMLData to tidy up the XML: D.Free; Z := FormatXMLData(Y); end; Variable Z contain: <?xml version="1.0" standalone="yes"?> <DATAPACKET Version="2.0"> <METADATA> <FIELDS> <FIELD attrname="F1" fieldtype="string.uni" WIDTH="40"/> </FIELDS> <PARAMS CHANGE_LOG="1 0 4"/> </METADATA> <ROWDATA> <ROW RowState="4" F1="test ??"/> </ROWDATA> </DATAPACKET> FormatXMLData has convert the ampersand entity to unicode character. So far so good. When I re-assign the XML back to TClientDataset instance, the string field value isn't the value I define at first: "test ä¸å¤®" QC Entry 71127 QC #: Date Reported: Area: 71164 2/4/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Unable to compile a generic class involving array types Compile the attached application below. See the following unexpected compile-time errors. [QC Description] I tried to port some Collection/List class to generics but the compiler seems to get confused about types and their idendity. QC Entry 71164 Error: E2243 Expression needs no Initialize/Finalize Error: E2010 Incompatible types: 'TTest1<TValue>.PStringItemArray' and 'Pointer' E2243 occurs on the line marked #1 E2010 occurs on the line marked #2 [Tester Recommended] program BTS268055; {$APPTYPE CONSOLE} type TTest1<TValue: class> = class public type TStringItem = record FString: string; FObject: TValue; end; TStringItemArray = array [0..100] of TStringItem; PStringItemArray = ^TStringItemArray; public FList: PStringItemArray; procedure Clear1; procedure Clear2; end; procedure TTest1<TValue>.Clear1; var OldList: PStringItemArray; begin Finalize(OldList^[0]); //#1 end; procedure TTest1<TValue>.Clear2; var OldList: PStringItemArray; begin OldList := FList; //#2 end; begin WriteLn('PASS'); end. QC #: Date Reported: Area: 71182 2/5/2009 Database\DBExpress Description: Steps: [QC Short Description] DBExpress slow fetching records with blob fields Open the project with Delphi 2009. If necessary, change the path of employee.gdb database in DbxSQLConnection and IBDatabase1 objects. Build the project and run it. Click "Insert 10000 records" button. Click "Fetch data with IbQuery" to test IBX components. Click "Fetch data with DBXpress" to test DBXpress components. [QC Description] Fetching 10,000 records: IBX --> 1.8 seconds. DbExpress --> 5.8 seconds. I know that IBX performance must be better than DbExpress, but the difference is too big, and only when the records have blob fields. QC Entry 71182 QC #: Date Reported: Area: 71187 2/5/2009 IDE\Code Templates Description: Steps: [QC Short Description] Ctrl+Space incorrectly eats the character following the template name E.g. 1) Suppose the template name is "abc" and that it expands to "A=B": Suppose that before Ctrl+Space you have: if abc| then Inc(A); After Ctrl+Space you get: if A=Bthen Inc(A); rather than: if A=B then Inc(A); This lost space must then be replaced manually for the code to compile. --- E.g. 2) Suppose the template name is "fan" [QC Description] and that it expands to "FreeAndNil": Suppose that before Ctrl+Space you have: fan|(ObjectReference); After When Ctrl+Space is used to expand a template name into a template, the character following the template name Ctrl+Space you get: FreeAndNilObjectReference); rather than: FreeAndNil(ObjectReference); This lost disappears. semicolon must then be replaced manually for the code to compile. See "Steps". This worked correctly in Delphi 7 but does not in Delphi 2009. Severity comment: This makes the new code template system MUCH more clumsy and less useful than the Delphi 7 system. QC Entry 71187 QC #: Date Reported: Area: 71233 2/6/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Restricted generic type parameters cannot be used as class references Compile the attached application below. See the following unexpected compile-time errors. [QC Description] See steps. QC Entry 71233 Error: E2029 '(' expected but ';' found Error: E2010 Incompatible types: 'TClass' and 'T' [Tester Recommended] program BTS268057; type TSomething<T: class> = class procedure Foo; end; { TSomething<T> } procedure TSomething<T>.Foo; var TheClassType: TClass; begin TheClassType := T; //#1 end; begin writeLn('PASS'); { PASS on compile } end. QC #: Date Reported: Area: 71242 2/6/2009 SOAP\Client Applications Description: Steps: [QC Short Description] Error using TSOAPConnection - Create a new application of type SOAP Server Application as Web App Debuger - Add a new SOAP Server DataModule - Drop into new SOAP Server DataModule a TSQLConnection, a TSQLDataSet and a TDataSetProvider - Set a valid configuration for SQLConnection - Set the property SQLConnection to TSQLConnection component, set a valid SELECT statement in CommandText of the TSQLDataSet - Set the property DataSet of the TDataSetProvider to TSQLDataSet component - Run application to register - Run Web App Debuger and click on button Start. Then click on link to localhost server - A web browser will opened Then click on register of the yuor application and click on RUN button - The ServerInfo application will run and your SOAP Server Application too - Then create a new VCL Forms Application and drop on main form a TSOAPConnection component and a ClientDataSet component - Configure the property URL of the TSOAPConnection component (ex. http://localhost:8081/prServerSOAP.SOAPTeste/soap) - Set the property Connected = True of the TSOAPConnection component - Set the property RemoteServer of the TClientDataSet component to TSOAPConnection component - Set the property ProviderName of the TClientDataSet component to TDataSetProvider's name in SOAP Server Application (and this appers to set normally) - Then try set property Active = True of the TClientDataSet componet then raise exception [QC Description] Error using TSoapConnection in a project DataSnap with a Server type SOAP Server Application and SOAPDataModule. When configure client application in TSOAPConnection component and configure TClientDataSet with the properties RemotServer, ProviderName everything ok. But when set ClientDataSet.Active = True then raise a exception. Sama times with the message "variant or safe array is locked" order times only "Access violation..." In the demo C:\Users\Public\Documents\RAD Studio\6.0\Demos\DelphiWin32\VCLWin32 \WebServices\SOAPDataModule raise the same error. QC Entry 71242 QC #: Date Reported: Area: 71291 2/9/2009 SOAP\Server Applications Description: Steps: [QC Short Description] 1. create new SOAP Server application (cgi stand-alone application) with sample methods 2. deploy on Apache SOAP Attachments don't work in D2009 because the MIME headers and boundary info are getting widened due 3. Call with soap client (e.g. SoapUI) to incorrect use fo the 'string' type. NOTE: This issue has been reported by Bob Swart on the beta forum and escalated by a customer. [ORIGINAL REPORT:] SOAP server (cgi stand-alone) does not work on apache [QC Description] SOAP service deployed as a cgi application on Apache returns incorrect SOAP response (see below). The same service compiled with Delphi 2006 and before does work. Tested with Apache 2.0.39 and 2.2.10. ResponseCode: 200 (OK) Date:Mon, 09 Feb 2009 11:46:34 GMT Server:Apache/2.2.10 (Win32) Content-Version:MIME-Version: 1.0 Content: Content-Length:704 Content-Type:multipart/related; boundary=MIME_boundaryB0R9532143182121; start="<http://www.borland.com/rootpart.xml>" 0: 0D 00 0A 00 2D 00 2D 00 4D 00 49 00 4D 00 45 00 ....-.-.M.I.M.E. 16: 5F 00 62 00 6F 00 75 00 6E 00 64 00 61 00 72 00 _.b.o.u.n.d.a.r. 32: 79 00 42 00 74 00 2D 00 54 00 79 00 70 00 65 00 y.B.t.-.T.y.p.e. 48: 3A 00 20 00 6D 00 75 00 6C 00 74 00 69 00 70 00 :. .m.u.l.t.i.p. 64: 61 00 72 00 74 00 43 00 6F 00 6E 00 74 00 65 00 a.r.t.C.o.n.t.e. 80: 6E 00 74 00 2D 00 54 00 79 00 70 00 65 00 75 00 n.t.-.T.y.p.e.u. 96: 6E 00 64 00 61 00 72 00 79 00 3D 00 4D 00 49 00 n.d.a.r.y.=.M.I. 112: 4D 00 45 00 5F 00 43 00 6F 00 6E 00 74 00 65 00 M.E._.C.o.n.t.e. 128: 6E 00 74 00 2D 00 49 00 44 00 3A 00 20 00 3C 00 n.t.-.I.D.:. .<. 144: 68 00 74 00 74 00 70 00 3A 00 2F 00 2F 00 77 00 h.t.t.p.:././.w. QC Entry 71291 QC #: Date Reported: Area: 71292 2/9/2009 Compiler\Delphi\Execution Description: Steps: [QC Short Description] Internal compiler error C12079 when comparing NativeUInt variables Compile the attached application below. See the following error at compile-time. [QC Description] See steps. QC Entry 71292 Fatal: F2084 Internal Error: C12079 [Tester Recommended] program BTS268014; {$APPTYPE CONSOLE} function Foo(A, B: NativeUInt): Boolean; begin Result := A > B; end; procedure DoIt; begin if Foo(5, 1) then WriteLn('PASS') else WriteLn('FAIL'); end; begin try DoIt; except on E: Exception do WriteLn('FAIL Exception (', E.ClassName, '/', E.Message, ')'); end; end. QC #: Date Reported: Area: 71311 2/9/2009 VCL Description: Steps: [QC Short Description] Unable to select cells in TStringGrid when its parent panel is floating 1) Run the attached sample. 2) You can focus a Grid cell by clicking it, or select multiple cells by dragging the mouse cursor while keeping the left mouse pressed. 3) Double-click the panel to float it. 4) The functionality from #2 doesn't work any more. [QC Description] The attached sample illustrates a TStringGrid placed on a TPanel. When the panel is positioned on its parent form - the StringGrid operates as expected. When the panel gets floating - the StringGrid is painted wrong. This works OK in D11, but fails in D12. We suspect that the problem may be caused by the modifications in the TCustomGrid.IsActiveControl method: Grids.pas function TCustomGrid.IsActiveControl: Boolean; var H: Hwnd; ParentForm: TCustomForm; begin Result := False; ParentForm := GetParentForm(Self); if Assigned(ParentForm) then begin // if (ParentForm.ActiveControl = Self) then <<<<<<<< D11 if (ParentForm.ActiveControl = Self) and (ParentForm = Screen.ActiveForm) then <<<<<<<< D12 Result := True QC Entry 71311 QC #: Date Reported: Area: 71402 2/11/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Declaration of PathFindOnPath in ShLwApi.pas is incorrect [QC Description] PathFindOnPath() is declared as: function PathFindOnPath(pszPath: PWideChar; var ppszOtherDirs: PWideChar): BOOL; stdcall; The correct declaration should be: function PathFindOnPath(pszPath: PWideChar; ppszOtherDirs: PPWideChar): BOOL; stdcall; This is important as the second parameter should be nil for most cases, as it is actually a pointer to an array of strings, NOT a value that will be updated by the function. QC Entry 71402 SB: We should add the 2nd declaration as an overload. QC #: Date Reported: Area: 71405 2/11/2009 IDE Description: Steps: [QC Short Description] [DCC Error] E2161 Error: RLINK32: Error opening file "DfmError\uMain.dfm" 1) Open file Compyle -> [DCC Error] 2) Compile norm if, after click all tab caption 3) Save project 4) Close project 5) Open file Compyle -> [DCC Error] [QC Description] [DCC Error] E2161 Error: RLINK32: Error opening file "DfmError\uMain.dfm" QC Entry 71405 QC #: Date Reported: 71417 2/12/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: I3098 Compile the attached application and units seen below. See the following compile-time error indicating failure. [QC Description] See attached project. It happens when referencing a global untyped constant in a generic class. QC Entry 71417 Fatal: F2084 Internal Error: I3098 [Tester Recommended] Notice the use of generic interface and class types and the involvement of a circular unit reference. program BTS268079; {$APPTYPE CONSOLE} uses SysUtils, uBTS268079a, uBTS268079b; begin WriteLn('PASS'); //PASS on compile end. unit uBTS268079a; interface type TASimpleEnum = (Simple1, Simple2, Simple3); ISimpleGenericInterface<T> = interface function GetAnEnum(): TASimpleEnum; end; implementation uses uBTS268079b; var ReferenceToClassInUnitDep2: TSimpleClass<Integer>; end. unit uBTS268079b; interface uses uBTS268079a; type TSimpleClass<T> = class FIntfRef: ISimpleGenericInterface<T>; procedure Method1(); procedure Method2(); end; implementation procedure TSimpleClass<T>.Method1; begin if FIntfRef.GetAnEnum() = Simple2 then; end; procedure TSimpleClass<T>.Method2(); begin if FIntfRef.GetAnEnum() = Simple2 then; end; end. QC #: Date Reported: Area: 71505 2/15/2009 RTL\Delphi\Other Classes\TStringReader/TStrngWriter Description: Steps: [QC Short Description] TStringReader.Read(buffer, index, count) does not return last character Compile and run the attached application below. See the program output indicating failure. [QC Description] TStringReader.Read(buffer, index, count) nevers returns the last character of the string. e.g.: procedure StringReaderDemo; var sr: TStringReader; ca: TCharArray; n: Integer; begin sr := TStringreader.Create('12345'); // string of 5 chars SetLength(ca, 5); // ca is big enough to hold 5 chars n := sr.Read(ca, 0, 5); // n = 4!! ca = '1234' end; QC Entry 71505 FAIL #1 n=4 FAIL #2 ca=1234 FAIL Counter=0 program BTS268104; {$APPTYPE CONSOLE} uses SysUtils, Classes; var Counter: Integer = 0; function CharArrayToStr(const A: TCharArray): String; var C: Char; begin Result := ''; for C in A do Result := Result + C; end; procedure StringReaderDemo; var sr: TStringReader; ca: TCharArray; n: Integer; S: String; begin sr := TStringreader.Create('12345'); // string of 5 chars SetLength(ca, 5); // ca is big enough to hold 5 chars n := sr.Read(ca, 0, 5); // n = 4!! ca = '1234' if (n=5) then Inc(Counter) else WriteLn('FAIL #1 n=', n); S := CharArrayToStr(ca); if S = '12345' then Inc(Counter) else WriteLn('FAIL #2 ca=', S); end; begin try StringReaderDemo; if Counter = 2 then WriteLn('PASS') else WriteLn('FAIL Counter=', Counter); except on E: Exception do WriteLn('FAIL - Exception (', E.ClassName, '/', E.Message, ')'); end; end. QC #: Date Reported: Area: 71575 2/18/2009 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Delphi 2009 literal string assigment only recognizes 88 characters Compile and run the attached application below. See the following program output indicating failure. [QC Description] The string-var Assignment with a literal string with more than 255 characters do not generate compile-time error and the run-time result is unpredictable. QC Entry 71575 FAIL Check <> sBuff Length(Check)=640 Length(sBuff)=88 Notice how the string value of sBuff is being truncated to 88 characters. QC #: Date Reported: Area: 71577 11/13/2008 8:43:54 PM IDE\ToDoList Description: Steps: ToDo list does not display todo comment if a source code is ANSI, and todo commnet contains a character outside us-ascii. Open attached project file. IDE loads Project1(.pas) file into editor. Open ToDo list. All accented character, copyright mark and DBCS characters have same problem. You will find three ToDo list. If not, check "Current project source files" in "Filter To-Do List" dialog. Especially, It is too important for DBCS user. They (and I) usually use DBCS character in ToDO comment. A ToDo item in Unit1_1252.pas in To-Do List is "An encoding is ANSI....." Double click this item. Unit1_1252.pas is loaded. You can find actual ToDo list is started with Cipyright mark. If you change the text in Unit1_1252.pas, ToDo list will display correct comment. QC #: Date Reported: 71595 2/18/2009 Area: VCL Description: Steps: [QC Short Description] Form resizing issue Create a new form. Set MaxWidth to 300 for example. Try to resize form from left side. After reaching maximum width the resizing stops but the form starts to move! [QC Description] I always see that Constraints does not apply completely to forms. I found that there is useless variable in WMGetMinMaxInfo message method of TCustomForm. The variable named FSizeChanging and used in line 5911. This variable is not used or assigned in any other place. After removing this variable from that condition in line 5911 and then replacing the new compiled Dcu, the behavior is corrected. QC Entry 71595 QC #: Date Reported: Area: 71632 2/20/2009 RTL\Delphi\File Management Description: Steps: [QC Short Description] myfile := TFileStream.Create (Filename, fmCreate OR fmShareDenyWrite) dont respect sharemode! constructor TFileStream.Create(const AFileName: string; Mode: Word; Rights: Cardinal); begin if Mode = fmCreate then begin inherited Create(FileCreate(AFileName, Rights)); ==== [QC Description] Hello Developers... PUSH PUSH TFileStream.Create(s, fmCreate OR fmShareDenyWrite ); <==== fmShareDeny* will be ignored TFileStream.Create (system.string, system.word) system.word = 16 Bit fmCreate = $FFFF fmShareDenyWrite = $20 $FFFF or $20 = $FFFF outch direct hit... How's about a TFileStream.CreateEx(s, fmCreate, fmShareDenyWrite ); <==== fmShareDeny* will be --- Some Programms look in ONE single file. One Create the file for Writing it, all others can read the file. Open new file with delph, shared mode deny WRITE , tfilestream or else... dont close file. lockfilehandle := TFileStream.Create(s, fmCreate OR fmShareDenyWrite ); <==== fmShareDeny* will be ignored Open the same file for READ only with another delphi programm... dont work... FSlockfilehandle := TFileStream.Create(Filename, fmOpenRead or fmShareDenyWrite ); <=== NO HANDLE!!!! FSlockfilehandle.Read(macbuffer^,sizeof(macbuffer^)) QC Entry 71632 QC #: Date Reported: 71676 2/22/2009 Description: Area: Compiler\Delphi\Generics Steps: [QC Short Description] E2010 Incompatible types: "array of foo" and TGenericArray<foo> (TGenericArray<T> = array of T) - save the attached file GenericsRangeCheckTestE2010.dpr or the following code - dcc32 GenericsRangeCheckTestE2010.dpr expected: it compiles actual: GenericsRangeCheckTestE2010.dpr(50) Error: E2010 Incompatible types: 'Array' and 'TGenericArray`1' GenericsRangeCheckTestE2010.dpr(70) Error: [QC Description] E2010 Incompatible types: 'Array' and 'TGenericArray`1' program GenericsRangeCheckTestE2010; It seems that for exam. {$APPTYPE CONSOLE} type TGenericArray<T> = array of T; TRangeCheckNormalClassTest = class(TObject) private function GetNormalWrongIndex(AValue: array of Integer): Integer; public procedure array of Integer NormalRangeCheckWithGenericArrayAsParam(AValue: TGenericArray<Integer>; ASingleValue: Integer); end; TRangeCheckGenericClassTest<T> = class(TObject) private function GetNormalWrongIndex(AValue: array of is equal to Integer): Integer; function GetGenericArrayWrongIndex(AValue: TGenericArray<Integer>): Integer; public procedure NormalRangeCheckWithGenericArrayAsParam(AValue: TGenericArray<Integer>; ASingleValue: TGenericArray<Integer> (TGenericArray<T> = array of T) Integer); end; function TRangeCheckNormalClassTest.GetNormalWrongIndex(AValue: array of Integer): Integer; begin Result := -1; end; procedure in a normal class, but not in a generics class or without a class. TRangeCheckNormalClassTest.NormalRangeCheckWithGenericArrayAsParam(AValue: TGenericArray<Integer>; ASingleValue: Integer); var WrongIndex: Integer; begin WrongIndex := -> see steps GetNormalWrongIndex(AValue); end; function TRangeCheckGenericClassTest<T>.GetNormalWrongIndex (AValue: array of Integer): Integer; begin Result := -1; end; function As you see in the example in the steps the code in the normal class is identical with the code in the generic class TRangeCheckGenericClassTest<T>.GetGenericArrayWrongIndex(AValue: TGenericArray<Integer>): Integer; and compiles - so there is no reason that it does not compile in a generics class or without a class. begin Result := -1; end; procedure TRangeCheckGenericClassTest<T>.NormalRangeCheckWithGenericArrayAsParam(AValue: BTW, given it would be really incompatible then I would expect TGenericArray<Integer>; ASingleValue: Integer); var WrongIndex: Integer; begin // does not work -> creates "E2010 Incompatible types: 'Array' and 'TGenericArray`1'" at compile time WrongIndex := E2010 Incompatible types: 'Array' and 'TGenericArray<Integer>' GetNormalWrongIndex(AValue); // does work WrongIndex := GetGenericArrayWrongIndex(AValue); end; function GetClasslessWrongIndex(AValue: array of Integer): Integer; begin Result := -1; end; function instead of GetClasslessGenericArrayWrongIndex(AValue: TGenericArray<Integer>): Integer; begin Result := -1; end; procedure ClasslessRangeCheckWithGenericArrayAsParam(AValue: TGenericArray<Integer>; ASingleValue: E2010 Incompatible types: 'Array' and 'TGenericArray`1' Integer); var WrongIndex: Integer; begin // does not work -> creates "E2010 Incompatible types: 'Array' and QC Entry 71676 'TGenericArray`1'" at compile time WrongIndex := GetClasslessWrongIndex(AValue); // does work WrongIndex := GetClasslessGenericArrayWrongIndex(AValue); end; begin WriteLn('PASS'); end. [Tester Recommended] QC #: Date Reported: Area: 71779 2/25/2009 Debugger\Watches Description: Steps: [QC Short Description] Watch view sometimes looses the popup menu shortcuts 1. Start an application 2. Add a new watch item to the list 3. Right click on the watch view (=> Popup menu appears with shortcuts) 4. Double click on the watch item's name to open the watch edit dialog 5. Close the dialog 6. Right click on the watch view Expected: The popup menu shortcuts are still available Actual: All shortcuts aren't there anymore and [DEL], [INS], [Ctrl+D], ... do not work anymore. [QC Description] The Watch View looses the popup menu shortcuts if you double click on the name of a watch item. QC Entry 71779 The Breakpoint view has the same problem. QC #: Date Reported: 71797 2/26/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Incorrect behavior in generics with constraints Compile the attached application below. See the following compile-time error indicating failure. [QC Description] Example: Error: E2089 Invalid typecast type TA<T: class> = class(TObject) procedure Test(A: T); end; program BTS268258; { Incorrect behavior in generics with constraints } {$APPTYPE CONSOLE} procedure TA<T>.Test(A: T); begin TObject(A) := nil; end; type TA<T: class> = class(TObject) procedure Test(A: T); end; Error: E2089 Invalid typecast Problem: It's very strange, that if i use constraint "class" on generics type parameter T, then i cant perform typecasts to TObject or any other class. I think it's incorrect behavior. Additional suggestion: It will be usefull to have a constraint like "pointer", for example: procedure TA<T>.Test(A: T); begin TObject(A) := nil; end; begin WriteLn('PASS'); { PASS on compile } end. TA<T: pointer> = ... QC Entry 71797 [Tester Recommended] QC #: Date Reported: Area: 71801 2/26/2009 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Appending a single char literal to PChar fails in Delphi 2009 See Description. [QC Description] If you compile following code: var StringPointer: PChar; Bar: string; begin StringPointer := StrNew('Foo'); Bar := StringPointer + '\'; end; it creates: Unit8.pas.32: Bar := StringPointer + '\'; 00464255 8D45F8 lea eax,[ebp-$08] 00464258 8BD3 mov edx,ebx 0046425A E85913FAFF call @UStrFromPWChar 0046425F 8B55F8 mov edx,[ebp-$08] 00464262 8D45F0 lea eax,[ebp-$10] 00464265 E82AF1F9FF call @PStrCpy 0046426A BAB4424600 mov edx,$004642b4 0046426F 8D45F0 lea eax,[ebp-$10] 00464272 B104 mov cl,$04 00464274 E8EBF0F9FF call @PStrNCat 00464279 8D55F0 lea edx,[ebp-$10] 0046427C 8D45FC lea eax,[ebp-$04] 0046427F E81414FAFF call @UStrFromString If you try to run this code it crashes when compiled with Delphi 2009. If you compile it with Delphi 2007 it works perfectly. QC Entry 71801 QC #: Date Reported: 71816 2/27/2009 Area: Compiler\Delphi\Anonymous Methods Description: Steps: [QC Short Description] Incorrect behavior anonymous methods when typecasts used Compile the attached program below. See the following compile-time error indicating failure. [QC Description] Problem: type TPredicateFunc<T> = reference to function (const Value: T): Integer; Error: E2035 Not enough actual parameters program BTS268270; TObjectPredicateFunc = TPredicateFunc<TObject>; { Incorrect behavior anonymous methods when typecasts used } TA = class(TObject) protected procedure DoTest(P: TObjectPredicateFunc); end; TB<T: class> = class(TA) public procedure Test(P: TPredicateFunc<T>); end; { TA } procedure TA.DoTest(P: TObjectPredicateFunc); begin // ... end; {$APPTYPE CONSOLE} type TPredicateFunc<T> = reference to function (const Value: T): Integer; TObjectPredicateFunc = TPredicateFunc<TObject>; TA = class(TObject) protected procedure DoTest(P: TObjectPredicateFunc); end; TB<T: class> = class(TA) public procedure Test(P: TPredicateFunc<T>); end; { TB<T> } { TA } procedure TB<T>.Test(P: TPredicateFunc<T>); begin DoTest(TObjectPredicateFunc(P)); end; Expected: Succefull compilation procedure TA.DoTest(P: TObjectPredicateFunc); begin // ... end; { TB<T> } Result: E2035 Not enough actual parameters Comment: I think it would be better if the anonymous method call required the explicit indication of brackets. In this case it would be possible to use such typecasts. QC Entry 71816 [Tester Recommended] procedure TB<T>.Test(P: TPredicateFunc<T>); begin DoTest(TObjectPredicateFunc(P)); //#1 end; begin WriteLn('PASS'); end. QC #: Date Reported: Area: 71837 2/27/2009 RTL\Delphi\Other RTL Description: Steps: Access Violation using TypInfo.GetPropList on a class involving a type derived from a generic Compile and run the attached application below. See the following program output indicating failure. FAIL EAccessViolationAccess violation at address 004123E2 in module 'BTS268376.exe'. Read of address 00000000 Commenting-out the published property, "List", will allow the program to run as expected. program BTS268376; { AV in GetPropList } {$APPTYPE CONSOLE} uses Generics.collections, TypInfo, SysUtils; {$M+} type TIntList = TList<integer>; TMyClass = class private FName: String; FIndex: Integer; FMagnitude: Real; FList: TIntList; published property Name: String read FName write FName; property Index: Integer read FIndex write FIndex; property Magnitude: Real read FMagnitude write FMagnitude; property List: TIntList read FList write FList; end; {$M-} var I: Integer; MyClass: TMyClass; PropList: TPropList; begin try I := GetPropList(PTypeInfo(TMyClass.ClassInfo), [tkInteger, tkString, tkFloat], @PropList); WriteLn('PASS - I=', I); except on E: Exception do writeln('FAIL ', E.ClassName, e.Message); end; end. QC #: Date Reported: Area: 71860 3/1/2009 Compiler\Delphi\Execution Description: Steps: [QC Short Description] Class helper with private protected call generate an [DCC Fatal Error] ...F2084 Internal Error: SY1526 Compile the below unit inside an application. expected: to compile fine actual: DCC Fatal Error //MMWIN:CLASSCOPY unit _MM_Copy_Buffer_; interface type TObjectHelper = class Helper for TObject public procedure Foo; strict protected procedure Bar; end; implementation { TObjectHelper } procedure TObjectHelper.Bar; begin //nop end; procedure TObjectHelper.Foo; begin // this error disappears when Bar becomes 'protected', 'strict private', or 'private' in stead of 'strict protected' //[DCC Fatal Error] _MM_Copy_Buffer_.pas(29): F2084 Internal Error: SY1526 Bar(); end; end. [QC Description] Code from the steps will produce this error: [DCC Fatal Error] ...F2084 Internal Error: SY1526 QC Entry 71860 [Tester Recommended] QC #: Date Reported: Area: 71863 3/1/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: AV004437D6-R00000022-0 with open constructed type as own type argument and inherited field - save the attached file OpenConstructedTypeAsOwnTypeArgumentTest.dpr or the following code - dcc32 OpenConstructedTypeAsOwnTypeArgumentTest.dpr expected: it compiles actual: OpenConstructedTypeAsOwnTypeArgumentTest.dpr(16) Fatal: F2084 Internal Error: AV004437D6R00000022-0 Some additional notes: - AV disappears if the type argument of "TAVLDaycodeExceptions<T> = class(TAVLDataCollection<" is something else then TAVLDaycodeExceptions<T> - AV disappears if a getter is used (see workaround) - it doesn't matter if the field FItems is defined in TAVLDataItem<T> or TAVLDataCollection<T> - Error Insight says "'FItems' is not a field or method identifier at line 13 (13:39)" program OpenConstructedTypeAsOwnTypeArgumentTest; {$APPTYPE CONSOLE} type TAVLDataItem<T> = class(TObject); TAVLDataCollection<T> = class(TAVLDataItem<T>) FItems: TObject; end; TAVLDaycodeExceptions<T> = class(TAVLDataCollection<TAVLDaycodeExceptions<T>>) property Exceptions: TObject read FItems; end; begin WriteLn('PASS'); end. [QC Description] It seems that inherited fields in combination with an open constructed type, which use itself as type argument, could lead to the internal error F2084 Internal Error: AV004437D6-R00000022-0 -> see steps QC Entry 71863 QC #: Date Reported: Area: 71870 3/2/2009 Compiler\Delphi\Generics Description: Steps: Unexpected compile-time error when using generic classes involving interfaces. Compile the attached application below. [Tester Recommended] See the following unexpected error at compile-time. Error: E2211 Declaration of 'GetEnumerator' differs from declaration in interface 'IEnumerable<System.Integer>' + BTS268299.dpr(15) Related member: function GetEnumerator: IEnumerator; program BTS268299; { Incorrect behavior generics when using interfaces } {$APPTYPE CONSOLE} type IEnumerator = interface end; IEnumerator<T> = interface(IEnumerator) end; IEnumerable = interface function GetEnumerator(): IEnumerator; end; IEnumerable<T> = interface(IEnumerable) function GetEnumerator(): IEnumerator<T>; end; TA = class(TInterfacedObject, IEnumerable) protected function DoGetEnumerator(): IEnumerator; virtual; function IEnumerable.GetEnumerator = DoGetEnumerator; end; TB = class(TA, IEnumerable<Integer>) public function GetEnumerator(): IEnumerator<System.Integer>; end; { TA } function TA.DoGetEnumerator: IEnumerator; begin Result := nil; end; { TB } function TB.GetEnumerator: IEnumerator<Integer>; begin Result := nil; end; begin WriteLn('PASS'); { PASS on compile } end. QC #: Date Reported: Area: 71885 3/2/2009 Compiler\Delphi\Generics Description: Steps: Internal Error C1812 compiling an application involving generics and record types. Compile the attached application below. [Tester Recommended] See the following compile-time error indicating failure. program BTS268300; { Internal Error C1812 compiling an application involving generics and record types. } {$APPTYPE CONSOLE} type TKeyValuePair<K, V> = record var Key: K; var Value: V; end; TValue = Pointer; PStringValuePair = ^TStringValuePair; TStringValuePair = TKeyValuePair<String, TValue>; function Test(p: Pointer): TStringValuePair; begin Result := PStringValuePair(p)^; end; begin WriteLn('PASS'); end. QC #: Date Reported: Area: 71999 3/6/2009 Midas\TProvider Description: Steps: TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_268383 [QC Short Description] WideStringField Data distorted through DataSetProvider [QC Description] Using Delphi 2009 Trial Version: -or1. Unzip and open the enclosed test application in Delphi 2009. Compile and run it. 2. Enter data into the fields of the upper grid. If there are two ClientDataSets connected through a DataSetProvider (The second ClientDataSet is connected to the DataSetProvider which gets its data from the first ClientDataSet) then the content of a TWideStringField gets distorted in the second ClientDataSet. 3. Double click the lower grid. 4. Check the results in the lower grid This seems to be a coarse error considering the fact that the major improvement in Delphi 2009 should be the handling of Unicode strings. (See also my screen shot about the failure, enclosed in the same zip file) The same application functions well in Delphi 7. This error of Delphi 2009 is disabling for us to upgrade. Added by Sysop <<<<<<<<<<<<<<< With 12.0.3210.17555, we still get same problem. >>>>>>>>>>>>>>> QC Entry 71999 QC #: Date Reported: Area: 72042 3/8/2009 AddOn\Interbase components Description: Steps: [QC Short Description] IBCustomdataset and its descendants treat field size of database fileds as 'size=number of characters even for non unicode character fields Please try with code like bellow with Delpphi2009 and attached sample database. put button1,ibdatabase,ibtransaction,ibquery,datasource,dbgrid on your form. procedure button1click (sender:TObject); var s:string; begin iibdatabase1.open; iibquery1.sql.add('select * from test'); ibquery1.open; s:=ibquery1.Filelds[0].Asistring; ShowMessage(s); s:=ibquery1.Filelds[1].Asistring; ShowMessage(s); datasource1.dataset:=ibquery1; dbgrid1.datasource:=datasource1; end; [QC Description] IBCustomdataset and its descendants treat field size of database fileds as 'size=number of characters even for non unicode character fields like char(n) or varchar(n) with character set sjis_0208 specified and this causes problem like below raise EIBClient Error when try to get field value from varchar field using TIBQuery or IBDataset(If the data type is char(n) inseted of varchar(n), it simply trucated (n+1)th characters on with no error.) when; size of data stored in (varchar(n) or char(n)) < (n * 2byte) and number of character in the data > n QC Entry 72042 QC #: Date Reported: Area: 72089 3/10/2009 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Generic Record with String not properly initialized Compile and run the attached application below. See the following program output indicating failure. [QC Description] Strings, Interfaces and Dynamic arrays - fields in generic records are not initialized if returned as function result. Can lead to unexpected side effects. E.g. Access violation or crash. Forum thread: https://forums.codegear.com/thread.jspa?threadID=13353&tstart=0 QC Entry 72089 FAIL #1 - Value=() FAIL Counter=110 Note that the field "s" is not seen as empty in the function "Test". program bts268374; { Generic Record with String not properly initialized } [Tester Recommended] {$APPTYPE CONSOLE} uses SysUtils; var Counter: Integer; type TTestRecord<T> = record Dummy: T; s: String; end; function Test: TTestRecord<Integer>; begin Inc(Counter, 100); if Result.s <> '' then Result.s := 'NOK' else Result.s := 'OK'; Inc(Counter, 10); end; procedure DoIt; var Value: String; begin Value := Test.s; if Value = 'OK' then Inc(Counter) else WriteLn('FAIL #1 - Value=(', Value, ')'); end; begin try DoIt; if Counter = 111 then WriteLn('PASS') else WriteLn('FAIL Counter=', Counter); except on E: Exception do WriteLn('FAIL - Exception (', E.ClassName, '/', E.Message, ')'); end; end. QC #: Date Reported: Area: 72175 3/12/2009 VCL\Additional Controls\TImage Description: Steps: [QC Short Description] Range check error in TGifImage Create a form. Drop a TImage to from. Load an animated Gif file. In FormCreate event write this code: TGifImage(Image1.Picture.Graphic).Animate:=true; From Project Options set Range Check Error to True Run project and enjoy with error. [QC Description] Enable Range Check and Overflow Check option then set Animate to true due blow code, you will get a range check error. Error location in GIFImg unit sometime is from "TransparentStretchBlt" function line 8112 and sometime from "StretchDraw" function line 8233. QC Entry 72175 QC #: Date Reported: Area: 72201 3/13/2009 Internet\XML Description: Steps: [QC Short Description] Faulty handling of FModified in XMLDoc.pas Run the attached application. Observe the caption doesn't reflect the correct XML. [QC Description] Local variable FModified is an integer that is incremented for each modification. In SaveToXMLStrings FModified is compared with FXMLStrRead to see if the xml text property should be refreshed. (FModified <> FXMLStrRead) SaveToXMLStrings sets FXMLStrRead := FModified when it is done. So FXMLStrRead variable retains the value for FModified when the xml text property was last refreshed. When you save the document to file FModified is reset to 0 and starts to count upwards again for each modification. This means that when FModified again reaches the exact same value that FXMLStrRead has, the xml property will not be refreshed in SaveToXMLStrings. QC Entry 72201 QC #: Date Reported: 72213 3/16/2009 11:26:42 AM Area: Compiler\Delphi\Language Description: Steps: Unexpected compile-time error using an enumerator in a record or class involving a managed type. (string, interface, variant, etc.) Compile the attached application below. See the following compile-time error indicating failure. [Tester Recommended] Error: E2010 Incompatible types: 'TMyRec.TEnumerator' and 'Pointer' program BTS268462; {$APPTYPE CONSOLE} uses SysUtils; type TMyRec = Record type TEnumerator = Record FField : string; // using any managed type (string, interface, // dynamic array, variant) lead to compilation error function MoveNext : Boolean; function GetCurrent : Integer; property Current : Integer Read GetCurrent; end; function GetEnumerator : TEnumerator; end; function TMyRec.TEnumerator.MoveNext: Boolean; begin Result := False; end; function TMyRec.TEnumerator.GetCurrent: Integer; begin Result := 0; end; function TMyRec.GetEnumerator: TEnumerator; begin Result.FField := 'Hello'; end; procedure DoIt; Var mr : TMyRec; I : Integer; begin for I In mr Do Writeln(I); WriteLn('PASS'); end; begin try DoIt; except on E: Exception do WriteLn('FAIL - Exception=', E.ClassName, '/', E.Message); end; end. QC #: Date Reported: 72246 3/16/2009 Area: Database\ADO Description: Steps: [QC Short Description] Ignored decimals (e.g. 1.23->123) with ADO Dataset + MSSQL + Client side cursor TDBXWeaverBugsSuite.Native.Db.Test.exe connection=mssqlconnection -s:TestRaid_268648 -or- [QC Description] Posting a dataset ignores decimals. 1,234 is stored as 1234 !!! See sample project for Bug #1: Update and Post NVARCHAR field to '' (not null!) becomes NULL in database (this is another bug) Bug #2: Update and Post Money (Currency) field ignores decimal separator: 4.321 becomes 4321 in database!!!!! See attached project - set input local to Hungarian (or any other language with ',' as decimal separator) - creates a table on mssql with money field - open table through a dataset with client size cursor - Edit dataset, update money field to 4.321 and Post record. - there will be 4321 in database Bug #3: if DecimalSeparator is set to '.' -> Exception "1,234" is not a valid BCD value Environment - SQL Server 2005 (9.0.4035) - Delphi? 2009 Version 12.0.3210.17555 (D2009 Enterprise with Update 1 and Update 2) - Ado Dataset, Client side cursor - Windows XP Prof English - Input Local: Hungarian (or any language where decimal separator is ',') QC Entry 72246 QC #: Date Reported: 72260 3/17/2009 9:37:41 AM Area: Compiler\Delphi\Generics Description: Steps: E2008 Incompatible types when trying to use a inherited generic field in the property read specifier - save the attached file GenericsInheritedFieldTest.dpr or the following code - dcc32 GenericsInheritedFieldTest.dpr It seems that it is not possible to use an inherited generic field in a property read specifier, because this leads to the error E2008 Incompatible types. expected: it compiles actual: GenericsInheritedFieldTest.dpr(17) Error: E2008 Incompatible types Means using ... read <inherited field> doesn't work - change line 17 from TChildClass<T> = class(TParentClass<T>) property Items: TObjectList<T> read <inherited field>; end; property Exceptions: TObjectList<T> read FItems; to -> see steps property Exceptions: TObjectList<T> read GetItems; [Tester Recommended] (...read FItems -> ...read GetItems) - compile and see it compiles which implies that the types are compatible program GenericsInheritedFieldTest; {$APPTYPE CONSOLE} type TObjectList<T> = class(TObject); TAVLDataCollection<T> = class(TObject) protected FItems: TObjectList<T>; end; TAVLDaycodeExceptions<T> = class(TAVLDataCollection<T>) //GetItems is only required for the workaround and not to repeat the problem function GetItems: TObjectList<T>; public property Exceptions: TObjectList<T> read FItems; end; function TAVLDaycodeExceptions<T>.GetItems: TObjectList<T>; begin Result := FItems; end; begin WriteLn('PASS'); end. QC #: Date Reported: Area: 72297 3/17/2009 VCL\Additional Controls Description: [QC Short Description] Request Property: TButtonedEdit.LeftButton\RightButton.Hint [QC Description] Request Property: TButtonedEdit.LeftButton\RightButton.Hint QC Entry 72297 Steps: QC #: Date Reported: Area: 72305 3/18/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] WinInet.InternetQueryOption returns rubbish under D2009 Use the following code to retrieve proxy server information under Delphi 2009: function GetProxyInformationW: WideString; var ProxyInfo: PInternetProxyInfo; Len: LongWord; begin Result := ''; Len := 4096; GetMem(ProxyInfo, Len); try if InternetQueryOptionW(nil, INTERNET_OPTION_PROXY, ProxyInfo, Len) then begin if ProxyInfo^.dwAccessType = INTERNET_OPEN_TYPE_PROXY then begin Result := ProxyInfo^.lpszProxy; end; end; finally FreeMem(ProxyInfo); end; end; The result is (in hex code): 3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F893F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3E [QC Description] Under Delphi 2009 the unicode function InternetQueryOption[=InternetQueryOptionW] returns non-ascii content instead of proxy information. Same code under Delphi 2007 works fine. QC Entry 72305 (JJS: Not expected in 14.0.3447.21911) QC #: Date Reported: Area: 72333 3/19/2009 Midas\TClientDataSet Description: Steps: [QC Short Description] TAggregateField and TAggregate not working correct on strings TDBXWeaverBugsSuite.Native.Db.Test.exe connection=ibconnection -s:TestRaid_268650 -or[QC Description] Using TAggregateField or TAggregate to calculate aggreate function on TStringField or TWideStringField returns Put a button on a form and attach this to its click handler. a fake value. Different result happen when using string and wide string fields but both are incorrect. Probably an unicode issue. procedure TForm1.Button1Click(Sender: TObject); const FldName = 'SOME_TEXT'; Added by Sysop from Comments var <<<<<<< cds: TClientDataSet; In DBClient.pas on line 4203. Instead aggr: TAggregate; Result := string(PChar(Buffer)); begin it should by cds:= TClientDataSet.Create(Self); Result := string(PAnsiChar(Buffer)); try >>>>>>> cds.FieldDefs.Add(FldName, ftString, 100); QC Entry 72333 cds.CreateDataSet; cds.AppendRecord(['hello']); cds.AppendRecord(['my']); cds.AppendRecord(['friend']); cds.AggregatesActive:= True; aggr:= cds.Aggregates.Add; try aggr.Expression:= 'Max(' + FldName + ')'; aggr.Active:= True; ShowMessage(aggr.Value); // shows a fake value finally FreeAndNil(aggr); end; finally FreeAndNil(cds); end; end; You can try also with a persistent ClientDataSet and persistent string field and aggregate field. Same result. QC #: Date Reported: Area: 72439 3/24/2009 RTL\Delphi\Memory, Pointer, Address Description: Steps: [QC Short Description] TLS Memory Leak (JJS: See attachments and comments) 1) Create an empty Delphi Dll with the IDE DLL wizard (no additional code needs to be added) [QC Description] When a Delphi DLL is loaded from an application, the application will loose memory every time it creates a new thread. 2) Load the Dll from Step 1) once dynamically with LoadLibrary('dllname') 3) Create and terminate threads in an endless loop M. B. made a detail analysis and found out that in SysInit._GetTLS unnecessarily the TLS is initialized another time and not freed anymore. 4) The memory consumption rises because in SysInit._GetTLS unnecessarily the TLS is initialized another time and not freed anymore See his post: https://forums.embarcadero.com/thread.jspa?threadID=14160 5) See https://forums.embarcadero.com/thread.jspa?threadID=14160 (JJS: See comments for Moritz Beutel's analysis) QC Entry 72439 Sample code of the main application: type TMyThread = class(TThread) procedure Execute; override; end; procedure TMyThread.Execute; begin end; var MyThread : TMyThread; begin LoadLibrary('mydelphi.dll'); while true do begin MyThread := TMyThread.Create(false); MyThread.WaitFor(); MyThread.Free; end; end. QC #: Date Reported: Area: 72462 3/24/2009 RTL\Delphi\Date - Time Description: Steps: [QC Short Description] VarToSQLTimeStamp fails to convert varUString value Compile and run the attached application below. See the following program output indicating failure. [QC Description] VarToSQLTimeStamp fails to convert varUString value with 'Invalid variant type conversion' exception. To resolve the issue just add varUString to the second IF: function VarToSQLTimeStamp(const aValue: Variant): TSQLTimeStamp; begin FAIL - Exception Error ClassName=EVariantError Message=Invalid variant type conversion if TVarData(aValue).VType in [varNULL, varEMPTY] then Result := NullSqlTimeStamp else if (TVarData(aValue).VType = varString) or (TVarData(aValue).VType = varOleStr) {***} or (TVarData(aValue).VType = varUString) {***} then Result := GetSQLTimeStampFromStringVariant(aValue) else if (TVarData(aValue).VType = varDouble) or (TVarData(aValue).VType = varDate) then Result := DateTimeToSqlTimeStamp(TDateTime(aValue)) else if (TVarData(aValue).VType = SQLTimeStampVariantType.VarType) then Result := TSQLTimeStampVarData(aValue).VDateTime.DateTime else Raise EVariantError.Create(SInvalidVarCast) end; QC Entry 72462 program BTS268663; { VarToSQLTimeStamp fails to convert varUString value } {$APPTYPE CONSOLE} uses SysUtils, SqlTimSt; procedure DoIt; var rTS: TSQLTimeStamp; V: Variant; begin V := DateTimeToStr(Now()); rTS := VarToSQLTimeStamp(V); WriteLn('PASS'); end; begin try DoIt; 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: 72558 3/29/2009 RTL\Delphi\RTL Exceptions Description: Steps: [QC Short Description] Unloading DLL breaks exception handling in host application Demonstrated in the attached projects. [QC Description] When a Delphi host application raises an exception, and then unloads a Delphi DLL within a nested exception handling clause (Try ... Finally ... Except), the exception object gets "hijacked" and destroyed by the DLL unloading procedure, causing the host application to crash. (JJS: The crash described does not occur when using the IDE. The executable should be run on its own or in the IDE via "Run without Debugging") For example, the following program crashes at step 4 with an access violation: Try 1. Load the DLL; Try 2. Raise Exception.Create('Ooops!'); Finally 3. Unload the DLL; End Except On E:Exception do 4. Print Exception message; End The problem seems to be caused by the "exception stack cleaning" code in the Halt0 procedure of the System.pas. This code blindly acquires and frees all outstanding exceptions. When executed during the DLL unloading, it frees the exception object prematurely, leaving the host application in step 4 accessing a piece of freed memory. The suspect code segment is also referred to in QC#72439. The problem only happens when building DLL and host application with packages. QC Entry 72558 QC #: Date Reported: Area: 72574 3/30/2009 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] $R directive inside Package source file causes mess in project manager window - begin new package project and save it. - create new resource file like (ShowMeBug.res) for example, and save it in the project directory. - from the project menu select "View Source". - in the package source file and after the line {$R *.res} enter a new line and type this line {$R ShowMeBug.res} letter by letter and don't use copy/paste. - save the project. - close the project. - reopen the project. - open the "Project Manager" window, expand the "contains" directory, you will see random parts of the resource file name added to the "contains" like this: S Sh Sho Show ShowM ShowMe ShowMeB ShowMeBu ShowMeBug ShowMeBug.r ShowMeBug.re ShowMeBug.res [QC Description] You will notice this bug in Delphi2006, Delphi2007 and Delphi2009, when using $R directive inside the source file of the Package Projects, just after the line {$R *.res}, like this {$R ShowMeBug.res}, then when you reopen the project you will notice random parts of this new resource file name added to the Contains directory like this: S Sh Sho Show ShowM ShowMe ShowMeB ShowMeBu ShowMeBug ShowMeBug.r ShowMeBug.re ShowMeBug.res though the project still can be compiled! QC Entry 72574 QC #: Date Reported: Area: 72709 4/3/2009 IDE\Project Management Description: Steps: [QC Short Description] MS Build - Post Build Save Malfunction 1. Create a project. 2. Add some Post Build commands. eg copy "$(PROJECTDIR)\Einstellungen.ini" "$(OUTPUTDIR)" copy "$(PROJECTDIR)\Report\Ausdruck.rav" "$(OUTPUTDIR)" copy "$(PROJECTDIR) \Report\Ausdruck.ini" "$(OUTPUTDIR)" 3. Save everything and close the IDE 4. Reopen that project and open the Build dilaog. Current Result (Malfunction): copy "$(PROJECTDIR)\Einstellungen.ini" "$(OUTPUTDIR)"copy"$(PROJECTDIR)\Report\Ausdruck.rav" "$(OUTPUTDIR)"copy"$(PROJECTDIR) \Report\Ausdruck.ini" "$(OUTPUTDIR)" [QC Description] When adding 2 or more Post Build commands, separated by the ENTER key (e.g. copy ...), it works fine. BUT when saving everything, closing the IDE and reopening that project. The Post Build commands are not separated anymore by the ENTER key. They are in one single line. Furthermore some SPACES are missing. ==>Execution of the Post Build fails. QC Entry 72709 QC #: Date Reported: Area: 72735 4/3/2009 Compiler\Delphi\Language Description: Steps: [QC Short Description] E2004 Identifier redeclared: '.2' with class helper with array of string Compile the attached application below. See the following unexpected compile-time error indicating failure. [QC Description] This is a copy from Newsgroup ..delphi.language.delphi.general Title: D2009 Class helper + array of string https://forums.codegear.com/thread.jspa?messageID=98305&tstart=0#98305 I've tried to add the following Unit to an existing package,complied it and got an Error: E2004 Identifier re-defined:'.2' It's only happend when I'm using several methods with string arrays within the helper class. An answer in the newsgroup: "Repeats also in a non package project." QC Entry 72735 [Tester Recommended] uBTS268840a.pas(19) Error: E2004 Identifier redeclared: '.2' program BTS268840; { E2004 Identifier redeclared: '.2' with class helper with array of string } {$APPTYPE CONSOLE} uses uBTS268840a; begin WriteLn('PASS'); { PASS on compile } end. unit uBTS268840a; interface uses Classes, uBTS268840b; type TTest = class(TComponent) public constructor create(aOwner:TComponent);override; end; implementation { TTest } constructor TTest.create(aOwner: TComponent); // <-Error begin inherited; end; end. unit uBTS268840b; interface uses Classes, SysUtils; Type TComponentClassHelper = class helper for TComponent procedure a1(s1:array of string); procedure a2(s2:array of string); end; implementation { TComponentClassHelper } procedure TComponentClassHelper.a1(s1: array of string); begin end; procedure TComponentClassHelper.a2(s2: array of string); begin end; end. QC #: Date Reported: Area: 72747 4/4/2009 Midas Description: Steps: [QC Short Description] TClientDataset server side TWideStringField curruption TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_269109 -or- [QC Description] In D2009, we have a multitier application where we use TDatasetProvider to exchange data to a client-side TClientDataset. The server datasets is of different types, e.g. TADOQuery, TADOTable, but also of type TClientDataset (we build datasets in code server side and exchange it with the client). If he server side data set is of type TClientDataset there are problems with unicode strings. See the attached application The problem occurs when a TWideStringField is used in the server side TClientDataset. The unicode string is broken when sent from the server to the client. I believe it happens in the routine that builds the data packet on the server side. <<<< Added by Sysop This issue seems to be related to QC#71999. >>>> QC Entry 72747 QC #: Date Reported: Area: 72754 4/4/2009 VCL\Action Classes Description: Steps: [QC Short Description] TPopupActionBar Style bug Open C++ Builder 2009 (update 1) Place a TPopupActionBar in a form and change the Style property to Default. Run program. added by Ssyop <<<<<<<< ... change the Style property to Default should be ... change the Style property to Standard >>>>>>>> [QC Description] In C++ Builder 2009 (update 1) id you place a TPopupActionBar in a form and change the Style property other than Platform Default or XP Style, when you run the program you get an exception EStringListError (List index out of bounds (-1). QC Entry 72754 QC #: Date Reported: Area: 72779 4/5/2009 VCL\Core VCL Classes\TWinControl Description: Steps: [QC Short Description] TForm.AutoSize does not work properly 1. Create a VCL Application 2. Set AutoSize property of Form1 to True. 3. Place a Button, a TOpenPictureDialog and TImage on TForm1. 4. Set AutoSize property of Image1 to True. 4. Write an Event Handler of the Button as below if OpenPictureDialog1.Execute then begin Image1.Picture.LoadFromFile (OpenPictureDialog1.Filename); end; 5. Run Application, Push Button and Load an Images. [QC Description] When A TImage(AutoSize=True) is placed On TForm(AutoSize=True) and the TImage loads a Bitmap, the TForm does not chage its Size. QC Entry 72779 QC #: Date Reported: Area: 72822 4/7/2009 VCL\Graphics Description: Steps: [QC Short Description] TGIFImage.Assign doesn't copy AnimationSpeed property 1. Create new application 2. Use GIFImg unit 3. Drop TImage on the form 4. Drop TButton on the form 5. In Button1 OnClick handler add code like this: var TestGIF: TGIFImage; begin TestGIF := TGIFImage.Create; try TestGIF.LoadFromFile('any animated GIF'); TestGIF.Animate := True; TestGIF.AnimationSpeed := 500; Image1.Picture.Assign(ResGIF); finally TestGIF.Free; end; 6. Changing value of TestGIF.AnimationSpeed doesn't affect actual animation speed in Image1 [QC Description] TGIFImage.Assign doesn't copy AnimationSpeed property. This also applies to Delphi 2007. QC Entry 72822 QC #: Date Reported: Area: 72842 4/8/2009 VCL Description: Steps: [QC Short Description] Deleting items in TValueListEditor causes Index out of bounds 1. Add TValueListEditor 2. Select KeyOptions-KeyDelete=True 3. Run 4. Press CTRL-DEL once or twice. 5. That's it [QC Description] When TValueListEditor.KeyOptions property has KeyDelete=True and list of values is empty, if you try to delete an item using CTRL-DEL it causes error Index out of bounds (sometimes you have to press it twice to make it appear). Correct behaviour would be to just ignore it. QC Entry 72842 QC #: Date Reported: Area: 72913 4/11/2009 RTL\Delphi\Other Classes\TStreamReader/TStreamWriter Description: Steps: [QC Short Description] TStreamReader does not change the encoding if created with a certain constructor Compile and run the attached application below. See the following program output indicating failure. [QC Description] If TStreamReader is created with both an Encoding and DetectBOM = TRUE it fails to change FEncoding to the encoding detected from BOM. FAIL Value=#$FEFF (JJS: Also seen in 14.0.3387.20524) The bug is in: constructor TStreamReader.Create(Stream: TStream; Encoding: TEncoding; DetectBOM: Boolean; BufferSize: Integer); begin inherited Create; program BTS268941; { TStreamReader does not change the encoding if created with a certain constructor } FBufferedData := TStringBuilder.Create; {$APPTYPE CONSOLE} FEncoding := Encoding; FBufferSize := BufferSize; FNoDataInStream := False; FStream := Stream; FOwnsStream := False; if DetectBom then {FillBuffer(Encoding, True);} // change to // ==> FillBuffer(FEncoding, True); end; QC Entry 72913 uses SysUtils, Classes; procedure DoIt; var S : TMemoryStream; W : TStreamWriter; R : TStreamReader; BOM : TBytes; EuroSign : Char; Value: String; begin EuroSign := #$20AC; S := TMemoryStream.Create; try BOM := TEncoding.UTF8.GetPreamble; S.Write(BOM[0], Length(BOM)); W := TStreamWriter.Create(S, TEncoding.UTF8); try W.WriteLine(EuroSign); finally W.Free; end; S.Seek(0, soBeginning); R := TStreamReader.Create(S, TEncoding.Default, TRUE, 1024); try Value := R.ReadLine; if Value[1] = EuroSign then WriteLn('PASS') else WriteLn('FAIL Value=#$', IntToHex(Ord(Value[1]), 4)); finally R.Free; end; finally S.Free; end; end; begin try DoIt; 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: 72926 4/12/2009 AddOn\TChart\TChart Description: Steps: [QC Short Description] Freeze when TeeChart height is extreme small. [QC Description] Add a lineSeries and Chart Align set to alClient, run the program and the form size change small (upper) by mouse then freeze window. QC Entry 72926 1. New VCL Form Application. 2. Add TeeChart on form. 3. Chart Align set to alClient and add a line series. (See following code) 4. Run. 5. Reduce the form vertically by the mouse to become chart height almost 0. 6. Freeze. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, TeeProcs, TeEngine, Chart, Series; type TForm1 = class(TForm) Chart1: TChart; procedure FormCreate(Sender: TObject); private public end; var Form1: TForm1; Series1: TLineSeries; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin Chart1.Align := alClient; Series1 := TLineSeries.Create(Self); Series1.ParentChart := Chart1; Series1.VertAxis := aLeftAxis; Series1.Active := true; Series1.Clear; Series1.AddXY(1, 1); Series1.AddXY(2, 2); end; end. QC #: Date Reported: Area: 72930 4/12/2009 IDE\Code Editor Description: Steps: [QC Short Description] Crash Delphi 2006 and Up 1. Open attached project in Delphi. 2. Compiling the project. The compilation should be successful. 3. In the .dpr, between the begin and end statements, write: [QC Description] I was found and localized bug Delphi. This bug consistently observed in all Delphi versions starting with Delphi 2006 and above. It also confirmed that problems with a few more people in discussing it at one of the forums. In my project, and this bug was observed at the time of compilation. This text has been translated using google-translator, so sorry for any inaccuracies. QC Entry 72930 VectorCross( 4. Wait for parameter insight tooltip to appear. 5. Write "v1" and "," // exp: Second parameter in the tooltip will become bold. // act: IDE hangs. Note: If you replace the line in Geometry.pas: TmtNormalf = type TmtPoint3f; with TmtNormalf = TmtPoint3f; the problem no longer occurs. QC #: Date Reported: Area: 72978 4/14/2009 AddOn\Interbase components Description: Steps: [QC Short Description] IBSQL TIBOutputDelimitedFile output is wrong Any use of the TIBOutputDelimitedFile will show the problem. Suggested fix: procedure TIBOutputDelimitedFile.ReadyFile; var b: UTF8String; // added i: Integer; st: String; begin if FColDelimiter = '' then FColDelimiter := TAB; if FRowDelimiter = '' then FRowDelimiter := CRLF; FFile := TFileStream.Create [QC Description] (FFilename, fmCreate or fmShareDenyWrite); if FOutputTitles then begin for i := 0 to Columns.Count - 1 do if i Both TIBOutputDelimitedFile.ReadyFile and TIBOutputDelimitedFile.WriteColumns do not consider that the local = 0 then st := String(Columns[i].Data.aliasname) else st := st + FColDelimiter + String(Columns string buffer is now unicode. They both need UTF8String or TEncoding conversions before being written. [i].Data.aliasname); st := st + FRowDelimiter; b := st; // added FFile.Write(b[1], Length(b)); // changed end; end; function TIBOutputDelimitedFile.WriteColumns: Boolean; var b: UTF8String; // added i: Integer; st: string; begin The current code uses Length(st) so only half the actual string is written. result := False; if Assigned(FFile) then begin for i := 0 to Columns.Count - 1 do begin if i > 0 then st := st + QC Entry 72978 FColDelimiter; st := st + StripString(Columns[i].AsString, FColDelimiter + FRowDelimiter); end; st := st + FRowDelimiter; b := st; // added Result := FFile.Write(b[1], Length(b)) = Length(b); // changed end end; QC #: Date Reported: Area: 72985 4/14/2009 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] VarDataFromStr calls _VarFromLStr, not _VarFromUStr [QC Description] In the Variants unit, the method TCustomVariantType.VarDataFromStr calls _VarFromLStr (which works on AnsiString), not _VarFromUStr (which works on UnicodeString). This is a narrowing conversion, and an unnecessary copy as well. It seems that VarDataFromStr should call _VarFromUStr, and a new method, _VarDataFromLStr should be added (this would call _VarFromLStr). QC Entry 72985 QC #: Date Reported: Area: 73018 4/15/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Incorrect declaration of QueryServiceStatusEx in WinSvc.pas [QC Description] The last parameter of QueryServiceStatusEx function "pcbBytesNeeded" should be of type DWORD instead of LPDWORD QC Entry 73018 QC #: Date Reported: Area: 73047 4/16/2009 Modeling\Audits Description: Steps: [QC Short Description] Possibly wrong warning about uninitialized global var 1. create some application as follows: Unit QATest; interface procedure DoIt; implementation var myglobgalvar:TObject; procedure DoIt; begin myglobalvar.Free; end; initialization myglobalvar:=TObject.Create; end. 2. enable modeling support and run QA audits 3. see it complain that myglobalvar never gets initialized [QC Description] QA audits warns me about one global variable in a unit which is uninitialized. It's a integer and in the initialization section of this unit it gets initialized. The only thing I could think about is if another unit uses this one and could have access to the var before the initialization section of the unit is run. Can this be? If not this check isn't yet intelligent enough in my eyes. QC Entry 73047 QC #: Date Reported: Area: 73072 4/17/2009 IDE\Refactoring\Change Parameters Description: Steps: [QC Short Description] Unnecessary translation in DE version of "Change Parameters" refactoring - start Delphi 2009 - copy the following procedure into the code of a console application for instance procedure TestChangeParams(P1: Int64; var P2: Int64; out P3: Int64; const P4: Int64); begin end; - put the mouse at TestChangeParams, open the popup menu and call "Refactor"\"Parameter aendern" (english: "Change params") - see there is for exam. an entry for the P4 parameter in the parameter list and it's type "const" (and not "Konst") - press the "Hinzufuegen" (english: "Add") button - have a look at the bottom of the dialog at the "Parametertyp" (english: "Parameter Type") groupbox expected: Value | Var | Out | Const actual: Wert | Var | Aus | Konst (see image ChangeParams1.png) - have a look at the top of the dialog at the caption above the listview expected: Uebereinstimmende Ergebnisse: actual: UebereinstimmendeErgebnisse: (missing space between Uebereinstimmende and Ergebnisse; see purple line on image ChangeParams1.png) - enter a parameter name (P5) and data type and select "Wert" (english: "Value") as parameter type - press OK - have a look at the parameter list again and see that the type is "value" and not "Wert" (see image ChangeParams2.png) [QC Description] I recently used the "Change Parameters" refactoring in the german version and have seen that the parameter type is translated in the "Add Parameter"/"Edit Parameter" dialog. In the english version the values for "Parameter Type" are Value | Var | Out | Const and in the german version it is translated to Wert | Var | Aus | Konst which is nonsense and differs from the parameter type names in the main "Change Parameters" dialog. BTW, there seems to be a missing space in the translation of "Matching Results" in the "Add Parameter" dialog - the text is obviously "UebereinstimmendeErgebnisse" and not "...de Ergebnisse". -> see steps and images QC Entry 73072 QC #: Date Reported: 73085 11/12/2008 9:53:39 AM Area: Compiler\Delphi\Language Description: Steps: When "TYPEDADDRESS OFF" is in effect, a record involving a inlined function in a unit produces an unexpected "Incompatible Types" error when used with a dereferenced pointer. Compile the attached application below. See the following compile-time errors for the lines marked #1 and #2 indicating failure. [Tester Recommended] Error: E2008 Incompatible types Error: E2008 Incompatible types Lines #1 and #2, refer to the record method defined on line #3 in the unit. program BTS252135b; { type error with inlined function of dereferenced record } {$APPTYPE CONSOLE} uses uBTS252135; {$TYPEDADDRESS OFF} var Foo: TMyRec; Bar: PMyRec; begin Bar := @Foo; if Foo.Value then WriteLn('property'); if Foo.GetValue() then WriteLn('function'); if Bar.Value then //#1// WriteLn('^property'); //[DCC Error]: E2008 Incompatible types if Bar.GetValue() then //#2// WriteLn('^function'); WriteLn('PASS'); end. unit uBTS252135b; interface type PMyRec = ^TMyRec; TMyRec = packed record function GetValue(): Boolean; inline; //#3// property Value: Boolean read GetValue; end; implementation function TMyRec.GetValue(): Boolean; begin Result := True; end; end. QC #: Date Reported: 73088 4/18/2009 Area: Compiler\Delphi\Language Description: Steps: [QC Short Description] nested type visibility issue Compile the attached application below. See the following compiler output indicating failure. [QC Description] See steps Some observations: - it works fine in Delphi 2007 - it works if you move the code in unit 3 to unit 2 - the latter case even works if you change 'protected' to 'strict protected' QC Entry 73088 [Tester Recommended] Error: E2362 Cannot access protected symbol TOne.TMyType ------8<-------unit uBTS269051a; interface uses uBTS269051b; type TTwo = class(TOne) private FX: TOne.TMyType; // <-- E2362 Cannot access protected symbol TOne.TMyType end; implementation end. -------->8-------------unit uBTS269051b; interface type TOne = class protected type TMyType = integer; end; implementation end. -------------8<---------program BTS269051; { nested type visibility issue } {$APPTYPE CONSOLE} uses uBTS269051a; begin WriteLn('PASS'); { PAss on compile } end. QC #: Date Reported: Area: 73100 4/18/2009 Compiler\Delphi\Interfaces Description: Steps: REGRESSION FROM D2009 UPDATE 3 Compile the attached application below in the IDE. (JJS: Does not seem to happen using the command-line compiler) [QC Short Description] Interface typecast causes internal compiler error [QC Description] Simple typecast on an interface causes compiler to misbehave - internal error occurs. See steps to reproduce. QC Entry 73100 See the following compile-time error indicating failure. [DCC Fatal Error] Unit1.pas(46): F2084 Internal Error: AV218BFD78-R219AD2CC-0 unit Unit1; interface (JJS: Interferes with compiling the JVCL from the JEDI project in the IDE.) uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} type IMyIntf = interface end; TMyClass = class(TInterfacedObject, IMyIntf) end; procedure TForm1.FormCreate(Sender: TObject); var l: TList; intf: IMyIntf; begin l:= TList.Create(); intf:= TMyClass.Create(); l.Add( TObject(intf) ); // remove this line to eliminate the error l.Free( ) end; <<<------ [DCC Fatal Error] Unit1.pas(46): F2084 Internal Error: AV218BF89C-R219AC2CC-0 end. QC #: Date Reported: Area: 73109 4/19/2009 IDE\Search Description: Steps: [QC Short Description] String trunction in "Find in files" in german and japanese version 1. install Weaver with german language 2. open search/find in files (german equivalent) 3. see "Verzeichnis" overwriting the border [QC Description] The german and japanese versions of Weaver have a small problem in the Find in files dialogue: the string Verzeichnis (directory in english) is right aligned but in german and japanese overwrites the border of the frame it is in. QC Entry 73109 //Masahiro Arai File: app\ed\SrchDlg.dfm Now all customized layout in language edition in this form have been reset QC #: Date Reported: Area: 73110 4/19/2009 IDE\Search\Find Description: Steps: [QC Short Description] String truncation and missing translation in "Find" in japanese and german version Modified steps (original below): - start the japanese or german Weaver IDE - create a new VCL Application for instance and switch to the code editor of the main form - call menu [Search | Find] or press Ctrl+F (the search bar should now appear at the bottom of the editor) - have a look at first checkbox (case) expected: string is not truncated actual: string is truncated (see 001.gif for japanese and ModelessSearchDE1.png [red line] for german version) - click into (focus) search combobox after clicked code editor - have a look at the second checkbox (whole words) expected: string is translated actual: string is not translated (see 002.gif for japanese and ModelessSearchDE1.png [purple line] for german version) - click again into the code editor and see the "whole words" string is translated //--- from here only confirmed for DE version so far - have a look at the second checkbox (whole words) expected: string is translated and not truncated actual: string is translated, but truncated (see ModelessSearchDE2.png [red behind lime line]) - search for something that exists and have a look at the "x matches found" string expected: string is translated actual: string is not translated (see ModelessSearchDE2.png [purple line]) //--- Original steps: In japanese environment of Weaver. 1.[Search | Find] (Ctrl+F) Case Checkbox truncated. 2.Click search combobox after clicked code editor. Please see atachement. [QC Description] There are truncated strings and missing translation in the japanese and german version of "Find". -> see steps QC Entry 73110 QC #: Date Reported: Area: 73123 4/19/2009 IDE Description: Steps: [QC Short Description] Unite terms of "Bookmarks" (Localization of Japanese) 1.Show Code editor. 2.Right-Click(show context-menu). EXP: "toggle Bookmark" -> "bukkuma-ku no kirikae" (Japanese Roman) "go to Bookmark" -> "shiori he idou" (Japanese Roman) ACT: "bukkuma-ku no kirikae" (Japanese Roman) "bukkuma-ku he idou" (Japanese Roman) or "shiori no kirikae" (Japanese Roman) [QC Description] Unite terms of "Bookmarks" (Localization of Japanese). QC Entry 73123 "shiori he idou" (Japanese Roman) QC #: Date Reported: Area: 73124 4/19/2009 IDE Description: Steps: [QC Short Description] Unite terms of "Whole words" (Localization of Japanese) Please see Attachements. Find.gif [Search | Find...] "Whole words" -> "Tango Tanni de Kensaku" (Japanese Roman) Find in Files.gif [Search | Find in Files] "Whole words only" -> "wa-do Kensaku" (Japanese Roman) Replace.gif [Search | Replace...] "Whole words only" -> "wa-do Kensaku" (Japanese Roman) [QC Description] Unite terms of "Whole words" (Localization of Japanese) QC Entry 73124 QC #: Date Reported: 73125 4/19/2009 Area: Compiler\Delphi Description: Steps: [QC Short Description] Wrong SizeOf calculation for generic types The following code prints two times FAIL instead of PASS: [QC Description] See 'Steps' for code that contains two cases of wrong SizeOf calculation for generic types. This results in wrong memory allocation and access violations. program BTS269052; { Wrong SizeOf calculation for generic types } {$APPTYPE CONSOLE} In the first case (TFoo), the size of static arrays is always set to exactly 4 bytes. This also happens if the type is a class, instead of a record. In the second case (TBar), the size of the variant part is calculated incorrectly. In both cases, the offset used in code generation for accessing variable B is wrong as well. QC Entry 73125 var Counter: Integer = 0; type TFoo<T> = packed record A: array [1..3] of T; B: T; end; TBar<T> = packed record case Integer of 0: (A: Word); 1: (B: Word); end; begin if SizeOf(TFoo<Word>) = 4 * SizeOf(Word) then Inc(Counter) else WriteLn('FAIL #1'); if SizeOf(TBar<Boolean>) = SizeOf(Word) then Inc(Counter) else WriteLn('FAIL #2'); if Counter = 2 then WriteLn('PASS'); end. QC #: Date Reported: Area: 73144 4/20/2009 IDE Description: Steps: [QC Short Description] String truncation and missing translation in Options-Dialog in japanese version 1.[Tools | Options...] 2.Select "Editor options" and "HTML Options" Please see attachements. [QC Description] String truncation and missing translation in Options-Dialog in japanese version. A part of check boxes shifts. QC Entry 73144 QC #: Date Reported: Area: 73153 4/20/2009 Database\TField\TStringField Description: Steps: [QC Short Description] TStringField.GetValue can return garbage data 1. Open the attached project 2. Execute it Expected: A new line (CRLF) should be written to the console window Actual: Chr($80) [Euro sign in my case] is written all over the screen and the application crashes. [QC Description] The TStringField.GetValue method can return garbage data if the field's size is larger than "dsMaxStringSize". In that case the PBuf variable points to the already released string (SetLength(Temp, StrLen(..)) reallocates the string buffer) and if you have FastMM with memory corruption detection active, you will get a $80808080... string as result. QC Entry 73153 QC #: Date Reported: 73156 4/20/2009 Area: RTL Description: Steps: [QC Short Description] Update CompilerVersion, RTLVersion, and VERxxx for Weaver. Compile and run the attached application below. Also needs to change for Error Insight used by the IDE. FAIL #1 FAIL #2 FAIL - Counter=0 [QC Description] The system unit variables CompilerVersion, RTLVersion and the condition define VERxxx are at values appropriate for D2009 and not Weaver. program BTS269046; { Update CompilerVersion, RTLVersion, and VERxxx for Weaver } ie. 20.0 and not 21.0 for CompilerVersion and RTLVersion and VER200 and not VER210 {$APPTYPE CONSOLE} This ommission breaks version dependant code. (From Michael Trubetskov on the Weaver Field Test) QC Entry 73156 [Tester Recommended] var Counter: Integer = 0; begin {$IFDEF VER210} Inc(Counter); {$ENDIF} if CompilerVersion >= 21.0 then Inc(Counter) else WriteLn('FAIL #1'); if RTLVersion >= 21.0 then Inc(Counter) else WriteLn('FAIL #2'); if Counter = 3 then WriteLn('PASS') else WriteLn('FAIL - Counter=', Counter); end. QC #: Date Reported: Area: 73161 4/20/2009 IDE\Search\Find Description: Steps: [QC Short Description] SHIFT+F3 omits every second identifier on a line 0. start Weaver 1. paste the following code into a new console application 2. press CTRL+F 3. enter "X" in the combobox 4. press ENTER (now the first X ["X: Integer"] should be marked) 5. press F3 until you are at "WriteLn(X)" and notice that no X is omitted 6. press SHIFT+F3 until you are at the beginning expected: every X will be selected actual: on the lines "X := X + 1" and "X := X + X ... X + 1" only every second X will be selected 7. repeat 5. with the "Search down" button in the search panel and see that every X will be selected (equal to 5. and as expected) 8. repeat 6. with the "Search up" button in the search panel and see that every X will be selected (that is different from 6., but as expected) program Project28; {$APPTYPE CONSOLE} var X: Integer; begin X := 1; X := X + 1; X := X + 1; X := X + X + X + X + X + X + 1; X := X + 1; WriteLn(X); end. [QC Description] It seems that SHIFT+F3 in contrast to the "Search up" button omits every second identifier on a line. -> see steps Was confirmed in FT newsgroup - see "SHIFT+F3 omits every second identifier on a line?" in .weaver.ide.editor https://forums.codegear.com/thread.jspa?messageID=106281&tstart=0#106281 QC Entry 73161 QC #: Date Reported: Area: 73210 4/21/2009 IDE\Search\Find Description: Steps: [QC Short Description] Unnecessary second confirmation dialog when search string was not found 1. Open Forms.pas 2. Go to the end of the unit 3. Press Ctrl+F 4. Type DefocusControl into the edit control 5. Press Enter 6. Dialog "Search match not found" appears. Click on "No". 7. Another dialog "Search string not found" appears. [QC Description] When you search for DefocusControl at the end of Forms.pas, you will be asked you if you want to restart from the beginning. If you click no, you will get another dialog that the search string was not found. This second dialog is not really needed, because the wrap-around dialog already tells you, that the search match was not found. QC Entry 73210 QC #: Date Reported: Area: 73219 4/21/2009 IDE\Code Editor Description: Steps: [QC Short Description] Search Bar background color is not consistent Set clBtnFace to $FF00FF and fire up the search bar. [QC Description] The screenshot says it all. QC Entry 73219 QC #: Date Reported: Area: 73225 4/21/2009 ActiveX Description: Steps: [QC Short Description] DRInterop (cmd line utility not working) - open the command prompt by for example using the 'Open the RAD STudion Command Prompt' option - type 'DRInterop' + Enter - the error message apears [QC Description] Running DRInterop.exe from the command line with any parameters, fails with '.. Coinitialize has not been called ..' error. QC Entry 73225 QC #: Date Reported: Area: 73248 4/22/2009 AddOn\Interbase components Description: Steps: [QC Short Description] IBSQLMonitor Char/AnsiChar buffer mismatch Any use of TSQLMonitor will demonstrate that the text in FBuffer is incorrect. [QC Description] The use of FBufferSize and FBuffer in TWriterThread.WriteToBuffer and TReaderThread.ReadSQLData does not handle wide characters properly. My solution was: 1) Change all PAnsiChar to PByte in IBSQLMonitor.pas 2) Change TWriterThread.WriteToBuffer to use a new cMaxChars local constant procedure TWriterThread.WriteToBuffer; const cMaxChars = cMaxBufferSize div SizeOf(Char); // tpm var i, len: Integer; Text : String; begin Lock; try { If there are no monitors throw out the message The alternative is to have messages queue up until a monitor is ready.} if FMonitorCount^ = 0 then FMsgs.Remove(FMsgs[0]) else begin Text := TTraceObject(FMsgs[0]).FMsg; i := 1; len := Length(Text); while (len > 0) do begin BeginWrite; try FTraceDataType^ := Integer(TTraceObject(FMsgs[0]).FDataType); FTimeStamp^ := TTraceObject(FMsgs[0]).FTimeStamp; FBufferSize^ := Min(len, cMaxChars) * SizeOf(Char); // tpm Move(Text[i], FBuffer[0], FBufferSize^); Inc(i, cMaxChars); // tpm Dec(len, cMaxChars); // tpm finally EndWrite; end; end; FMsgs.Remove(FMsgs[0]); end; finally Unlock; end; end; 3) Change TReaderThread.ReadSQLData to use SizeOf(Char) as follows: procedure TReaderThread.ReadSQLData; begin st.FMsg := ''; {do not localize} BeginRead; if not bDone then try SetString(st.FMsg, PChar(FBuffer), FBufferSize^ div SizeOf(Char)); // tpm st.FDataType := TTraceFlag(FTraceDataType^); st.FTimeStamp := TDateTime(FTimeStamp^); finally EndRead; end; end; QC Entry 73248 QC #: Date Reported: Area: 73286 4/23/2009 RTL\Delphi\Other Classes Description: Steps: [QC Short Description] TStringStream.ReadString causes AV if it was created from TBytes Compile and run the attached application below. See the following program output indicating failure. [QC Description] In last D2009 with update 2, TStringStream.ReadString causes access violation if it was created from TBytes array. And it does not move the Position, but that was reported already by Francois GAILLARD (68582). FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 0041552B in module 'BTS269134.exe'. Read of address 00000000 QC Entry 73286 (JJS: Fix not seen in 14.0.3461.22311) program BTS269134; { TStringStream.ReadString causes AV if it was created from TBytes } {$APPTYPE CONSOLE} uses SysUtils, Classes; procedure DoTest; var s1 : string; Bytes : TBytes; SS : TStringStream; begin SetLength(Bytes, 2); Bytes[0] := $31; Bytes[1] := $32; SS := TStringStream.Create(Bytes); s1 := ss.ReadString(1); //<-- AV appears here 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: 73314 4/23/2009 IDE\Code Editor Description: Steps: [QC Short Description] Undo causes crash Create a new Unit. write in the implementation section one procedure. Examples: unit Unit1; interface implementation procedure One; var vList: TList; begin vList := TList.Create; end; end. Select the line after the var statement, hit the tab key and delete the block with the backspace key. Press Ctrl+Z, and the error occurs. Sometimes happens with Crtl + Shift + Z. [QC Description] When using the new feature of block tab indented QC Entry 73314 QC #: Date Reported: 73324 4/24/2009 Area: Compiler\Delphi Description: Steps: [QC Short Description] Internal Error + IDE Crash using contraints on generics Steps to reproduce : - Compile the following Unit. - If compiling from the Delphi IDE, keep smiling while you watch the IDE crash and lose all your unsaved work (note that it may require another compilation to crash the IDE). - Sometimes simply editing similar code to this one will crash the IDE (I guess code completion can involve compiling code in the background ?) UNIT YetAnotherGenericCrash; // Internal error GPFC00000FD0048C48C-0 + IDE Crash INTERFACE IMPLEMENTATION TYPE TFoo<T> = CLASS PROCEDURE UseLess (CONST A : T); END; TBar<T ; U : TFoo<T>> = CLASS a : boolean; PROCEDURE What (); END; PROCEDURE TFoo<T>.UseLess (CONST A : T); BEGIN END; PROCEDURE TBar<T; U>.What (); BEGIN a := true; END; END. [QC Description] Short summary : While using contraints on generics, one can very easily get - Internal error when compiliing from the command line. - IDE crash if compiling from the IDE. See steps to reproduce. QC Entry 73324 (JJS: Seen in Tiburon Update 3, not in Weaver 14.0.3403.20859) QC #: Date Reported: 73340 4/24/2009 Area: VCL Description: Steps: [QC Short Description] TTrayIcon Error Here's some steps: 1. Add a TTrayIcon to a form 2. Set the visible property to true 3. Click the windows start menu button 4. Hold down Ctrl+Shift while right clicking on an empty spot in the right part of the start menu. (This is if you haven't switched your start menu to classic mode) 5. Click Exit Explorer on the popup menu 6. Start the appliation --> It will crash with an out of resources exception and close. By. Sebastian Zierer [QC Description] By including a TTrayIcon in the project and try to run it, shows the following two errors: --------------------------Debugger Exception Notification --------------------------- Project Project1.exe raised exception class EOutOfResources with message 'Cannot create shell notification icon'. --------------------------Break Continue Help ----------------------------------------------------Debugger Exception Notification --------------------------Project Project1.exe raised exception class EReadError with message 'Error reading TrayIcon1.Visible: Cannot create shell notification icon'. --------------------------Break Continue Help --------------------------QC Entry 73340 QC #: Date Reported: Area: 73349 4/25/2009 IDE\Tool Palette Description: Steps: [QC Short Description] Tool Palette is flickering 1) Install as many components you can 2) Try to scroll the tool palette up/down using the scroll bar or the mouse wheel [QC Description] If you scroll up/down the tool palette using the scroll bar or the mouse wheel you'll notice that it's flickering a lot. QC Entry 73349 QC #: Date Reported: 73372 4/25/2009 Area: RTL Description: Steps: [QC Short Description] readln fails when reading integer variables Compile the attached application below. The file BTS269174.ini holds the following text value. 12 [QC Description] Readln fails in the scenario below, if i is defined as longword or int64. It works OK with byte, word or integer. I have not tested with further types. This has worked in all versions prior to D2009. QC Entry 73372 Run the application and see the following program output indicating failure. FAIL - Exception Error ClassName=EInOutError Message=Invalid numeric input program BTS269174; { Readln fails to read integer values } {$APPTYPE CONSOLE} uses SysUtils; procedure DoIt; var f: Textfile; i: longword; begin AssignFile(f,'bts269174.ini'); Reset(f); Readln(f,i); if I = 12 then WriteLn('PASS') else WriteLn('FAIL I=', I); CloseFile(f); end; begin try DoIt; except on E: Exception do begin WriteLn('FAIL - Exception Error'); WriteLn(' ClassName=', E.ClassName); WriteLn(' Message=', E.Message); end; end; end. QC #: Date Reported: 73410 4/27/2009 Description: [QC Short Description] SOAPAttach.pas is not unicode ready [QC Description] In unit SOAPAttach.pas you can read procedure TAggregatedStream.AddStream(AValue: string); var AStream: TMemoryStream; begin AStream := TMemoryStream.Create; AStream.Write(AValue[1], Length(AValue)); AddStream(AStream, soOwned); end; Of course AStream.Write(AValue[1], Length(AValue)) is wrong since AValue is a unicode string. Same thing in procedure ReadContent(ADestStream: TStream); var SLine: string; begin SLine := ReadLine(MimeStream.SourceStream); while (MimeStream.SourceStream.Position <= MimeStream.SourceStream.Size) and (not SameMimeBoundary(SLine, MimeBoundary)) do begin ADestStream.Write(SLine[1], Length(SLine)); SLine := ReadLine(MimeStream.SourceStream); if Length(SLine) = 0 then Raise Exception.Create(SMimeReadError); end; FLastMimeBoundary := sLine; Area: SOAP\Components Steps: end; The line ADestStream.Write(SLine[1], Length(SLine)); is wrong QC Entry 73410 QC #: Date Reported: Area: 73420 4/27/2009 IDE\Open Tools API Description: Steps: [QC Short Description] IOTABreakpoint40.Destruct does not remove a breakpoint - start Delphi 2009 - open, build and install the attached package BreakpointTest.dpk - open the attached project BreakpointSampleProject.dpr - show the Breakpoint List (View | Debug Windows | Breakpoints or CTRL+ALT+B) - put a breakpoint on line 6 ("Writeln...") and you should now see a breakpoint for this line in the breakpoint list with the Action "Break" - call Help | Breakpoint Test expected: the breakpoint would be removed actual: the breakpoint is still there and the Action is now empty (was "Break" and the action change is a feature of this test and no bug - it just shows that the wizard can do something with the breakpoint) [QC Description] I tried to remove a breakpoint with the OTA by calling IOTABreakpoint40.Destruct, but that does just nothing. The comment above the Destruct method is { Call this to destroy the object } It doesn't say explicitly that it removes the breakpoint, but on the other hand I don't see any real reason why an OTA user should destroy the breakpoint. (...interface...ref-counted...) A more straightforward way to remove a breakpoint would a "RemoveBreakpoint" method in IOTADebuggerServices. -> see steps QC Entry 73420 QC #: Date Reported: 73520 4/30/2009 Area: Database\TParams Description: Steps: [QC Short Description] Bug in TParam.GetAsAnsiString TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_269223 or [QC Description] After assigning a UTF8 encoded string to a TParam object, the string becomes corrupted. See attached project TParam.GetAsAnsiString consists of the following code: function TParam.GetAsAnsiString: AnsiString; begin if VarType(FData) = vtAnsiString then Result := AnsiString(FData) else Result := AnsiString(GetAsString); end; Since FData is declared as a Variant instead of a TVarRec, the first condition is never met. This results in UTF8 encoding being lost. To correct this issue, change the code to: function TParam.GetAsAnsiString: AnsiString; begin if VarType(FData) = varString then // Changed vtAnsiString to varString Result := AnsiString(FData) else Result := AnsiString(GetAsString); end; QC Entry 73520 QC #: Date Reported: Area: 73538 5/1/2009 Compiler\Delphi\BASM Description: Steps: [QC Short Description] Compiler expects wrong memory operand for PMAXUB instruction Compile the attached application below. See the following compile-time error for the statement on the line marked #2. [QC Description] The XMM version of the PMAXUB instruction (66 0F DE /r PMAXUB xmm1, xmm2/m128) can take a 128-bit memory operand (DQWORD) as second parameter. However, the compiler insists on a 64-bit memory (QWORD) operand instead. Error: E2116 Invalid combination of opcode and operands Also see that the preceding statement on the line marked #1 does not produce this error message. Reference: See that the explicit modifier used in the line marked #3 works around the issue. Intel® 64 and IA-32 Architectures, Software Developer’s Manual, Volume 2B: Instruction Set Reference, N-Z, September 2008 QC Entry 73538 program BTS269233; { Compiler expects wrong memory operand for PMAXUB instruction } [Tester Recommended] {$APPTYPE CONSOLE} uses SysUtils; procedure DoIt; var i64:int64; i128:packed array [0..15] of byte; asm jmp @ovr //jump over instructions as memory operands may not be 16-byte aligned pmaxub xmm1, i64 //this compiles but should not //#1 pmaxub xmm1, i128 //this does not compile but should //#2 pmaxub xmm1, qword ptr i128 //this is a work-around //#3 //Disassembly shows: //660FDE4DF8 pmaxub xmm1,dqword ptr [ebp-$08] //660FDE4DE8 pmaxub xmm1,dqword ptr [ebp-$18] @ovr: end; begin try DoIt; WriteLn('PASS'); { PASS on compile } 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: 73539 5/1/2009 RTL\Delphi\File Management Description: Steps: [QC Short Description] FileAge does not work for open files with share_exclusive (Plattform>=W2K) Compile and run the attached program below. See the following program output indicating failure. [QC Description] The FileAge function does not work for files that are opened in SHARE_EXCLUSIVE mode (like the pagefile.sys). FileAge('C:\pagefile.sys') always return -1 instead of the FileDate. (Same problem as in FileExists) FAIL program BTS269238; { FileAge does not work for open files with share_exclusive (Plattform>=W2K) } (Same problem in Delphi 2009) QC Entry 73539 {$APPTYPE CONSOLE} uses SysUtils; procedure DoIt; begin if FileAge('C:\pagefile.sys') <>-1 then WriteLn('PASS') else WriteLn('FAIL'); end; begin try DoIt; 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: 73551 5/1/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Cannot cast to a generic type parameter restricted as class Compile the attached application below. See the following compile-time error indicating failure. [QC Description] The compile currently doesn't permit casting an object to a generic type parameter that is restricted as class: // ----type TFoo<T: class> = class function Get: T; end; function TFoo<T>.Get: T; begin Result := T (TObject.Create); // E2089 Invalid typecast end; // ----IMHO, this is basic functionality. As an example, consider the following attempt to reduce boilerplate code: // ----type TOwnedCollection <TItem: TCollectionItem> = class (TOwnedCollection) private function GetItem(Index: Integer): TItem; procedure SetItem(Index: Integer; Value: TItem); public constructor Create (AOwner: TPersistent); function Add: TItem; function GetEnumerator: TCollectionEnumerator <TItem>; function Insert (Index: Integer): TItem; property Items[Index: Integer]: TItem read GetItem write SetItem; default; end; // ----How would you implement TOwnedCollection<TItem>.GetItem? Of course, the straightforward approach is // ----function TOwnedCollection<TItem>.GetItem(Index: Integer): TItem; begin Result := TItem (inherited GetItem (Index)); end; // ----- Error: E2089 Invalid typecast program BTS269236; { Cannot cast to a generic type parameter restricted as class } {$APPTYPE CONSOLE} uses SysUtils; type TFoo<T: class> = class function Get: T; end; function TFoo<T>.Get: T; begin Result := T (TObject.Create); // E2089 Invalid typecast end; begin WriteLn('PASS'); { PASS on compile } end. I ended up with this ugly workaround: // ----function TOwnedCollection<TItem>.GetItem(Index: Integer): TItem; var ResultAddr: PPointer; begin ResultAddr := @Result; TCollectionItem (ResultAddr^) := inherited GetItem (Index); end; // ----QC Entry 73551 [Tester Recommended] QC #: Date Reported: Area: 73565 5/2/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Compiler permits call of generic method without an object instance Compile and run the attached application below. See the following program output indicating failure. [QC Description] The following code shouldn't compile at all: // ----program qc73565; FAIL - Compile-time error expected FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 00408DC9 in module 'BTS269293.exe'. Write of address 0040B942 type TFoo = class procedure VirtualProcedure; virtual; procedure GenericProcedure <T>; end; program BTS269293; { Compiler permits call of generic method without an object instance } {##COMERR: Error: E2076 This form of method call only allowed for class methods} procedure TFoo.GenericProcedure<T>; begin VirtualProcedure; end; procedure TFoo.VirtualProcedure; begin end; begin TFoo.GenericProcedure <Integer>; // <-end. // ----Unfortunately, it does compile without errors or warnings. Of course, the resulting program crashes at runtime. QC Entry 73565 [Tester Recommended] {$APPTYPE CONSOLE} uses SysUtils; type TFoo = class procedure VirtualProcedure; virtual; procedure GenericProcedure <T>; end; procedure TFoo.GenericProcedure<T>; begin VirtualProcedure; end; procedure TFoo.VirtualProcedure; begin end; procedure DoIt; begin WriteLn('FAIL - Compile-time error expected'); TFoo.GenericProcedure <Integer>; end; begin try DoIt; 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: 73576 5/2/2009 VCL\Ribbon Controls Description: Steps: [QC Short Description] Using wheel mouse when collapsed group is show cause an exception Run Ribbon Demo Click on Control Types or example Resize until on group is collapsed Click on the collapsed group to show it Use wheel mouse UP and then Down [QC Description] Using wheel mouse when collapsed group is show cause an exception. The wheel mouse has to be desactivated like office 2007 QC Entry 73576 QC #: Date Reported: Area: 73587 5/3/2009 Compiler\Delphi\BASM Description: Steps: [QC Short Description] MOVBE instruction not supported Compile the attached application below. See the following compile-time errors indicating failure. [QC Description] The MOVBE instruction mnemonic is not supported by the assembler/compiler. The missing instruction is: MOVBE - Move Data After Swapping Bytes 0F 38 F0 /r MOVBE r16, m16 0F 38 F0 /r MOVBE r32, m32 0F 38 F1 /r MOVBE m16, r16 0F 38 F1 /r MOVBE m32, r32 Error: E2003 Undeclared identifier: 'movbe' Error: E2031 Label expected Error: E2031 Label expected Error: E2031 Label expected program BTS269293; { MOVBE instruction not supported } Reference: Intel® 64 and IA-32 Architectures, Software Developer’s Manual, Volume 2A: Instruction Set Reference, A-M, September 2008 QC Entry 73587 {$APPTYPE CONSOLE} [Tester Recommended] procedure TestMOVBE; var dwd:longword; wd:word; asm movbe eax, dwd movbe dwd, edx movbe cx, wd movbe wd, ax end; uses SysUtils; begin try TestMOVBE; WriteLn('PASS'); 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: 73650 5/5/2009 RTL\Delphi\WinAPI Description: [QC Short Description] ActiveX.pas: Incorrect declaration of parameter iid in IRpcChannelBuffer.GetBuffer [QC Description] ActiveX.pas: Incorrect declaration of parameter iid in IRpcChannelBuffer.GetBuffer. There should be the "const" modifier to pass the iid parameter by reference, not by value. Steps: QC Entry 73650 ActiveX.pas: Incorrect declaration of parameter iid in IRpcChannelBuffer.GetBuffer QC #: Date Reported: Area: 73686 5/6/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Generic static class function damages the stack if built without optimizations Compile and run the attached application below. See the following program output indicating failure. [QC Description] The following code results in invalid codegen: // ----{$OPTIMIZATION OFF} FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 0040499C in module 'qc73686.exe'. Read of address FFFFFFF9 type TFoo = class public class function Get<T>: Integer; static; end; program BTS269330; class function TFoo.Get<T>: Integer; begin Result := 1; end; uses SysUtils; procedure DamageStackAndCrash; var ManagedVariable: String; begin TFoo.Get <Integer>; TFoo.Get <Extended>; end; // ----The compiler generates two instantiations for TFoo.Get<>. The first instantiation, TFoo.Get<Integer>, has a stack frame: // ----qc73686.dpr.12: begin 00403CDC 55 push ebp 00403CDD 8BEC mov ebp,esp 00403CDF 51 push ecx qc73686.dpr.13: Result := 1; 00403CE0 C745FC01000000 mov [ebp-$04],$00000001 qc73686.dpr.14: end; 00403CE7 8B45FC mov eax,[ebp-$04] 00403CEA 59 pop ecx 00403CEB 5D pop ebp 00403CEC C3 ret // ----The second instantiation doesn't have a stack frame, but the function apparently thinks it has one: // ----qc73686.dpr.13: Result := 1; 00403CF0 C745FC01000000 mov [ebp-$04],$00000001 qc73686.dpr.14: end; 00403CF7 8B45FC mov eax,[ebp-$04] 00403CFA C3 ret // ----- {$APPTYPE CONSOLE} {$OPTIMIZATION OFF} type TFoo = class public class function Get<T>: Integer; static; end; class function TFoo.Get<T>: Integer; begin Result := 1; end; procedure DamageStackAndCrash; var ManagedVariable: String; begin TFoo.Get <Integer>; TFoo.Get <Extended>; end; begin try DamageStackAndCrash; WriteLn('PASS'); except on E: Exception do begin WriteLn('FAIL - Exception Error'); WriteLn(' ClassName=', E.ClassName); WriteLn(' Message=', E.Message); end; end; end. The attached sample demonstrates how easily this stack damaging can lead to a crash. QC Entry 73686 [Tester Recommended] QC #: Date Reported: Area: 73698 5/6/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Incorrect size of generic static multi-dimensional array type const IHigh1 = 5-1; IHigh2 = 4-1; IHigh3 = 3-1; type TStatic3dArray<T> = array[0..IHigh1, 0..IHigh2, 0..IHigh3]of T; TStatic3dArrayDouble = array[0..IHigh1, 0..IHigh2, 0..IHigh3]of Double; procedure TForm1.Button1Click (Sender: TObject); procedure Log(const Fmt: string; const Args: array of const); begin Memo1.Lines.Add [QC Description] (Format(Fmt, Args)); end; var old3d : TStatic3dArrayDouble; new3d : TStatic3dArray<Double>; pp : Pointer; ip : Define a generic type of a static multi-dimensional array, the Compiler only counts how many elements in it: Integer absolute pp; sz : Integer; begin pp := @new3d[0, 0]; sz := SizeOf(new3d); Log('%s', ['[Generic]']); Log type TStatic2dArrayOf<T> = array[1..5, 1..2]of T; (#9'Full Size:'#9'[%d]'#9'SizeOf(V[0]): %d'#9'SizeOf(V[0,0]): %d', [sz, SizeOf(new3d[0]), SizeOf(new3d[0,0])]); var myArray: TStatic2dArrayOf<Double>; Log(#9'Length(V): %d'#9'Length(V[0]): %d'#9'Length(V[0,0]): %d', [Length(new3d), Length(new3d[0]), Length { -> SizeOf(myArray) = 10 ( 5 * 2 ) } (new3d[0,0])]); Log(#9'Expected Stack:'#9'%p .. %.8x', // it's wrong number [pp, ip + sz - 1]); Log(#9'Actual Stack:'#9'%p .. %.8x', [pp, Integer(@new3d[IHigh1, IHigh2, IHigh3]) + SizeOf(new3d[0,0,0])-1 ]); pp := @old3d As we know, SizeOf(aNDArrVar)=Length(aNDArrVar)*SizeOf(aNDArrVar[0]), but the Compiler is always thinking [0, 0]; sz := SizeOf(old3d); Log('%s', ['[Traditional]']); Log(#9'Full Size:'#9'[%d]'#9'SizeOf(V[0]): %d'#9'SizeOf(V SizeOf(aNDArrVar[0]) is only count of its elements while aNDArrVar is a static N-D array variable and N is more [0,0]): %d', [sz, SizeOf(old3d[0]), SizeOf(old3d[0,0])]); Log(#9'Length(V): %d'#9'Length(V[0]): %d'#9'Length(V than 1. [0,0]): %d', [Length(old3d), Length(old3d[0]), Length(old3d[0,0])]); Log(#9'Expected Stack:'#9'%p .. %.8x', [pp, So the size reserved by the Compiler is not enough for a static N-D array variable actually needs, it's a serious ip + sz - 1]); Log(#9'Actual Stack:'#9'%p .. %.8x', [pp, Integer(@old3d[IHigh1, IHigh2, IHigh3]) + SizeOf(old3d bug. [0,0,0])-1 ]); end; ============================== the result of the "reproduce steps" shows the bug: ------------------------------------------------[Generic] Full Size: [60] SizeOf(V[0]): 12 SizeOf(V[0,0]): 3 Length(V): 5 Length(V[0]): 4 Length(V[0,0]): 3 Expected Stack: 0012F3BC .. 0012F3F7 Actual Stack: 0012F3BC .. 0012F40C [Traditional] Full Size: [480] SizeOf(V[0]): 96 SizeOf(V[0,0]): 24 Length(V): 5 Length(V[0]): 4 Length(V[0,0]): 3 Expected Stack: 0012F3F8 .. 0012F5D7 Actual Stack: 0012F3F8 .. 0012F5D7 ============================== We see the SizeOf(TStatic3dArray<Double>) is 60(=5*4*3) not 480(=60*8). And it reserved 60 bytes in Stack not 480. But actually it needs 480 bytes, so it may overwrite virtual memory block not reserved for it and cause problem. BTW, when I tried to put the type declaration into local scope of the procedure like: procedure TForm1.Button1Click(Sender: TObject); type TStatic2dArray<T> = array[0..IHigh1, 0..IHigh2, 0..IHigh3]of T; TStatic2dArrayDouble = array[0..IHigh1, 0..IHigh2, 0..IHigh3]of Double; .... It caused Internal Error URW1135. QC Entry 73698 QC #: Date Reported: Area: 73742 5/8/2009 Compiler\Delphi\BASM Description: Steps: [QC Short Description] SSE4 pmovzxbw doesn't generate proper opcode in some case (JJS: See attached test case.) // Sample code - NOP are there only for emphasis [QC Description] program Project4; writing {$APPTYPE CONSOLE} pmovzxbw xmm1, [eax+esi] uses SysUtils; generate proper opcode begin try { TODO -oUser -cConsole Main : Insert code here } asm nop pmovzxbw xmm1, [eax+esi] // Put a breakpoint here, then CTRL+ALT+C to pop the CPU view nop pmovzxbw xmm1, [esi+eax] nop end; except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. writing pmovzxbw xmm1, [esi+eax] doesn't See steps QC Entry 73742 Here is the generated opcode Project4.dpr.12: nop 0040B194 90 nop Project4.dpr.13: pmovzxbw xmm1, [eax+esi] 0040B195 660F38300C06 pmovzxbw xmm1,dqword ptr [esi+eax] <---- Good Project4.dpr.14: nop 0040B19B 90 nop Project4.dpr.15: pmovzxbw xmm1, [esi+eax] 0040B19C 660F38300C30 pmovzxbw xmm1,dqword ptr [eax+esi] <---- Good 0040B1A2 0000 add [eax],al <---- Added junk that cause crash 0040B1A4 0000 add [eax],al 0040B1A6 0000 add [eax],al 0040B1A8 0000 add [eax],al 0040B1AA 0000 add [eax],al 0040B1AC 0000 add [eax],al 0040B1AE 0000 add [eax],al 0040B1B0 0000 add [eax],al 0040B1B2 0000 add [eax],al 0040B1B4 0000 add [eax],al 0040B1B6 0000 add [eax],al 0040B1B8 0101 add [ecx],eax 0040B1BA 0101 add [ecx],eax 0040B1BC 0000 add [eax],al 0040B1BE 0000 add [eax],al 0040B1C0 0000 add [eax],al 0040B1C2 0000 add [eax],al 0040B1C4 0000 add [eax],al 0040B1C6 0000 add [eax],al 0040B1C8 0000 add [eax],al 0040B1CA 0000 add [eax],al Project4.dpr.16: nop 0040B1CC 90 nop QC #: Date Reported: Area: 73777 5/10/2009 IDE\Tool Palette Description: Steps: [QC Short Description] [Missing Translation] Rename category - start the german Weaver version - show the Tool Palette - show the popup menu for the Tool Palette and have a look at the third menu item expected: Kategorie "<category name>" umbenennen actual: Rename "<category name>" Category [QC Description] The new rename function in the Tool Palette is not translated in the german version. -> see steps QC Entry 73777 QC #: Date Reported: Area: 73807 5/11/2009 VCL\Graphics Description: Steps: [QC Short Description] Access violation when loading PNG [QC Description] Create a new VCL form, drop a TImage on it, and double click the "Picture" line in the Object inspector for the TImage to open the Picture Editor. In the picture editor click the "Load..." button and select the attached PNG image in the attached zip. The image shows up correctly in the "Load Picture" dialog's preview panel, but when you actually try to load it it gives the error: "Access violation at address 5000456F in module 'rtl120.bpl'. Read of address 0018401F." I have madExcept installed, which takes over exception handling in the IDE as well, and it shows that the crash occurs in pngimage.DecompressZLIB. QC Entry 73807 QC #: Date Reported: Area: 73867 5/12/2009 RTL\Delphi\Other Classes Description: Steps: [QC Short Description] Remove method of TDictionary and TObjectDictionary<,> incorrect in Generics.Collections. Compile and run the attached application. See the following program output indicating failure. [QC Description] the result of the steps example using TDictionary where K is the expected value and V is the actual value Removed: ( K = 1, V = 1 ) Removed: ( K = 2, V = 6 ) <== it's wrong! Removed: ( K = 3, V = 3 ) Removed: ( K = 4, V = 4 ) Removed: ( K = 5, V = 5 ) Removed: ( K = 6, V = 6 ) FAIL - TDictionary.Remove Error Expected Item=2 Actual Item=6 program BTS269410; { Removal in Generics.Collections.TObjectDictionary<,> incorrect } so a HashTable like TObjectDictionary <T, TObject>.Create([doOwnsValues]); often raise exceptions, because the object which alreay has been destroyed before, is being free again. {$APPTYPE CONSOLE} QC Entry 73867 uses SysUtils, Generics.Collections; [Tester Recommended] type TMyClass = class Tag: Integer; procedure DoIt; procedure OnNotify(Sender: TObject; const Item: String; Action: TCollectionNotification); end; var Counter: Integer = 0; const ITimes = 6; procedure TMyClass.DoIt; var I: Integer; begin with TDictionary<Integer,string>.Create do try for I := 1 to ITimes do Add(I, IntToStr(I)); OnValueNotify := OnNotify; for I := 1 to ITimes do begin Tag := I; Remove(I); end; finally Free; end; end; procedure TMyClass.OnNotify(Sender: TObject; const Item: string; Action: TCollectionNotification); begin // WriteLn(Format('Removed: ( K = %d, V = %s )', [Tag, Item])); if IntToStr(Tag) = Item then Inc(Counter) else begin WriteLn('FAIL - TDictionary.Remove Error'); WriteLn(' Expected Item=', Tag); WriteLn(' Actual Item=', Item); end; if Counter = ITimes then WriteLn('PASS'); end; var MyClass: TMyClass; begin try MyClass := TMyClass.Create; MyClass.DoIt; 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: 73988 5/16/2009 VCL\Win 32 Controls\THeaderControl Description: Steps: [QC Short Description] Setting AllowDrag to false in OnSectionDrag corrupts Sections order Create a new VCL forms project. Drop a THeadercontrol on the form, double-click on it to call up the sections collection editor, add several sections and set their Text property. Set the headercontrols DragReorder property to true. Add a handler for the controls OnSectionDrag event and add the following code to the handler: [QC Description] AllowDrag := false; Build and run the project. Drag one of the header sections to a new position. - expected: the Reordering sections in a header control by dragging (DragReorder property set to true) fires the OnSectionDrag sections stay in the old order after the mouse button has been released. - actual: the sections are reordered. event when the mouse button goes up again. The event has an AllowDrag parameter that can be set to false to The deeper problem is that the header controls Sections collection still lists the sections in the original order. abort the drag operation. Doing that does not work properly: the drag seems to still succeed (the header sections Extract the test project from the attached ZIP archive, build and run and follow the instructions on screen to see are shown in the new order) but the controls internal Sections collection is left in the old order. this. The TCustomHeaderControl.CNNotify method fires the OnSectionDrag event when it gets the See steps for details. HDN_ENDDRAG notification. It records the returned value of AllowDrag in an internal field but does *not* set QC Entry 73988 the message.result to a value <> 0 to indicate to the OS that the drag should be aborted. Instead it is probably intended to rely on what the SDK docs call "manual reordering": the applications code keeps track of the header sections and their order itself and tells the control the order to user after the drag is done. In another part of the CNNotify hander the VCL does this: NM_RELEASEDCAPTURE: if FSectionDragged then DoSectionEndDrag; The control sends this notification after the drag has ended. FSectionDragged is the field that stores the AllowDrag value from the event handler. If it was set to false the code that is supposed to sync the Sections collection with the control is never called. QC #: Date Reported: 73989 5/16/2009 Area: Compiler Description: Steps: [QC Short Description] type AnsiString(CP_xxx) does not work correctly with "Make Project" 1. Open the attached project 2. Do a "Build Project" 3. Execute the application 4. Everything works 5. Do a "Make Project" (to recompile the *.dpr file) 6. Execute the application 7. The asserion suddenly fails. Expected: Unit2.OemString should work if you use "Make Project". Actual: Unit2.OemString is degenerated to an AnsiString(CP_ACP) if you do not rebuild your project. [QC Description] If the type AnsiString(CP_OEMCP) is declared in a different unit and you use "Make Project" instead of "Build Project" the "CP_OEMCP" is lost and the normal AnsiString(CP_ACP) is used in typecasts. This bug is also in Delphi 2009 (RTM, Update 1, 2 and 3) QC Entry 73989 (JJS: See comments) (DLW: See comments) [Tester Recommended] QC #: Date Reported: Area: 73991 5/16/2009 Midas\TClientDataSet Description: Steps: [QC Short Description] Memory leak in 2 cases for TClientDataSet run the project close the form you will have 2 uknown memory leaks. 1 for Aggregators: if one is set and active (designtime), it causes a memory leak. if Active := false; then no memory leak. ofcourse to work with it, it needs to be Active := true; 1 for defaultexpression: notice that test field has a defaultexpression (0). if u remove this value, it will be ok, putting it back and u will have a memory leak. notice that there is 1 more on-purpose leak you can ignore it. read here for more information https://forums.codegear.com/thread.jspa? threadID=17320&tstart=0 D2009 update 2. [QC Description] Added by Sysop <<<< This issue seems to be same as QC#70409(RAID#267615). >>>> QC Entry 73991 QC #: Date Reported: Area: 73995 5/16/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] [3417] Code Formatter: No menu item It was in the CodeFormatter requirements. http://radblog.codegear.net/wiki/index.php?title=Source_Code_Formatter see Design Overview "Worst use cases". We have now problems with files outside project [QC Description] I noticed that the Formatter can only work on pas files in a project. Otherwise there is no item in the menu. e.g. load Math.pas unit with Open File and right click in the editor window --> no menu item QC Entry 73995 [vk] Formatting files not in the project fixed in rev.23158 all other - 23191 refixed: rev.23211 [vk]All is OK for Delphi, but the same bug occures now in cpp [vk] refixed - in the trunk rev.24349 in the branch - rev.24350 QC #: Date Reported: 74014 5/18/2009 Area: Compiler Description: Steps: [QC Short Description] $METHODINFO caused bogus W1035 warning on class functions unit test; type {$METHODINFO ON} TTest = class public class function Test : string; end; {$METHODINFO OFF} implementation class function TTest.Test: string; begin result := 'Test'; end; end. [QC Description] The compiler issues bogus W1035 warnings when a class that has MethodInfo turned on has public class functions. [DCC Warning] Unit1.pas(49): W1035 Return value of function 'Test' might be undefined QC Entry 74014 QC #: Date Reported: Area: 74036 5/18/2009 Modeling\Metrics Description: Steps: [QC Short Description] AV happens after 'QA Metrics' execution and during the end of IDE. 1. Start IDE. 2. [File]-[New]-[VCL Forms Application - Delphi] 3. Show a code editor. 4. [Project]-[QA Metrics] 5. Click the 'Start' button. 6. Close a Metrics dialog. 7. End IDE. The dialog of AV is displayed after the window of IDE disappears. [QC Description] OS : Windows Vista Ultimate SP1, Japanese Weaver : Build 3417, Japanese I installed Visual Studio 2008 in order to get information more. I got the address with the JIT debugger of VS2008. I installed the Weaver English edition in Windows XP Japanese. However, I was not able to reproduce AV. [vk, 22.09.2009] See CommentOnly note [vk] Fixed in trunk - revision 24876, branch - rev.24882 [vk, 28.09.2009] 2nd fix. Fixed in trunk - rev.24902, branch - rev.24904 -July 3, 2009 Edit Similarly in Build3462, AV occurs. I attached to bds by bds. I added the screen shot and the text file of Call Stack to the attached file. QC Entry 74036 QC #: Date Reported: Area: 74050 5/19/2009 Compiler\Delphi\Other Compiler Description: Steps: [QC Short Description] F2084 Internal Error: URW2824 with class helper Steps by Uwe Schuster: - extract unit1.pas, unit2.pas and unit3.pas from attached QC74050Minimized.zip dcc32 unit1.pas expected: it compiles actual: unit1.pas(19) Fatal: F2084 Internal Error: URW2824 Original steps (does only repeat with "dcc32 unit1.pas", but not with "dcc32 <projectname>"): Make a new project with four units: unit1, unit2, unit3 and unit4. Paste into them code as follow: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) private { Private declarations } public constructor Create(AOwner: TComponent); override; end; var Form1: TForm1; implementation {$R *.dfm} uses Unit4, Unit2; { TForm1 } constructor TForm1.Create(AOwner: TComponent); var t4: TType4; t2: TType2; i: Integer; begin inherited; t4:= TType4.Create; t2:= TType2.Create; with t2.stringList do i:= Count; end; end. unit Unit2; interface uses classes, Unit3; type TType2 = class(TObject) public stringList: TStringList; end; implementation end. unit Unit3; interface uses classes; type TStringListSortCompare2 = function(List: TStringList; Index1, Index2: Integer): Integer of object; TStringListHelper = class helper for TStringList protected procedure QuickSort2(L, R: Integer; SCompare: TStringListSortCompare2); public procedure CustomSort2(cmpFnc: TStringListSortCompare2); end; implementation { TStringListHelper } procedure TStringListHelper.CustomSort2(cmpFnc: TStringListSortCompare2); begin if not Sorted and (Count > 1) then begin Changing; QuickSort2(0, Count - 1, cmpFnc); Changed; end; end; procedure TStringListHelper.QuickSort2(L, R: Integer; SCompare: TStringListSortCompare2); var I, J, P: Integer; begin repeat I := L; J := R; P := (L + R) shr 1; repeat while SCompare(Self, I, P) < 0 do Inc(I); while SCompare(Self, J, P) > 0 do Dec(J); if I <= J then begin Exchange(I, J); if P = I then P := J else if P = J then P := I; Inc(I); Dec(J); end; until I > J; if L < J then QuickSort2(L, J, SCompare); L := I; until I >= R; end; end. unit Unit4; interface uses Unit2, Classes; type TType4 = class (TObject) public procedure foo; end; implementation uses Unit3; { TType4 } procedure TType4.foo; var stringList: TStringList; begin stringList.CustomSort2(nil); end; end. Then try to compile project. [QC Description] Project doesn't compile. There is problem with class helper and with 'whit do' [DCC Error] Unit1.pas(45): F2084 Internal Error: URW2824 QC Entry 74050 [Tester Recommended] QC #: Date Reported: Area: 74052 5/19/2009 Internet Description: Steps: [Weaver Only] See description [QC Short Description] Unit Sockets not correct converted to Unicode. Method ReceiveIn will crash [QC Description] Unit Sockets are not correctly converted to Unicode the mothod Receiveln will crash function TBaseSocket.Receiveln(const eol: string): string; var len: Integer; buf: array[0..511] of char; eolptr: pchar; begin Result := ''; eolptr := nil; repeat len := PeekBuf(buf, sizeof(buf) - 1); //SIzeOf Buf is 1024 and len will return 1023 if len > 0 then begin buf[len] := #0; //buf[1023] = #0 wil crash, outside 0..511 eolptr := strpos(buf, pchar(eol)); if eolptr <> nil then len := eolptr - buf + length(eol); ReceiveBuf(buf, len); if eolptr <> nil then len := len - length(eol); buf[len] := #0; Result := Result + buf; end; until (len < 1) or (eolptr <> nil); end; The units seems not been ready converted to UniCode. I send a attachment (TTSockets.pas) with corrections and my conversions . I think TSocketHost = type string; TSocketPort = type string; also should be converted to AnsiString but I can see your need for Unicode here. You newer get any Unicode from Sockets methods typed as TSocketHost or TSocketPort QC Entry 74052 QC #: Date Reported: Area: 74091 5/20/2009 Documentation Description: Steps: [QC Short Description] TWinControl.CreateParams not documented [QC Description] ms-help://borland.bds5/delphivclwin32/!!MEMBEROVERVIEW_Controls_TWinControl.html doesn't contain the CreateParams method which cannot be found in the help elsewhere as well. QC Entry 74091 QC #: Date Reported: Area: 74122 5/20/2009 VCL\Standard Controls\TComboBox Description: Steps: [QC Short Description] TComboBox "randomly" saves ItemHeight = 13 and ItemHeight = 0 into the DFM Sadly, tteps are difficult to produce. The changin of the property is somewhat random. Sometimes, when saving a .dfm, the value is not changed. Thre steps might be something like this: - Create a VCL forms application and add a few TComboBoxes to the form - Save it to disk - Close the IDE - Check the value of TComboBox.ItemHeight in the .dfm - Reopen the IDE and project - Modify the form and save it - [Some other steps might be required here, but it is unclear] - Go back to step "Close the IDE" and recheck until the ItemHeight value changes Maybe the issue is worse with forms involved in visual form inheritance, but maybe not. The issue is discussed some more here: https://forums.codegear.com/thread.jspa?messageID=11734 [QC Description] I review .dfm files for changes before checking them in, and I often see a form with a TComboBox ItemHeight property changing from 13 to 0 and back to 13 over the course of a few days without actually changing that property (or any property on the combobox). The problem happens under both XP and Vista and has been happening since at least Delphi 2007. The reason might be quoted here: "In the VCL source files, FItemHeight is set to "16" in the constructor (TCustomComboBox.Create), but the property's read method retrieves the ItemHeight by performing CB_GETITEMHEIGHT windows message: function TCustomComboBox.GetItemHt: Integer; begin if FStyle in [csOwnerDrawFixed, csOwnerDrawVariable] then Result := FItemHeight else Result := Perform(CB_GETITEMHEIGHT, 0, 0); end; Looks like this call sometimes returns "0", which is then saved to the dfm file :-(" Quote from: https://forums.codegear.com/thread.jspa?messageID=11734 QC Entry 74122 QC #: Date Reported: Area: 74124 5/21/2009 IDE\Search\Find in Files Description: Steps: [QC Short Description] Find in Files / Select Directories dialog: Turn off wordwrapping for the group contents Steps: 1. Find in files 2. Click folders and groups 3. Create a new group and add the following two folders: C:\Program Files\CodeGear\RAD Studio\7.0\source\Win32\vcl C:\Program Files\CodeGear\RAD Studio\7.0 \source\Win32\rtl The memo shows the filenames with wordwrapping. C:\Program Files\CodeGear\RAD Studio\7.0\source \Win32\vcl C:\Program Files\CodeGear\RAD Studio\7.0\source \Win32\rtl This already looks a bit suspicious and confusing. And when starting the search, I find that Delphi made indeed 4 folders out of the two: --------------------------- Project1 - CodeGear Delphi 2010 for Microsoft Windows - Unit1 [Built] -------------------------- Cannot find the specified path: "\Win32\vcl\" --------------------------- OK --------------------------- [QC Description] Please turn off word wrapping in the "Select Directories" sub-dialog of the "Find in Files" dialog. It looks ugly and creates funny behaviour as Delphi will split the folder names into several parts and try to search each of those parts. When trying to enter C:\Program Files\CodeGear\RAD Studio\7.0\source\Win32\vcl Delphi will make C:\Program Files\CodeGear\RAD Studio\7.0\source \Win32\vcl out of it and try to search those two paths. Error message when searching: Cannot find the specified path: "\Win32\vcl\" QC Entry 74124 QC #: Date Reported: Area: 74132 5/21/2009 Database\dbExpressCore Description: Steps: [QC Short Description] dbx3 drivers receive wrong datatype when fetching data - add a SQLConnection to a dbx3 driver - add a TSQLquery that tries to retrieve an INTEGER datatype from the database - set the TSQLQuery to active - driver receives a request for a fldFLOAT instead of a fldINT32 [QC Description] If I'm using a dbx3 driver in Weaver (build 3417) datatypes do not seem to be mapped to the correct functions in my dbx3 driver via dbxadapter.dll for example if I try to retrieve a INTEGER value from the database, the getDouble routine in my driver is called. This all worked fine in D2009. Is there a wrong mapping introduced in the new dbxadapter.dll ? It seems to me that TDBXDataTypes and TFieldType were mixed - for example ftInteger is 6 in "driver land" and TDBXDataTypes, but 6 is ftDouble in TFieldType. I can trace in sqlexpr.pas that the correct value of 6 (ftInteger) is used when DBXRow_GetFixedBytes is called, DBXRow_GetFixedBytes calls into dbxadapter where I have no source of and then this calls the GetDouble routine in my driver. QC Entry 74132 QC #: Date Reported: Area: 74142 5/21/2009 IDE\Dialogs\Environment Options Description: Steps: [QC Short Description] Code Insight options are unexpectedly reset to default values These steps simulate the required install scenario and allow the problem to reproduced without re-installing. From a command prompt, CD to the bin directory. rename mlcc120.bpl to mlcc120.bak execute: bds.exe pDelphi Click "OK" and "Yes" to error dialogs during startup. In the IDE: Tools | Options | Editor Options | Code Insight Check that the "Source file type" combo lists only "Pascal" Uncheck "Code Parameters" option (or any option) Click OK New VCL Application Double click the form to goto code editor type <Ctrl+Space> to invoke code completion Press <escape> Go back into Tools | Options | Editor Options | Code Insight Expected: Code insight options are in previous state Actual: Code insight options are reset to the default values Exit the IDE and restore the mlcc120.bpl package. Reported by Simon H. [QC Description] When installing only the Delphi Personality, and disabling the HTML functionality all of the Code Insight options for Pascal files are reset to the defaults the first time code insight is used. QC Entry 74142 QC #: Date Reported: 74182 5/23/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Class constructors do not compile with generic classes. 1. Compile this code: type TX<T> = record class constructor Create(); end; { TX<T> } class constructor TX<T>.Create; begin end; begin end. 2. This code may actually compile if properly implemented in the compiler. Call the class constructor whenever a new "instantiated" types is used. It may be complicated ... 3. Otherwise simply emit a "Class constructor not allowed in generic types" so that things are easier to understand. Currently these errors are shown: [DCC Error] Project1.dpr(17): E2506 Method of parameterized type declared in interface section must not use local symbol 'TX`1' [DCC Error] Project1.dpr(19): E2506 Method of parameterized type declared in interface section must not use local symbol 'TX`1' [QC Description] Invalid error message emited by the compiler in case of class constructors. Either make them work or emit a more accetable error like "Class constructors not allowed in generic types." QC Entry 74182 QC #: Date Reported: Area: 74196 5/24/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Missing API constant Look at the source code and compare it with the Windows API documentation. [QC Description] The ASSOCF_IGNOREUNKNOWN (or ASSOCF_INIT_IGNOREUNKNOWN if you look at http://msdn.microsoft.com/en-us/library/bb762471(VS.85).aspx) which has an ordinal value of 0x00000400 is missing from the ASSOCF enum type found in ShLwApi.pas. This is the case for both D2007 and D2009. QC Entry 74196 QC #: Date Reported: Area: 74253 5/26/2009 IDE\Code Editor Description: Steps: [QC Short Description] Inconvinience with indent I found small problem with tab indent. Assume we have following text: (1)Begin (2) MyLine; (3)End; if I selected block from the beginning of line 2 to the beginning of MyLine (in other order all these spaces from the left of MyLine until beginning of the line) and then press Tab MyLine will be indented even more. I actually expecting it to replace selection with tab (or spaces) because selected only one line. Visual Studio works exactly the same way as I expected. QC Entry 74253 QC #: Date Reported: 74268 5/27/2009 Area: VCL Description: Steps: [QC Short Description] Caption disappearing in TLabel, TBitBtn and maybe other themed controls when switching to classic theme 1. Start new delphi 2009 project (Application have to support runtime themes, tick this checkbox in the project options). 2. Drop Label1 and BitBtn1 on the form. 3. Make sure that you are using non classic visual style (for ex. Windows XP style -> Silver). Compile, run this application. 4. Don't close your application and switch to windows classic style in the Appearance tab of the display properties. The result is you will not see Label1 and BitBtn1 captions. The same for glyphs. Tested on XP, Vista, Windows 7. [QC Description] Themed controls like TBitBtn, TSpeedButton, TLabel and maybe other have drawing problem when switching from themed visual style to windows classic theme. For TBitBtn and TSpeedButton the problem is in TButtonGlyph.FThemesEnabled member that is not updated on changing theme to classic theme. For TLabel the problem is in TCustomLabel.Create constructor, there is only once checked ThemesEnabled and on theme change it will not be checked and as the result we will not see label caption when switching from Themed visual style to windows classic visual style. Added by Sysop <<<<<<<<<<<<<<< With Update 3 & Update 4, 1. For XP drawing of TBitBtn, TSpeedButton and TLabel works fine after switching to windows classic/standard theme. 2. For Vista and Windows 7 drawing of TBitBtn works fine, but TLabel captions disappeared after switching theme to windows classic/standard. >>>>>>>>>>>>>>> QC Entry 74268 QC #: Date Reported: Area: 74369 5/28/2009 VCL\Additional Controls\TStringGrid Description: Steps: [QC Short Description] Can't scroll TStringGrid using touch Run the attached program. There's a ListBox on the right, which can be scrolled via touch. This doesn't work with the StringGrid on the left. [QC Description] In Windows 7 you can scroll controls which have a scrollbar using touch. This is supposed to work for 'legacy applications'. It does not work with TStringGrid. The 'bounce window when scrolled all the way' thing actually does work, but scrolling itself doesn't. QC Entry 74369 QC #: Date Reported: Area: 74398 5/29/2009 Documentation Description: Steps: [QC Short Description] Thread.Onterminated help should mention that it's called via Synchronize [QC Description] The text at ms-help://borland.bds5/delphivclwin32/Classes_TThread_OnTerminate.html should mention that the event is called via synchronize and thus only fires if the main thread has a working message pump. I recently found that out the hard way. One single sentence about this and the consequences would be great. QC Entry 74398 QC #: Date Reported: Area: 74426 5/29/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] polyline incorrectly declared in windows.pas [QC Description] polyline is declared as: function Polyline(DC: HDC; var Points; Count: Integer): BOOL; stdcall; while it should be declared as: function Polyline(DC: HDC; const Points; Count: Integer): BOOL; stdcall; QC Entry 74426 (JJS: Not expected in 14.0.3447.21911) QC #: Date Reported: Area: 74427 5/29/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] polygon incorrectly declared in windows.pas [QC Description] polygon is declared as: function Polygon(DC: HDC; var Points; Count: Integer): BOOL; stdcall; while it should be declared as: function Polygon(DC: HDC; const Points; Count: Integer): BOOL; stdcall; QC Entry 74427 (JJS: Not expected in 14.0.3447.21911) QC #: Date Reported: 74466 5/31/2009 Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] TRibbon & System Menu Place a TRibbon on a form Run the application Right click on the Taskbar Button [QC Description] When a Form uses a TRibbon and I click the Taskbar Button to call the System Menu for the Form (Minimize, Maximize etc.) the Border Icons on the Form changing to "something" QC Entry 74466 QC #: Date Reported: Area: 74489 6/1/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: URW1135 when using generic class with local enum type from another unit Steps by Uwe Schuster: - extract the three files from the attached QC74489.zip - dcc32 -B project1.dpr expected: it compiles actual: DeHL.Collections.SortedBag.pas(25) Fatal: F2084 Internal Error: URW1135 Original steps: - Open DeHL.groupproj project group - Select DeHL_Package.dproj project - Build the DeHL_Package project The build process stop with the message "[DCC Fatal Error] DeHL.Collections.SortedBag.pas(547): F2084 Internal Error: URW1135" [QC Description] Error trying to compile DeHL Library with Dephi 2009 update 3 + 4. (USc: error happens also with Update 1 and with RTM) Sources from trunk version, revision 169 from http://delphilhlplib.googlecode.com/svn/trunk QC Entry 74489 QC #: Date Reported: Area: 74539 6/3/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Internal error by using generic type in two dimensional array Compile following program: program Project1; {$APPTYPE CONSOLE} uses SysUtils; Type TSomeClass<T> = Class public X: array[0..1] of array of T; end; begin end. [QC Description] Declaring a two dimensional array of Generic type results in an internal error (D8695). QC Entry 74539 QC #: Date Reported: Area: 74564 6/3/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: AV004897B1-R0000000C-0 with DeHL revision 172 - extract the four files from the attached DeHLMakeAV.zip - dcc32 -B DeHL.Collections.HashSet.pas -> should compile - dcc32 -M DeHL.Collections.HashSet.pas expected: it compiles actual: DeHL.Collections.HashSet.pas (16) Fatal: F2051 Unit DeHL.Collections.HashSet was compiled with a different version of [QC Description] DeHL.Types.TDictionary<System.Pointer,System.TClass> (maybe it does lead to an F2084 AV instead) Trying to compile DeHL revision 172 from http://delphilhlplib.googlecode.com/svn/trunk by Make does lead to an Optional complex steps: - export or checkout revision 172 from http://delphilhlplib.googlecode.com/svn/trunk internal error in the IDE and on the command line. start Delphi 2009 - open DeHL.groupproj - call "Build" (SHIFT + F9) for DeHL_Package.bpl -> should compile call "Compile" (Make; CTRL + F9) for DeHL_Package.bpl expected: it compiles actual: [DCC Fataler Fehler] -> see steps DeHL.Collections.HashSet.pas(141): F2084 Interner Fehler: AV21A7F5F9-R0000000E-0 (on the command line QC Entry 74564 the error is [DCC Fehler] DeHL.Collections.HashSet.pas(141): F2084 Internal Error: AV004897B1-R0000000C0) QC #: Date Reported: Area: 74571 6/4/2009 Midas\TClientDataSet Description: Steps: [QC Short Description] TDBXWeaverBugsSuite.Native.Db.Test.exe connection=ibconnection -s:TestRaid_269933 Problem with filter in TClientDataSet - Delphi2009 -or[QC Description] I would like to create filter in TclientDataset. I have Oracle 9.0, dbExpress, table with varchar2(10) and sql query, for example "Select per_name from personal". If I want to create filter in Clientdataset with command 'like' it doesn't work. It returns nothing. This feature is fully functional in Delphi 2006 and Delphi 6. It's very frustrating for me, I have to transfer application from Delphi 2006 into Delphi 2009 (because of UNicode support), but I can't transfer it because of the bug in Tclientdatset with command 'LIKE'. Create table "Personal" in Oracle 9.0 with field "Per_name" varchar2(10) and put 2 records into this table. The records are 'Smith' and 'Vagner'. Use dbexpress technology for showing data from this table. I used Tsqldataset, TdataSETprovider, Tclientdataset, TDataSource and TDBGrid. If you write following sql query "select per_name from personal" into Tsqldataset and if you use TDBGrid to show data, it works. But If you want to use a filter in TclientDataSet '(Per_name LIKE '%Smith%')', the command 'Like' doesn't work. If you use a command '(Per_name = 'Smith')', it works. I have all updates of Delphi 2009. Added by Sysop <<<<<<<<<<<< This fatal issue still exists in 12.0.3420.21218. Please see https://forums.codegear.com/thread.jspa?threadID=18273 >>>>>>>>>>>> QC Entry 74571 QC #: Date Reported: Area: 74586 6/4/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Internal compiler: URW1135 while using a generic interface in another unit - extract the attached zip file - change dir to SmallTestCase - dcc32 Package1.dpk (or Collections.Interfaces.pas) (JJS: F2084 Internal Error: URW1100 in Weaver) [QC Description] -> see steps (Original: Try compile attached package) QC Entry 74586 expected: it compiles actual: Package1.dpk(35) Fatal: F2084 Internal Error: URW1135 See the following interface declaration in the attachment [Tester Recommended] unit Collections.Base; interface type IEnumerator<T> = interface end; IInterfaceEnumerator = IEnumerator<IInterface>; implementation end. See also the following use of these types in the other unit below. unit Collections.Interfaces; interface uses Collections.Base; type IListEnumerator = IInterfaceEnumerator; implementation type TLinkedListEnumerator = class(TInterfacedObject, IListEnumerator) end; end. QC #: Date Reported: Area: 74599 6/4/2009 Compiler\Delphi Description: Steps: [QC Short Description] Generic records trashes memory when assigned Compile and run the attached test case involving the generic record declarations seen below. See the following test output indicating failure. [QC Description] When using variables of generic records in a non generic class the variables are not aligned properly. type TGenericRecord<T> = record private FValue : T; fa : integer; public constructor Create(AValue: T); class operator Implicit(Value : TGenericRecord<T>) : T; class operator Implicit(Value: T): TGenericRecord<T>; class operator Explicit(Value : TGenericRecord<T>) : T; end; TFaultyGenericStoreClass = class x, y : TGenericRecord<double>; end; FAIL #1 r.x = 999999999.00 r.y = 111111104.06 FAIL Counter=1 type TGenericRecord<T> = record private FValue : T; fa : integer; public constructor Create(AValue: T); class operator Implicit(Value : TGenericRecord<T>) : T; class operator Implicit(Value: T): TGenericRecord<T>; class operator Explicit(Value : TGenericRecord<T>) : T; end; In this example the y is aligned in memory 12 bytes after x, thats ok BUT when assigned, a memcopy of 16 bytes are performed. And Sizeof(x) = 16! Assigning x will partially overwrite y! If the class instead looks like this TWorkingGenericStoreClass<T> = class x, y : TGenericRecord<double>; end; y is aligned 16 bytes after x and everything is ok. TFaultyGenericStoreClass = class x, y : TGenericRecord<double>; end; TWorkingGenericStoreClass<T> = class x, y : TGenericRecord<double>; end; /Mikael QC Entry 74599 QC #: Date Reported: Area: 74633 6/5/2009 Description: Documentation Steps: [QC Short Description] TEncoding descendant classes lack content [QC Description] The following classes contain only boiler plate descriptions. TBigEndianUnicodeEncoding ms-help://embarcadero.rs2009/delphivclwin32/SysUtils_TBigEndianUnicodeEncoding.html TMBCSEncoding ms-help://embarcadero.rs2009/delphivclwin32/SysUtils_TMBCSEncoding.html TUnicodeEncoding ms-help://embarcadero.rs2009/delphivclwin32/SysUtils_TUnicodeEncoding.html TUTF7Encoding ms-help://embarcadero.rs2009/delphivclwin32/SysUtils_TUTF7Encoding.html TUTF8Encoding ms-help://embarcadero.rs2009/delphivclwin32/SysUtils_TUTF8Encoding.html QC Entry 74633 QC #: Date Reported: Area: 74646 6/6/2009 Midas\TClientDataSet Description: Steps: [QC Short Description] Buffer overflow in TCustomClientDataSet.DataConvert with ftWideString TDBXWeaverBugsSuite.Native.DB.Test.exe connection=ibconnection -s:TestRaid_269966 Compile and Execute the following application. [QC Description] The TCustomClientDataSet.DataConvert can overwrite (stack) memory if it is called for a ftWideString field. The method doesn't check if data to copy fits into the buffer which is quaranteed to hold Field.DataSize bytes. This bug also affects Delphi 2006 and 2007. QC Entry 74646 program DBClientWideStringBug; {$APPTYPE CONSOLE} uses SysUtils, DB, DBClient; procedure Main; var cds: TClientDataSet; begin cds := TClientDataSet.Create(nil); try cds.FieldDefs.Add('FLD_WIDETEXT', ftWideString, dsMaxStringSize div 2); cds.CreateDataSet; cds.AppendRecord([StringOfChar('a', dsMaxStringSize + 10)]); cds.Fields[0].AsString; // << access violation due to buffer overflow overwriting return address finally cds.Free; end; end; begin try Main; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. QC #: Date Reported: Area: 74662 6/7/2009 Database Description: Steps: [QC Short Description] BLOB problem in D2009 vs D6 INCLUDED IS DPR FOR D6 & D2009, USING SAME DB & SAME UNIT. Unzip app. DB included is from FB2.1.1, If you do not have FB, edit path in .sql file and create DB yourself. How app works: 1) Run app, press button, it loads Image1 from jpg file & display. 2) It saves that image into BLOB field & post. (After making sure it is a TJPegImage) 3)It loads the Image2 from the saved BLOB, works fine. 4)Apply CDS to DB. (No error) 5) Close/Re-open DB and no record there. ********NOTE************ Run the D2009 APP first (with empty DB), when you try, it does not work. Now run the D6 app, click on 'Sunset' to commit to DB, works fine. Now run D2009 app again but click on 'Winter' and you'll see it will load the sunset image created in D6. [QC Description] In D2009, I can read BLOB fields written in D6, but I cannot write new ones. A) When I try to save a BLOB into a CDS (in memory)it works(read/write). B) When I apply to DB via DSProvider, I get no error but does not save. C) In D6, the same app works 100% D) And I can read the record written in D6. QC Entry 74662 Added by Sysop <<<<<<<<<<<< In myenvironment(Delphi 2009 w/ the latest updates and InterBase 2009), 'CDS.ApplyUpdates(0);' raises Exception(EIBClientError). This issue seems to be same as QC#68377. >>>>>>>>>>>> QC #: Date Reported: Area: 74663 6/7/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] SM_MEDIACENTER constant in Windows.pas has invalid value QC#68147 has been closed as 'Fixed'. But, this issue is NOT fixed yet. [QC Description] SM_MEDIACENTER constant is defined in windows.pas as $87 but should be 87. In Microsoft WinUser.h it is defined as: #define SM_MEDIACENTER 87 In Windows.pas it is defined as: SM_MEDIACENTER = $87 ; QC Entry 74663 QC #: Date Reported: Area: 74669 6/8/2009 IDE\Search\Find in Files Description: Steps: [QC Short Description] When 4bytes-character is included in source-code, result of "Find in Files" isn't correctly displayed 0. On Vista or Windows 7 1. Open Attachment. 2.[Search | Find in Files] 3.Input 4bytes character to "Text to find:". (Please See find_input_4bytes_character.gif) 4.The display of the result collapses. [QC Description] When 4bytes-character is included in source-code, result of "Find in Files" isn't correctly displayed. QC Entry 74669 EXP: UTF_8.txt: // 1111 SSDTQ UTF_8.txt: // 1111 DTQSS UTF_8.txt: // 1111 TQSSD UTF_8.txt: // 1111 QSSDT ACT: UTF_8.txt: // 1111 SSDTQ UTF_8.txt: // 1111 DTQLS // Lost Single-byte Character UTF_8.txt: // 1111 TQLSD // Lost Single-byte Character UTF_8.txt: // 1111 QLSDT // Lost Single-byte Character S: 1byte-character. D: 2byte-character. T: 3byte-character. Q: 4byte-character. L: Lost character. # 3bytes character is OK. QC #: Date Reported: Area: 74682 6/8/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] memory leak reported in generics record Paste and run (I'm using fastmm4 to get a full report) program Test; {$APPTYPE CONSOLE} uses //fastmm4, SysUtils; type TRecord<T> = record FText : string; class operator implicit(const S : string): TRecord<T>; end; class operator TRecord<T>.implicit(const S : string): TRecord<T>; begin Result.FText := S; end; type [QC Description] TShortName = record Name: TRecord<integer>; end; var x : TShortName; begin In a rather complex situation (generic record inside a record; in my context it was inside a class), fastmm reports ReportMemoryLeaksOnShutdown := true; X.Name := 'b'; // this would clear the string! // x.Name := ''; end. memory leak. I traced the finalization order, and it seems that the strings are still somehow referenced and therefore not finalized. Checked w/ update 3/4. QC Entry 74682 QC #: Date Reported: Area: 74740 6/10/2009 Midas\TWebConnection Description: Steps: [QC Short Description] Automated Incident Report 1. Create VCL Application 2. Add Remote Data Module 3. Add DataSet to connect with DB 4. Add DatasetProvide 5. Activate DataSet 6. run and register server application 7. run IIS 8. Copy httpsrvr.dll to root folder of IIS website 9. Check if it's available throw WebBrowser 10. Create Client application 11. Add webconnection 12. set address to httpsrvr.dll 13. Try to choose serverName 14. Error appears [QC Description] Access violation at address 50C07EF1 in module 'dsnapcon140.bpl'. Read of address 00000000. I created DataSnap Application, run IIS, copy httpsrvr.dll in root directory of server directory. Run server application on server to registrate it. Than create client application, add webconnection to it, enter http-path to httpsrvr.dll and try to choose server-name, then error appears. QC Entry 74740 QC #: Date Reported: Area: 74775 6/11/2009 IDE\Code Parameters Description: Steps: [QC Short Description] Code Insight settings doesn't save under 64bit vista (and maybe others) 1. disable UAC 2. run delphi -> tools -> editor options -> code insight 3. for example, uncheck "Error Insight" or "Help Insight". 4. press OK 5. write some code 6. open options again: nothing is saved... [QC Description] see steps Added by Sysop <<<<<<<<<<< it seems my issue similar to QC#71330 >>>>>>>>>>> QC Entry 74775 QC #: Date Reported: Area: 74812 6/12/2009 RTL\Delphi\Thread support Description: Steps: [QC Short Description] Calling TThread.CurrentThread raises access violation exception Compile and run the following attached program. See the following program output indicating failure. QC Entry 74812 (JJS: TThread.GetCurrentThread accesses instance field FCurrentThread ) FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 00433180 in module 'BTS270160.exe'. Read of address 00FCC6C4 program BTS270160; { Calling TThread.CurrentThread raises access violation exception } {$APPTYPE CONSOLE} uses SysUtils, Classes; begin try TThread.CurrentThread; WriteLn('PASS'); 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: 74835 6/13/2009 RTL\Delphi\File Management\TDirectory Description: Steps: [QC Short Description] IOUtils.TDirectory.GetDirectories ignores SearchOption parameter Test code: var s: tstringdynarray; I: Integer; begin s := TDirectory.GetDirectories('C:\', '*.*', tsearchoption.soTopDirectoryOnly); for I := 0 to Length(s) - 1 do ListBox1.Items.Add(S[i]); end; [QC Description] The function IOUtils.TDirectory.GetDirectories ignores the SearchOption parameter. It will always use soAllDirectories as SearchOption. class function TDirectory.GetDirectories(const Path, SearchPattern: string; const SearchOption: TSearchOption): TStringDynArray; begin CheckGetDirectoriesParameters(Path, SearchPattern); Result := DoGetDirectories(Path, SearchPattern, TSearchOption.soAllDirectories, nil); end; QC Entry 74835 QC #: Date Reported: Area: 74836 6/13/2009 IDE\Docking Description: Steps: [QC Short Description] Difficult to dock Object-Inspector and Tool-Palette with Project-Manager 1.Object-Inspector is dropped to Project-Manager or 1.Tool-Palette is dropped to Project-Manager EXP: Each window is docked. ACT: Window is often maximized. [QC Description] Difficult to dock Object-Inspector and Tool-Palette with Project-Manager. When docking, the window is maximized. QC Entry 74836 QC #: Date Reported: 74846 6/14/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Passing method references to generic functions raises ICE Compile the following code (dcc32 qc74846.pas): // ----- program qc74846; uses SysUtils; type TGenericFactory = TFunc <Pointer, TObject>; TFactoryFactory = class class function GetGenericFactory <T: class>: TGenericFactory; static; end; class function TFactoryFactory.GetGenericFactory<T>: TGenericFactory; begin Result := function (Info: Pointer): TObject begin Result := T.Create; end; end; end. // ----- Exp.: compiles Act.: Fatal: F2084 Internal error: GPFC00000FD-0044AD8D-0 [QC Description] See steps. QC Entry 74846 [Tester Recommended] QC #: Date Reported: Area: 74855 6/14/2009 Compiler\Delphi\Errors - Warnings Description: Steps: [QC Short Description] F2084 Internal Error: SY9804 when trying to use a non existing ident as value in an enumeration - save the following code as EnumValue.dpr - dcc32 EnumValue.dpr expected: EnumValue.dpr(11) Error: E2003 Undeclared identifier: 'TCascadeHydroplantBoundFields.IDoNotExists' actual: EnumValue.dpr(11) Fatal: F2084 Internal Error: SY9804 program EnumValue; {$APPTYPE CONSOLE} type TCascadeHydroplantBoundFields = ( HasBackwater ); TCascadeHydroplantLookupFields = ( HasBackwaterNew = TCascadeHydroplantBoundFields.IDoNotExists ); begin end. [QC Description] -> see steps Original description: See attached example. QC Entry 74855 QC #: Date Reported: Area: 74859 6/14/2009 RTL\Delphi\File Management\TDirectory Description: Steps: [QC Short Description] IOUtils.TDirectory.GetDirectories complains about filenames starting with \\?\C:\ program Project1; {$APPTYPE CONSOLE} uses SysUtils, IOUtils; begin try TDirectory.GetDirectories('\\? \C:\test', '*.*', TSearchOption.soAllDirectories); except on E: Exception do Writeln('FAIL: ' +E.ClassName, ': ', E.Message); end; end. [QC Description] The windows SDK documents the path prefix \\?\ to extend the maximum path length to approx. 32000 characters. IOUtils.TDiretory.GetDirectories rejects a path with that name with the error "The path format is not supported". The same problem exists in TFile.InternalCheckFilePathParam. We've run into the 260 char path length limit a couple of times especially when using network shares, so this syntax should be supported. For a description of the \\?\ syntax see the topic "Naming a File" in the Windows SDK. This topic is missing in the index, but you can find a link in the description of the CreateFile function. QC Entry 74859 QC #: Date Reported: 74887 6/15/2009 Area: Compiler\Delphi\Anonymous Methods Description: Steps: [QC Short Description] Anonymous methods with 4-byte VAR params generate invalid code Compile and run the attached application below. See the following program output indicating failure. [QC Description] Consider an anonymous method such as... TMyProc = reference to procedure(var Obj: TFoo); FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 00408CD3 in module 'BTS270151.exe'. Read of address 8D004285 The compiler generates invalid code at the point of calling an anonymous method like this one (the var parameter must be 4 bytes in size). Specifically, the generated code passes the "value" of the var param, not the program BTS270151; "address". In other words, it dereferences a pointer that it should not dereference. { Anonymous methods with 4-byte VAR params generate invalid code } The result, of course, is unpredictable, but usually an access violation. QC Entry 74887 {$APPTYPE CONSOLE} uses Windows, SysUtils, Classes, Variants; type TMyProc = reference to procedure(var Obj: TObject); procedure MyProc(var Obj: TObject); begin Writeln(Obj.ClassName); end; procedure Demo(const Proc: TMyProc); var z: TObject; begin z := TStringList.Create; try Proc(z); finally z.Free; end; end; procedure Main; begin try Demo(MyProc); WriteLn('PASS'); except on E:Exception do begin Writeln('FAIL - Exception Error'); WriteLn(' ClassName=', E.Classname); WriteLn(' Message=', E.Message); end; end; end; begin Main; end. QC #: Date Reported: 74889 6/15/2009 Description: Area: Debugger\Evaluator\Delphi Steps: [QC Short Description] Inspecting a string with quotes doesn't work properly [QC Description] When you inspect a string in the debugger, if the string has single-quote characters, the debugger doesn't show a proper Delphi string literal -- it refuses to double-up the quotes. For example... s := 'abc''xyz'; If we inspect s after running the above statement, the debugger shows... 'abc'xyz' Perhaps this is "easier to read", but it causes some serious problems... 1) You can't copy-and-paste from here into a source code unit (or other tool that expects a literal). 2) It breaks the "modify" part of the Evaluate/Modify dialog -- in the sense that Evaluating the invalid string is placed into the "New Value" edit. For example, if we evaluate "s" above, then hit the "Modify button, then s will be trucated to just 'abc'. 3) It is ambiguous, in many cases. For example, if the Evaluate command shows the following string: 'a'#9'b' then there are actually to real strings that could be behind this: 'a'#9'b' and 'a''#9''b'. One is a 3-character string with a tab, the other is a 6-character string with no tab. To determine whcih one you have, you must resort to things like taking the length of the string, or looking at the individual characters in the string. QC Entry 74889 QC #: Date Reported: Area: 74902 6/15/2009 VCL\Graphics Description: Steps: [QC Short Description] TDirect2DCanvas leaks memory - Create a new VCL forms app, and hoop up an FormPaint event like this: uses Direct2D; procedure TForm1.FormPaint(Sender: TObject); var D2DCanvas: TDirect2DCanvas; begin D2DCanvas := TDirect2DCanvas.Create(Canvas, ClientRect); D2DCanvas.RenderTarget.BeginDraw; D2DCanvas.RenderTarget.EndDraw; D2DCanvas.Free; end; begin ReportMemoryLeaksOnShutdown := true; end. - Run and close the app. You'll see that FastMM finds a leaked TList<Direct2D.TDirect2DGraphicsObject>, among others. [QC Description] see steps QC Entry 74902 QC #: Date Reported: Area: 74915 6/16/2009 VCL\Core VCL Classes Description: Steps: [QC Short Description] Controls can't receive mousemoves coming from windows 7 touch [QC Description] The current implementation of interactive gestures makes it impossible for a control to receive mousemove messages coming from Windows 7 touch if a parent control uses an interactive gesture. This is quite a problem since TScrollingWincontrol sets TouchManager.InteractiveGestures to [idPan]. The cause is in TWinControl.WMGestureNotify(): // Find first control that wants a gesture while (FTouchControl.Parent <> nil) and (FTouchControl.TouchManager.InteractiveGestures = []) do FTouchControl := FTouchControl.Parent; There should be an option to block pass through to the parent QC Entry 74915 QC #: Date Reported: Area: 74917 6/16/2009 VCL\Core VCL Classes Description: Steps: [QC Short Description] Can't move form using windows 7 touch Create a new VCL forms app and run it on a Windows 7 multitouch machine. Try moving the form using your finger. You can't. [QC Description] see steps QC Entry 74917 QC #: Date Reported: Area: 74919 6/16/2009 VCL\Core VCL Classes Description: [QC Short Description] interactive gestures issue [QC Description] The current interactive gestures implementation has a feature that's a bit unfortunate. Gesture events can't be forwarded to the control's parent is the control implements a gesture itself. Let's say we have a TButton which is on a TScrollBox. For some reason the button responds to igPressAndTap. Now igPan no longer works on the button, so you can't pan the scrollbox in that area, which probably isn't what you want. Steps: QC Entry 74919 QC #: Date Reported: Area: 74926 6/16/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: no autorepeat on arrow keys 1. File | New VCL Application 2. Drop a TTouchKeyboard on the form 3. Drop a TMemo on the form 4. Run 5. Put a long string of test into the memo. For example "aaaaaaaaaaaaaaaaaaaaaaa" 6. Make sure the cursor is at the end of the line 7. Press the left arrow on the TTouchKeyboard and hold it down QC Entry 74926 //exp:the cursor to move left //act:For some reason the form cycles through tab instead of repeating the left arrow down. QC #: Date Reported: Area: 74931 6/16/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: multitouch Shift issue - run a keyboard on a windows 7 multitouch machine - do this with your fingers: 1. Shift up down 2. Aplha key down 3. Alpha key up 4. Shift key up Expected: Shift key is off (like the Windows 7 keyboard) Observed: Shift key is on QC Entry 74931 QC #: Date Reported: 74932 6/16/2009 Description: Area: VCL Steps: [QC Short Description] TTouchKeyboard: touch doesn't work if DPI <> 96 [QC Description] Touch doesn't work if you run a keyboard on a windows 7 multitouch machine running at DPI=150. This only happens if Windows scales your app. There's no problem if you call SetProcessDPIAware and let the VCL do the scaling. Looks like Windows doesn't scale the WM_Touch coordinates like it does the mouse coordinates. QC Entry 74932 QC #: Date Reported: Area: 74934 6/16/2009 VCL\Graphics\TWICImage Description: Steps: [QC Short Description] Crash in TWICImage TWICImage crashes in LoadFromStream procedure when loading TIFF image saved in CMYK mode. 1. I opened some JPEG image in Photoshop, changed mode to CMYK color and saved it in TIFF format. (other TIFF options - like Image Compression, Pixel Order ,etc - don't matter) 2. Assigned resulted .tif image to TImage control on the form. At this point I can see expected image in the designer. 3. When run application, it crashes in procedure TWICImage.LoadFromStream. Alternatively, toggling from Form View to Text View and back to Form View (Alt-F12 twice) crashes IDE in vcl140.bpl I attached TIFF image I was testing with. QC Entry 74934 QC #: Date Reported: 74950 6/16/2009 Description: Area: Debugger Steps: [QC Short Description] Installing a second replace debugger visualizer for the same type raises an exception - save the attached files - start Weaver - build the package DuplicateReplaceVisualizerTestPackage.dpk - try to install that package expected: the package will be installed without an exception actual: --------------------------Fehler --------------------------- Registration procedure, Duplicatereplacevisualizertestunit.Register in package [QC Description] C:\Users\Public\Documents\RAD Studio\7.0\Bpl\DuplicateReplaceVisualizerTestPackage.bpl raised exception Trying to install/load a package that tries to install a replace debugger visualizer for a type, which already has a class ENonAIRException: There is already a IOTADebuggerVisualizerValueReplacer visualizer installed for register visualizer, fails with a ENonAIRException. type 'TFooBar'. --------------------------- OK Details >> --------------------------- - change TypeName in the method That could be a problem if two 3rd party products install a replace debugger visualizer for the same type. (These TSecondFooBarVisualizer.GetSupportedType from 'TFooBar' to 'TFooBar2' - try to install that package again -> types could be different, but have the same name) this time it should work - change TypeName in the method TSecondFooBarVisualizer.GetSupportedType back I think the debugger should just use the first enabled visualizer in the visualizer list, but must not raise an to 'TFooBar' - compile the package again expected: it compiles actual: it compiles and the following message is exception. shown --------------------------- DuplicateReplaceVisualizerTestPackage - Weaver DuplicateReplaceVisualizerTestUnit [Built] --------------------------- Registration procedure, -> see steps Duplicatereplacevisualizertestunit.Register in package C:\Users\Public\Documents\RAD Studio\7.0 \Bpl\DuplicateReplaceVisualizerTestPackage.bpl raised exception class ENonAIRException: There is already a QC Entry 74950 IOTADebuggerVisualizerValueReplacer visualizer installed for type 'TFooBar' --------------------------- OK -------------------------- QC #: Date Reported: 74953 6/16/2009 Area: Debugger Description: Steps: [QC Short Description] EvalResult in IOTADebuggerVisualizerExternalViewerUpdater.RefreshVisualizer contains garbage at the end - save the attached files - start Weaver - build and install the package ViewVisualizerGarbageTestPackage.dpk - open ViewVisualizationGarbageTestProject.dpr - put a breakpoint on line 14 (F := TFoo...) - start the program - add F to the Watch List and show the visualizer, dock it somewhere and see that the length of the EvalResult string is 6 (the image FirstEvalResult.png shows it) - press F8 (Step Over) - have a look at the visualizer window expected: (1, 0) Length: 6 actual: (1, 0) Length: 3072 (see RefreshedEvalResult.png) [QC Description] In contrast to IOTADebuggerVisualizerExternalViewer.Show the EvalResult in IOTADebuggerVisualizerExternalViewerUpdater.RefreshVisualizer contains a lot of garbage at the end. -> see steps and images QC Entry 74953 QC #: Date Reported: Area: 74954 6/16/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: memory leak - create a new VCL forms app - drop a TTouchKeyboard on it - add this to the unit: initialization ReportMemoryLeaksOnShutdown := true; end. - run and close the program. You now see this: -------------------------- Unexpected Memory Leak --------------------------- An unexpected memory leak has occurred. The unexpected small block leaks are: 1 - 12 bytes: Unknown x 20 13 - 20 bytes: UnicodeString x 107 21 - 28 bytes: TVirtualKeys x 20, UnicodeString x 117, Unknown x 4 29 - 36 bytes: UnicodeString x 1, Unknown x 120 45 - 52 bytes: Unknown x 1 173 - 188 bytes: Unknown x 1 381 - 412 bytes: Unknown x 4 797 - 876 bytes: Unknown x 1 1645 - 1804 bytes: Unknown x 14 --------------------------- OK --------------------------- QC Entry 74954 QC #: Date Reported: Area: 74970 6/17/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: NumPad keys don't turn white [QC Description] The keys of the NumPad layout don't turn white while clicked using the mouse. It works fine with the Standard layout. QC Entry 74970 QC #: Date Reported: Area: 74971 6/17/2009 Description: VCL Steps: [QC Short Description] TTouchKeyboard: LoadFromStream/LoadFromResourceName should be class procedures [QC Description] All they do is add something to the FKeyboardLayouts class variable. Currently you can't add a layout without creating an instance of TTouchKeyboard. QC Entry 74971 QC #: Date Reported: 74994 6/17/2009 Description: Area: Database Steps: [QC Short Description] ftLongWord, ftShortint and ftByte are missing in DBCommon [QC Description] function TFilterExpr.PutConstant(Node: PExprNode): Integer; ... else DatabaseErrorFmt(SExprBadConst, [Node^.FData]); ... end; It would appear that CodeGear forgot to put code into DBCommon.pas to support new field types they added in D2009, specifically ftLongWord which is now used by Word32 fields. case Node^.FDataType of ftSmallInt, ftInteger, ftWord, ftAutoInc: That should probably have ftLongWord, ftShortint and ftByte added. QC Entry 74994 QC #: Date Reported: Area: 75007 6/17/2009 Compiler\Delphi\Errors - Warnings Description: Steps: [QC Short Description] F2084 Internal Error: AV0042A1A1-R00000000-0 with self referencing enumeration program BTS270256; { F2084 Internal Error: AV0042A1A1-R00000000-0 with self referencing enumeration } [QC Description] While playing with QC 74855 Uwe Schuster noticed that there is an internal error with a self referencing enumeration {$APPTYPE CONSOLE} -> see steps QC Entry 75007 type TCascadeHydroplantLookupFields = ( HasBackwaterNew = TCascadeHydroplantLookupFields.IDoNotExists ); begin writeLn('FAIL - Compile-time error expected'); end. {##COMERR.English: Error: E2003 Undeclared identifier: 'TCascadeHydroplantLookupFields.IDoNotExists'} QC #: Date Reported: Area: 75013 6/17/2009 VCL\Win 32 Controls\TPageControl Description: Steps: [QC Short Description] Incorrect painting of TPageControl with Silver theme in WinXP TPageControl (actually, TTabSheet) is painted with some artefacts in Windows XP with standard Silver theme. This doesn't happen with standard Blue and Olive themes. In previous versions of Delphi it was painted correctly. Attached 3 screenshots: Weaver.png - application written and compiled in Weaver D2009.png - same application compiled in Delphi 2009 VS2008.png - similar application written in Visual Studio 2008 using Windows Forms controls (TabControl) All screenshots are made in WinXP with Silver theme enabled. QC Entry 75013 [Pleas leave this as Must Fix. It's a regression in Weaver] QC #: Date Reported: Area: 75015 6/17/2009 IDE\Code Editor\Help Insight Description: Steps: [QC Short Description] Automated Incident Report [QC Description] Object reference not set to an instance of an object. - Created new VCL Forms project - Opened RTTI.pas - Scrolled around in it for a while... moved the mouse over it a couple of times (just looking at the interface section for TValue) - boom Did some more testing, it's specifically this line: function Cast<T>: TValue; overload; when moving the cursor over the "T" QC Entry 75015 QC #: Date Reported: Area: 75017 6/17/2009 Database\Core VCL\Filters Description: [QC Short Description] DBCommon.pas is missing support for ftLongWord and ftExtended [QC Description] Some field types are missing in a couple of places in DbCommon.pas: function IsNumeric(DataType: TFieldType): Boolean; is missing support for ftLongWord and ftExtended function TFilterExpr.PutConstant(Node: PExprNode): Integer; is missing support for ftLongWord and ftExtended. It also might fail with ftAutoInc if it's mapped to a TUnsignedAutoIncField and a constant value > High(Integer) is passed. ftLongWord should map to fldUINT32 ftExtended should map to fldFLOATIEEE procedure TExprParser.TypeCheckArithOp(Node: PExprNode); should probably be a bit more careful in the IsNumeric() and IsNumeric() case. e.g. if one of the operands is an extended, the result should be an extended too. Steps: I've rated this as a critical error because as long as this is not fixed, it's not possible to use TExprParser for any filter which compares a ftLongWord or ftExtended against a constant value (parser bombs out with an exception, no filter expression is being created). QC Entry 75017 QC #: Date Reported: Area: 75026 6/18/2009 RTL\Delphi\File Management\TDirectory Description: Steps: [QC Short Description] IOUtils.TDirectory.GetDirectories may ignore certain directories erroneously Copy the attached test case into its own directory. Create the following subdirectories in this directory. [QC Description] If you call TDirectory.GetDirectories with a SearchPattern of "*.*", then directories that do not contain a full-stop in their names are excluded from the results. A B.B C.C.C The problem lies in TPath.DoMatchesPattern (roundabout line 2714 in IOUtils.pas). It returns "false" for a file without a file extension when you search for "*.*". The standard convention is for "*.*" to match any filename. QC Entry 75026 Compile and run the attached application below. See program output similar to the following indicating failure. FAIL - Value not found - (c:\work\A) FAIL Counter=2 program BTS270253; { IOUtils.TDirectory.GetDirectories may ignore certain directories erroneously } {$APPTYPE CONSOLE} uses SysUtils, Types, IOUtils; var Counter: Integer = 0; procedure FindStr(const Value: String; List: TStringDynArray); var S: String; begin for S in List do begin if SameText(Value, S) then begin Inc(Counter); Exit; end; end; WriteLn('FAIL - Value not found - (', Value, ')'); end; procedure DoTest; var DirName: String; DirList: TStringDynArray; S: String; begin DirName := GetCurrentDir; DirList := TDirectory.GetDirectories(DirName, '*.*', TSearchOption.soAllDirectories); DirName := DirName + PathDelim; FindStr(DirName + 'A', DirList); FindStr(DirName + 'B.B', DirList); FindStr(DirName + 'C.C.C', DirList); end; begin try DoTest; if Counter = 3 then WriteLn('PASS') else WriteLn('FAIL Counter=', Counter); except on E: Exception do begin WriteLn('FAIL - Exception Error'); WriteLn(' ClassName=', E.ClassName); WriteLn(' Message=', E.Message); end; end; end. QC #: Date Reported: 75034 6/18/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Cannot define a property on a generic-instanciated field Compile the attached application below. See the following unexpected compile-time error for the line marked #1. [QC Description] See exemple code in steps to reproduce. The TBase and TBase2<myrecord> classes should have the same behaviour, but the compiler refuses to compile TDerived2 (TDerived is fine). QC Entry 75034 [Tester Recommended] Error: E2467 Record or object type required program BTS270257; { Cannot define a property on a generic-instanciated field } {$APPTYPE CONSOLE} uses SysUtils; type myrecord = record a : integer; b : char; end; // Basic usage : works TBase = class(TObject) protected myfield : myrecord; end; TDerived = class(TBase) property reada : integer read myfield.a; end; // Using generics... the compiler fails to compile TDerived2 TBase2<T> = class(TObject) protected myfield : T; end; TDerived2 = class(TBase2<myrecord>) property reada : integer read myfield.a; //#1// end; begin WriteLn('PASS'); //PASS on compile// end. QC #: Date Reported: 75037 6/18/2009 Area: Compiler\Delphi\Language Description: Steps: [QC Short Description] Local enumerations, generics and constants lead to Erroneous "Undeclared identifier" error unit ThisBreaksDelphi; interface uses Generics.Collections; const EOL = #13#10; type TSomeClass = class (TObject) data: string; procedure WriteLine(s: string); end; function OrdinaryFunction(s: string) : integer; procedure GenericFunction(lst: TList<TObject>); implementation // Removing this... procedure GenericFunction (lst: TList<TObject>); begin end; function OrdinaryFunction(s: string) : integer; type TSomeEnum = (enumThing, enumThing2); // ... or this fixes it begin Result := 0; end; procedure TSomeClass.WriteLine(s: string); begin data := s + String(EOL); end; end. [QC Description] (Actually under D2009 Update 3 - is not available in drop-down box on the bug submission form) The following code does not compile. Error: [DCC Error] ThisBreaksDelphi.pas(39): E2003 Undeclared identifier: 'EOL' Removing either "GenericFunction", or the locally defined "TSomeEnum" type fixes the problem. Additionally moving GenericFunction down to below OrdinaryFunction also fixes this issue. QC Entry 75037 QC #: Date Reported: Area: 75042 6/18/2009 VCL\Additional Controls\TSpeedButton Description: Steps: [QC Short Description] SpeedButton no disable if Flat = True and Enable = False 1. New VCL Forms Application 2. Drop SpeedButton 3. Flat = True 4. Enable = False SpeedButton not disable [QC Description] Added by Sysop <<<<<<< Please make sure 'Enable runtime themes' is turned ON to reproduce this issue. >>>>>>> QC Entry 75042 QC #: Date Reported: 75099 6/20/2009 Area: Compiler\Delphi\Execution Description: Steps: [QC Short Description] Internal Error TI2013 (Attributes) Compile the attached application below see the following compile-time error indicating failure. Fatal: F2084 Internal Error: TI2050 [QC Description] Internal Error TI2013 when trying to compile the project from the steps. QC Entry 75099 program BTS270302; { Internal Error TI2013 (Attributes) } {$APPTYPE CONSOLE} uses SysUtils; type MyInfoAttribute = class(TCustomAttribute) public constructor Create(s: string); end; TTest = class(TObject) private { Private declarations } public { Public declarations } [MyInfo('123')] procedure Test; end; { TTest } procedure TTest.Test; begin end; { MyInfoAttribute } constructor MyInfoAttribute.Create(s: string); begin end; begin try WriteLn('PASS'); { PASS on compile } except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. QC #: Date Reported: 75104 6/20/2009 Area: Compiler\Delphi\Execution Description: Steps: [QC Short Description] F2084 Internal Error: TI2000 with several RTTI attribute types - save the following console application - dcc32 AttributeTypeTest.dpr expected: it compiles actual: AttributeTypeTest.dpr(15) Fatal: F2084 Internal Error: TI2000 program AttributeTypeTest; {$APPTYPE CONSOLE} type MyInfoAttribute = class(TCustomAttribute) public constructor Create(AValue: Double); end; [MyInfo(0.0)] TTest = class(TObject) end; constructor MyInfoAttribute.Create(AValue: Double); begin end; begin WriteLn('PASS'); end. [QC Description] This is a follow up to Report No: 75099 (RAID: 270302) Status: Open Internal Error TI2013 (Attributes) http://qc.embarcadero.com/wc/qcmain.aspx?d=75099 and it seems that some types create a TI2000 error instead of TI2013 error. These types are at least: - Float types (Double, Extended, Single, ...) - Pointers (Pointer, TObject, IInterface) with nil as value - Variants with a float as value -> see steps QC Entry 75104 QC #: Date Reported: Area: 75105 6/20/2009 Documentation Description: Steps: [QC Short Description] Missing help for Variants [QC Description] For instance: - Variants.ChangeAnyProc Variable (This is variable Variants.ChangeAnyProc.) - Variants.TAnyProc Type (This is type Variants.TAnyProc.) Man, can't you just search through help topics where the Description starts with the words "This is...". Sheesh!!! QC Entry 75105 QC #: Date Reported: Area: 75117 6/21/2009 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Wrong code generation for property access of nested Old Style objects. Compile and run the attached application below. See the following program output indicating failure. [QC Description] Code generation for direct access of nested Old Style objects through property read/write identifiers is wrong, resulting in access violations. QC Entry 75117 FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 004121A0 in module 'BTS270346.exe'. Write of address 0079C4D4 program BTS270346; { Wrong code generation for property access of internal objects } uses SysUtils; {$APPTYPE CONSOLE} type TInternal = object // no access violation if this is a record public Field: Integer; end; TFoo = object // or class, or record private Internal: TInternal; public property Field: Integer read Internal.Field write Internal.Field; end; var Foo: TFoo; begin try Foo.Field := 1; // access violation in build 14.0.3449.21988 WriteLn('PASS'); exit; 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: 75125 6/21/2009 IDE\Code Editor Description: Steps: [QC Short Description] Undo after search inserts superfluous navigation events 1. File -> New console application 2. Press Ctrl-F, enter a search term (e.g. a single character 'e') and search for it multiple times with F3 3. Hit Ctrl-Z repeatedly to undo ==> instead of jumping backwards to the last 'e' with each Ctrl-Z, the caret jumps to the top of the file inbetween each undo event. Every Ctrl-Z should simply jump backwards and mark the preceding 'e' (exactly as in Delphi 7 and earlier). This applies when the default "group undo" option is set; without "group undo", there is still one extra navigation event for each undo (three instead of two) which is annoying [QC Description] See steps for description QC Entry 75125 QC #: Date Reported: Area: 75144 6/22/2009 IDE\Project Management\Project Manager Description: Steps: [QC Short Description] FastMM error on exit from IDE Copy the attached .dst file into %appdata%\CodeGear\BDS\7.0 directory Open Weaver and switch to that desktop. Close IDE. [QC Description] This is new with build 3449. Every time I exit the IDE since install of build 3449 i see a FastMM memory error: FastMM has detected an attempt to call a virtual method on a freed object. An access violation will now be raised in order to abort the current operation. Freed object class: TRegistryIniFile Virtual method: Offset +16 Virtual method address: 50087A08 Exp: IDE will close without error Act: FastMM has detected an attempt to call a virtual method on a freed object. An access violation will now be raised in order to abort the current operation. Freed object class: TRegistryIniFile Virtual method: Offset +16 Virtual method address: 50087A08 The allocation number was: 647 The allocation number was: 647 The full EventLog for the error is attached. QC Entry 75144 QC #: Date Reported: Area: 75145 6/22/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] Typo in Tools | Options | Formatter dialog n/a [QC Description] In the Tools | Options dialog, under Formatter | Delphi | Capitalization, one of the options for Other Words Capitalization is 'As First Occurence'. 'Occurrence' should have two rs. QC Entry 75145 QC #: Date Reported: Area: 75156 6/22/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] "Identifier redeclared..." for dispinterface forward declaration - save the following code at the end of the steps as DispInterfaceErrorInsightTest.dpr - start Delphi - open DispInterfaceErrorInsightTest.dpr - compile (it should compile) expected: no Error Insight errors in the Structure view actual: Identifier redeclared 'IAmForwardedDisp' at line 8 (8:3) - open ...\RAD Studio\6.0\source\Win32 [QC Description] \rtl\win\oleacc.pas expected: no Error Insight errors in the Structure view actual: Identifier redeclared Several .pas files in ...\RAD Studio\6.0\source\ use dispinterface forward declarations and they lead to "Identifier 'IAccessibleDisp' at line 542 (542:3) program DispInterfaceErrorInsightTest; {$APPTYPE CONSOLE} type redeclared..." errors in the Structure view. IAmForwardedDisp = dispinterface; IAmForwardedDisp = dispinterface ['{97C0A647-7B29-4A8A-AA61F132EA3FB915}'] end; begin end. -> see steps QC Entry 75156 QC #: Date Reported: 75164 6/22/2009 Area: Compiler\Delphi\Language Description: Steps: (JJS: [QC Short Description] Static constructors fail generic types. CASE 1 -- STACK OVERFLOW: [QC Description] [Applies to Weaver] There are 3 failure cases. 1. Stack overflow in the StartExe/InitUnits functions. 2. An internal error. 3. Another internal error UPDATE: OK, I have no idea how I managed to get the last internal error! I closed and reopened the IDE and it dissapeared. QC Entry 75164 Using the IDE, compile this code, at run-time an stack overflow will pop up. (JJS: See BTS270383a.dpr attached) uses SysUtils, TypInfo; type TTestRec<T> = record private class var FPula: String; public class constructor Create; class destructor Destroy; (JJS: I can reproduce the first two issues with build 14.0.3458.22241. The first in the IDE and the second either in the IDE or using the command-line compiler.) procedure Something; end; [Tester Recommended] { TTestRec<T> } class constructor TTestRec<T>.Create; begin WriteLn(GetTypeName(TypeInfo(T))); end; class destructor TTestRec<T>.Destroy; begin end; procedure TTestRec<T>.Something; begin WriteLn('Bublic'); end; var a: TTestRec<String>; begin a.Something; readln; end. CASE 2 -- INTERNAL COMPILE ERROR: Just remove the class destructor from the first example and you will get an internal error like this: [DCC Fatal Error] Project1.dpr(1): F2084 Internal Error: AV21C2B279-R00000008-0 uses SysUtils, TypInfo; type TTestRec<T> = record private class var FPula: String; public class constructor Create; procedure Something; end; { TTestRec<T> } class constructor TTestRec<T>.Create; begin WriteLn(GetTypeName(TypeInfo(T))); end; procedure TTestRec<T>.Something; begin WriteLn('Bublic'); end; var a: TTestRec<String>; begin a.Something; readln; end. CASE 2 -- COOLER INTERNAL COMPILE ERROR: In this cace I moved the generic class definition to another unit in hopes to get past the stack overflow. This one raises: [DCC Fatal Error] Unit1.pas(24): F2084 Internal Error: O647 MAIN PROJECT FILE: program Project1; {$APPTYPE CONSOLE} uses SysUtils, TypInfo, Unit1 in 'Unit1.pas'; begin readln; end. THE UNIT: unit Unit1; interface uses SysUtils, TypInfo; type TTestRec<T> = record public class constructor Create; class destructor Destroy; end; implementation { TTestRec<T> } class constructor TTestRec<T>.Create; begin end; class destructor TTestRec<T>.Destroy; begin end; end. QC #: Date Reported: 75174 6/22/2009 Area: Compiler\Delphi\Language Description: Steps: [QC Short Description] Cyrillic symbols in names of variables are accepted by the compiler Compile unit "ID_RU.pas" See the following compiler output indicating failure. [QC Description] Bug with unicode support in Delphi 2009 (12.0.3420.21218) ID_RU.pas(11) Error: E2004 Identifier redeclared: '???????????????' Attachment code does not compile QC Entry 75174 [Tester Recommended] QC #: Date Reported: Area: 75177 6/23/2009 AddOn\IntraWeb Description: Steps: [QC Short Description] Mastertemplate does not work Try the PCP-Demoproject and run it. You will see that masterTemplate.html is not loaded [QC Description] Mastertemplate functionality is completly broken. Only subtemplates will be loaded. QC Entry 75177 QC #: Date Reported: Area: 75188 6/23/2009 IDE\Code Completion Description: Steps: [QC Short Description] Using code completion in a class after the word function or procedure causes an error Make sure you have Code Insight | Auto invoke switched on (in Tools | Options | Editor options | Code insight). Start a new console application. Type or paste in type TObj = class(TObject) end; Above the 'end;', type function and press space. Press the down arrow and then Return, to select the QueryInterface function from the code completion list. //EXP: the QueryInterface function to be inserted //ACT: --------------------------- Project1 CodeGear Delphi for Microsoft Windows - Project1.dproj [Built] --------------------------- Expected an identifier but END found in class TObj. --------------------------- OK -------------------------- [QC Description] When I want to override a virtual function or procedure, I often start out by automatically typing 'function' or 'procedure', and then I notice the Code insight dropdown and pick the one I want. But this causes an 'Expected an identifier but ...' error. QC Entry 75188 QC #: Date Reported: 75206 6/24/2009 Area: Compiler\Delphi\BASM Description: Steps: [QC Short Description] Incorrect CodeGen for SSSE3 and SSE4 instructions Example: asm ret //Put a breakpoint here and inspect disassembly/machine code pshufb xmm0, [ecx+esi] //WRONG nop; nop; nop; nop; nop; nop; pshufb xmm0, [esi+ecx*4] //WRONG nop; nop; nop; nop; nop; nop; pshufb xmm0, [ecx*4] //WRONG nop; nop; nop; nop; nop; nop; end; Please have a look at the attached source code file, which includes similar cases for all affected SSSE3, SSE4.1 and SSE4.2 instructions that I found. [QC Description] The compiler/assembler generates wrong machine code for all SSSE3, all SSE4.1 and some SSE4.2 instructions (all except POPCNT) when these instructions are used with certain register addressing combinations, i.e. SOMEINSTRUCTION register, [register+register] SOMEINSTRUCTION register, [register*scale] SOMEINSTRUCTION register, [register+register*scale] (E.g., try the combinations "[ECX+ESI]" or "[ECX*4]"). As far as I can see, the instructions affected are: PMOVZX.., PMOVSX.., ROUND.., DPPS/DPPD, PMULDQ.., PMULLD.., EXTRACTPS, INSERTPS, BLENDV.., PMIN.., PMAX.., MPSADBW.., PHMINPOSUW, PTEST, PCMPEQQ, PACKUSDW, CRC32, PCMPGTQ, PCmpXStrX, PALIGNR, PHADD..., PABS..., PMADDUBSW, PMULHRSW, PSHUFB, and PSIGN... This is apparently related to QC report 73742 for PMOVZXBW (which I can't access). See also: https://forums.embarcadero.com/thread.jspa?threadID=19508&tstart=0 and https://forums.embarcadero.com/thread.jspa?threadID=16359&tstart=15 QC Entry 75206 [Tester Recommended] QC #: Date Reported: 75207 6/24/2009 Area: Compiler\Delphi\BASM Description: Steps: [QC Short Description] CRC32 instruction with WORD-sized operands not encoded correctly Inspect the machine code generated for the following: procedure Crc32CompilerBug2; var w:word; asm jmp @x //CRC32 with WORD-sized operands not encoded correctly crc32 eax, cx //66F20F38F1C1 repnz crc32 eax,cx crc32 eax, w //66F20F38F145FE repnz crc32 eax,[ebp-$02] @x: end; [QC Description] The CRC32 instruction, if used with WORD-sized operands (whether memory or register) is not encoded correctly. Reference: Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2A: Instruction Set Reference, A-M QC Entry 75207 [Tester Recommended] QC #: Date Reported: Area: 75212 6/24/2009 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] AV error filling out old-style object descendants Compile and run the attached application below. See the following program output indicating failure. [QC Description] Now this is yet another object bug in the implementation of legacy objects in Delphi 2009. The following code, which worked in previous versions of Delphi, will generate an access violation: FAIL - Exception Error ClassName=EAccessViolation Message=Access violation at address 004121A5 in module 'BTS270422.exe'. Read of address FFFFFFF8 program Project8; {$APPTYPE CONSOLE} program BTS270422; uses Windows, SysUtils; { AV error filling out old-style object descendants} type TTestBase=object X: Integer; end; uses Windows, SysUtils; {$APPTYPE CONSOLE} type TTestBase=object X: Integer; end; type TTest=object(TTestBase) end; var T:TTest; begin try ZeroMemory(@T,SizeOf(T)); except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. Strangely enough the following code will work: program Project8; {$APPTYPE CONSOLE} uses Windows, SysUtils; type TTest=object(TTestBase) end; var T:TTest; begin try ZeroMemory(@T,SizeOf(T)); WriteLn('PASS'); except on E:Exception do begin WriteLn('FAIL - Exception Error'); Writeln(' ClassName=', E.Classname); WriteLn(' Message=', E.Message); end; end; end. type TTestBase=object X: Integer; end; //type <-- The two objects are declared in the same ?type declaration block?. TTest=object(TTestBase) end; var T:TTest; begin try ZeroMemory(@T,SizeOf(T)); except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. This however does not solve my problem as my objects are defined in several different units. I simply don?t understand why Embarcadero (or whoever they are) simply doesn?t drop support of the legacy object type all together or get backwards compatibility fixed ASAP. In almost every version since Delphi 2 some behavior of the legacy objects have changed or been declared illegal and the implementation of it in Delphi 2009 seems to be one huge bug. Too bad for an otherwise great product. QC Entry 75212 QC #: Date Reported: Area: 75215 6/24/2009 Description: VCL\Touch Controls\TTouchKeyboard Steps: [QC Short Description] TTouchKeyboard: customize background colors [QC Description] If a TTouchKeyboard is on a form, but it doesn't fill the whole client area, the background gradient may not look good. It doesn't if the form is black, for example. A way to change the colors would be convenient. A virtual PaintBackground(c: TCanvas) method could be added, for example. Alternatively the top/bottom gradient colors could be public or published properties. QC Entry 75215 QC #: Date Reported: Area: 75216 6/24/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: button margin issues [QC Description] - There isn't a margin between rows. - In the Standard layout the up and down arrow keys don't align. This probably happens because the "Fn" doesn't have a margin on its righthand side. - There's a margin in the righthand side of the keyboard. The other sides don't have a margin. - There's a 2 pixel margin between buttons which doesn't respond to mouse/touch clicks. It's better to avoid these inactive areas, so the user won't wonder why the program doesn't respond to pressing buttons. Note that the Windows 7 keyboard doesn't have inactive areas between buttons. It would look better if all buttons had the same margin (1 pixel) on all four sides. Modifying the FindButton function to remove the inactive areas would then be easy. QC Entry 75216 QC #: Date Reported: Area: 75224 6/24/2009 RTL\Delphi\Other Classes Description: Steps: [QC Short Description] ObjAuto TCallingConvention changes Compile the attached application below. See the following unexpected compile-time error indicating failure. [QC Description] In Delphi 2009 TCallingConvention is defined as Error: E2003 Undeclared identifier: 'ccRegister' TCallingConvention = (ccRegister, ccCdecl, ccPascal, ccStdCall, ccSafeCall); program BTS270429; In Weaver, this was changed to {$APPTYPE CONSOLE} TCallingConvention = TypInfo.TCallConv; uses ObjAuto; TCallConv is defined as TCallConv = (ccReg, ccCdecl, ccPascal, ccStdCall, ccSafeCall); The problem here is that ccRegister was changed to ccReg. This (unnecessary, in my opinion) change breaks existing code. Could not the original ccRegister token be preserved? QC Entry 75224 var CC: TCallingConvention; begin CC := ccRegister; WriteLn('PASS'); { PASS on compile } end. QC #: Date Reported: Area: 75236 6/24/2009 VCL\Graphics Description: Steps: [QC Short Description] TDirect2DCanvas can't draw 'width=1' horizontal line - create a new VCL forms app - create a OnPaint event handler - paste the code below in the unit - run the app - note that the Direct2D lines on the right are wider than the GDI lines on the left. Also note the the Direct2D lines are gray, whereas the GDI lines are black. This is caused by antialiasing. - uncomment the TDirect2DCanvas type declaration and run the app again. The lines are now identical. Rectangle() suffers from the same problem. I think it can be fixed in a similar (but more complicated) way. --------------- code ------------------------ unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Direct2D, D2D1; type TForm1 = class(TForm) procedure FormPaint(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} { This code solves the LineTo problem type TDirect2DCanvas = class(Direct2D.TDirect2DCanvas) public procedure LineTo (X, Y: Integer); override; end; procedure TDirect2DCanvas.LineTo(X, Y: Integer); var p1, p2: TD2D1Point2F; begin RequiredState([csHandleValid, csPenValid]); p1.x := PenPos.x; p1.y := PenPos.y + 0.5; p2.x := x; p2.y := y + 0.5; RenderTarget.DrawLine(p1, p2, Pen.Brush.Handle, Pen.Width, Pen.StrokeStyle); PenPos := Point (X,Y); end; } procedure TForm1.FormPaint(Sender: TObject); var LCanvas: TDirect2DCanvas; begin Canvas.Brush.Color := clWhite; Canvas.Pen.Color := clBlack; Canvas.MoveTo(100, 50); Canvas.LineTo(200, 50); Canvas.Rectangle(100,100,200,200); LCanvas := TDirect2DCanvas.Create(Canvas, ClientRect); try LCanvas.BeginDraw; try LCanvas.Brush.Color := clWhite; LCanvas.Pen.Color := clBlack; LCanvas.MoveTo (204, 50); LCanvas.LineTo(304, 50); LCanvas.Rectangle(204,100,304,200); finally LCanvas.EndDraw; end; finally LCanvas.Free; end; end; end. [QC Description] TDirect2DCanvas can't draw 'width=1' horizontal line because the line is antialiased, and therefor spans two pixels. Moving the line half a pixel solves the problem. I'd expect vertical lines to suffer from the same problem, but I haven't looked into that. QC Entry 75236 QC #: Date Reported: Area: 75309 6/26/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] "Expected ; but received an identifier <ident>" with parameterless procedure type definition and call style directive - save the following code at the end of the steps as ParameterlessStdcallErrorInsightTest.dpr - start Delphi open ParameterlessStdcallErrorInsightTest.dpr - compile (it should compile) expected: no Error Insight errors in the Structure view actual: Expected ; but received an identifier 'TGLUtessEndProc' at line 8 (8:3) Expected ; but received an identifier 'TRCBack' at line 13 (13:3) Expected ; but received an identifier 'cdecl' at line 13 (13:40) (the last is QC 69120/RAID 266835) - open ...\RAD Studio\6.0\source\Win32\rtl\win\OpenGL.pas expected: no Error Insight errors in the Structure view actual: beside a lot of errors related to Report No: 69120 (RAID: 266835) Status: Open Expected ; but recieved 'stdcall' on TThreadStartRoutine and TWaitOrTimerCallback in Windows unit http://qc.embarcadero.com/wc/qcmain.aspx?d=69120 you should get Expected ; but received an identifier 'TGLUtessEndProc' at line 2591 (2591:3) - open ...\RAD Studio\6.0\source\Win32\rtl\win\Nsapi.pas" expected: no Error Insight errors in the Structure view actual: beside a lot of errors which are related to QC 69120/RAID 266835 you should get Expected ; but received an identifier 'TRCBack' at line 1444 (1444:3) program ParameterlessStdcallErrorInsightTest; {$APPTYPE CONSOLE} //from OpenGL.pas type GLUtessEndProc = procedure stdcall; TGLUtessEndProc = GLUtessEndProc; //from Nsapi.pas type TRotateCallback = procedure cdecl; TRCBack = procedure (Param: Integer) cdecl; begin end. [QC Description] A few .pas files in ...\RAD Studio\6.0\source\ have parameterless procedure type declarations with an additional callstyle directive and they lead to "Expected ; but received an identifier <ident>..." errors in the Structure view. This could be very much related to Report No: 69120 (RAID: 266835) Status: Open Expected ; but recieved 'stdcall' on TThreadStartRoutine and TWaitOrTimerCallback in Windows unit http://qc.embarcadero.com/wc/qcmain.aspx?d=69120 but from my POV it is a different issue and thatswhy I report it. -> see steps QC Entry 75309 QC #: Date Reported: Area: 75311 6/26/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] "Expected ; but received ..." with missing semicolon after inline - save the following code at the end of the steps as MissingSemicolonAfterInlineErrorInsightTestUnit.pas - start Delphi - create a new console application and add MissingSemicolonAfterInlineErrorInsightTestUnit.pas compile (it should compile) expected: no Error Insight errors in the Structure view actual: Expected ; but received FUNCTION at line 13 (13:1) - open ...\RAD Studio\6.0\source\Win32\rtl\win\CommCtrl.pas expected: [QC Description] ...\RAD Studio\6.0\source\Win32\rtl\win\CommCtrl.pas has a missing semicolon after an inline directive and that lead to a "Expected ; but received ..." error in the Structure view. -> seep steps QC Entry 75311 no Error Insight errors in the Structure view actual: beside a lot of errors related to Report No: 69120 (RAID: 266835) Status: Open Expected ; but recieved 'stdcall' on TThreadStartRoutine and TWaitOrTimerCallback in Windows unit http://qc.embarcadero.com/wc/qcmain.aspx?d=69120 you should get Expected ; but received FUNCTION at line 1527 (1527:1) unit MissingSemicolonAfterInlineErrorInsightTestUnit; interface uses Windows; type HIMAGELIST = THandle; //from CommCtrl.pas function Header_OrderToIndex(hwnd: HWND; i: Integer): Integer; inline function Header_CreateDragImage(hwnd: HWND; i: Integer): HIMAGELIST; inline; implementation function Header_OrderToIndex(hwnd: HWND; i: Integer): Integer; begin Result := 0; end; function Header_CreateDragImage(hwnd: HWND; i: Integer): HIMAGELIST; begin Result := 0; end; end. QC #: Date Reported: Area: 75313 6/26/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] "Expected ; but received ..." with missing semicolon after external name - save the following code at the end of the steps as MissingSemicolonAfterExternalNameErrorInsightTestUnit.pas - start Delphi - create a new console application and add MissingSemicolonAfterExternalNameErrorInsightTestUnit.pas - compile (it should compile) expected: no Error Insight errors in the Structure view actual: Expected ; but received FUNCTION at line 19 (19:1) open ...\RAD Studio\6.0\source\Win32\rtl\win\ShlObj.pas expected: no Error Insight errors in the Structure view actual: beside one error related to Report No: 69120 (RAID: 266835) Status: Open Expected ; but recieved 'stdcall' on TThreadStartRoutine and TWaitOrTimerCallback in Windows unit http://qc.embarcadero.com/wc/qcmain.aspx?d=69120 you should get Expected ; but received FUNCTION at line 4246 (4246:1) Expected ; but received FUNCTION at line 4247 (4247:1) Expected ; but received PROCEDURE at line 4248 (4248:1) Expected ; but received FUNCTION at line 4249 (4249:1) Expected ; but received VAR at line 4251 (4251:1) unit MissingSemicolonAfterExternalNameErrorInsightTestUnit; interface uses Windows; function SHGetSpecialFolderPath(hwndOwner: HWND; lpszPath: PWideChar; nFolder: Integer; fCreate: BOOL): BOOL; stdcall; function SHGetSpecialFolderPathA(hwndOwner: HWND; lpszPath: PAnsiChar; nFolder: Integer; fCreate: BOOL): BOOL; stdcall; implementation const shell32 = 'shell32.dll'; function SHGetSpecialFolderPath; external shell32 name 'SHGetSpecialFolderPathW' function SHGetSpecialFolderPathA; external shell32 name 'SHGetSpecialFolderPathA'; end. [QC Description] ...\RAD Studio\6.0\source\Win32\rtl\win\ShlObj.pas has missing semicolons after the names for the external directive and that leads to "Expected ; but received ..." errors in the Structure view. -> see steps QC Entry 75313 QC #: Date Reported: Area: 75317 6/26/2009 RTL\Delphi\Other Classes Description: Steps: [QC Short Description] TIniFile.ReadSections passes wrong parameter to GetPrivateProfileString, corrupting heap Compile and run MakeIni.dpr seen below. Compile and run TestProg.dpr seen below. [QC Description] Application crashes on startup when reading INIFiles. See this program output indicating failure. #1 #2 Section1=FAIL - Exception Error Investigation shows that memory is corrupted when reading sections from an INI file. Problematic code is here: program TestProg; procedure TIniFile.ReadSections(Strings: TStrings); const BufSize = 16384; var Buffer, P: PChar; begin GetMem(Buffer, BufSize); /* ... */ if GetPrivateProfileString(nil, nil, nil, Buffer, BufSize, PChar(FFileName)) <> 0 then {$APPTYPE CONSOLE} Problems: 1> Fixed buffer size is used, leading to data loss if actual size of file is larger. 2> GetPrivateProfileString's 5th parameter is a count of *characters* and the code is passing the number of *bytes*. Heap corruption results. I think the same mistake is made elsewhere in this file. Bug #1 was supposed to be fixed by QC#35234, but it looks like that might have only fixed the "ReadSection" function and not the "ReadSections" function. QC Entry 75317 uses SysUtils, Classes, IniFiles; procedure DoTest; var IniFile: TIniFile; Sections: TStringList; begin IniFile := TIniFile.Create('.\MyFile.ini'); with IniFile do try Sections := TStringList.Create; WriteLn('#1'); ReadSections(Sections); WriteLn('#2 Section1=', Sections[0]); WriteLn('PASS'); finally Sections.Free; 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. program MakeIni; uses Windows, SysUtils, Classes, IniFiles; {$APPTYPE CONSOLE} procedure Run; var I: Integer; begin if FileExists('.\MyFile.ini') then DeleteFile('.\MyFile.ini'); with TIniFile.Create('.\MyFile.Ini') do try for I := 1 to 1000 do WriteString(Format('Section%d', [I]), 'Item', 'Value'); UpdateFile; finally Free; end; end; begin try Run; except on E: Exception do begin WriteLn('Exception Failure'); WriteLn(' ClassName=', E.ClassName); WriteLN(' Message=', E.Message); end; end; end. QC #: Date Reported: 75318 6/26/2009 Area: Database\DBExpress Description: Steps: [QC Short Description] DBX: Firebird driver needs DBXInterbase 1.Open Project1.dpr (attachements) 2.Compile 3.Run 4.Click the Button. EXP: DBXInterbase is not required. ACT: DBXInterbase is required. or EXP: 'Could not find metadata: TDBXInterbaseMetaDataCommandFactory; package: DbxFirebirdDriver140.bpl. Add DBXInterbase to your uses.'. ACT: 'Could not find metadata: TDBXInterbaseMetaDataCommandFactory; package: DbxFirebirdDriver140.bpl. Add DBXFirebird to your uses.'. [QC Description] The following errors appear when Firebid is used with DBX. -------------------------------------------------------------------------------Debugger Exception Notification -------------------------------------------------------------------------------Project Project1.exe raised exception class TDBXError with message 'Could not find metadata: TDBXInterbaseMetaDataCommandFactory; package: DbxFirebirdDriver140.bpl. Add DBXFirebird to your uses.'. -------------------------------------------------------------------------------Break Continue Help -------------------------------------------------------------------------------It is necessary to add DBXInterbase to the unit to solve this. The error message is wrong. QC Entry 75318 QC #: Date Reported: Area: 75326 6/27/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Error Insight defines VER190 instead of VER210 - save the following code as VERxxxErrorInsightTest.dpr - start Weaver - open VERxxxErrorInsightTest.dpr expected: Expected BEGIN but received * at line 6 (6:1) actual: Expected BEGIN but received * at line 10 (10:1) program VERxxxErrorInsightTest; {$APPTYPE CONSOLE} {$IFDEF VER210} * {$ENDIF VER210} {$IFDEF VER190} * {$ENDIF VER190} begin end. [QC Description] This is the same issue as RAID 268128, but RAID 268128 is fixed and then a new bug has to be logged. -> see steps QC Entry 75326 QC #: Date Reported: Area: 75330 6/27/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] IsDebuggerPresent is not using the stdcall conventions Potentially could be triggered by calling TThread.NameThreadForDebugging or calling IsDebuggerPresent from the Windows unit. [QC Description] Recently, I was looking at our Indy code to make sure it's updated for the RTL. I noticed that IsDebuggerPresent is defined in Windows without the stdcall conventions. Is there any reason why it isn't being defined that way since it's a Win32 API function call? This omission should be fixed even if it doesn't effect most code. You never know what's going to happen down the line. QC Entry 75330 QC #: Date Reported: Area: 75334 6/27/2009 Compiler\Delphi\Code Generation/Optimization Description: Steps: [QC Short Description] Range check error in inline functions with chars and string indexes Compile and run the attached application below. See the following program output indicating failure. [QC Description] If range checking is on, inlining causes a range check error to be wrongly reported - see steps. QC Entry 75334 [Tester Recommended] FAIL: ERangeError: Range check error program BTS270523; { Range check error in inline functions with chars and string indexes } {$APPTYPE CONSOLE} {$R+} uses SysUtils; function LastChar(const Str: string): char; inline; // ok if not inline begin Result := Str[Length(Str)]; end; begin try WriteLn(LastChar('PP'), 'ASS'); except on E: Exception do begin Writeln('FAIL: ' + E.ClassName, ': ', E.Message); end; end; end. QC #: Date Reported: 75337 6/27/2009 Area: Debugger Description: Steps: [QC Short Description] Debugger fails to show correct message when PE version is higher then current OS version - start Delphi - create a new app - set "Set Subsystem Version fields in PE Header as <major>.<minor>" in the project options (Delphi Compiler\Linking) to a version which is higher then your current OS (so far 7.0 should work for all OS versions) - press F9 to execute the program with the debugger expected: a message that the app cannot be executed for some reason actual: --------------------------- Error --------------------------- Format '%1 ' invalid or incompatible with argument. --------------------------- OK Details >> --------------------------- - press SHIFT+CTRL+F9 to execute the program without the debugger expected: a message that the app cannot be executed for some reason actual: (note the message is from a DE OS and "ist keine zulässige Win32Anwendung." means "is no valid Win32 application.") --------------------------- Error --------------------------- System Error. Code: 193. %1 ist keine zulässige Win32-Anwendung. --------------------------- OK Details >> -------------------------- [QC Description] -> see steps QC Entry 75337 QC #: Date Reported: Area: 75339 6/28/2009 VCL\Standard Controls\TEdit Description: Steps: [QC Short Description] TCustumEdit.OnContextPopUp: MousePos is wrong add a TEdit to a form and use the debugger to see MousePos after right-clicking the TEdit [QC Description] TCustumEdit.OnContextPopUp: MousePos are screen coordinates, whereas they should be client coordinates. It worked fine in D2007. TCustumEdit.WMContextPopUp now handles this itself, rather than calling TControl.WMContextPopUp. This code misses a ScreenToClient call. It also misses the InvalidPoint check which serves to leave (-1, -1) alone. See TControl.WMContextPopUp. QC Entry 75339 QC #: Date Reported: Area: 75340 6/28/2009 VCL\Core VCL Classes\TControl Description: Steps: [QC Short Description] MouseOriginToShiftState uses wrong mask [QC Description] The MouseOriginToShiftState function uses: MouseOriginMask = $FFFFFFF0; This should be: MouseOriginMask = $FFFFFF80; You've probably been fooled by a typo in http://msdn.microsoft.com/en-us/library/ms703320(VS.85).aspx which reads "needs to be mask-checked against 0xFFFFFF0," (note there's a hex digit missing). QC Entry 75340 QC #: Date Reported: 75353 6/28/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: AV0044AE94-R0000000C-0 when using generics from another package Steps by USc (small test created from revision 47 of TURBU): - save the attached files - dcc32 -B map_default.dpk expected: it compiles actual: Fatal: F2084 Internal Error: AV0044AE94-R0000000C-0 Original steps: 1. Check out the TURBU project from http://turbu.googlecode.com/svn/trunk 2. Open \turbu\turbu.groupproj 3. Build EngineBasis.bpl 4. Build default_format.bpl. (If this gives you trouble, see QC 75119 for the workaround.) 5. Try to build map_default.bpl. This will cause "[DCC Fatal Error] F2084 Internal Error: AV06D00CDC-R0000000C-0". 6. Comment out line 117 on unit turbu_2k_map_engine inside map_default.bpl, and it compiles correctly. [QC Description] -> see steps Original short description: Error AV06D00CDC-R0000000C-0 when attempting to assign a function pointer Original description: When trying to build my project, the compiler chokes on a certain function pointer assignment. I haven't been able to successfully break this down into a small, simple test case that will duplicate the error. QC Entry 75353 [Tester Recommended] QC #: Date Reported: Area: 75376 6/29/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] Incorrect value of CSIDL_MYDOCUMENTS (JJS: In shlobj.h, see the following... [QC Description] Delphi 2009, ShlObj.pas { For Windows >= XP } {$EXTERNALSYM CSIDL_MYDOCUMENTS} CSIDL_MYDOCUMENTS = $000c; { logical "My Documents" desktop icon } #define CSIDL_PERSONAL 0x0005 // My Documents #define CSIDL_FAVORITES 0x0006 // <user name>\Favorites #define CSIDL_STARTUP 0x0007 // Start Menu\Programs\Startup #define CSIDL_RECENT 0x0008 // <user name>\Recent #define CSIDL_SENDTO 0x0009 // <user name>\SendTo #define CSIDL_BITBUCKET 0x000a // <desktop>\Recycle Bin #define CSIDL_STARTMENU 0x000b // <user name>\Start Menu #define CSIDL_MYDOCUMENTS CSIDL_PERSONAL // Personal was just a silly name for My Documents Note that CSIDL_MYDOCUMENTS equals CSIDL_PERSONAL which has the value 0x0005 Error here: CSIDL_MYDOCUMENTS <> $000c QC Entry 75376 QC #: Date Reported: Area: 75380 6/29/2009 VCL\Standard Controls\TEdit Description: Steps: [QC Short Description] TButtonedEdit: transparency around the left and right button - save the attached files - make sure that theming is enabled in the OS - start Delphi - compile ButtonedEditTest.dpr and execute it (it should look like as on TButtonedEdit1.png) - press the "Back in Black" button expected: it looks like before actual: two black lines on the left top corner of the left button and one black line on top of the right button (it might look like as on TButtonedEdit2.png) [QC Description] I don't use TButtonedEdit, but I often see in the left top edge black lines in the search edit in the Tool Palette of the IDE when I have theming enabled in the OS. -> see image TransparentIDESearchEdit.png -> see steps QC Entry 75380 QC #: Date Reported: 75397 6/30/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Incorrect finalization classes with dynamic arrays program test; uses SysUtils; type TArray<T> = array of T; TValues = TArray<Double>; // It seem's that this line is the reason of access violation TA = class var FValues: TValues; end; var A: TA; begin A := TA.Create(); A.Free(); // <- Access violation end. QC Entry 75397 QC #: Date Reported: Area: 75406 6/30/2009 Documentation Description: Steps: [QC Short Description] TXPManifest help missing Fixed in Weaver see [QC Description] This is class XPMan.TXPManifest QC Entry 75406 ms-help://embarcadero.rs2010/vcl/XPMan.TXPManifest.html QC #: Date Reported: Area: 75423 7/1/2009 SOAP\WSDL Importer Description: Steps: [QC Short Description] SOAP client: delphi 2007 can not set the result to an object Import the wsdl and call a function. [QC Description] I imported (with the wsdl import wizard from Delphi 2007) a wsdl from the following location: http://internetest.vocuslis.nl/test/services/dbs/nedapservice?wsdl If I call the function testNedapService (returns a Boolean) I always receive false. I installed a packet sniffer and I can see that the webservice send a true, but Delphi cannot set the true to an object. Also the rest of the functions don? work. I have created a test project in Visual Studio 2005 (Visual Basic) and Eclipse (Java) and everything works fine. So the wsdl seem to be ok. See the attachment (Delphi 2007) for an example of my test project. Is this a bug in Delphi or do I something wrong? QC Entry 75423 QC #: Date Reported: Area: 75436 7/1/2009 Compiler\Delphi\Execution Description: Steps: [QC Short Description] Internal error C1872 Compile the attached application below. See the following compile-time error indicating failure. [QC Description] When compiling some basic code with optimizations turned on I get an internal error C1872. Please note that on my full project I seem to get the same error also with optimizations turned off but I couldn't reproduce it on a smaller example, sorry. Fatal: F2084 Internal Error: C1872 program BTS270643; { Internal error C1872 } See program in steps to reproduce. QC Entry 75436 (Affects JVCL) [Tester Recommended] {$APPTYPE CONSOLE} type TypeRec = record EnumField : set of 1..52; end; function GetC1872 (AMax : integer; const ARec : TypeRec) : Cardinal; var I : integer; LBool : boolean; begin Result := 0; LBool := AMax in ARec.EnumField; I := 1; while I <= AMax do begin if LBool then begin if I in ARec.EnumField then Inc(Result) end; Inc(I); end; end; begin WriteLn('PASS'); { PASS on compile } end. QC #: Date Reported: Area: 75439 7/1/2009 IDE\Search Description: Steps: [QC Short Description] History of .pas files cannot be searched Steps: 1. Open a .pas file which has a history 2. Click the history tab 3. click into the code view 4. Press Ctrl+F 5. Enter a search term like "procedure" 6. Press Enter --> you get a message that x matches were found, but nothing else happens 7. Switch to Contents or Diff tab --> now the search works. You can also switch back and it will work. But it says "0 matches found" and there is no highlighting of the search terms. But when you close the search, go back to the code tab, and try again from step 2, it will be broken again. [QC Description] Searching the history of .pas files is broken. QC Entry 75439 QC #: Date Reported: Area: 75445 7/1/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Invalid directive 'RTTI' - save the following code at the end of the steps as RTTIErrorInsightTest.dpr - start Delphi - open RTTIErrorInsightTest.dpr - compile (it should compile) expected: no Error Insight errors in the Structure view actual: Invalid directive 'RTTI' at line 5 (5:3) - open ...\RAD Studio\X.0\source\Win32\rtl\sys\System.pas expected: no Error Insight errors in the Structure view actual: Invalid directive 'RTTI' at line 285 (285:5) program RTTIErrorInsightTest; {$APPTYPE CONSOLE} {$RTTI INHERIT METHODS(DefaultMethodRttiVisibility) FIELDS(DefaultFieldRttiVisibility) PROPERTIES(DefaultPropertyRttiVisibility)} begin end. [QC Description] In ...\RAD Studio\7.0\source\Win32\rtl\sys\System.pas has the directive {$RTTI INHERIT METHODS(DefaultMethodRttiVisibility) FIELDS(DefaultFieldRttiVisibility) PROPERTIES(DefaultPropertyRttiVisibility)} been added and Error Insight doesn't know $RTTI yet. -> see steps QC Entry 75445 QC #: Date Reported: Area: 75450 7/1/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: AV00000000-W00000000-8 with generics / enumerators involving an inlined method Compile the attached application below. See the following compile-time error [QC Description] See Steps. QC Entry 75450 BTS270688.dpr(15) Fatal: F2084 Internal Error: AV00000000-R00000000-0 Note that compiliation succeeds if the method GetEnumerator is not inlined. unit uBTS270688a; interface type List<T: class> = class public type Enumerator = record private var item: T; public function MoveNext: boolean; inline; property Current: T read item; end; public function GetEnumerator: Enumerator; inline; //#1// end; implementation function List<T>.Enumerator.MoveNext: boolean; begin result := true end; function List<T>.GetEnumerator: Enumerator; begin result.item := nil // or default(T) end; end. unit uBTS270688b; interface uses uBTS270688a; type C = class public var F: List<TObject>; end; implementation end. program BTS270688; { F2084 Internal Error: AV00000000-W00000000-8 with generics / enumerators } uses uBTS270688a, uBTS270688b; procedure foo; var o: TObject; c: uBTS270688b.C; begin for o in c.F do end; procedure DoTest; begin foo end; begin WriteLn('PASS'); { PASS on compile } end. QC #: Date Reported: Area: 75453 7/1/2009 Install Description: Steps: [Vista + localized build only] Environment: Guest OS: Windows XP Professional + SP3 (Japanese Edition) Host OS: Windows Vista Business + SP2 (Japanese Edition) VM: Virtual PC 2007 SP1 QC Entry 75453 1.Install Japanese edition. 2.[File | New | VCL Forms Application] 3.[Project | Compile Project] EXP: work fine. ACT: [Fatal Error] Class not registered, ClassID: {410C0C78-0AFB-4FEC-9530-B41D86B0792D} MSBuild is not correctly set perhaps. HKEY_CLASSES_ROOT\CLSID{410C0C78-0AFB-4FEC-9530-B41D86B0792D} is not found. The following registry entries are necessary. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\CLSID\{410C0C78-0AFB-4FEC-9530-B41D86B0792D}] @="Borland.Studio.Interop.MSBuildProjectInteropCreator" [HKEY_CLASSES_ROOT\CLSID\{410C0C780AFB-4FEC-9530-B41D86B0792D}\Implemented Categories] [HKEY_CLASSES_ROOT\CLSID\{410C0C780AFB-4FEC-9530-B41D86B0792D}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}] [HKEY_CLASSES_ROOT\CLSID\{410C0C78-0AFB-4FEC-9530-B41D86B0792D}\InprocServer32] @="mscoree.dll" "ThreadingModel"="Both" "Class"="Borland.Studio.Interop.MSBuildProjectInteropCreator" "Assembly"="Borland.Studio.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b" "RuntimeVersion"="v2.0.50727" [HKEY_CLASSES_ROOT\CLSID\{410C0C78-0AFB-4FEC-9530B41D86B0792D}\InprocServer32\14.0.0.0] "Class"="Borland.Studio.Interop.MSBuildProjectInteropCreator" "Assembly"="Borland.Studio.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b" "RuntimeVersion"="v2.0.50727" [HKEY_CLASSES_ROOT\CLSID\{410C0C78-0AFB-4FEC-9530B41D86B0792D}\ProgId] @="Borland.Studio.Interop.MSBuildProjectInteropCreator" QC #: Date Reported: Area: 75456 7/1/2009 IDE\Code Editor [QC Short Description] Can't Compile with Japanese edition [QC Description] Can't compile with Japanese edition. English edition works normally. Description: Steps: [QC Short Description] Editor inserts garbage after code template completion Make sure Tools | Options | Editor Options | Code insight | Code templates completion is on. 1) File | New console application 2) insert line after "begin", type 3 characters "if " ==> code template now inserts "if True then" and places caret over "True" 3) type "False", overwriting "True" 4) press Esc 5) press Ctrl-F9 to compile ==> garbage added after last line, compiler emits warning: text after final END ignored. Clicking on the warning jumps to the garbage To reproduce it, do not switch to another window between steps 2 and 3. In longer units, the garbage will be added somewhere in the middle of the code. [QC Description] The editor inserts garbage text when doing code template completion. This is usually at a seemingly random location somewhere in the current unit and is particularly nasty when unintended code changes go unnoticed. See steps for how to reproduce QC Entry 75456 QC #: Date Reported: Area: 75461 7/2/2009 VCL\Standard Controls\TMemo Description: [QC Short Description] TMemo: can't select via touch [QC Description] Microsoft lets the user select text by dragging horizontally. You can move vertically as well once the system thinks you're selecting rather than panning. See Notepad for example. This no longer works in this build. Steps: QC Entry 75461 QC #: Date Reported: Area: 75479 7/2/2009 VCL\Standard Controls\TListBox Description: Steps: [QC Short Description] Control "" has no parent window [QC Description] This causes a "Control "" has no parent" error: procedure TForm1.FormCreate(Sender: TObject); begin TListBox.Create(self).Color := clRed; end; This used to work fine. Looks like this happens because procedure TCustomListBox.WndProc(var Message: TMessage); contains code case Message.Msg of CM_COLORCHANGED: InvalidateRect(Handle, nil, True); ... You probably need to check here if Handle is created: case Message.Msg of CM_COLORCHANGED: if HandleAllocated then InvalidateRect(Handle, nil, True); (thanks to Yevgen Ostapchuk) QC Entry 75479 QC #: Date Reported: Area: 75486 7/2/2009 10:39:21 AM IDE\Open Tools API Description: Steps: Installing a compiler notifier crashes the IDE Open the attached package project Right click on it and select Install Problem 1: You'll see a crash right away when it add the IOTACompileNotifier Problem 2: After the crash is fixed, notifiers don't actually work. To make sure they're working, create a new project and compile it. You should see 4 message boxes for the 4 different notifications. QC #: Date Reported: Area: 75489 7/2/2009 VCL\Core VCL Classes Description: Steps: [QC Short Description] WMTabletQuerySystemGestureStatus works correct at 96 dpi only [QC Description] The WMTabletQuerySystemGestureStatus screen position also suffers from the problem described in QC 74932. Chris Bensen seems to have found a solution for this. Note that this can not only occur in Windows 7, but in Vista as well. PS. I haven't checked, but I'd guess WMGesture has the same issue. QC Entry 75489 QC #: Date Reported: Area: 75490 7/2/2009 VCL\Core VCL Classes Description: Steps: [QC Short Description] Touch.ParentTabletOptions doesn't work - create a new VCL app - add a TPaintBox - remove toPressAndHold from the form's Touch.Tabletoptions - run the app - press the paintbox with your finger for a couple of seconds [QC Description] see steps QC Entry 75490 [SB: ParentTabletOptions is being ignored unless the control descends from TWinControl] expected: nothing happens observed: press-and-hold kicks in QC #: Date Reported: Area: 75494 7/2/2009 Install\Files Description: Steps: [QC Short Description] Unit debug version of system.dcu was compiled from different pas unit Enable debug DCUs in the project and try to debug something in system unit. See attachments for example. [QC Description] It is very look like debug system.dcu was compiled from another pas unit then present in source directory. Because I very often see misplaced dots which mean the line was linked to binary, and debugging often was unable because position of the debugger was not the real source position. So I recompiled the system unit, replaced original one and problems has gone. PS: English is not my native language so sorry if I speak not clear QC Entry 75494 QC #: Date Reported: Area: 75498 7/2/2009 VCL\Graphics Description: [QC Short Description] TBitmap.WriteStream selects >8bpp DIBs (unnecessarily) into HDC which (for large bitmaps) can lead to BSODs with current nvidia drivers [QC Description] In TBitmap.WriteStream the following code is always called: Canvas.RequiredState([csHandleValid]); Save := GDICheck(SelectObject(FCanvas.FHandle, FDIBHandle)); Steps: ColorCount := GetDIBColorTable(FCanvas.FHandle, 0, 256, Colors); SelectObject(FCanvas.FHandle, Save); The documentation to GetDIBColorTable states: Remarks The GetDIBColorTable function should be called to retrieve the color table for DIB section bitmaps that use 1, 4, or 8 bpp. The biBitCount member of a bitmap associated BITMAPINFOHEADER structure specifies the number of bits-per-pixel. DIB section bitmaps with a biBitCount value greater than eight do not have a color table, but they do have associated color masks. Call the GetObject function to retrieve those color masks. So calling GetDIBColorTable will always return 0 for any bitmap with > 8bpp, making this code useless for any >8 bpp bitmap. I've found that, at least with current (186.18) nVidia drivers under Windows 2008 and with large bitmaps (6090x1682 in my case) the SelectObject call regularily fails (returns 0, but GetLastError also returns 0) and is followed by a BSOD a couple of seconds later. Given that the code in question is just a waste of time and resource for >8bpp bitmaps anyway, it should be changed to: if FDIB.dsbmih.biBitCount <= 8 then begin Canvas.RequiredState([csHandleValid]); Save := GDICheck(SelectObject(FCanvas.FHandle, FDIBHandle)); ColorCount := GetDIBColorTable(FCanvas.FHandle, 0, 256, Colors); SelectObject(FCanvas.FHandle, Save); end else ColorCount := 0; Not only does that prevent the BSOD (which admittedly would appear to be a driver bug that's causing kernel mode memory overwrite), but it generally speeds up saving of TBitmap's QC Entry 75498 QC #: Date Reported: Area: 75515 7/3/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Identifier redeclared: '.5' message when using generics Download the attached project and try compiling it. Alternatively, start a new project with a standard form (call them unit2 and Form2/TForm2). The unit would then look like this: Unit2.pas========================= unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DiagonallySymmetricArray; type TObject1 = class(TObject) end; TObject2 = class(TObject) end; TObject3 = (ossUnknown, ossShare, ossNoShare); TCachedOriginsShareStatus = class (TDiagonallySymmetricArray<TObject3>) end; TForm2 = class(TForm) private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} end. /Unit2.pas====================== Add to the project a second unit, called DiagonallySymmetricArray: DiagonallySymmetricArray.pas============= unit DiagonallySymmetricArray; interface type TDiagonallySymmetricArray<T> = class(TObject) protected // need direct access for speed reasons in some cases FArray: array of array of T; class procedure NormalizeIndices(var i, j: Integer); private function GetItem(i, j: Integer): T; procedure SetItem(i, j: Integer; const AItem: T); public end; implementation uses SysUtils; { TDiagonallySymmetricArray<T> } function TDiagonallySymmetricArray<T>.GetItem(i, j: Integer): T; begin NormalizeIndices(i, j); Result := FArray[i, j]; end; class procedure TDiagonallySymmetricArray<T>.NormalizeIndices(var i, j: Integer); begin end; procedure TDiagonallySymmetricArray<T>.SetItem(i, j: Integer; const AItem: T); begin NormalizeIndices(i, j); FArray[i, j] := AItem; end; end. /DiagonallySymmetricArray========= [QC Description] Using a generic object in a different unit can lead to "Error 2004 Identifier redeclared: '.5'". The '.5' may be some other number, depending on the precise context. The error message is incorrect (the code should compile properly) and it is also worded rather obviously incorrectly (identifier '.5'???). This occurs in D2009 UP3 (which the combobox does not allow me to select). QC Entry 75515 QC #: Date Reported: Area: 75543 7/5/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] F2084 Internal Error: C12079 when using TDictionary's TPair enumerator - save the following three files or the attachment - dcc32 PairEnumeratorTest.dpr expected: it compiles actual: PairEnumeratorTest.dpr(12) Fatal: F2084 Internal Error: C12079 //--- PairEnumeratorTest.dpr --- program PairEnumeratorTest; {$APPTYPE CONSOLE} uses Unit2, Generics.Collections; var Pair: TPair<Integer, string>; begin for Pair in Testing do; end. //--- unit2.pas --- unit Unit2; interface uses Generics.Collections; var Testing: TDictionary<Integer, string>; implementation end. //--- Generics.Collections.pas --- unit Generics.Collections; interface type TEnumerator<T> = class abstract protected function DoGetCurrent: T; virtual; abstract; public property Current: T read DoGetCurrent; function MoveNext: Boolean; end; TEnumerable<T> = class abstract public function GetEnumerator: TEnumerator<T>; end; TPair<TKey,TValue> = record Key: TKey; Value: TValue; end; TDictionary<TKey,TValue> = class (TEnumerable<TPair<TKey,TValue>>) end; implementation function TEnumerator<T>.MoveNext: Boolean; begin Result := False; end; function TEnumerable<T>.GetEnumerator: TEnumerator<T>; begin Result := nil; end; end. [QC Description] This was reported by simon horup in embarcadero.public.delphi.language.delphi.win32 in the thread "Internal Error T2402 when enumerating a tDictonary under Delphi 2009Update 3 / 4" Message-ID: <[email protected]> https://forums.codegear.com/thread.jspa?messageID=132786&tstart=0#132786 -> see steps QC Entry 75543 [Tester Recommended] QC #: Date Reported: Area: 75560 7/6/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] Incorrect code generation for procedure with var parameters Use the following console project and try running it. You'll get an EExternalException at the Normalize call in the SetItem method. It does not matter whether Normalize is a class method or a normal method, nor whether it is inline or not. It does not even work if it is a plain procedure. program Project2; {$APPTYPE CONSOLE} uses SysUtils; type TMyEnum = (meNone, meOne, meTwo); TSomething<T> = class private class procedure Normalize(var i, j: Integer); inline; procedure SetItem(i, j: Integer; const Value: T); public property Items[i, j: Integer]: T write SetItem; end; TSomethingMyEnum = class(TSomething<TMyEnum>) end; { TSomething<T> } class procedure TSomething<T>.Normalize(var i, j: Integer); var t: Integer; begin if i < j then begin t := j; j := i; i := t; end; end; procedure TSomething<T>.SetItem(i, j: Integer; const Value: T); begin Normalize(i, j); if i < j then raise Exception.Create('Error!'); end; var LSomething: TSomethingMyEnum; begin try LSomething := TSomethingMyEnum.Create(); LSomething.Items[0, 0] := meOne; except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. [QC Description] Using var parameters in a generic method can lead to runtime crash. This happens in UP3 (can't select it in the Version combobox). May be somehow related to #75515. QC Entry 75560 QC #: Date Reported: Area: 75569 7/6/2009 ActiveX\Code Generators\TLibImp frontend Description: Steps: [QC Short Description] GenTLB cannot handle SAFEARRAY declaration - Download attached .ridl file (which is a stripped-down version of the RIDL generated by TLibImp for Borland.Studio.ToolsAPI.tlb), save it somewhere - Try to generate a TLB from it: GENTLB Borland_Studio_ToolsAPI.ridl - Exp.: no errors - Act.: Error E0001 Borland_Studio_ToolsAPI.ridl 30: Identifier expected, found ')' inst ead Error E0001 Borland_Studio_ToolsAPI.ridl 33: '<EOF>' expected, found '[' instead [QC Description] The RIDL parser of GenTLB chokes on SAFEARRAY declarations as emitted by TLibImp. See the steps for details. (This is a more concise test case, provided by Chris Bensen, for the problem originally reported as #75513.) QC Entry 75569 QC #: Date Reported: Area: 75652 7/10/2009 VCL\Touch Controls\TTouchKeyboard Description: [QC Short Description] TTouchKeyboard doesn't respond to pen [QC Description] TTouchKeyboard doesn't respond to pen. This is caused by the "if not IsPenEvent(GetMessageExtraInfo) then" code. Also, the keyboard won't work on modern touchscreen computers running Vista because GetMessageExtraInfo Steps: will return "pen" or "touch" hence mouse messages won't be processed. But there's no WMTouch on Vista. QC Entry 75652 QC #: Date Reported: Area: 75728 7/13/2009 3:56:59 PM Compiler\Delphi\Code Generation/Optimization Description: Steps: Compiling a package with -JL (for C++ files) and -V (debug info) produces a .bpl that is seen as invalid by the Windows loader. Compile the attached package with the following command-line. dcc32 -JL -V ScintillaComponents.dpk (JJS: Seen to be fixed in Weaver) Compile the attached application with the following command-line dcc32 -JL -V Test.dpr Run the resulting executable and see a dialog entitled "Test.exe - Bad Image" with the following text. The application or DLL "..."ScintallaComponentsD12.bpl is not avalid Windows Image. Please check this against your installation diskette. Clicking okay produces the following program output indicating failure. FAIL - Exception Error ClassName=EOSError Message=System Error. Code: 193. %1 is not a valid Win32 application QC #: Date Reported: Area: 75759 7/14/2009 VCL\Core VCL Classes Description: Steps: [QC Short Description] AclAPI.pas wrong functions declaration [QC Description] In unit AclAPI some functions do not declared correctly: 1. function GetNamedSecurityInfoW(pObjectName: PAnsiChar; [...]) Must Be: function GetNamedSecurityInfoW(pObjectName: PChar; Because it Unicode version (look at MSDN, and try to work with unicode Files or Folders) 2. function SetNamedSecurityInfoW(pObjectName: PAnsiChar; The same. 3. BuildExplicitAccessWithNameW the same etc - and another 4 functions in this Unit. 4. function GetSecurityInfo([..], ppSecurityDescriptor: PPSECURITY_DESCRIPTOR): DWORD; Must be: function GetSecurityInfo([..], pSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; READ MSDN about this function. SetSecurityInfo have correct - PSECURITY_DESCRIPTOR. All another functions in this unit have PSECURITY_DESCRIPTOR. QC Entry 75759 QC #: Date Reported: Area: 75774 7/14/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] Regression: ALIGN directive is flagged as error - save the following code at the end of the steps as AlignErrorInsightTest.dpr - start Weaver - open AlignErrorInsightTest.dpr - compile (it should compile) expected: no Error Insight errors in the Structure view actual: 'ON.pas' could not be found in the current project at line 11 (11:1) 'OFF.pas' could not be found in the current project at line 12 (12:1) - open ...\RAD Studio\7.0\source\Win32\rtl\win\Windows.pas expected: no Error Insight errors in the Structure view actual: 'ON.pas' could not be found in the current project at line 17 (17:1) 'ON.pas' could not be found in the current project at line 21939 (21939:1) 'ON.pas' could not be found in the current project at line 24305 (24305:1) program AlignErrorInsightTest; {$APPTYPE CONSOLE} {$A+} {$A-} {$A1} {$A2} {$A4} {$A8} {$ALIGN ON} {$ALIGN OFF} {$ALIGN 1} {$ALIGN 2} {$ALIGN 4} {$ALIGN 8} begin end. [QC Description] Since FT build 3478 the ALIGN directive does produce an Error Insight error. This affects a lot of files: - source: 10 files and 12 occurrences top file is ...\RAD Studio\7.0\source\Win32\rtl\win\Windows.pas (3x) - JCL: 4 files and 4 occurrences - JVCL: one file and one occurrence -> see steps QC Entry 75774 QC #: Date Reported: Area: 75790 7/14/2009 IDE\Packages\Package Manager Description: Steps: [QC Short Description] Changes to package "enabled" state is not persisted 1) Select any installed designtime BPL for testing 2) Close the IDE 3) Rename or move the selected BPL so it cannot be loaded 4) Start the IDE and wait for the "Cannot load package..." error 5) Respond "No" to disable future attempts to load the missing BPL 6) Open Component -> Install Packages... (missing package is unchecked) 7) Restore the BPL that was renamed or moved in step 3 8) Click the check box in Install Packages to load the restored BPL 9) Close and restart the IDE 10) Open Install Packages dialog (restored package is unchecked again!) [QC Description] There is a very annoying problem in the Component -> Install Packages... dialog that sometimes causes changes to the "enable" check boxes in the list of packages to be lost when the IDE is closed. This problem occurs frequently in our environment when updates to third-party packages cause package dependencies to become broken (e.g. Package A depends on Package B and an updated version of Package B is installed). After a component update (e.g. installing a new version of DevExpress), the IDE emits a shower of "Cannot load package..." errors as each broken package fails to load. Responding "No" to disable future loading of the offending packages avoids a repeat of the same errors when a project is opened. The problem occurs when attempting to re-enable the packages after the broken packages have been opened and re-compiled. QC Entry 75790 QC #: Date Reported: Area: 75791 7/14/2009 VCL\Win 32 Controls\TCoolBar Description: Steps: [QC Short Description] TCoolBar Bitmap property is broken 1) File | New VCL Application 2) drop a TCoolBar on the form 3) assign a bitmap to its Bitmap property 4) add an element (TCoolBand) to the CoolBar ==> the CoolBar is drawn with a themed background, instead of the bitmap. Assigning a bitmap to the TCoolBand's bitmap property also doesn't help. [QC Description] The TCoolBar/TCoolBand Bitmap property is no longer working in build 3478, both at design time and at run time. In build 3462 it was still working. See steps. QC Entry 75791 [SB: regression from Tiburon] QC #: Date Reported: Area: 75792 7/14/2009 IDE\Code Editor Description: Steps: [QC Short Description] Ctrl-F with text selected turns on search selection and keeps it turned on Select text in the editor. Press Ctrl-F. The text is shown in the search bar at the bottom of the editor. Press Enter to search. The text you selected yourself is found. Press F3. Message "tried to search selected text, but no text was selected" comes up. [QC Description] When you select some text in the editor and press Ctrl-F, the search bar at the bottom appears and holds the selected text as the text to search for. It also turns on the "search selection" checkbox. (Which is similar to D2009 behaviour), but if you then press F3 to search for the next occurence, you get dialog boxes "tried to search selected text, but no text was selected". In previous versions the "search selection" was cleared when the selection in the editor was cleared according to Darren Kosinski in the newsgroups (weaver.ide.editor). A bit awkward if you want to use the keyboard to search for something by just selecting text, pressing Ctrl-F and then F3 repeatedly like we used to be able to do. QC Entry 75792 QC #: Date Reported: Area: 75803 7/15/2009 IDE Description: Steps: [QC Short Description] List of recent files is almost off-screen - Launch Weaver Build 3478 - open and close several source files (at least 10 different files) - Click File -> Reopen The list of recently used files is almost off-screen; I can only see the last 5 items. [QC Description] - Launch Weaver Build 3478 - open and close several source files (at least 10 different files) - Click File -> Reopen The list of recently used files is almost off-screen; I can only see the last 5 items. QC Entry 75803 QC #: Date Reported: 75820 7/15/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] The compiler uses the wrong size (1 byte) for type parameters of a generic in pointer operations Compile and run the attached application below. See the following program output indicating failure. [QC Description] See Steps. Inc()/Dec() intrinsic routines and pointer arithmetic operations do not respect the actual size of type parameter. QC Entry 75820 FAIL #3 - increment FAILED FAIL #4 - addition FAILED FAIL - Counter=2 program BTS271103; { The compiler uses the wrong size (1 byte) for type parameters of a generic in pointer operations } {$apptype console} uses SysUtils; var Counter: Integer = 0; type G<T> = class class procedure Test; end; class procedure G<T>.Test; const standard = sizeof(integer); var p: ^T; begin if sizeof(T) <> standard then writeln('FAIL #1 - sizeof(T) FAILED') // OK else Inc(Counter); if sizeof(p^) <> standard then writeln('FAIL #2 - sizeof(p^) FAILED') // OK else Inc(Counter); p := nil; inc(p); if uint32(p) <> standard then writeln('FAIL #3 - increment FAILED') // FAILED else Inc(Counter); {$pointermath on} p := nil; p := p + 2; if uint32(p) <> standard*2 then writeln('FAIL #4 - addition FAILED') // FAILED else Inc(Counter); {$pointermath off} end; begin try G<integer>.Test; if Counter = 4 then WriteLn('PASS') else WriteLn('FAIL - Counter=', Counter); except on E: Exception do begin WriteLn('FAIL - Exception Error'); WriteLn(' ClassName=', E.ClassName); WriteLn(' Message=', E.Message); end; end; end. QC #: Date Reported: 75853 7/16/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Access violation for Extract on a generic TObjectList Compile and run the example. A access violation occurs at the line List.Extract(Ob) { This example demonstrates the usage of the generic TObjectList class. } type { Declare a new object type } TNewObject = class private FName: String; public constructor Create(const AName: String); destructor Destroy(); override; end; { TNewObject } constructor TNewObject.Create(const AName: String); begin FName := AName; end; destructor TNewObject.Destroy; begin { Show a message whenever an object is destroyed } MessageDlg ('Object "' + FName + '" was destroyed!', mtInformation, [mbOK], 0); inherited; end; procedure TForm3.Button1Click(Sender: TObject); var List: TObjectList<TNewObject>; Obj: TNewObject; begin { Create a new List } List := TObjectList<TNewObject>.Create(); { Set the OwnsObjects to true - the List will free them automatically } List.OwnsObjects := true; { Add some items up the List } List.Add(TNewObject.Create('One')); List.Add(TNewObject.Create('Two')); { Add a new item but keep the reference } Obj := TNewObject.Create ('Three'); List.Add(Obj); { Remove an instance of TNewObject class. Destructor should be called because we have set the OwnsObjects to true! } List.Delete(0); List.Extract(Obj); { Destroy the List completely - more messageboxes will be shown } List.Free; end; [QC Description] I tried to test the code example I found in the Delphi Help file for a generic TObjectList. The code was compiled without any error message. However when I run the program I got an access violation at the line List.Extract (Obj). The same happens if I try to use List.Remove(Obj) or List.IndexOf(Obj) QC Entry 75853 QC #: Date Reported: Area: 75882 7/17/2009 IDE\Form Designer Description: Steps: [QC Short Description] ActionMainMenuBar designtime stuff is broken severely in build 3478.22926 Here is the problem reproduce steps: 1. Create an ActionManager, create the usual suspect standard actions (File, Edit, Help) 2. Drag from category list in actionmanager editor window to the ActionMainMenuBar. 3. Now click on the top-level categorys (pulldown menu headings, File, Edit, and Help) in sequence. 3. You get accidental drag/drop reorderings when you didn't move the mouse even one pixel. You get pull-downmenus (edit actions, especially, because it is neither the first nor the last in the list) will not "go away" (hide) even when you show other things or mouse focus is lost from the actionmainmenubar. 4. Repeated dragging, and clicking will result in Access violation. For a traceback see comments. [QC Description] ActionMainMenuBar used with ActionManager, and standard Actions (Edit actions, File actions, Help actions) results in various design-time glitches, and eventually access violations and IDE crashing. QC #75291 seems possibly related; What is similar is that someone else has reported problems with "accidental reordering" in the structure pane very similar to the accidental "move/delete" that is happening here. Whatever mouse-move message handling glitches are happening in the one place may happen in the other as well. See steps to reproduce (easily reproduceable). For a stack traceback on the access violations, see comments. Testing done on Vista 64bit with SP1, but I don't believe it's likely to be only an issue on 64bit platforms. [screenshot bug02.jpg is in attachments which shows the visual glitches] QC Entry 75882 QC #: Date Reported: 75883 7/17/2009 Area: Debugger\Evaluator\Delphi Description: Steps: [QC Short Description] TStrings visualizer returns garbage when trying to visualize a nil TStrings variable Create this console app: program Project1; {$APPTYPE CONSOLE} {$OPTIMIZATION OFF} uses SysUtils, Classes; var SL: TStringList; begin SL := nil; ReadLn; end. Add watch for SL variable Breakpoint at ReadLn Run app In watch, show visualizer for SL (spyglass dropdown, show strings) Garbage appears in the resulting dialog (see screenshot) (Chris already fixed this, it is reported for tracking only) [QC Description] The new TStrings visualizer returns garbage when trying to visualize a nil TStrings variable QC Entry 75883 QC #: Date Reported: 75897 7/18/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] New() with generic class records allocate field-count bytes instead of SizeOf bytes. 1. Open the attached project 2. Set a breakpoint to the "New(P)" line 3. Start the application 4. When the Debugger hits the breakpoint, look at the CPU view [QC Description] If you use "New(PRecType)" in a generic class where PRecType=^TRecType is declared in the generic class with generic fields, the New() call will be transformed to an GetMem call with the number of fields as the "size" parameter, where it should be SizeOf. Furthermore if one of the records fields becomes a managed type (e.g. string) the InitializeRecord and FinalizeRecords calls are missing. QC Entry 75897 Expected: The EAX register is loaded with 8 (By USc: and records with managed types will be initialized) Actual: The EAX register is loaded with 2 (and if you add another field to the record it is loaded with 3, 4, 5, ...) (By USc: no initialization for records with managed types) program BTS271245; {$APPTYPE CONSOLE} type TCustomList<TKey, TValue> = class(TObject) public type PItem = ^TItem; TItem = record Key: TKey; Value: TValue; end; end; var P: TCustomList<string, TObject>.PItem; begin New(P); // allocates only 2 bytes but it should allocate 8 bytes // and where is the Initialize() call (for the string field)? { B802000000 mov eax,$00000002 <<<< here E882ADFCFF call @GetMem } {//disassembly for a classic class with a managed record (string and TObject) 8B15A85A4000 mov edx,[$00405aa8] B808000000 mov eax,$00000008 E814EFFFFF call @New //disassembly for a classic class with an unmanaged record (two Integer's) B808000000 mov eax,$00000008 E80EDCFFFF call @GetMem } //P^.Value := nil; // doesn't compile: "Incompatible types: 'TValue' and 'Pointer'" Dispose(P); // releases only 2 bytes but it should release 8 bytes // and where is the Finalize() call (for the string field)? { BA02000000 mov edx,$00000002 <<<< here E894ADFCFF call @FreeMem } {//disassembly for a classic class with a managed record (string and TObject) 8B15A85A4000 mov edx,[$00405aa8] E81DEFFFFF call @Dispose //disassembly for a classic class with an unmanaged record (two Integer's) BA08000000 mov edx,$00000008 E820DCFFFF call @FreeMem } end. QC #: Date Reported: Area: 75901 7/18/2009 IDE\Class Completion Description: Steps: [QC Short Description] Class completion feature error 1. Create new VCL form Project. 2. Add to the top "type" next lines: type TMyRec = record fMyRec: integer; class operator Implicit(ANew: integer): TMyRec; end; It is fully correct but if you press Ctrl+Shift+C here or below it always show error. For Example: unit Unit1; interface uses ... type TMyRec = record fMyRec: integer; [QC Description] class operator Implicit(ANew: integer): TMyRec; end; TForm1 = class(TForm) private { Private declarations } Class completion feature shows wrong error - "Expected END but '?' found in class TMyRec." (There are no any public function My: boolean; //<<<<< PRESS CTRL + SHIFT + C - to automatically complete function - see '?' letters!) in next situation: error end; Added by Sysop <<<<<< This issue similar to QC#70431. >>>>>> QC Entry 75901 QC #: Date Reported: Area: 75910 7/19/2009 VCL\Property/Type Editors Description: Steps: [QC Short Description] AV after closing component editor for ScreenTipsManager - Create a new VCL Forms application (Delphi or C++Builder) - Drop a "TScreenTipsManager" component Drop a "TActionList" component - Add an item to "ScreenTipsManager1.LinkedActionLists", set its "ActionList" property to "ActionList1" - Double-click the "ScreenTipsManager1" component. A component editor pops up. Open the "File" menu (or any other menu item) of the component editor window, close it again. - Close the component editor. Exp.: no problems Act.: Access violation at address 2147D7F5 in module 'vclactnband140.bpl'. Read of address 80808090. [QC Description] See steps. QC Entry 75910 QC #: Date Reported: Area: 75914 7/19/2009 IDE\Open Tools API Description: Steps: [QC Short Description] Some method names use "Descendent" instead of "Descendant" Search ToolsAPI.pas for "descendent" [QC Description] Some new methods in the ToolsAPI use the word "Descendent" when the word "Descendant" is intended. QC Entry 75914 QC #: Date Reported: 75916 7/19/2009 EXP: No matches found ACT: Some matches found Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] TRibbon: typo in form designer function "Add Quick Access Toolbar" - start Delphi - create a new VCL app - add TRibbon - show the popup menu for the TRibbon instance - have a look at the fourth item expected: "Add Quick Access Toolbar" (A_CC_ESS) actual: "Add Quick Acess Toolbar" (A_C_ESS) [QC Description] There is a typo in the english version of the function "Add Quick Access Toolbar" for TRibbon in the form designer. -> see steps QC Entry 75916 QC #: Date Reported: Area: 75920 7/19/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] "Identifier redeclared" with procedures after generic "reference to procedure" - save the file at the end of the steps - start Weaver - open SimplifiedSysUtils.pas expected: no Error Insight errors in the Structure view actual: Identifier redeclared 'GetDefaultFallbackLanguages' at line 16 (16:10) Identifier redeclared 'SetDefaultFallbackLanguages' at line 20 (20:11) Identifier redeclared [QC Description] 'PreferredUILanguages' at line 24 (24:10) - open ...\RAD Studio\7.0\source\Win32\rtl\sys\SysUtils.pas expected: ...\RAD Studio\7.0\source\Win32\rtl\sys\SysUtils.pas does produce since FT build 3478 some "new" Error Insight no Error Insight errors in the Structure view actual: Identifier redeclared 'GetDefaultFallbackLanguages' at line error. They were probably hidden due RAID 213361 (+ QC 64959/RAID 263095) and the error has something 22731 (22731:10) Identifier redeclared 'SetDefaultFallbackLanguages' at line 22736 (22736:11) Identifier todo with generic "reference to procedure" redeclared 'PreferredUILanguages' at line 22746 (22746:10) unit SimplifiedSysUtils; interface type TProc<T> = reference to procedure; function GetDefaultFallbackLanguages: string; procedure -> see steps SetDefaultFallbackLanguages(const Languages: string); function PreferredUILanguages: string; QC Entry 75920 implementation function GetDefaultFallbackLanguages: string; begin end; procedure SetDefaultFallbackLanguages(const Languages: string); begin end; function PreferredUILanguages: string; begin end; end. QC #: Date Reported: 75932 7/20/2009 Description: Area: VCL Steps: [QC Short Description] GetCategoryPanelSurfaceClass declared virtual in private section [QC Description] GetCategoryPanelSurfaceClass in TCustomCategoryPanel is declared virtual in private section. Should be moved to protected section. QC Entry 75932 QC #: Date Reported: Area: 75941 7/20/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] Code Formatter: formatting of message handlers Message handlers like procedure WMLButtonDown(var Msg: TWMMouse); message WM_LBUTTONDOWN; are formatted into procedure WMLButtonDown( var Msg: TWMMouse); message WM_LBUTTONDOWN; Not good. It's also weird, 'cause 'virtual', 'override', 'abstract' keywords are kept on the same line, which is correct and expected. QC Entry 75941 QC #: Date Reported: Area: 75984 7/21/2009 VCL\Additional Controls\TStringGrid Description: [QC Short Description] TStringGrid: pan doesn't follow finger [QC Description] Steps: If you pan a TStringGrid vertically (via DoGesture) the grid doesn't follow your finger: it goes much faster. This isn't what you'd expect (see TListBox for example). The scrollbars have a fake Max value, which is very high (SetAxisRange() sets it to MaxShortInt). This might have something to do with it. QC Entry 75984 QC #: Date Reported: 76024 7/23/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Cannot compile package when generics are used 1. Open the attached project. 2. Build package A. 3. Try to build package B. [QC Description] I have 2 packages A and B. In A I have defined a generic class inherited from TObjectDictionary<TKey,TValue> B depends on A and uses that class. If I try to compile B I get: [DCC Fatal Error] F2084 Internal Error: AV04F70CDC-R0000000C-0 See the attached project. Update 3 doesn't solve the problem Also when I use more complex packages and generic types referenced in their interface sections I get errors: E2225 Never-build package must be recompiled Unit was compiled with different Manually recompiling packages doesn't help. QC Entry 76024 QC #: Date Reported: Area: 76026 7/23/2009 RTL\Delphi Description: Steps: [QC Short Description] zlib ZSendToBrowser bug quite obvious from source in Zlib.pas [QC Description] ZSendToBrowser uses Length(s) to compress, where s is string. if the intention was to pass string (instead of AnsiString), it should be bytelength QC Entry 76026 Notice the call to both ZCompress2 and the Move are presuming that a character is one byte in size. ... procedure ZSendToBrowser(var s: string); var outBuf: Pointer; outBytes: Integer; begin ZCompress2(pointer(s), length(s), outBuf, outBytes); SetLength(s, outBytes); Move(pointer(outBuf)^, pointer(s)^, outBytes); FreeMem(outBuf); end; .... where the second parameter to ZCompress2 is the size in bytes of the buffer coming in. procedure ZCompress2(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer); QC #: Date Reported: 76058 7/24/2009 Area: Database\DBExpress Description: Steps: [QC Short Description] AV in dbxinf.dll (Informix DBX driver) TDBXWeaverBugsSuite.Native.DB.Test.exe connection=informixconnection -s:TestRaid_271931 -or- [QC Description] If we use a paramterized Query and open it with CDS, all is right. If we now change the SQL to one whithout a Paramter and Close/Open the CDS, it will raise an AV in dbxinf.dll. QC Entry 76058 1. Unzip the attached sampleproject 2. Change the SQLConnect1.Params to your environement. 3. Compile and run the application inside the IDE to see the AV. Outsinde the IDE you will only see an generic error. 4. Press the "Fill Table" button. The application will create a test table with 25'003 records. This will take some time. 5. Now execute the SQL by pressing the "Go DBX" button. This will select one record with ArtNr = 10000 6. Now change the SQL in thw Memo to this: select * from testdbxorder order by ArtNr (simply remove the Where clausle with the parameter) 7. Press again the "Go DBX" button. Now you will see an AV in dbxinf.dll if you debug inside the IDE. This is a handled AV which will give an generic error "Fatal Error" (German: Schwerwiegender Fehler). Acces Vilaotion at address 00F64CB8 in mdoul dbxinf.dll. Read of address 00000004. QC #: Date Reported: 76073 7/25/2009 Area: VCL Description: Steps: [QC Short Description] D2009 does not initialize the PrintDlgRec record in TPrintDialog Execute Added by Sysop <<<<<<<< Unit Dialogs, line 3241, function TPrintDialog.Execute(ParentWnd: HWND): Boolean. At least, the nCopies variable in the PrintDlgRec record have variouse strange values when calling TaskModalDialog(@PrintDlg, PrintDlgRec) at 3319 line. >>>>>>>> [QC Description] The PrintDlgRec record in the TPrintDialog Execute method has not been initialized before it usage. QC Entry 76073 QC #: Date Reported: Area: 76128 7/27/2009 IDE\Code Editor Description: Steps: [QC Short Description] "Undo" in the editor doesn't always mark the file as modified 1) Ensure that Tools -> Options -> Environment Options -> Autosave Options -> Editor Files is checked 2) Ensure that Tools -> Options -> Editor Options -> Undo After Save is checked 3) Open the attached dpr file 4) Run it: It should display "1". Click OK to close the app. 5) Open Unit1.pas in the editor and change the text in the ShowMessage to "2". 6) Run it: It should display "2". Click OK to close the app. 7) Change the text in the ShowMessage to "3". 8) Run it: It should display "3". Click OK to close the app. 9) Use Edit -> Undo (or Ctrl+Z) to undo the last changes so it is back to "2" 8) Run it: It should display "2". Click OK to close the app. 9) Use [QC Description] There are certain situations in which using "undo" does not mark the source file as modified, possibly causing data loss and/or the compiler building an executable with an old dcu file. Refer to "Steps" for a set of steps that reproduces this behaviour reliably. QC Entry 76128 Edit -> Undo (or Ctrl+Z) to undo changes further so it is back to "1" 10) Run it. Expected behaviour: It should display "1". Actual: It displays "2". QC #: Date Reported: Area: 76152 7/28/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: multitouch shift issue - run a TTouchKeyboard on a windows 7 multitouch machine - do this with your fingers: 1. Shift key down 2. Alpha key down 3. Alpha key up 4. Shift key up Expected: Alpha keys show lower case Observed: Alpha keys show upper case 5. repeat step 1..4 Expected: Shift key is off Observed: Shift key is on The first issue is just a painting issue (ie. pressing an alpha key gets you a lowercase charachter, as expected). The second issue is a logical problem: Shift is really still on. [QC Description] see steps QC Entry 76152 QC #: Date Reported: 76163 7/28/2009 Area: Debugger\Evaluator\Delphi Description: Steps: [QC Short Description] No support for TValue as argument in the Debugger Use the following console app: program Project8; [QC Description] Have a Form. Add a button and the following method to the form: function TForm4.Test(aVal: TValue): string; begin Result:=aVal.ToString; end; ...also in the Button's OnClick handler write the following and put a breakpoint in the marked bogus line. procedure TForm4.ToolButton1Click(Sender: TObject); begin Caption:=Caption; //<---breakpoint here! end; Run. When the program stops, press Ctrl+F7 to invoke the Evaluator and type 'Test(Form4)' (or whatever name your form has). Instead to return eg. '(TForm4 @ 00BC4320)' it returns Access violation at 004C3EC3 accessing 0234CA1D ...and if you're stubborn and try to evaluate this multiple times there are good chances to generate AVs through the entire IDE. QC Entry 76163 {$APPTYPE CONSOLE} uses SysUtils, Classes, Rtti; function foo(Value: TValue): string; begin Result := Value.ToString; end; var SL: TStringList; begin try SL := TStringList.Create; writeln(foo(SL)); //set breakpoint here except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. Set a breakpoint where indicated Run to hit the breakpoint Ctrl-F7 to open the evaluator dialog Enter "foo(SL)" for the expression Evaluator returns an AV QC #: Date Reported: Area: 76169 7/29/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: RepeatRate / RepeatDelay default values swapped [QC Description] in declaration: property RepeatRate: Cardinal read FRepeatRate write FRepeatRate default 300; property RepeatDelay: Cardinal read FRepeatDelay write FRepeatDelay default 50; in constructor: FRepeatDelay := 300; FRepeatRate := 50; QC Entry 76169 QC #: Date Reported: 76195 7/29/2009 Area: Compiler\Delphi Description: Steps: [QC Short Description] TRttiField.Visibility incorrect (JJS: See the attached file BTS271761 rewritten for PASS/FAIL) Run the following program it will show the invalid results [QC Description] Every field is return as "mvPublic" regardless of where it really is located. program Project9; QC Entry 76195 {$APPTYPE CONSOLE} uses SysUtils, Rtti,TypInfo; type TFoo = class(TObject) private fPrivate : IUnknown; protected fProtected : IUnknown; public fPublic : IUnknown; published fPublished : IUnknown; end; var c : TRttiContext; t : TRttiType; s : string; Field : TRttiField; begin try c := TRttiContext.Create; t := c.GetType(TFoo); for Field in t.GetFields do begin Write(field.Name, ' '); writeln(GetEnumName(TypeInfo(TMemberVisibility),ord(field.Visibility))); end; c.Free; readln(s); except on E: Exception do begin Writeln(E.ClassName, ': ', E.Message); readln(s); end; end; end. QC #: Date Reported: Area: 76198 7/29/2009 VCL\Property/Type Editors Description: Steps: [QC Short Description] The button in "Value List Editor" is truncated. 1.[File | New | VCL Forms Application] 2.Put TSQLConnection on the form. 3.Show "Object Inspector". 4.Click "Params" button. 5."Value List Editor" appears. EXP: Not truncated. ACT: Truncated. [QC Description] The button in "Value List Editor" is truncated. Please see Steps QC Entry 76198 [SB: Bottoms of all buttons are truncated, value list is snug up against edge of form] QC #: Date Reported: Area: 76202 7/29/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] Code formatter: $ in comments If I have comment in the code like { $100 is a good price for this piece of ... code } and I set option "Set spacing for { and (* comments" = "Outer only", then it's formatted into {$100 is a good price for this piece of ... code} So comment becomes a directive. It's a dangerous behavior of code formatter. It breaks the code. QC Entry 76202 QC #: Date Reported: Area: 76203 7/29/2009 IDE\Message View Description: Steps: [QC Short Description] Compile-Window: Label showing the filename is one pixel off-center Compile a project, see the compile-window [QC Description] In the windows that shows us the compile-progress (project, filename, line-number) the label showing the filename is one pixel off-center. see attached screenshot QC Entry 76203 QC #: Date Reported: Area: 76228 7/30/2009 SOAP\WSDL Importer Description: Steps: [QC Short Description] WebService under https authenticated via X509 certificates [This requires that we setup a WSDL on a Server that requires a Client Certificate; I did that a while ago but the machine is not longer available; it's something that we should have setup in-house for testing purposes; See Bruneau for more details]. [Please see Resolutin Note on Workaround] Steps to verify this bug: - Extract attached files to a local directory. - Copy ws-tokens.ini to C:\ or main drive root directory - Launch Internet Explorer. Tools|Internet Options. Advanced. Uncheck option 'Security|Check for server certificate revocation*' ---// Needed only on Vista and Win 7. Should skip this for XP. - Restart Internet Explorer. - Tools|Internet Options. Content. Click on Certificates. - Import...import the first certificate SRF.P7B. - Click Import...again and import hp2009.pfx. Please check with Chris White, Lata Amujuri or Andreano for the password to import this certificate. - In IDE, Component|Import WSDL using URL: https://homologacao.nfe.fazenda.sp.gov.br/nfeweb/services/nferecepcao.asmx?wsdl //exp: Should import successfully [QC Description] Hi folks, I'm getting the "Empty Document" error when trying to import a authenticated webservice using a X509 certificate. The Wizard displays the installed certificates for selection, but the import process stops after that displaying the attached message. Saving and importing the .wsdl file locally works ok. QC Entry 76228 Error [Empty Document] happens on Windows Vista and Windows 7. Works on Windows XP. Note: This bug should be tested on Win XP, Vista an 7 to make sure that it works properly. QC #: Date Reported: Area: 76234 7/30/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: "Kanji" key's caption is empty (Japanese keyboard layout) 0.Install Japanese edition of Weaver. 1.[File | New] 2.Put TTouchKeyboard on the form. EXP: The key's caption is "kanji" (Japanese Roman). ACT: The key's caption is empty. [QC Description] (Japanese keyboard layout) "Kanji" key's caption is empty. The function of the key cannot be understood. QC Entry 76234 QC #: Date Reported: Area: 76237 7/30/2009 VCL\Touch Controls\TTouchKeyboard Description: Steps: [QC Short Description] TTouchKeyboard: Can't input U+30ED/U+30FC (Japanese keyboard layout) 0.Install Japanese edition of Weaver. 1.[File | New] 2.Put TTouchKeyboard on the form. 3.Put TMemo on the form. 4.[Run | Run] 5.Press "Kana" key. EXP: Can input U+30ED/U+30FC. ACT: Can't input U+30ED/U+30FC. See Also: http://en.wikipedia.org/wiki/File:KB_Japanese.svg U+30ED, KATAKANA LETTER RO Left side of Right-Shift key U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK Left side of BackSpace key. [QC Description] Can't input U+30ED/U+30FC (Japanese keyboard layout) U+30ED, KATAKANA LETTER RO U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK Please see steps. QC Entry 76237 QC #: Date Reported: 76238 7/30/2009 Area: Database\DataSnap\Server Description: Steps: [QC Short Description] DataSnap Server projects generated without DSServerClass component 1. Start RAD Studio 2. Click New Project 3. Click DataSnap Server in left pane 4. Double-click DataSnap Server in projects list 5. Check HTTP and uncheck TCP/IP 6. Click OK. Expected: The generated data module to contain the DSServerClass component in addition to DSServer and DSHTTPService. Actual: The generated data module only contains the DSServer and DSHTTPService components. [QC Description] The DataSnap Server project wizard does not place the DSServerClass component on the form and link it with the generated OnGetClass event handler. QC Entry 76238 QC #: Date Reported: Area: 76247 7/31/2009 Compiler\Delphi Description: Steps: [QC Short Description] AVs when using Rtti inside BDS (JJS: Compile, install, and activate the attached IDE wizard) Here's the procedure that fails with the AV from the menu wizard's execute method. [QC Description] Using Rtti in a dll expert build with run-time packages (including designide) that is loaded into BDS, causes AV's. procedure RttiTest; It turns out that just iterating the packages is enough to invoke the AVs (several). var FContext: TRttiContext; I don't know if this also happens when used inside a design-time package. P: TRttiPackage; Buffer: TStringList; A similar test with emitting the types obviously crashes too. begin QC Entry 76247 Buffer := TStringList.Create; try FContext := TRttiContext.Create; try for P in FContext.GetPackages do Buffer.Add(P.Name); // The last packagename is vcl140.bpl // crash after that. finally FContext.Free; end; Buffer.SaveToFile('c:\rtti.txt'); ShowMessage('Done'); finally Buffer.Free; end; end; QC #: Date Reported: Area: 76250 7/31/2009 Database\Data Aware Controls\TDBGrid Description: Steps: [QC Short Description] Themed DBGrid draws black boxes around every cell Create a new Delphi VCL Win32 Application - drop a TDBGrid on the form - drop a TClientDataSet - drop a DataSource component Wire the components: DBGrid -> DataSource -> ClientDataSet Run the application on a Windows with Themes enabled. Exp: The DBGrid is rendered smoothly Act: Every Cell in the DBGrid is surrounded by black boxes. See attached ScreenShots taken under - Windows 7 RC1 Win32 with Areo Basic (VMWare) - Windows XP Prof. with Luna Blue Theme (phys. machine) [QC Description] DBGrid connected to a dataset draws black boxes around every cell. See attached screenshots Screenshots are taken under - Windows 7 32 Bit, Areo Basic (VMWare) - Windows XP Prof. 32 Bit, Luna Blue Theme As long as the DBGrid is *not* connected to any dataset, it is painted correctly. QC Entry 76250 QC #: Date Reported: 76252 7/31/2009 Area: VCL\Ribbon Controls Description: Steps: [QC Short Description] Clicking on a tab when minimized Ribbon dont show collapsed group Open RibbonDemo Run Application Double click on Ribbon tab to minimize Resize Click on Control Types Somme groups are neither collapsed nor show [QC Description] Clicking on a tab when minimized Ribbon dont show collapsed group QC Entry 76252 QC #: Date Reported: Area: 76277 7/31/2009 IDE\Code Editor\Error Insight Description: Steps: [QC Short Description] "Overloaded procedure 'TFoo.Bar' must be marked with the 'overload'..." with generic type a result - save the file at the end of the steps - start Weaver - open GenericsResultOverloadErrorInsightTest.dpr expected: no Error Insight errors in the Structure view actual: Overloaded procedure 'TRttiType.GetMethods' must be marked with the 'overload' directive at line 18 (18:10) - open ...\RAD Studio\7.0\source\Win32 \rtl\common\Rtti.pas expected: no Error Insight errors in the Structure view actual: Overloaded procedure 'TRttiType.GetMethods' must be marked with the 'overload' directive at line 3401 (3401:10) program GenericsResultOverloadErrorInsightTest; {$APPTYPE CONSOLE} type TArray<T> = class(TObject); TRttiType = class(TObject) function GetMethods: TArray<TObject>; overload; function GetMethods(const AName: string): TArray<TObject>; overload; end; function TRttiType.GetMethods: TArray<TObject>; begin Result := nil; end; function TRttiType.GetMethods(const AName: string): TArray<TObject>; begin Result := nil; end; begin end. [QC Description] ...\RAD Studio\7.0\source\Win32\rtl\common\Rtti.pas does produce a Error Insight error for an overloaded method with a generic type as result. -> see steps QC Entry 76277 QC #: Date Reported: Area: 76280 7/31/2009 Compiler\Delphi\Other Compiler Description: Steps: [QC Short Description] "CodeGear Delphi for Win32 compiler" instead of "Embarcadero Delphi for..." - dcc32 --version - have a look at the output expected: ...Embarcadero Delphi... dcc (Embarcadero Delphi for Windows) 21.0 Embarcadero Delphi for Win32 compiler version 21.0 Copyright (c) 1983,2009 Embarcadero Technologies actual: ...CodeGear Delphi... dcc (CodeGear Delphi for Windows) 21.0 CodeGear Delphi for Win32 compiler version 21.0 Copyright (c) 1983,2009 Embarcadero Technologies [QC Description] The CodeGear to Embarcadero bulk replacement hasn't yet reached the compiler -> see steps QC Entry 76280 QC #: Date Reported: Area: 76299 8/1/2009 VCL\Ribbon Controls Description: Steps: [QC Short Description] Deleting a combobox from a Ribbon cause an exception Open RibbonDemo Go to Home tab Click on rcbFontSize Press delete key An exception occures [[10534938] {vclribbon140.bpl} RibbonActnCtrls.TRibbonComboControl.SetBounds (Line 4382, "RibbonActnCtrls.pas" + 4) + $F [500073FE]{rtl140.bpl } System.ErrorAt (Line 3645, "System.pas" + 3) + $4 [10534938]{vclribbon140.bpl} RibbonActnCtrls.TRibbonComboControl.SetBounds (Line 4382, "RibbonActnCtrls.pas" + 4) + $F [1051D0A8] {vclribbon140.bpl} Ribbon.TCustomRibbonGroup.AlignGroupControls (Line 6851, "Ribbon.pas" + 93) + $12 [502996AB]{vcl140.bpl } Controls.TWinControl.Notification (Line 8959, "Controls.pas" + 1) + $6 [1051E6D5] {vclribbon140.bpl} Ribbon.TCustomRibbonGroup.Notification (Line 7495, "Ribbon.pas" + 9) + $4 [50075359] {rtl140.bpl } Classes.TComponent.RemoveFreeNotifications (Line 11810, "Classes.pas" + 4) + $11 [500752FC] {rtl140.bpl } Classes.TComponent.Destroy (Line 11793, "Classes.pas" + 2) + $2 [50293A7B]{vcl140.bpl } Controls.TControl.Destroy (Line 5222, "Controls.pas" + 27) + $7 [50009D14]{rtl140.bpl } System.TObject.FreeInstance (Line 9440, "System.pas" + 2) + $2 [5000A3E6]{rtl140.bpl } System.@ClassDestroy (Line 10319, "System.pas" + 0) + $2 [50293198]{vcl140.bpl } Controls.TControlCanvas.Destroy (Line 4865, "Controls.pas" + 3) + $6 [5029FD7C]{vcl140.bpl } Controls.TGraphicControl.Destroy (Line 13104, "Controls.pas" + 3) + $7 [214E1B6A]{vclactnband140.bpl} ActnMan.TCustomActionControl.Destroy (Line 5749, "ActnMan.pas" + 3) + $7 [1053418A]{vclribbon140.bpl} RibbonActnCtrls.TRibbonComboControl.Destroy (Line 4164, "RibbonActnCtrls.pas" + 4) + $7 [50009D5C] {rtl140.bpl } System.TObject.Free (Line 9459, "System.pas" + 1) + $4 [214E1085]{vclactnband140.bpl} ActnMan.TCustomActionBar.RecreateControls (Line 5448, "ActnMan.pas" + 4) + $15 [214DE3AB] {vclactnband140.bpl} ActnMan.TActionClientItem.SetCommandStyle (Line 4063, "ActnMan.pas" + 33) + $A [10534817]{vclribbon140.bpl} RibbonActnCtrls.TRibbonComboControl.Notification (Line 4347, "RibbonActnCtrls.pas" + 7) + $8 [500756C0]{rtl140.bpl } Classes.TComponent.Notification (Line 11979, "Classes.pas" + 8) + $12 [50293E37]{vcl140.bpl } Controls.TControl.Notification (Line 5426, "Controls.pas" + 1) + $6 [502996AB]{vcl140.bpl } Controls.TWinControl.Notification (Line 8959, "Controls.pas" + 1) + $6 [214E0337]{vclactnband140.bpl} ActnMan.TCustomActionBar.Notification (Line 5001, "ActnMan.pas" + 1) + $6 [1051E69F]{vclribbon140.bpl} Ribbon.TCustomRibbonGroup.Notification (Line 7487, "Ribbon.pas" + 1) + $6 [QC Description] Deleting a combobox from a Ribbon cause an exception QC Entry 76299 [500756C0]{rtl140.bpl } Classes.TComponent.Notification (Line 11979, "Classes.pas" + 8) + $12 [50293E37] {vcl140.bpl } Controls.TControl.Notification (Line 5426, "Controls.pas" + 1) + $6 [502996AB]{vcl140.bpl } Controls.TWinControl.Notification (Line 8959, "Controls.pas" + 1) + $6 [502BEC17]{vcl140.bpl } Forms.TCustomForm.Notification (Line 3362, "Forms.pas" + 1) + $6 [20D80EB1]{designide140.bpl} Proxies.NotificationHook (Line 310, "Proxies.pas" + 8) + $B [50075549]{rtl140.bpl } Classes.TComponent.RemoveComponent (Line 11903, "Classes.pas" + 2) + $8 [50075311]{rtl140.bpl } Classes.TComponent.Destroy (Line 11795, "Classes.pas" + 4) + $9 [50293A7B]{vcl140.bpl } Controls.TControl.Destroy (Line 5222, "Controls.pas" + 27) + $7 [5029821B]{vcl140.bpl } Controls.TWinControl.Destroy (Line 8198, "Controls.pas" + 34) + $7 [10534FDD]{vclribbon140.bpl} RibbonActnCtrls.TCustomRibbonComboBox.Destroy (Line 4589, "RibbonActnCtrls.pas" + 2) + $7 [50009D5C] {rtl140.bpl } System.TObject.Free (Line 9459, "System.pas" + 1) + $4 [20DAF869]{designide140.bpl} ComponentDesigner.TComponentRoot.DeleteSelection (Line 4628, "ComponentDesigner.pas" + 44) + $2 [20DC2DAB]{designide140.bpl} Surface.TDesignSurface.DeleteSelection (Line 193, "Surface.pas" + 0) + $7 [20D8E48B]{designide140.bpl} Designer.TDesigner.DeleteSelection (Line 751, "Designer.pas" + 2) + $5 [20D909EF]{designide140.bpl} Designer.TDesigner.Key (Line 1547, "Designer.pas" + 4) + $3 [5196CF04] {vcldesigner140.bpl} VCLSurface.KeyEvent (Line 3000, "VCLSurface.pas" + 8) + $1E [5196D80E] {vcldesigner140.bpl} VCLSurface.TVclDesignSurface.IsDesignMsg (Line 3182, "VCLSurface.pas" + 61) + $6 [50009F7E]{rtl140.bpl } System.@IsClass (Line 9739, "System.pas" + 1) + $8 [50296273]{vcl140.bpl } Controls.TControl.WndProc (Line 6968, "Controls.pas" + 4) + $21 [20D6C80E]{designide140.bpl} DeskUtil.SetFocusHook (Line 454, "DeskUtil.pas" + 4) + $C [5029AD50]{vcl140.bpl } Controls.TWinControl.WndProc (Line 9797, "Controls.pas" + 144) + $6 [502BFCDC]{vcl140.bpl } Forms.TCustomForm.WndProc (Line 3960, "Forms.pas" + 191) + $5 [5029A41D]{vcl140.bpl } Controls.TWinControl.MainWndProc (Line 9521, "Controls.pas" + 6) + $0 [5029AD50]{vcl140.bpl } Controls.TWinControl.WndProc (Line 9797, "Controls.pas" + 144) + $6 (0002D49C){CnWizards_D14.dll} [0948E49C] [502BFCDC]{vcl140.bpl } Forms.TCustomForm.WndProc (Line 3960, "Forms.pas" + 191) + $5 [2215510B]{delphivclide140.bpl} VCLFormContainer.TControlSizer.ControlWndProc (Line 306, "VCLFormContainer.pas" + 33) + $C [5029A408]{vcl140.bpl } Controls.TWinControl.MainWndProc (Line 9518, "Controls.pas" + 3) + $6 [50076E3C]{rtl140.bpl } Classes.StdWndProc (Line 13072, "Classes.pas" + 8) + $0 [502C8EF1]{vcl140.bpl } Forms.TApplication.ProcessMessage (Line 9784, "Forms.pas" + 30) + $1 [502C8F36] {vcl140.bpl } Forms.TApplication.HandleMessage (Line 9814, "Forms.pas" + 1) + $4 [502C9261]{vcl140.bpl } Forms.TApplication.Run (Line 9951, "Forms.pas" + 26) + $3 [0042C94A]{bds.exe } bds.bds (Line 200, "" + 8) + $FFFB Note: this happens in Delphi 2009 too QC #: Date Reported: Area: 76300 8/1/2009 IDE Description: Steps: [Flexible language feature] 0.Install Japanese edition of Weaver. 1.$(BDS)\bin\BDSSetLang.exe /I 2.Switch Japanese to English. 3.Launch Delphi. 4.[View | Toolbars] EXP: Menu item is displayed with English. ACT: Menu item is displayed with Japanese. (QC76300.jpg) [QC Short Description] BDSSetLang: The language of the menu item of the toolbar doesn't switch [QC Description] <!> In Japanease Windows environment <!> The language of the menu item of the toolbar doesn't switch. Please see steps. QC Entry 76300 QC #: Date Reported: Area: 76318 8/3/2009 IDE\Open Tools API Description: Steps: [QC Short Description] Calling IOTAEditorServices.KeyboardServices results in AV Compile the attached DLL Install it as usual as a DLL expert into the registry like this: REGEDIT4 [HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0\Experts] "TestExpert"="Z:\\TestExpert\\TestExpert.dll" Start the IDE Shtdown the IDE and see the AV when calling: (BorlandIDEServices as IOTAEditorServices).KeyboardServices; [QC Description] Calling IOTAEditorServices.KeyboardServices consistently results in this AV: --------------------------Debugger Fault Notification --------------------------Project C:\Program Files\Embarcadero\RAD Studio\7.0\bin\bds.exe faulted with message: 'access violation at 0x771b7eae: write of address 0x00030fe8'. Process Stopped. Use Step or Run to continue. --------------------------OK --------------------------Chris already duplicated this, but asked that I QC it. He mentioned the problem was present in TIDEEditorServices.GetKeyboardServices. QC Entry 76318 QC #: Date Reported: Area: 76332 8/3/2009 IDE\Search\Find Description: Steps: [QC Short Description] Find bar (Ctrl-F) options doesn't shown used screen resolution: 1680x1050 run and maximaze Delphi 2010 open any file for editing press Ctrl-F - find bar is shown the result - some options (usually Search selection, but sometimes others depends on program window size) are not shown hidden behind "Additional search options" button when plenty of space available to show all of them in one place (See attached image) [QC Description] When using Ctrl-F option find bar shown but some options are hidden behind "Additional search options" button when plenty of space available to show all of them in one place QC Entry 76332 QC #: Date Reported: Area: 76347 8/3/2009 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] A TDictionary search can get caught in an endless loop. // Compile and run this program, and watch it deadloop. {JJS: The line marked //#1// is expected to generate a EListError exception} [QC Description] TDictionary search algorithm can deadloop under certain circumstances. Particularly, when multiple powers of 2 (not including 2) number of keys are added to the dictionary, AND TrimExcess() function is called, then search with any non-existent key lead to deadloop. This is becuase the GetBucketIndex() function assumes if the search key does not exists, then eventually it will hit an empty entry. This assumption fails when all entries are filled. QC Entry 76347 Program TestDictSearch; {$APPTYPE CONSOLE} Uses Generics.Collections; Type TTestDict = TDictionary<Word, Word>; Var TestDict: TTestDict; begin TestDict:= TTestDict.Create; TestDict.Add(1, 1); TestDict.Add(2, 1); TestDict.Add(3, 1); TestDict.Add(4, 1); TestDict.TrimExcess; Writeln(TestDict[500]); //#1// end. QC #: Date Reported: Area: 76356 8/3/2009 VCL\Ribbon Controls Description: Steps: [QC Short Description] Original Minimize/Maximize/Close buttons shown on Vista 1. open Ribbon Demo 2. run it 3. click right below the maxmize button 4. original close button is displayed with white color [QC Description] When clicking right below the Minimize/Maximize/Close buttons by Mouse, original Minimize/Maximize/Close buttons have been displayed with while color. This issue occurs on only Vista. Please see attached screenshot. QC Entry 76356 QC #: Date Reported: Area: 76400 8/5/2009 RTL\Delphi\Other RTL Description: Steps: (JJS: Possibly related to RAID 271947, will retest with current rev.) Compile the attached application below with the following command-line. [QC Short Description] Accessing GetTypes() of TRttiContext with for loop causes AV when packages are being used. dcc32 BTS272100 -LUrtl Run the executable and see the following program output indicating failure. [QC Description] When 'Use Runtime Packages' is turned On, accessing GetTypes() of TRttiContext with for loop causes AV. --------------procedure TForm4.Button1Click(Sender: TObject); var LContext: TRttiContext; LType: TRttiType; begin LContext := TRttiContext.Create; for LType in LContext.GetTypes() do ; end; --------------QC Entry 76400 FAIL - Exception ClassName=EAccessViolation Message=Access violation at address 0040125D in module 'BTS272100.exe'. Read of address 00000000 program BTS272100; {$APPTYPE CONSOLE} uses Rtti, SysUtils; procedure DoTest; var LContext: TRttiContext; LType: TRttiType; begin LContext := TRttiContext.Create; for LType in LContext.GetTypes() do ; WriteLn('PASS'); end; begin try DoTest; except on E: Exception do begin WriteLn('FAIL - Exception'); WriteLn(' ClassName=', E.ClassName); WriteLn(' Message=', E.Message); end; end; end. QC #: Date Reported: Area: 76402 8/5/2009 IDE\Code Editor\Sync Edit Description: Steps: [QC Short Description] sync edit is totally broken - create a vcl app - add a constructor like this: procedure TForm1.FormCreate(Sender: TObject); begin caption := caption + '33'; end; - select the "caption := caption + '33';" line - start Sync Edit - press the '1' key 5 times. Now the lines reads " 11111111111111 + '33';" [QC Description] see steps QC Entry 76402 QC #: Date Reported: Area: 76426 8/5/2009 VCL\Standard Controls\TComboBox Description: Steps: [QC Short Description] TComboBox KeyPress Filter Broken Open attached project Drop down the list type 'ap' (Regression caused by Raid #269507) [QC Description] The following code in StdCtrls.pas (around line 3947) was changed from this... if HasSelectedText(StartPos, EndPos) then SaveText := Copy(FFilter, 1, StartPos) + Key To this (around line 4031) ... // This call sets StartPos and EndPos HasSelectedText(StartPos, EndPos); if StartPos < Length(FFilter) then SaveText := Copy(FFilter, 1, StartPos) + Key + Copy(FFilter, EndPos+1, Length(FFilter)) I reformatted it slightly for word wrapping. Anyway, I'm not quite sure what the intention of the new code is, but I have determined that it breaks the original behavior of the combo box (this code is in the KeyPress method). Here's how. Suppose the combo box has 4 items: Answer Apple Banana Pie And suppose that the Style is csDropDownList. In Delphi 2009, if you type "ap" quickly, then you will be taken to "Apple". In the latest Weaver, no matter how quickly you type "ap", you will be taken to "Pie". The "a" takes you to "Answer", as desired, but the "p" takes you to "Pie", which is not desired. QC Entry 76426 QC #: Date Reported: Area: 76437 8/5/2009 Compiler\Delphi\Packages Description: Steps: Package is built with wrong package flags and settings if a dependent package gets implicitly built. Steps with command line and dev build (the command line passed to the compiler assumes the tp tree lives in c:\svn\tp. Adjust that path accordingly for your system): In this case, it might be an error that the dependent package is implicitly built, since both packages have {$IMPLICITBUILD OFF} Download the attachment At a command prompt do: defined dcc32 -Uc:\svn\tp\intermediate\debug\lib;c:\svn\tp\intermediate\debug\dcp DesignPackage.dpk =================== [QC Short Description] Automated Incident Report Note that you see this output: [C:\testcases\QC76437]dcc32 -uc:\svn\tp\intermediate\debug\lib;c:\svn\tp\interme diate\debug\dcp DesignPackage.dpk Embarcadero Delphi for Win32 compiler version 21.0 Copyright (c) 1983,2009 Embarcadero Technologies, Inc. Confidential pre-release version built Aug 6 2009 11:47:48 ComponentImpl.pas(15) Installing a designtime package using the Install option of the project manager context menu. The package being RuntimePackage.dpk(40) installed is a *designtime* package, but is incorrectly reported as not being a designtime package. ComponentReg.pas(22) QC Entry 76437 DesignPackage.dpk(41) 122 lines, 0.72 seconds, 1996 bytes code, 84 bytes data. [QC Description] Package C:\Documents and Settings\All Users\Documents\RAD Studio\7.0\Bpl\DesignPackage.bpl can't be installed because it is not a design time package. It also compiled RuntimePackage.dpk (even though $IMPLICITBUILD OFF is specified for both packages) Run: "pgkinfo DesignPackage.bpl" (pkginfo is a tool in the $(tp)\tools directory) Note that DesignPackage was built with RuntimePackage's flags and settings. It should be a DesigntimeOnly package and the Description should be Designtime Test Package (Delphi 2010) Steps with IDE: 1) Create a designtime package that references a runtime package containing a componet. 2) Ensure that the designtime package is not installed and no build artifacts are present. 3) Open both components in the project manager 4) Right click on the the designtime package and select Install from the menu - Package compiles without error - Install fails (package is not a designtime package) 5) Select the runtime package and select build - Package builds OK 6) Select the designtime package *again* and select Install - Package compiles and installs as expected QC #: Date Reported: Area: 76469 8/6/2009 Compiler\Delphi\Generics Description: Steps: [QC Short Description] [DCC Fatal Error] F2084 Internal Error: L2084 Steps by USc: - save the following code as GenericRecordClassVarTest.dpr - dcc32 GenericRecordClassVarTest.dpr [QC Description] Try This code expected: it compiles actual: Fatal: F2084 Internal Error: L2084 (Internal note by USc: with Weaver the error is "GenericRecordClassVarTest.dpr(1) Fatal: F2084 Internal Error: O616") TTest<t> = record class var A2: array of string; end; program GenericRecordClassVarTest; QC Entry 76469 {$APPTYPE CONSOLE} (JJS: Seen as Internal Error C6044 in build 14.0.3505.24002) type TTest<t> = record class var A2: array of string; end; begin end. Original Steps: File|New|VCL Forms Application- Delphi Past this code in the type section: TTest<t> = record class var A2: array of string; end; Try to comple <F9>. [DCC Fatal Error] F2084 Internal Error: L2084 QC #: Date Reported: Area: 76536 8/9/2009 Compiler\Delphi\Execution Description: Steps: [QC Short Description] REGRESSION: inline creates internal error C5459 Compile the attached program below. [QC Description] I try to compile a function with inline enabled get internal dcc error C5459 Additional information by USc: This compiles with Tiburon and has been broken between Weaver FT build 3417 and FT build 3449. QC Entry 76536 expected: it compiles actual: Fatal: F2084 Internal Error: C5459 Additional note: The error goes away if G, R and A are commented out in BufferToColor32 - means with TColor32Entry(Result) do begin B := Buffer.B shr Shift; //G := Buffer.G shr Shift; //R := Buffer.R shr Shift; //A := Buffer.A shr Shift; end; instead of with TColor32Entry(Result) do begin B := Buffer.B shr Shift; G := Buffer.G shr Shift; R := Buffer.R shr Shift; A := Buffer.A shr Shift; end; program BTS272247; {$DEFINE USEINLINING} type TColor32 = type Cardinal; TBufferEntry = record B, G, R, A: Integer; end; TColor32Entry = packed record case Integer of 0: (B, G, R, A: Byte); 1: (ARGB: TColor32); 2: (Planes: array[0..3] of Byte); end; function BufferToColor32(Buffer: TBufferEntry; Shift: Integer): TColor32; {$IFDEF USEINLINING} inline; {$ENDIF} begin with TColor32Entry(Result) do begin B := Buffer.B shr Shift; G := Buffer.G shr Shift; R := Buffer.R shr Shift; A := Buffer.A shr Shift; end; end; function ConvertBuffer(var Buffer: TBufferEntry): TColor32; begin Result := BufferToColor32(Buffer, 8); {[DCC Fataler Fehler] Unit1.pas(38): F2084 Interner Fehler: C5459} end; begin WriteLn('PASS'); //PASS on compile // end. QC #: Date Reported: Area: 76563 8/10/2009 IDE\Code Editor\Help Insight Description: Steps: [QC Short Description] Tooltip help insight is not working for symbols inside "on" statement block Create a new Delphi Win32 application Double click on the new form In the OnCreate Event past this code : try showmessage('Hello'); except on E: Exception do showmessage('Hello'); end; Hover the mouse over showmessage('Hello'); ("on" block) Act : code parameter hint is displayed Expt : Tooltip help insight should be displayed [QC Description] Tooltip help insight is not working for symbols inside "on" statement block QC Entry 76563 QC #: Date Reported: Area: 76576 8/10/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] Using the code formatter hangs the IDE 1. EITHER: Open the attached console application OR: start a new one and paste in the following code: type TObj = class(TObject) public const TESTCONST = 5; end; 2. Select the lines const TESTCONST = 5; end; 3. Rightclick and choose Format source. Now try to use any of the menus. You will find that the IDE is unusable and has to be killed. [QC Description] Invoking the code formatter while some text is selected can cause the IDE to hang. QC Entry 76576 QC #: Date Reported: Area: 76584 8/10/2009 Compiler\Delphi\RTTI\Custom attributes Description: Steps: [QC Short Description] Retrieving Attributes on a Type causes A/V Compile and run the attached program and unit, BTS272303.dpr and uBTS272303.pas. See the following output indicating failure. [QC Description] Calling TRttiType.GetAttributes fails with an Access Violation QC Entry 76584 FAIL - Exception Error Classname=EAccessViolation Message=Access violation at address 00446F34 in module 'BTS272303.exe'. Read of address 52280046 See the DoTest routine in the main program code as below. The AV error on the call to TRttiType.GetAttributes (aType.GetAttributes in source) procedure DoTest; var ReturnValue: Boolean; Attr: TCustomAttribute; Attrs : TArray<TCustomAttribute>; aType: TRttiType; C : TRttiContext; var lAttr : TCustomAttribute; begin C := TRttiContext.Create; aType := C.GetType(TSingleAttrTest.ClassInfo); if Assigned(aType) then Inc(Counter) else WriteLn('FAIL #1 - No Type Retreived'); // #1 // if atype.IsPublicType then Inc(Counter) else WriteLn('FAIL #2 - Not a Public Type'); // #2 // // This call is causing an A/V and I expect it to complete Attrs := aType.GetAttributes; if Assigned(Attrs) then Inc(Counter) else WriteLn('FAIL #3 - Attributes must be Assigned'); // #3 // if 3 = Length(Attrs) then Inc(Counter) else WriteLn('FAIL#4 - Length check'); // #4 // end; QC #: Date Reported: Area: 76641 8/12/2009 Compiler\Delphi\RTTI\Custom attributes Description: Steps: [QC Short Description] Attributes on Properties are not found Compile and run the attached application below. See the following program output indicating failure. (JJS: Seen to be fixed in dev build rev. 24209) FAIL #2 - L=0 [QC Description attributes on properties are not visible Notice that no attributes are seen for the property "Prop" even though "TPropTest" is present in source. program BTS272375; Using 3505 with RTTI.pas patched with code from Barry to get past QC#76584 Index: rtl/common/Rtti.pas =================================================================== --- rtl/common/Rtti.pas (revision 24075) +++ rtl/common/Rtti.pas (working copy) @@ -4603,7 +4603,8 @@ constructor TRttiInstancePropertyEx.Create(APackage: TRttiPackage; AParent: TRttiObject; var P: PByte); begin inherited; - Inc(P, SizeOf(Handle^)); + P := @Handle^.AttrData; + Inc(P, PWord(P)^); end; function TRttiInstancePropertyEx.GetPropInfo: PPropInfo; [QC 76641] {$APPTYPE CONSOLE} uses SysUtils, Rtti; type TPropTest = class(TCustomAttribute) end; TFoo = class(TObject) private FProp: Integer; public [TPropTest] property Prop : Integer read FProp write FProp; end; { TAnonTest } var c : TRttiContext; Retval: TArray<TCustomAttribute>; a : TCustomAttribute; Count: Integer; S: String; L: Integer; begin c := TRttiContext.Create; try RetVal := c.GetType(TFoo).GetProperty('Prop').GetAttributes; L := Length(RetVal); if Length(RetVal) = 1 then begin S := RetVal[0].ClassName; if Sametext(S, 'TPropTest') then WriteLn('PASS') else WriteLn('FAIL #1 - S=', S); end else WriteLn('FAIL #2 - L=', L); finally c.Free; end; end. QC #: Date Reported: 76667 8/13/2009 Area: Compiler\Delphi\Execution Description: Steps: [QC Short Description] Internal Compiler Error when generating header definition for a subset of an enumeration Compile the following code (dcc32 -JPHN qc76667.pas): // ----- unit qc76667; interface type TVegetable = (Aubergine, Zucchini, Tomato, Paprika, Onion); TRatatouille = set of TVegetable; // works TPeperonata = set of Tomato..Onion; // fails implementation end. // ----- Exp.: works Act.: Fatal: F2084 Internal error: GH1151 [QC Description] See steps. QC Entry 76667 QC #: Date Reported: Area: 76730 8/16/2009 IDE\History View Description: Steps: [QC Short Description] Search does only work the first time First part of the steps to get a test case and perform the search the first time to break the search (not the actual problem; the first time it works due the fix for QC 75439/RAID 270794) - start the IDE - create a new Delphi console application - save it - remove the "{ TODO -oUser -cConsole Main : Insert code here }" line - save it close the IDE - restart the IDE - open the saved project - switch to the History editor tab - click into the edit control on the "Contents" tab - press CTRL+F - enter "end" in the search edit and press ENTER (see "end" [end;] on line 13 is marked in black, "end" [end.] is NOT marked and there is no match count) Second part of the steps (the actual problem) - close the project and reopen it - switch to the History editor tab - click into the edit control on the "Contents" tab - press CTRL+F - enter "end" in the search edit and press ENTER expected: first "end" [end;] on line 13 is marked in black - there is no match count (per Darren is this as designed for Weaver) actual: - nothing is marked - there is a match count [2 matched found] - switch to the "Code" tab expected: nothing is marked actual: "end" [end;] on line 13 is marked in black and "end" [end.] is marked in orange [QC Description] It seems that the search (CTRL+F) in the History view does only work the first time and later it searches in the "Code" tab. -> see steps This is from the thread "Search in Historie Window?" in .weaver.ide.editor https://forums.embarcadero.com/thread.jspa?messageID=147476&tstart=0#147476 Message-ID: <[email protected]> QC Entry 76730 QC #: Date Reported: Area: 76732 8/16/2009 IDE\History View Description: Steps: [QC Short Description] Switching to another revision does not reset the search result Before you start with the following steps make sure that QC 75439/RAID 270794 and QC 76730 is fixed! - start the IDE - create a new Delphi console application - save it - remove the "{ TODO -oUser -cConsole Main : Insert code here }" line - save it - switch to the History editor tab - switch to the "Content" History sub tab - click into the edit control on the "Contents" tab - press CTRL+F - enter "end" in the search edit and press ENTER (see "end" [end;] on line 13 is marked in black see also HistoryViewSearchResultCorrectRevision.png) - select the Revision "~1~" in the Revision content virtual tree expected: the search result is resetted actual: the black mark stays where it is (see HistoryViewSearchResultOtherRevision.png) [QC Description] After performing a search in the History view and switching to another revision the search result is not resetted. -> see steps and attached images This is from the thread "Search in Historie Window?" in .weaver.ide.editor https://forums.embarcadero.com/thread.jspa?messageID=147476&tstart=0#147476 Message-ID: <[email protected]> QC Entry 76732 QC #: Date Reported: Area: 76775 8/17/2009 IDE\Code Editor Description: Steps: [QC Short Description] How to crash the IDE in a few steps [QC Description] Steps: 1) Create a new Delphi forms application and drop a TButton, double klick to auto-create the OnClick handler. 2) In the event handler type some nonsense chars, ensure the last char is not a semicolon. 3) Mark the nonsense string and move the curser to the right within the _same line until some loop starts popping up code insight windows infinitely (eats a lot of CPU time, but IDE still survives). 4) While in that loop press the DEL key. 5) Move the curser to another line to stop the loop. 1) Create a new Delphi forms application and drop a TButton, double klick to auto-create the OnClick handler. 2) In the event handler type some nonsense chars, ensure the last char is not a semicolon. 3) Mark the nonsense string and move the curser to the right within the _same line until some loop starts popping up code insight windows infinitely (eats a lot of CPU time, but IDE still survives). 4) While in that loop press the DEL key. 5) Move the curser to another line to stop the loop. If you do not see strange looking characters in the editor yet just undo last change by using the shortcut keys. A lot of garbage should become visible. Try to delete the garbage and the IDE should crash sooner or later. Vista 32bit, single CPU VM. Clean, default install and default settings. If you do not see strange looking characters in the editor yet just undo last change by using the shortcut keys. A lot of garbage should become visible. Try to delete the garbage and the IDE should crash sooner or later. Vista 32bit, single CPU VM. Clean, default install and default settings. QC Entry 76775 QC #: Date Reported: 76776 8/17/2009 Area: Database\DataSnap\Server Description: Steps: [QC Short Description] DataSnap WebBroker applications don't run 1. Click File->New->Other 2. Select DataSnap Server 3. Double-click on DataSnap WebBroker application. 4. Select CGI, and click OK 5. Hit Run Expected: Application to run, show default handler content, and exit. Actual: Application starts and throws the following exception: First chance exception at $7C812AEB. Exception class Exception with message 'Only one data module per application'. Process Project1.exe (4216) [QC Description] DataSnap WebBroker projects created with the new project wizard do not run, but throw an exception stating that an application can only have one data module. QC Entry 76776 QC #: Date Reported: Area: 76780 8/17/2009 IDE\Tool Palette Description: Steps: [QC Short Description] Indy Component Icons missing Check Indy component Tool Palette and also in the Component Toolbar. [QC Description] Some of Indy components are missing icons: - Indy SASL - missing all - Indy Misc - missing some - Indy Intercept - missing some - Indy I/O Handlers - missing one - Indy Servers - missing some - Indy Clients - missing one QC Entry 76780 QC #: Date Reported: Area: 76861 8/19/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] RAD Studio 2010: "Format source" moved all bookmarks 1) Create one (or more) bookmark in the unit 2) 'Format source'; 3) All bookmarks are moved in the last line of unit [QC Description] All bookmarks are moved in the last line of unit http://img443.imageshack.us/img443/4311/13961015.png QC Entry 76861 http://img443.imageshack.us/img443/4311/13961015.png fixed: trunk - rev,24557-24559, branch - rev.24560-24562 QC #: Date Reported: Area: 77118 8/28/2009 IDE\Code Editor\Formatting Description: Steps: [QC Short Description] Formatter confused by subrange type definition See Description [QC Description] Code to be formatted: program Project1; {$APPTYPE CONSOLE} uses SysUtils; type { subrange type } TSub = -1..1; TFoo = class private FSub1: TSub; FSub2: TSub; end; begin end. Result: program Project1; {$APPTYPE CONSOLE} uses SysUtils; type { subrange type } TSub = -1 .. 1; TFoo = class private FSub1: TSub; FSub2 : TSub; end; begin end. [vk] Fixed in the trunk rev.24448. Fixed in brunch - rev.24450 QC Entry 77118 QC #: Date Reported: 77121 8/28/2009 Area: Compiler\Delphi\Generics Description: Steps: [QC Short Description] Internal Error: I12307 w/ Generic Descendants in Separate Units and {$INLINE AUTO} Attempt to compile the attached project. Steps by USc: - save the following three files - dcc32 --inline:auto GenericsCodeGenTest.dpr expected: compiles actual: GenericsCodeGenTest.dpr(9) Error: E2010 Incompatible types: 'TObjectList<System.TObject>' and 'Class reference' GenericsCodeGenTest.dpr(11) Fatal: F2084 Internal Error: I12307 Note the E2010 error disappears if you remove the "FOwnsObjects := AOwnsObjects;" in "TObjectList<T>.Create" in Generics.Collections.Simplified.pas //--- GenericsCodeGenTest.dpr --- program GenericsCodeGenTest; {$APPTYPE CONSOLE} uses BarUnit in 'BarUnit.pas'; begin TBar.Create; WriteLn ('PASS'); end. //--- BarUnit.pas --- unit BarUnit; interface uses Generics.Collections.Simplified; type TBar = class(TObjectList<TObject>); implementation end. //--- Generics.Collections.Simplified.pas --- unit Generics.Collections.Simplified; interface type TObjectList<T: class> = class(TObject) private FOwnsObjects: Boolean; public constructor Create(AOwnsObjects: Boolean = True); end; implementation constructor TObjectList<T>.Create(AOwnsObjects: Boolean); begin inherited Create; FOwnsObjects := AOwnsObjects; end; end. [QC Description] The attached project demonstrates the error. The setup: Unit2 contains TBar, a non-Generic descendant from TObjectList<T>. (TObjectList<TObject> in particular) type TBar = class(TObjectList<TObject>); Unit1 uses Unit2 and attempts to create an instance of TBar in Button2's OnClick handler. var Bar: TBar; begin {$INLINE AUTO} Bar := TBar.Create; Bar.Free; end; Attempting to compile the project will trigger the I12307 on the Bar := TBar.Create; line. Removing (or disabling) the $INLINE AUTO directive will allow the file to compile successfully. It appars to only affect the call site itself, because setting Inline to Auto in the project options also causes the compiler error. If the class declaration is in the same unit, the error is not thrown, as can be seen by TFoo and its corresponding usage in the demo project. QC Entry 77121 QC #: Date Reported: Area: 77185 8/30/2009 IDE\Class Completion Description: Steps: [QC Short Description] Class Complete stops working if there is a "procedure(x: Integer) of object" field in the class 1. Create a new unit 2. Replace the content with the following text <<<<<< unit ClassComplBug; interface type TTest = class public Event: procedure(const S: string) of object; procedure Test; end; implementation end. >>>>>> 3. Move the caret into the class declaration 4. Press Ctrl+Shift+C (Class Complete) Expected: The body for "Test" is created under implementation Actual: Expected ';' but OF found in class TTest. [QC Description] Class Complete stops working if there is a method pointer in the class who's type is inlined. QC Entry 77185 QC #: Date Reported: Area: 77285 9/2/2009 Compiler\Delphi\Interfaces Description: Steps: [QC Short Description] TComponent interface functions "redirected" to TInterfacedObject when a class helper for TComponent (descendant) exists Steps by USc: - save the file at the end of the steps - dcc32 ClassHelperIntf.dpr - execute ClassHelperIntf.exe and see the output is "PASS" - dcc32 -DWITHCOMPONENTCLASSHELPER ClassHelperIntf.dpr - execute ClassHelperIntf.exe expected: output is PASS actual: output is FAIL #1 Additional test to "see" whats happening - start Delphi - open ClassHelperIntf.dpr - enable "Use debug .dcus" in the project options or compile with the RTL source - add WITHCOMPONENTCLASSHELPER as conditional define or remove the dot in line five - compile ClassHelperIntf.dpr - start the app - step through the following lines "FooComponent.GetInterface (IFooInterface, I)" "I := nil;" and see TInterfacedObject._AddRef and TInterfacedObject._Release are executed program ClassHelperIntf; {$APPTYPE CONSOLE} {.$DEFINE WITHCOMPONENTCLASSHELPER} uses Classes; type IFooInterface = interface ['{68A52E11-7139-4B66-AB44-21AF8E85B81A}'] end; TFooComponent = class(TComponent, IFooInterface) destructor Destroy; override; end; {$IFDEF WITHCOMPONENTCLASSHELPER} TBarComponentHelper = class helper for TComponent end; {$ENDIF WITHCOMPONENTCLASSHELPER} var FooComponent: TFooComponent; I: IFooInterface; ComponentAlive: Boolean; destructor TFooComponent.Destroy; begin ComponentAlive := False; inherited Destroy; end; begin FooComponent := TFooComponent.Create(nil); try if FooComponent.GetInterface(IFooInterface, I) then begin ComponentAlive := True; I := nil; if ComponentAlive then WriteLn('PASS') else WriteLn('FAIL #1'); end else WriteLn('FAIL #2'); except FooComponent.Free; end; end. [QC Description] TComponent Interface functions like _AddRef or _Release are "redirected" to TInterfacedObject when a class helper for TComponent or a TComponent descendant exists. This is regression from D2007, but it happened already in D2009. This issue can lead to unexpected behavior, because components are destroyed when the interfaces are released. -> see steps Original short description: Corrupted component interfaces Original description: I am running into a very strange bug with interfaces. Unfortunately it seems that i can only reproduce this on my product which is about 200000 lines of codes making impossible to supply a code for reproducing. I'll try to describe what happens in pseudo code bellow Type a = class(tcomponent) b = class(a, IAnyInterface) var myobject: b; implementation in my code i a getinterface call on objects eg myobject.getInterface(IAnyInterface, ivar) The problem is that in function TObject.GetInterface(const IID: TGUID; out Obj): Boolean; the statement if Pointer(Obj) <> nil then IInterface(Obj)._AddRef; Results to a call to TInterfacedObject._AddRef insteand of TComponent._AddRef. This behavior occurs only with 2010 while 2007 and 2009 work as expected. This causes the object to be freed and crash the app. My application dosen't work with d2010 while worked as expected with d2007 and d2009 QC Entry 77285 QC #: Date Reported: Area: 77303 9/3/2009 Database\DBExpress Description: Steps: [QC Short Description] Impossible to use temp tables in mssql TDBXWeaverBugsSuite.Native.DB.Test.exe connection=mssqlconnection -s:TestRaid_272730 -or- [QC Description] An application originally made with D2007 uses dbExpress to connect to MSSQL. For some functionality, it creates temporary tables and fills these with data in consecutive statements on the same connection in the same (implicit) transaction. This worked great in D2007, but the same code fails in D2010. It looks like changes to the mssql dbexpress driver in between versions has broken this functionality. (Don't know about D2009.) Using explicit transactions does not help. Dmitry Arefiev suggested the driver might be using sp_execute statements internally, which would explain the behaviour because that would create a new context for each statement thus failing to recognize temp tables made in another context and therefore already dropped. This is really basic functionality for our app and a showstopper for porting it to D2010 (unfortunately, because I really like it even better than D2007). Create a new application and drop a TSQLConnection and a TButton. Connect the TSQLConnection to a MSSQL server by setting the Driver, Host and a Database. To the button.OnClick handler attach this code: SQLConnection1.ExecuteDirect('create table #TestTemp (something integer)'); SQLConnection1.ExecuteDirect('insert into #TestTemp (something) values (1)'); Expected: both statements run fine. If this program is made using D2007, it does. If made with D2010, this application fails on the 2nd statement with the SQL error "Invalid object name '#TestTemp' ". QC Entry 77303 D2007 uses dbxmss30.dll. D2010 uses dbxmss.dll. If I make the D2007 version use dbxmss.dll, it fails too. Unfortunately, it doesn't work the other way round. QC #: Date Reported: Area: 77509 9/8/2009 RTL\Delphi\Other RTL Description: Steps: [QC Short Description] GetTimeZoneInformation is very slow on Vista with programs compiled using RS2010 Also see attached projects: 1) Open Project1 in D2009 and compile and run it. 2) note execution time 3) Open Project1 in D2010 and compile and run it. 4) note execution time When running on Vista (x32 or x64) you'll see a huge difference between the two execution times. 1) Open Project2 and compile and run in D2010 2) note execution time 3) Open Project2 and activate the $define USE_LOCALE_INVARIANT and compile using D2010. 4) note execution time Again when running on Vista (x32 or x64) you'll see a huge difference between the two execution times. [QC Description] On Vista GetTimeZoneInformation() is about a 1000 times slower when using D2010 compared to when using D2009 (and earlier). Also discussed here: https://forums.embarcadero.com/thread.jspa?messageID=156125&tstart=0#156125 ... and here: https://forums.embarcadero.com/thread.jspa?messageID=157355&tstart=0#157355 program Project1; program Project234; {$APPTYPE CONSOLE} { $DEFINE USESYSUTILS} // define or not - test both uses Windows{$IFDEF USESYSUTILS}, SysUtils{$ENDIF}; var I: Integer; QPF, QPC1, QPC2: Int64; tzi: TTimeZoneInformation; begin QueryPerformanceFrequency(QPF); QueryPerformanceCounter(QPC1); for I := 0 to 9999 do GetTimeZoneInformation(tzi); QueryPerformanceCounter(QPC2); Writeln(CompilerVersion:10:2); WriteLn('Execution time = ', (QPC2-QPC1)/QPF:10:6); ReadLn; end. (On Vista Ultimate 64 SP2 on an Intel i7 920 2.67GHz) D2009: Execution time = 0.005 s D2010: Execution time = 5.289 s It just worries me that a simple API suddenly takes about 0.5 millisecond to execute and am wondering if other APIs are effected by this as well. In the mean-time someone else found out that this is apperently caused by a SetThreadUILanguage call in D2010 which sets some flag in Windows Vista which makes GetTimeZoneInformation call tzres.dll on every call instead of only a few times in all the loops. On XP, only 0 is allowed, so there, LOCALE_INVARIANT is not used anyway. Note: this will not happen when you remove SysUtils from the above code. To further prove this, following test was presented: program Project2; {$APPTYPE CONSOLE} { $DEFINE USE_LOCALE_INVARIANT} // define or not - test both uses Windows; var I: Integer; QPF, QPC1, QPC2: Int64; tzi: TTimeZoneInformation; function SetThreadUILanguage(LangId: WORD): WORD; stdcall; external 'kernel32.dll'; begin {$IFDEF USE_LOCALE_INVARIANT} SetThreadUILanguage( LOCALE_INVARIANT); // In System.pas // getting res strings invokes its call. {$ENDIF} QueryPerformanceFrequency(QPF); QueryPerformanceCounter(QPC1); for I := 0 to 9999 do GetTimeZoneInformation(tzi); QueryPerformanceCounter(QPC2); Writeln(CompilerVersion:10:2); WriteLn('Execution time = ', (QPC2-QPC1)/QPF:10:6); ReadLn; end. (Vista U64 SP2, D2010) without SetThreadUILanguage: Execution time = 0.005452 seconds with SetThreadUILanguage: Execution time = 5.045242 seconds QC Entry 77509 QC #: Date Reported: 77670 9/14/2009 Description: [QC Short Description] overloaded method causes Internal Error: E2896 Area: Compiler\Delphi\Anonymous Methods Steps: Steps by USc including the code from the description slightly completed: - save the following code as AnonMethodFailure.dpr - dcc32 AnonMethodFailure.dpr expected: it compiles actual: D2009 U#3: AnonMethodFailure.dpr(42) Fatal: F2084 Internal Error: E2896 D2010 RTM: AnonMethodFailure.dpr(42) Fatal: (JJS: Not seen until rev. 24844 is delivered) F2084 Internal Error: E3018 program AnonMethodFailure; {$APPTYPE CONSOLE} type TF1 = reference to function(P: Pointer; AI: Integer): Cardinal; type TRec = record var FP: Pointer; var FI: Integer; function Proc [QC Description] (AInteger: Integer): Boolean; overload; function Proc(const AF: TF1): Boolean; overload; end; function Advanced record with overloaded function/procedure, where one of them has an anonymous method parameter TRec.Proc(AInteger: Integer): Boolean; begin Result := AInteger = 1; end; function TRec.Proc(const AF: TF1): causes F2084 Internal Error: E2896. Boolean; var I: Integer; begin I := AF(FP, FI); Result := I = 1; end; procedure TestProc; var Rec: TRec; Bool: Here is a code snippet that causes the F2084 Internal Error: E2896: Boolean; begin Rec.FP := @Rec; Rec.FI := 2; Bool := Rec.Proc(function(P: Pointer; AI: Integer): Cardinal begin if P = nil then Result := 1 else Result := AI; end); end; begin WriteLn('PASS'); end. type TF1 = reference to function (P: Pointer; AI: Integer): Cardinal; type TRec = record var FP: Pointer; var FI: Integer; function Proc (AInteger: Integer): Boolean; overload; function Proc (const AF: TF1): Boolean; overload; end; function TRec.Proc (AInteger: Integer): Boolean; begin Result := AInteger = 1; end; function TRec.Proc (const AF: TF1): Boolean; var I: Integer; begin I := AF (FP, FI); Result := I = 1; end; procedure TForm1.Button1Click ( Sender: TObject); var Rec: TRec; Bool: Boolean; begin Rec.FP := @Rec; Rec.FI := 2; Bool := Rec.Proc (function (P: Pointer; AI: Integer): Cardinal begin if P = Nil then Result := 1 else Result := AI; end); end; QC Entry 77670 QC #: Date Reported: Area: 78015 9/24/2009 RTL\Delphi\WinAPI Description: Steps: [QC Short Description] MINENUMSIZE missing in DirectShow and DirectX units ** See comments for different test case ** [QC Description] Delphi 2010 includes many new DirectShow and DirectX units that were taken from my site at http://tib.s.songbeamer.eu/downloads/DSPack.zip Compile and run the following console app with src\DirectX9 and also with ...\RAD Studio\7.0\source\Win32\rtl\win. In rtl.bpl is ...\source\Win32\rtl\win included... program DSFilterTest; These units used to include the file DirectX.inc which also defines $MINENUMSIZE 4. These files depend on MINENUMSIZE 4 and will definitely not work without it. QC Entry 78015 {$APPTYPE CONSOLE} uses SysUtils, DSPack, DSUtils; trunk rev: 24885 update rev: 24886 var F: TFilter; SysDevEnum: TSysDevEnum; begin SysDevEnum := TSysDevEnum.Create; SysDevEnum.SelectIndexCategory(0); F := TFilter.Create(nil); F.BaseFilter.Moniker := SysDevEnum.GetMoniker(2); IFilter(F).NotifyFilter(foAdding); IFilter(F).NotifyFilter(foRemoving); end. QC #: Date Reported: Area: 78028 9/24/2009 IDE\Search\Find Description: Steps: [QC Short Description] [DE, FR] Match count is truncated - save the attached SearchMatchCountTest.dpr - start Delphi - open SearchMatchCountTest.dpr - search for "1", "2" and "3" expected: the match count is not truncated actual: US and JA: the match count is not truncated DE: the match count is always truncated (this is similar to the attached screenshot) FR: for "1" and "2" the match count is not truncated for "3" the match count is truncated [QC Description] A search result with a match count with two or more digits is truncated in the DE version and also the partly in the FR version. -> see steps and attached screenshot QC Entry 78028