Jump to content

Vandrovnik

Members
  • Content Count

    523
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Vandrovnik


  1. 14 minutes ago, David Heffernan said:

    I'm amazed that you can guarantee that the error will be far away from the observer. How did you do that? 

    Of course I cannot guarentee it. But you wrote "Giving the user the wrong results is always worse than showing an error, even if the error is poorly worded.", so I gave you an example, where error message would be worse than ignoring the error.


  2. 26 minutes ago, David Heffernan said:

    No you wouldn't. Giving the user the wrong results is always worse than showing an error, even if the error is poorly worded. 

    Not always... In an application drawing 3D scene, a small error in object displayed somewhere far away from the observer does not metter, probably nobody notices. Of course in a book-keeping application the situation is quite different.


  3. Hmm, it seems embarcadero is using TTL 3 days (!) for that record, so if they did change the address recently, it is still in the caching DNS.

     

    # dig quality.embarcadero.com @ns1.navidns.net

    ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.3 <<>> quality.embarcadero.com @ns1.navidns.net
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17856
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 6
    ;; WARNING: recursion requested but not available

    ;; QUESTION SECTION:
    ;quality.embarcadero.com.       IN      A

    ;; ANSWER SECTION:
    quality.embarcadero.com. 259200 IN      A       204.61.221.78

     


  4. Hello,

     

    I am trying to make a FMX application for Android. When I close the application, I get:

    Debugger Exception Notification: Project PlantisReaderPro.apk raised exception class Segmentation fault (11).

     

    When I choose Break, IDE positions cursor here in file IdThreadSafe.pas:

     

    procedure TIdThreadSafe.Lock;
    begin
      FCriticalSection.Enter;        <---------------
    end;

     

    But in my project, I am not using any Indy components. I have used GExpert, MMX and DUDS to scan used units, they do not show anything starting "Id". I do use IBX and ZXing.

    Please do you have any idea how to get rid of it? I am including image of the call stack.

     

    Kind regards,

     

    Karel

     

     

    id.png


  5. 5 hours ago, Arnaud Bouchez said:

    For decoding such log lines, I would not bother about UTF-8 decoding, just about line feeds decoding, during file reading.

    Just read your data into a buffer (bigger than you expect, e.g. of 2MB, not 32KB), search for #13#10 or #10, then decode the UTF-8 or Ansi text in-between - only if really needed.

    If you don't find a line feed before the end of the buffer, copy the bytes remaining from the last line at the beginning of the buffer, then fill it from disk.

     

    Last but not least, to efficiently process huge log files which are UTF-8 or Ansi encoded, I wouldn't make any conversion to string (UnicodeString), but use raw PAnsiChar or PByteArray pointer, with no memory allocation.

    We have plenty of low-level search / decoding functions working directly into memory buffers (using pointers) in our Open Source libraries https://github.com/synopse/mORMot/blob/master/SynCommons.pas

     

    He expects files up to 5 GB, lots of machines will not be able to keep it in RAM.


  6. 1 hour ago, David Heffernan said:

    You don't understand. Moving an item to the end leads to all items between that point and the end being moved down.

     

    It's perfectly possible to implement this without a realloc and without the dire performance traits of your chosen method. And if your array is huge and push the boundaries of available memory as you suggest, then your algorithm is unspeakably dire. 

    Why to move these items to the end? They can be ignored...
     

    Next:=0;
    for a:=0 to List.Count-1 do begin
     if List[a].Keep then begin
      List[Next]:=List[a];
      inc(Next);
     end;
    end;
    List.Count:=Next;

    List<T>.Pack probably does (almost) the same, it just tries to move bigger amount of memory in one block.


  7. HTTP Status 500 - org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Network error IOException: Connection timed out: connect)

    type Exception report

    message org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Network error IOException: Connection timed out: connect)

    description The server encountered an internal error (org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Network error IOException: Connection timed out: connect)) that prevented it from fulfilling this request.

    exception...


  8. Hello,

     

    in Delphi 10.3.3, there is something broken in Indy - root certificate cannot be load.

    Probably same problem as here: https://community.idera.com/developer-tools/programming-languages/f/delphi-language/70711/indy-can-t-load-root-certificate-file-in-10-3-3/91055

     

    Application raises an exception: Project Plantis.exe raised exception class EFOpenError with message 'Cannot open file "C:\Plantis\㩃䑜汥桰屩敄灬楨堠㙅停慬瑮獩䕜呅䑜杩䍩牥䝴潬慢剬潯䝴⸲散rv3". Systém nemůže nalézt uvedený soubor'.

     

    Please is it possible to remove Indy installed with Delphi and install Indy from github, without breaking things? I wanted just to replace IdSSLOpenSSL.pas, but it will not compile (always missing something).

    Or make Emba to repair it... In 10.3.2 it was working fine.

     

    Kind regards,

     

    Karel

     


  9. 15 hours ago, Attila Kovacs said:

    I can't see anything broken.

    SHIFT overrides NumLock and CapsLock.

    That means, with NumLock ON pressing SHIFT + 0 = pressing insert.

    Releasing SHIFT means, you are holding the 0 key, releasing 0 means you are releasing the 0 key, and not Insert.

    That's how windows works.

     

    I think it is broken - windows is reporting INSERT down, but it is not.

    In fact as soon as he releases Shift, he is not pressing Insert anymore, so there should be Shift-up, Insert-up, Zero-down.


  10. Well, I have made a check list for myself which I use for upgrading. Improvements are welcome 🙂

     

    Before upgrade:

    - close project, close IDE

    - remove IdeFixPack

    - backup settings using Migration Tool

     

    Installation:

    - run web install (because I am using it since XE6)

    - setup invokes uninstallation of previous version; during uninstall, keep registry settings

    - try to run IDE; usually there are missing .bpl files; when it asks whether to try to load them next time, answer yes on all such questions

    - close IDE

     

    After installation:

    - install TMS

    - install FastReport

    - install SecureBridge

     

    Run IDE and use Getit to install (usually needs a few restarts):

    - JCL

    - JVCL

    - Bookmark

    - Navigator

    - PngComponents

    - SynEdit

    - VirtualTree

     

    Other components, some of them unsupported:

    - prepare for new versions, with major upgrade it usually means copy project files and other corresponding files from names like DsgnCPortD250.dproj to DsgnCPortD260.dproj; edit them, change 250 to 260 inside. Find IFDEFs like IFDEF VER310 and add IFDEF VER320 etc. Often such IFDEFs are in .inc files. When something goes wrong with their compilation, I can be sure that I have not found all places to edit 🙂

    - run .bat file, which compiles these components for Win32 and Win64 and makes a list of created .bpl files

    - Component, Install packages, Add (I copy/paste paths to design time .bpl files created in previous step)

     

    Reduce annoyance 🙂

    - In C:\Program Files (x86)\Embarcadero\Studio\20.0\bin, rename or delete:

      dclbindcomp260.bpl,   dclbindcompfmx260.bpl,   dclbindcompvcl260.bpl,   dclbindcompfiredac260.bpl,   dclbindcompdbx260.bpl

    - using Regedit.exe, in HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\Known IDE Packages

      set $(BDS)\Bin\startpageide260.bpl = _Start Page IDE Package

      (add underscore, so start page is ignored)

     

    Final steps:

    - in some project, I use Vcl.Consts.pas and System.SysConst.pas translated to Czech; it is wise after upgrade to use diff and be sure, that all strings defined in original files exist in my files and also remove strings that were removed from originals

    - Tools, Options, Language, Delphi, Library - check library paths for Win32 and Win64, remove obsolete items and add items that disappeared during upgrade

     

    Hope it helps a little.

     

     

    • Thanks 1
×