Jump to content

Lars Fosdal

Administrators
  • Content Count

    3416
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Lars Fosdal

  1. We chose to do wrapper classes that further abstract the actual database types away from our code. Hence, in our code, there is no difference between running a BDE wrapped ADO connection and a FireDAC connection. Those classes use old school encapsulation to hide such differences from our code with very little overhead.
  2. Thanks! Neither suggestion is "perfect", but that gives me something to work with. I wonder how expensive it would be to do suggestion 1 for every structure that I use? There are supposed to be ways to plug in validators and converters for TJson & family, but the documentation is non-existent, and I don't want to take time to reverse engineer it all.
  3. Lars Fosdal

    Best site/source for SQL Server questions?

    We do all data change via SPs of which some do not do explicit transaction handling. The current SP call handling will detect if the call was a deadlock victim and rerun it if necessary - but that basically escalates the risk of yet another deadlock. The bigger sites have nearly a hundred pickers - so the odds for concurrent access = inevitable. We need to identify where we do not need exclusive access and explicitly use NoLock where appropriate. We need to identify where transactions will be feasible / required. We need to identify a best practice for resource allocation. The challenge is that the rules are complex and the dataset is dynamic (pallets are emptied and replaced many, many times during a day). f.x. get the best pick position for n items of article x with date requirement y which has the best fit for our pick route and least incoming traffic. To further complicate it, different clients have different rules for date requirements due to longer transports or specific rules per article for shorter requirements due to high turnover. The list of these varying parameters go on and on. If two clients make the same request at the same time - one has to be the winner of what may be a scarce resource, while the other needs a viable plan b. The pick request may consume the remaining items on one pallet, and then grab the rest from the next pallet - if there is one. To further complicate it, the allocation may need to be split onto multiple deliveries to multiple clients within the pick order. What is blatantly clear is that we currently are not doing it the optimal way.
  4. Lars Fosdal

    Possible bug in debugger for Delphi 10.3.1

    Debugger improvements were on the most recent roadmaps, wasn't they?
  5. Does anyone recognize that seemingly hardcoded address? The call stack indicates that it happens in Rio 10.3.1 source - but searching the source does not yield anything. Can it be Eurekalog that tries to tell me something about referencing a deleted or inaccessible piece of memory? #BAD: EAccessViolation: Access violation at address 0040CEEC in module 'MyApp.exe'. Read of address DEADBEE7. DBServer\INDUSTRIELL\DBName # 3017235 20.03.2019 13:23:06 (Brukerinterface, CRITICAL) MyApp_ClientId @ [0040CEEC] System._UStrAsg __________ CallStack [0040CEEC] System._UStrAsg [01561AF4] System.Generics.Collections.pas.{GridSet}TGridSet.TFieldValue<System.string>.SetValue (Line 4745, "System.Generics.Collections.pas") [0156241F] System.Generics.Collections.pas.{GridSet}TGridSet.TFieldValue<System.string>.CopyRow (Line 4745, "System.Generics.Collections.pas") [01558452] GridSet.TGridSet.CopyRow (Line 1002, "GridSet.pas") [01B92885] frmPSDExpeditionDeliveries2.TDeliverySet.UpdateFromDeliverySet (Line 4108, "frmPSDExpeditionDeliveries2.pas") [01B8F919] frmPSDExpeditionDeliveries2.TDeliveryGrid.RefreshByRouteList (Line 3671, "frmPSDExpeditionDeliveries2.pas")
  6. Lars Fosdal

    Read of address DEADBEE7. - Source of this raise?

    Excellent analysis, Remy. As I often do, I did not ask the right question - which should have been: What sets dead memory references to $DEADxxxx? RTL? EurekaLog? OS?
  7. Not all for loops are created equal.Considerfor x in [value1, value2, value3]You would expect to see x vary in the order of the values in the list. However – if x and the values are of an enumerated type, looping the “list” does NOT loop in the apparent order of the constant, but in the order of the enumerated type declaration, such as it would for any set. Example at: https://larsfosdal.blog/2019/02/18/delphi-pitfalls-enumerated-types-and-for-loops/
  8. Lars Fosdal

    Rio 10.3 - IDE Menu|Tabs

    It would have been so nice if the Tabs menu had been sorted by most recently used on top!
  9. Lars Fosdal

    TurboPower component sets sub forums.

    @Daniel - Sounds like a good idea, or what?
  10. Lars Fosdal

    Read of address DEADBEE7. - Source of this raise?

    The question is: Which programmer? What raises the AV?
  11. Lars Fosdal

    Read of address DEADBEE7. - Source of this raise?

    Also spotted: Read of address DEADC00B. Normally I'd expect to see things like this EUseAfterFreeError: Application made attempt to call method of already deleted object: $071EC5A0 OBJECT [TMyClass] 404 bytes.
  12. Lars Fosdal

    where are search paths stored?

    Ref. paths and VCS systems... We use standard paths C:\SomeFolder\Projects Common ThisCollection ThatCollection External Lib1 Lib2 Proj1 Proj2 We also use a $BIN environment var to direct the project outputs. Allows the team members great freedom for where to put their source, and where to direct the output. and try to ensure that all project search or include paths are on this form ..\Common\ThisCollection Those are stored in the .dproj which can be committed to the VCS. That also allows me to check out various versions Projects <- my typical working branch switched between trunk/pilot/live Projects.Rio <- while still on Tokyo, but testing Rio Projects.Trunk Projects.Pilot Projects.Live
  13. Lars Fosdal

    where are search paths stored?

    Somewhat off topic, but related. Ctr+-F12 gives you a list of units to open, and I assumed it was from the search paths and project paths, Turns out that it also will look at the .dpr uses statement. Ideally, the paths should be relative... uses SomeUnit in '..\RelativeFolder\SomeUnit.pas' But, I had a stale test project in my project group where the uses path used an explicit path uses SomeUnit in 'c:\Obsolete.Path\to\RelativeFolder\SomeUnit.pas' So, pressing Ctrl+F12 gave me both of these - even if Obsolete.Path didn't exist.
  14. Lars Fosdal

    Best site/source for SQL Server questions?

    I usually limit NOLOCK to queries for - data that is used as viewing info (i.e. not acted upon) - data that are currently in the custody of the client (i.e. not likely to be changed by other processes)
  15. Lars Fosdal

    IcoMoon font with TText

    For Windows, the norm would be to install the font. AddFontResource could be used, but as you demonstrated, it doesn't seem to work as intended? For MacOS, I would also assume that installing the font is recommended. I've not used custom fonts with FMX on Android or iOS, so I can't answer that.
  16. Lars Fosdal

    Rapid generics

    I literally do that failing Generics Ctrl-Click several times a day. I guess I am a slow learner 😛 I also wish that the Insight mechanism would deduce the most likely class types in scope and let me select one as jump target, and not ALWAYS send me to the virtual/abstract declarations of the base class.
  17. Lars Fosdal

    10.3.1 has been released

    Virtually, yes. Seriously busy days atm. Themed IDE = Lipstick on pig. I just deadlocked the IDE while trying to abort a compile/run - F9 then Escape -> Not responding.
  18. Lars Fosdal

    10.3.1 has been released

    Is there a FixPack for 10.3.1 ?
  19. Lars Fosdal

    10.3.1 has been released

    The new IDE skinning is a disaster. So! freaking! slow!
  20. Lars Fosdal

    IcoMoon font with TText

    What happens if you install the font in Windows and just try to use it the same way as any other font? (Saw that was answered already). AddFontResource is a WinAPI call, so if you plan for cross-platform FMX code, you should not use it. Also, https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-addfontresourcea says that return value for success = the number of fonts installed, and 0 = failure.
  21. Lars Fosdal

    Best site/source for SQL Server questions?

    Read queries can lock and be deadlocked in MS SQLServer. https://aboutsqlserver.com/2011/09/28/locking-in-microsoft-sql-server-table-of-content/
  22. Lars Fosdal

    Spelling and search

    Grammarly is a nice Chrome plugin for spell-checking in any edit box. https://chrome.google.com/webstore/detail/grammarly-for-chrome/kbfnbcaeplbcioakkpcpgfkobkghlhen
  23. Lars Fosdal

    Spelling and search

    Also, if it is your own old post, you can also check your activities on your profile.
×