Jump to content

Vandrovnik

Members
  • Content Count

    523
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Vandrovnik

  1. Vandrovnik

    Micro optimization: Math.InRange

    Yes, but if you disable these checks, results for ascending intervals are OK.
  2. Vandrovnik

    Micro optimization: Math.InRange

    IsInRangeEx looks OK for interval in ascending order. But in these cases, first one returns false, second one true: writeln(IsInRangeEx(10, 12, 8)); writeln(IsInRangeEx(316084043, 3932079699, 3000547150));
  3. Vandrovnik

    Micro optimization: Math.InRange

    I think it does not produce such jumps:
  4. Vandrovnik

    Micro optimization: Math.InRange

    I used "inc(x);" for 64bit (global variable). You can have nop in a procedure: procedure Nop; assembler; asm nop end; But as far as I know, this procedure cannot be inlined, so there will be a call.
  5. Vandrovnik

    Micro optimization: Math.InRange

    When you have something after "then", things change. if ... then asm nop end; 32bit: Math.InRange: 1081 IsInRange: 1078 If: 1077
  6. Vandrovnik

    Micro optimization: Math.InRange

    Your cLoop constant is out of range, so I deleted one zero. Results on an old i7 920, Delphi 10.4.2 Pro, Release: 32bit: Math.InRange: 1083 IsInRange: 766 If: 759 64bit: Math.InRange: 722 IsInRange: 725 If: 721 K.
  7. Vandrovnik

    Simple FMX Win32 app hangs

    Hello, I have this simple error demonstration. Please can you look at it, whether there is a mistake in the app? When not, I would report it to QC. Steps to reproduce: 1. click Show form B 2. click Show form C 3. close form C 4. close form B 5. click Show form B 6. click Show form C ---> application freezes This error does not happen: - if I remove TBasicFormForm.FormClose event handler (which contains just a comment) or - if I change in ObjectInspector tSecondaryForm.BorderIcons, so that it is [biSystemMenu, biMinimize, biMaximize] Kind regards, Karel Test75.zip
  8. Vandrovnik

    "Divided by zero" exception

    Try 1/0 and 0/0 on Wolfram Alpha: https://www.wolframalpha.com/input/?i=0%2F0
  9. Vandrovnik

    "Divided by zero" exception

    In Delphi 10.4.2, this: uses System.SysUtils, System.Math; var a, b, c: double; begin try SetExceptionMask([]); a:=0; b:=0; c:=a/b; Writeln(c); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; Readln; SetExceptionMask(exAllArithmeticExceptions); raises the exception: EInvalidOp: Invalid floating point operation When "a" is 1, the exception is: EZeroDivide: Floating point division by zero When I do not call "SetExceptionMask(exAllArithmeticExceptions);" in the end, I get: Runtime error 216 at 004067EA
  10. Vandrovnik

    "Divided by zero" exception

    And what is wrong with SetExcepionMask to desired value? http://docwiki.embarcadero.com/Libraries/Sydney/en/System.Math.SetExceptionMask
  11. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    Patch for the patch has been released.
  12. Hello, If you fix the bug in original files (C:\Program Files (x86)\Embarcadero\Studio\21.0\source\IBX\IBX.IBSQLMonitor.pas?), it should be enough to add this file to your project and rebuild the project. Kind regards, Karel
  13. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    Yes, the situation with severe bugs is strange and I wonder, if other software have similar problems. When paying customer is not able to work with big projects more then two months, it is like if he buys a new car with six-speed gearbox, but could use only speeds 1-4 with the information, that speeds 5-6 will be repaired sometime in the future, without any specific date.
  14. Hello, In deployment manager, I have some files for Android32 and some other files for Android64. When I create .apk for Android32, it contains all files that were set for this target. Also .apk for Android64 contains all files that were set for it. But when I create .aab (which contains 32 and 64 bits versions of the app) to publish on Google Play, it contains only assets files for Android64. Is it a bug, or a "feature"? When I add files for Android32 to Android64 too, it will probably work, but the download size will be bigger than necessary... Kind regards, Karel
  15. Vandrovnik

    Android .aab - assets for Android32 missing

    Well, I can select, that a file is for Android as well as for Android64. But when I do it, it is not stored in the .aab file at all...
  16. Vandrovnik

    Android .aab - assets for Android32 missing

    Ehm, now I found out that in the column "Platforms" in deployment manager, I can select more values... But still do not know how to do it properly so that file A is included in .aab, but distributed to 32-bit devices only.
  17. Vandrovnik

    Android .aab - assets for Android32 missing

    Yes, Delphi 10.4.2 Pro. May be I am doing it wrong. Let's say I have: - file A for Android 32 - in deployment manager, it has two rows (Android - Release, Android - Debug). - file B for Android 64 - in deployment manager, it has two rows (Android64 - Release, Android64 - Debug). Now when I create .aab file for Release, Application store (with checked option "Generate Android 32-bit and 64-bit binaries), this .aab contains only file B. So I have to place file A to deployment manager for Android 64 bit too (this was my mistake: I thought Delphi takes this file automatically). But I guess Google Play will never be able to recognize that this file A is for 32-bit Android only and will deliver it to all devices. And probably will also deliver file B to 32-bit devices...
  18. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    I have almost no problems, but my projects are smaller - the largest one is about 1.5 M lines of code. I use no runtime packages and since I stopped to use their translation manager, I do not use project groups anymore (to be more precise, there is only one project in the project group). VCL apps for Win32 and Win64. FMX apps for Win32, Win64, Android32, Android64, but these are much smaller.
  19. Hello, I use Better Translation Manager from @Anders Melander to create language modules. This works fine even with 10.4.2. In the application, I use resourcestrings. BTM translates them and saves them to, for example, .DEU file for German translation. I have checked with Resource Hacker that translated resourcestrings are there. In the application, I load resource file, it works for components. Unfortunatelly, when I use resourcestring in the application like MyButton.Caption:=xxZavrit (resourcestring), it is not correctly loaded from .DEU file (it is loaded from .exe instead). It was working fine in 10.3.3, but does not work in 10.4.2. Were there any changes regarding loading resourcestrings? I am using an old function which sets new resource file in place: function SetResourceHInstance(NewInstance: HModule): HModule; var CurModule: PLibModule; begin CurModule := LibModuleList; Result := 0; while CurModule <> nil do begin if CurModule.Instance = HInstance then begin if (CurModule.ResInstance <> CurModule.Instance) then FreeLibrary(CurModule.ResInstance); CurModule.ResInstance := NewInstance; Result := NewInstance; Exit; end; CurModule := CurModule.Next; end; end; Kind regards, Karel
  20. Vandrovnik

    Pos

    🙂 Fortunately it is usually enough to type "incl", press Ctrl+space, arrow down, enter.
  21. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    What is a hotfix: a small piece of code developed to correct a major software bug or fault and released as quickly as possible. This one probably will not be much hot...
  22. Vandrovnik

    Android - new version of file in assets\internal\

    Hmm, for now "solved" for deployed file MyFile.txt on app start: - if exists, delete MyFile2.txt - rename (deployed) MyFile.txt to MyFile2.txt - in the app, use MyFile2.txt
  23. Vandrovnik

    compiling DCU without creating EXE

    What if you set in Project Options to create .exe on non-existent path, like W:\Output?
  24. Vandrovnik

    Delphi 5 Printing

    What about the printer name? Isn't it just quite long?
  25. Refactor/Rename did not work for me too. It started to work properly after installing some Windows updates, including optional ones (including KB5000842).
×