Bugs and Issues in Delphi XE2 & FireMonkey

Given the number of issues I and others are finding in fireMonkey I decided to log them here. QualityCentral (QC) is not yet accepting bug reports on XE2. All my tests were done on a trial version of Embarcadero® Delphi® XE2 Version 16.0.4256.43595 running Windows 7. Other reported issues don’t include the build version and are currently unconfirmed.

Update (Monday 5 Sept, 2011): Uwe Schuster reports that Embarcadero is aware that version 16.0/XE2 is not yet available in QC. It should be available in the next few days. For now it is okay to report it against version 15.1/XE, but please mention that it is actually a report for XE2.

1. Duplicated Controls: I just noticed that I have two copies of TScrollBar on the FM tabbed interface for selecting controls. As far as I can tell they are identical.

The scrollbar to the right of the rightmost circled component is the TSmallScrollBar. Update: I’ve now seen this in other controls. Update: I just noticed that the entire Shapes group has been duplicated.

2. TColorComboBox: Possible bug in TColorComboBox? The color selection is displaced, see below:

Happens on a new project.

3. Compile/Run: When changing a style at design time it is necessary to do an explicit compile project (Ctrl-F9) in order for the style to be applied. Doing a normal ‘run’ doesn’t work

4. TMemo Behavior I think I noticed at least one difference in behavior between VCL TMemo and FM TMemo. Consider:

VCL:

memo.lines[2] := ‘Hello VCL’

This simply write the string ‘Hello VCL’ to the third line in the memo (0 indexed) and nothing more

FM:
memo.lines[2] := ‘Hello FM’

This writes the line as in the VCL but then removes the first character from the next line. If I had the following:

Some text
Another line

and called memo.lines[2] := ‘Hello FM’ I would get

Hello FM
nother Line

I can’t imagine this is the expected behavior. This is the biggest issue so far and means I can’t continue with the project I was developing. See video below:

5. Documentation: Almost all the TMemo fields are undocumented. This actually applies to lot of the FM controls as far as I can tell. The help has good overview documentation however but lacks detail at the individual controls level.

6. Differences with VCL Designer: I’ve noticed a couple of differences between the FM and VCL designer. 1) No guides in the FM designer, I never realized until they werent’ there how much I used them. 2) Unable to select more than one control at a time. Correction to 2): When you select multiple controls, the controls are actually selected but there is no visual cue to indicate this. Control left/right arrow will move the entire group, also alignment works. Thanks to ‘Steve’ for pointing this out. The bug therefore resides in highlighting the selected group.

7. IDE Bug: Sometimes, but I haven’t been able to track down the exact circumstance, clicking on the Toggle Form/Unit F12 doesn’t work. To make it work I have to select another tab in the editor first, go back to the tab I was at then toggle the form/unit. Update: Others have reported the same issues, see fire monkey forum.

8. Layer3d Bug: This was reported earlier in the fireMonkey forum, not yet confirmed.  Start firemonkey app with a Tform3d and add a TLayer3d now create a mousedown or mouseup event (on the 3dlayer). If you try to compile you will get a message that TMouseButton is unknown. It appears that the uses section does not have “System.UITypes” added to it automatically. This was found by playing around with Samples\FireMonkey\gui3d\gui3d.dpr. Original post at https://forums.embarcadero.com/thread.jspa?threadID=59931&tstart=0 by Ralph Wesseling

9. TOpenDialog Issue: This was reported earlier in the fireMonkey forum, not yet confirmed.Using the TOpenDialog component on Delphi XE2 (Firemonkey HD Application) in Windows 7 and I’ve been facing some troubles when using this component with the Multiselect property checked. On Windows 7 it shows the old style dialog (even if ofOldStyleDialog is not checked) and when debugging on OS X it crashes completely. This only happens when ofAllowMultiSelect is marked. I guess there is no way to work around this problem right now but to disable the feature, right?. Original post at: https://forums.embarcadero.com/thread.jspa?threadID=59961&tstart=0 by Ivan Juaez.

