Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/18/24 in all areas

  1. Steven Kamradt

    ANN: SVGIconViewer

    Lately I have found myself spending way to much time locating and converting my various toolbars and buttons to use SVG images. Part of that time was searching multiple archives only to find the same list of icons, however in different weights and sizes. The Microsoft Fluent UI icon repository is difficult to easily navigate and requires multiple steps to grab an icon... there had to be an easier way. So I wrote one that not only allows one to save SVG files, but also PNG files with an included -x size added to make it super easy when adding to an existing image collection (if you, like me, have projects that are still not quite in the latest version of Delphi). The project requires Delphi 12 (or minimally Delphi 10.4 with Skia4Delphi added) to recompile, I have included a compiled executable as a release asset if you do not have the required Delphi version. There are currently 27,400 individual SVG icons, additionally those that have both a filled and outline version have the option to also generate a "TwoTone" icon. You have complete control over colors and export sizes. https://github.com/skamradt/SVGIconViewer Currently included Icon libraries: Microsoft Fluent UI, Tablar-Icons If you find this project useful, I would appreciate a star. If it saves you time and effort, feel free to buy me a coffee (or several, code signing is so expensive lately). 🙂
  2. Remy Lebeau

    TLS v1.3

    The "crew" is me. Since Indy 11 has been pending for a very long time, I've been considering lately about updating Indy 10 just to bring it more inline with Embarcadero's releases (ie, adding LIBSUFFIX, etc) sooner rather than later. Dropping older compilers, etc will still wait for Indy 11 for now.
  3. I found myself down the rabbit hole of IEEE 754 standard on Floating-Point numbers (which Delphi follows), specifically the different values of NaN.... There are multiple potential internal values for NaN, all which evaluate as fsNaN. I found what I believe to be a bug, but I'm curious if anyone else has any thoughts on it. (As I was writing this up I discovered the behavior is only on Win32, so I've decided it must be a bug (RSS-1831), but sharing here anyway because I find the details interesting.) In short: IEEE 754 distinguishes between Signaling NaN and Quiet NaN. Delphi defaults to Quiet NaN, but you can make it signaling manually. Unfortunately, when a float is returned from a function in the Win32 compiler, the quiet flag is set. I was testing to see if Delphi converted it into an exception, which would be understandable, but instead it just silently sets the quiet flag, suppressing the signaling state. Testing in FPC, Delphi Win64, or Delphi Linux64, and the flag value doesn't change, which is what I would expect. Detailed explanation and background IEEE 754 divides a float into 3 parts Sign Exponent Fraction For a NaN the Exponent bits are all set ($FF in Single), any value for sign (Delphi's default NaN has it set, making it a negative NaN, which doesn't carry any specific significance), and the Fraction is anything but all 0. This allows for quiet a few different values that all are treated as NaN. What may distinguish the different values of NaN is signaling vs. quiet NaN. The Quiet flag is usually the first bit of the fraction. When the quiet flag isn't set, then it is considered a signaling NaN. The internal the internal representation of a NaN is typically displayed as follows (notice this is reversed from how Delphi stores the value in memory to put the most significant bit first.) S Exponent Fraction 1 | 11111111 | 10000000000000000000000 ^ The quiet flag So a signaling NaN is has an value for Faction without that first bit set. What I found in Delphi Win32 is it handles all these values correctly, except that if the quiet flag is missing (making it a signaling NaN), then when the value is returned from a function the quiet flag is set. Before returning from function: (Notice that the debugger recognizes it as negative NaN. Very nice!) This is 1 | 11111111 | 00000000000000000000001 in binary, which doesn't have the Quiet flag set 1 | 11111111 | 10000000000000000000001 After return it isn't the Default NaN, but it is the previous value with the Quiet flag set. Here is some sample code that demonstrates the behavior // The Delphi Win32 (tested in Delphi 12.1 and 12.2) sets NaN's quiet flag when are returning from a function // More information on IEEE 754 NaN https://en.wikipedia.org/wiki/NaN#Quiet_NaN // More information on this code: https://gist.github.com/jimmckeeth/2b4f017917afbae88ee7a3deb75b4ef7 program NaNSignalBug; {$APPTYPE CONSOLE} uses System.SysUtils;//, SingleUtils in 'SingleUtils.pas'; function is_Signaling(const NaN: Single): Boolean; begin Result := NaN.IsNan and (NaN.Frac and $400000 = 0); end; function NaNDetails(const Value: Single): string; begin if value.IsNan then begin if is_Signaling(value) then Result := 'NaN is Signaling' else Result := 'NaN is Quiet'; end else Result := 'Not a NaN'; end; procedure MakeSignaling(var NaN: Single); begin NaN.Exp := 255; NaN.Frac := NaN.Frac and not (1 shl 22); Assert(is_Signaling(NaN)); Writeln('Manipulated: ',NaNDetails(NaN),#9, '// Line 33'); end; // When a NaN is returned from a function the Signal bit is set function SignalingNaN: Single; begin Result := Single.NaN; Result.Frac := 1; MakeSignaling(Result); Assert(is_Signaling(Result)); Writeln(#9,'SignalingNaN Returning',#9'// Line 43'); end; function NestedNaN: Single; begin var NaN : Single := SignalingNaN; // The quiet bit was set Writeln('Returned: ',NaNDetails(NaN),#9, '// Line 50'); // without returning it from a function it works fine MakeSignaling(NaN); Writeln('Manipulated: ',NaNDetails(NaN),#9, '// Line 53'); Assert(is_Signaling(NaN)); Writeln(#9,'NestedNaN Returning ',#9,'// Line 55'); Exit(NaN); end; begin try Writeln(TOSVersion.ToString); Writeln('Used: ',SizeOf(NativeInt)*8,'-bit compiler'); var NaN : Single := NestedNaN; // The quiet bit was set Writeln('Returned: ', NaNDetails(NaN),#9,'// Line 66'); //Assert(is_Signaling(NaN)); // Fails on Win32 // without returning it from a function it works fine MakeSignaling(NaN); Writeln('Manipulated: ', NaNDetails(NaN),#9,'// Line 70'); Assert(is_Signaling(NaN)); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; readln; end. and here is the output Windows 11 (Version 23H2, OS Build 22631.4169, 64-bit Edition) Used: 32-bit compiler Manipulated: NaN is Signaling // Line 33 SignalingNaN Returning // Line 43 Returned: NaN is Quiet // Line 50 Manipulated: NaN is Signaling // Line 33 Manipulated: NaN is Signaling // Line 53 NestedNaN Returning // Line 55 Returned: NaN is Quiet // Line 66 Manipulated: NaN is Signaling // Line 33 Manipulated: NaN is Signaling // Line 70 and a more detailed look at the NaN values Default NaN Value of : Nan Special : fsNaN Sign : TRUE Exponent : 255 Fraction : 4194304 Size : 4 InvertHex: $FFC00000 1 | 11111111 | 10000000000000000000000 ----------------- Singnaling NaN Value of : Nan Special : fsNaN Sign : TRUE Exponent : 255 Fraction : 1 Size : 4 InvertHex: $FF800001 1 | 11111111 | 00000000000000000000001 ----------------- Returned from Function Value of : Nan Special : fsNaN Sign : TRUE Exponent : 255 Fraction : 4194305 Size : 4 InvertHex: $FFC00001 1 | 11111111 | 10000000000000000000001 @David Heffernan it was suggested I tag you on this... NaNSignalBug.dpr
  4. KimHJ

    partial_info.plist not found

    Started everything up today erased everything on the Mac, installed the new iOS 18.0. Compiled and no errors. ??
  5. https://developercommunity.visualstudio.com/t/signaling-nan-float-double-becomes-quiet-nan-when/903305#T-N1065496 https://stackoverflow.com/questions/22816095/signalling-nan-was-corrupted-when-returning-from-x86-function-flds-fstps-of-x87 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57484 So apparently this is just the way things are on x86.
  6. The result value is coming from FPU register ST(0) like @David Heffernan told. The issue is that the code load in ST(0) the correct signaling NAN, but become quieted NAN in ST(0). This is not an Issue from Embarcadero, but may be an hardware setting. I am far from FPU registers (working with them at time of I486DX ). EDIT: From what I read in the Intel manuals, it seems that the impersonation is internally QNAN if the FPU "invalid operation" exception is masked. (ref 4.8.3.6 of Intel manual "325462-sdm-vol-1-2abcd-3abcd-4"). There are many tables inside that show how hardware treats the NAN.
  7. alejandro.sawers

    Delphi 12.2 TMEMO - indexoutofbounds

    A quick test on a Delphi 12.2 blank FMX app with only a TMemo, compiled for Android 64, running on an Android 13 device doesn't show such error. Maybe test with a blank project to discard issues with your Delphi/Android SDK installation.
  8. I don't have anything later than 11.3 installed. So there are likely changes that I'm not familiar with. The one thing that jumps to my mind is the ABI. Floating point return values travel via ST(0) in x86 but by a general purpose register in x64 (can't remember which). This means that it has traditionally not been possible to return SNaN by function return value in 32 bit, although it is possible to in 64 bit. That's because loading into ST(0) triggers invalid op. But now fp exceptions are masked by default. Anyway, that's all I know right now, not at a computer.
  9. Hi all, I apologise for doing a double post, but some people don't see the posts everywhere. For any users, or anyone interested in the Sempare Template Engine, I would love to get some feedback from you to help with next steps in development on the project. The questionnaire is a bit general, as the objective is to guide the direction of this project and another I will be releasing soon as well. https://docs.google.com/forms/d/e/1FAIpQLScioIiDxvsWK01fMFqYr9aJ6KhCGeiw4UaU_esGuztEE7vYwA/viewform Thank you in advance. Regards, Conrad
  10. Roger Cigol

    Delphi 12.2 enterprise : code insight 64 bits version

    Tiny and easy work around maybe - but still worthy of reporting. That way there's a chance it will be fixed in a later release. Small improvements help make the tool set better for seasoned users and new users alike. Out of interest: 12.2 does include a minor fix that I reported so it is worth doing !
  11. Hello Roger We have a copy of RADStudio so it was an easy job to compile any Delphi components. For the components where we have the source (Delphi or C++), we needed to add an additional 'Target Platform' of 'Windows 64-Bit (Modern) '. Using the macro $(Platform) in the output path will create a \Win64x output directory. For those Delphi components for which we do not have source code, we'll just have to wait for an update from the vendors.
  12. Remy Lebeau

    TLS v1.3

    The OpenSSL code that is currently in the main library is being pulled out completely into its own separate package that uses the main library. This way, future updates to OpenSSL are more isolated and can be worked on and committed independently outside of the main library. Yes, that is the plan. I've already asked Embarcadero for details about the changes they make to their bundled release of Indy.
  13. Anders Melander

    how to correct this Code

    There seems to be a pretty big gap between your knowledge and your ambitions and you shouldn't really be trying to make custom components (or whatever it was you did) if you haven't learned about things like polymorphism and scope. I suggest you start with something more basic.
  14. Darian Miller

    Quality Portal going to be moved

    JIRA Service Desk is an abomination... but so many companies are tied into the JIRA/Confluence infrastructure that they can get away with it being so terrible. That reality sucks. I recommended they go with something else, or write their own. A simple service desk system written in TMS WebCore or Quartex Pascal would be a nice solution using a RAD Server middle tier with Interbase backend. But it's too big of a project to add to their overly full plate.
  15. johnnydp

    Quality Portal going to be moved

    this grim joke called the new quality portal is only escalating, I wanted to read about the bugs fixed in 12.2 and the details most of them simply don't work don't find them.... Bravo EMB, you have finally found a nice way to get those nasty users to leave you alone, no voting no transparency, users are there to pay for subscriptions not to report some bug and bother us. ..
  16. StefandB

    ICS V9.1 announced

    I'd be happy to help. I do have to maintain code though, so can try and just revert back to an earlier version if I am not successful as I run C++ Builder XE3, 10 Seatle, 10.2, 10.4 and 12.
  17. "RTC SDK was originally developed by Danijel Tkalčec in 2004, and acquired by Teppi Technology in 2018 . Now, as of May 20th 2022, we announce that ReatlThinClient SDK (a.k.a. RTC SDK) is open source." https://rtc.teppi.net/ https://github.com/teppicom/RealThinClient-SDK
  18. At least one of my bug reports got resolved in Delphi 12 partially : IDE Menu does not display correctly when moving from one main menu item to another https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-516 This no longer happens the same way, but moving from Run to Components using the right arrow key now only highlights the Menu item without showing the menu. Pressing the down arrow key then shows the menu, so I guess I can live with that partial fix. Moving from Edit to Search with the right arrow key works as expected. Unfortunately the two most infuriating bugs since Delphi 11 have still not been fixed: IDE toolbars get scrambled over time https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-515 Switching Desktops does not work properly when using some mixed High DPI und HD monitor setups https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-514
×