10. TPopupMenu: This was reported earlier in the fireMonkey forum, not yet confirmed. TPopupMenu has a serious bug – while the menu items themselves reflect the changed Scale property of the base layout, the overall size of the menu does not. (To get it scaling at all, the TPopupMenu needs to be parented to the layout, which is as it should be of course, if a bit weird from a VCL POV.). Original post at: https://forums.embarcadero.com/thread.jspa?threadID=60033&tstart=0 by Chris Rolliston

11. Align Property: This was reported earlier in the fireMonkey forum, not yet confirmed. The Align property appears to break when Scale is set, meaning the base layout has to be positioned and resized manually rather than just having its Align property to alClient. Original post at: https://forums.embarcadero.com/thread.jspa?threadID=60033&tstart=0 by Chris Rolliston

12. SetFocus on TMemo: Calling SetFocus on a FMX.TMemo selects all the text in the TMemo. This is not the same behavior as we find in the VCL TMemo. To get round this odd behavior, call Memo1.SetLength := 0 immediately after you’ve called SetFocus.

13. FMX Menu Loop Bug: Chri Rolliston on this blog described and provided a fix to a bug in the implementation of FMX menu loops on Windows. See his site for more details.

14. Bug in inline assembler for 64 bit: The following was reported by Nick Barnes.  Finding major bugs in the inline assembler for 64 bit.

1. Get internal error if try to compile inline assembler without optimization turned on
2. JMP instructions, seemingly of any type, are not assembled causing code to drop through branches etc.

this routine shows both problems:

function Cmp (A, B: longint): integer;
label
equal, done;
asm
  CMP A,B
  JE equal
  mov @Result, 1
  jmp done
  equal:
  mov @Result, 0
  done:
  nop
end;
procedure TForm1.Button1Click (Sender: TObject);
begin
  ShowMessage (IntToStr(Cmp(10,11)));
end;

These seem to be fairly basic testing issues! I’m happy to be corrected on any errors I’m making.

This entry was posted in Delphi. Bookmark the permalink.

26 Responses to Bugs and Issues in Delphi XE2 & FireMonkey

  1. consuelo says:

    Does anyone have this problem?
    When we install package dclsockets160.bpl the TServerSocket and TClientSocket aren’t in the Internet tool palette. And I can’t build the application which use it.
    What did I forget to configure it? Is this a bug of RadStudio XE2?

  2. i4WD says:

    The same firemonkey code below, with the diffrent result in Win32 and Mac.

    procedure testFillPath;
    var
    bm: TBitmap;
    p1, p2, p3, p4, p5, p6: TPointF;
    path: TPathData;
    begin
    p1 := PointF(100, 100);
    p2 := PointF(150, 150);
    p3 := PointF(150, 100);
    p4 := PointF(0, 0);
    p5 := PointF(100, 250);
    p6 := PointF(300, 100);
    bm := TBitmap.Create(500, 500);
    bm.Clear(claRed);
    with bm do
    begin
    Canvas.Stroke.Kind := TBrushKind.bkSolid;
    Canvas.Stroke.color := claAqua;
    Canvas.Fill.color := claBlue;
    Canvas.Fill.Kind := TBrushKind.bkSolid;
    Canvas.BeginScene;
    path := TPathData.Create();
    path.MoveTo(p4);
    path.LineTo(p5);
    path.LineTo(p6);
    path.LineTo(p4);
    path.MoveTo(p1);
    path.LineTo(p2);
    path.LineTo(p3);
    path.LineTo(p1);
    Canvas.FillPath(path, 1);
    path.Free;
    Canvas.EndScene;
    end;
    bm.Free;
    end;

  3. M. Heerdink says:

    I have a form which i use to inherit from. When i add that form in Delphi to File – New and i customize that to add my form, i first need to shut down Delphi before i can use the Form. If i dont shut down the form and try to add a form based on my custom form, the IDE says it can not find the components on the form. After that, the IDE crashes.

  4. boz says:

    Using XE2 Update 2 and there still seem to be several bugs in the IDE

    1. The save desktop layout ignores which monitor you were in
    2. Editor seems to freeze randomly during editing and the cursor disapears and mouse unresponsive to editor and controls in IDE, focusing out of the IDE and back in generally fixes (If I ever find out what I’m doing to cause this I will report it)
    3. If you ever get the error “Expected ‘)’ but PROCEDURE Found” the IDE will lock up using 25% of the CPU (dont manually edit the form object/components!)

    Still using Delphi 2010 until gets a bit more stable

  5. Jones says:

    Hello to all, somebody knows which is the options of reports of firemonkey, did not find no option. they can help me?

  6. Ron says:

    @ Michael Swindell When are you going to publish a (any) decent FM documentation? And what is this nonsense “Embarcadero Technologies does not currently have any additional information”. We paid for it, didn’t we?

  7. Adriano says:

    I’ve created some wrapper components that extends and creates a common interface between VCL and FM components. My VCL wrappers appears normaly on the toobar after installed but the same set of FM wrappers does not appear on the toolbar no matter what I do.
    Someone know something about this ?
    Someone already got to create and install FM components that get visible on the Toolbar ?

  8. Lack of APNS in IOS FireMonkey apps is a biggie for me. When, can we expect this capability?

    Right now it means the difference to purchasing RADStudio or not.

  9. Martin says:

    The OnClick, OnDblClick, and maybe other events are not triggered for TTreeViewItem.

  10. Frank says:

    And of course right after I post I find something of interest. If I load an image into Image2 during design time, the code works. So it seems you have to pre-load your images with placeholder graphics or something in order to get your TImages working?

  11. Frank says:

    I downloaded the trial and am trying to do basic graphic stuff but nothing happens. What I’m doing is I have a form with two images. Image1 has an image already loaded into it. Image2 doesn’t. CopyRect is no longer available so I assume I’m to use DrawBitmap as I saw Pawel Glowacki use it in some code he posted. If anyone knows the secret handshake or whatever it is I’m missing please let me know.

    var
    MyRect : TRectF;

    procedure TForm2.Button1Click(Sender: TObject);
    begin
    MyRect.Create(0, 0, 190, 120);
    Image2.Bitmap.Canvas.BeginScene;
    Image2.Opacity := 1.0;
    Image2.Bitmap.Canvas.DrawBitmap(Image1.Bitmap, MyRect, MyRect,1.0,true);
    Image2.Bitmap.Canvas.EndScene;
    Image2.Bitmap.BitmapChanged;
    end;

    procedure TForm2.SpeedButton2Click(Sender: TObject);
    begin
    Image1.Bitmap.Canvas.Fill.Color := random(100);
    Image1.Bitmap.BitmapChanged;
    end;

  12. hsauro says:

    Thank you for these reporting these issues, I will add them to the main list.

  13. Lifepower says:

    Several issues I’ve found so far in Delphi XE 2 Professional (some of them I’ve posted to QC). Since I doubt that these issues will be solved any time soon, it’s good to mention them.

    1) OnIdle event in FireMonkey never occurs on Mac OS, either in FireMonkey HD or FireMonkey 3D applications. It does occur on Windows.

    2) In 64-bit inline assembly documentation there’s a typo, the first parameter is passed through RCX, not RAX as manual says. The result, however, is returned in RAX.

    3) 64-bit compiler: in some very specific cases where you use NativeInt type in FOR loop, the entire loop will get removed and compiler will warn you that the loop variable is not used. It’s a very annoying issue. You have to change variable type back to Integer to make it work. This is more likely to occur if there are two or more nested loops.

    4) After certain number of compiles, the IDE gets bugged. If you try to compile anything, it will give random error like wrong parameters to function or any other syntax error. If you keep insisting, it will eventually crash. The best way is to save everything, close and restart, after which it will work.

    5) Similar issue to (4). After many executions on PAServer on Mac OS with Delphi, especially if there were runtime errors, PAServer becomes unstable and deploying application results in unpredictable issues. Restarting the server solves the issue.

    6) Sometimes files deployed from the Deployment menu of IDE on Mac OS will not be found by your application at the time you click “Run” and will result in an error. In fact, sometimes even the correct application icon won’t appear on Mac OS. If you wait few seconds and re-run the application on the Mac, it will work correctly.

    7) Files added in Project menu “Resources and Images” will not be detected in the application from start, especially on Mac OS and Win64 (if you try to load them using TResourceStream, for instance). You will have to reopen IDE several times and rebuild the application for these changes to take effect.

    8) FireMonkey radio button and checkbox: text is usually not centered vertically very well. Take a screenshot and look at it zoomed to see this issue.

    There are probably some more I’ve noticed, but these are the ones I remember at this moment.

  14. Nick says:

    Hello all! No hardware accelerated picture stretching when using FM. I try to use FM framework to port my existing video application to OSX and I get only software picture stretching (too slow). I can’t get 25-30 FPS with low CPU usage (GPU acceleration). What I am doing wrong?

  15. Pete says:

    Just made a report on Quality Central. A new installation of Delphi XE2 Starter .
    There are no Forms as a toolbar icon or in the View menu.

    Without this basic functionality how the heck I am going to create anything, if I can’t see the form to put things on it. Needs sorting A.S.A.P

  16. jgibson says:

    I’m trying to make a simple drag drop example, dropping a button on a TPanel.
    As far as I can see, the TPanel OnDragOver event is fired inmediatelly after I start the button drag operation.

    Do you know how to handle drag drop operations in firemonkey?

  17. Nick says:

    Finding major bugs in the inline assembler for 64 bit.

    1. Get internal error if try to compile inline assembler without optimization turned on
    2. JMP instructions, seemingly of any type, are not assembled causing code to drop through branches etc.

    this routine shows both problems:


    function Cmp(A, B: longint): integer;
    label
    equal, done;
    asm
    CMP A,B
    JE equal
    mov @Result, 1
    jmp done
    equal:
    mov @Result, 0
    done:
    nop
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ShowMessage(IntToStr(Cmp(10,11)));
    end;

    These seem to be fairly basic testing issues!

    I’m happy to be corrected on any errors I’m making.

  18. hsauro says:

    Sure, I’ll put up RSS (etc) feed up today. Update, the feed was already active.

    Use the following link:

    blog.analogmachine.org/feed

  19. Tommi Prami says:

    Hello hello,

    Nice articles, but could it be possible to get RSS (etc) feed to this blog, so would be much easier to follow new articles…

    -Tee-

  20. Uwe Schuster says:

    Embarcadero is aware that version 16.0/XE2 is not yet available in QC. It should be available in the next few days. For now it is okay to report it against version 15.1/XE, but please mention that it is actually a report for XE2.

  21. hsauro says:

    Excellent news that you’re planning on upgrade regularly, this will help a lot. The FM TMemo bug has temporarily stopped me from developing using FM as one of my apps relies on a functioning TMemo. I understand this is a completely new product so there will be issues. The main thing is that the problems are resolved as quickly as possible.

  22. Great feedback, I’ve fwd’d to R&D. Since this is FM 1.0 we will be evolving rapidly and updating on a regular basis. We’re investing heavily into FM. First update is well underway and expect to release soon (targeting end of this month). -m

  23. hsauro says:

    Thanks for letting me know, I saw your comment on the forum and the posted solution. I am now putting together another page with tips for fireMonkey users.

  24. Jon Souter says:

    Another peculiarity I’m noticing in FireMonkey…

    Programmatic setting of Font attributes doesn’t work for certain controls, such as checkboxes…

    The following code generates a complier error…

    CheckBox1.Font.Style:=[fsBold];
    Label1.Font.Style:=[fsBold];

    Strange that you can set the font attributes fine through the Property Editor though!

    Looks like we could be facing some teething problems for a while yet.

  25. hsauro says:

    Thanks for pointing that out, I never thought of trying. When I didn’t see the controls highlighted I just automatically thought they hadn’t been selected. I have amended the main text with the new information.

  26. Steve says:

    “2) Unable to select more than one control at a time. Make it tedious to position control, eg you can’t select a bunch of checkboxes and line them up by selecting them all an doing a left align.”

    Yes, you can. It’s just not obvious that they’re selected.

Leave a Reply

Your email address will not be published.