The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

In potentially multi-threaded .NET Console applications, ensure `Console.EnsureInitialized` gets called for at least output, and potentially for input

Posted by jpluimers on 2024/07/02

An interesting issue at [Wayback/Archive] Khalid ⚡️: “I just used #JetBrainsRider to find a deadlock scenario in #dotnet that I would not have guessed would deadlock. The Console needs to be initialized since the initialization uses a lock the first time. Using it in parallel tasks causes deadlocks. #dotnet This is excellent tooling!…” – Mastodon.

https://i0.wp.com/web.archive.org/web/20240626133154if_/https%3A//files.mastodon.social/media_attachments/files/112/683/097/702/613/855/original/3c11b46a77d3a1fd.png

[Wayback/Archive] 3c11b46a77d3a1fd.png (2800×1610)

It boils down to a non-public Console.EnsureInitialized method being called from multiple threads causes deadlocks. So far, it looks it can only be called as part of referring to Console.In or Console.Out.

I could only find one potentially related bug, which is [Wayback/Archive] NativeRuntimeEventSource behaving poorly in conjunction with other providers · Issue #88011 · dotnet/runtime · GitHub and being worked on, for .NET 9 or later:

Read the rest of this entry »

Posted in .NET, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »

Reminder to self: write a Bookmarklet that shortens YouTube URLs to the youtu.be ones

Posted by jpluimers on 2024/07/02

When sharing YouTube videos via the mobile apps, they are shortened using the youtu.be domain.

So this is a reminder to write a Bookmarklet based URL-shortener myself for this and extend it so it also understands the various YouTube URL parameters (like start time).

The transformation is documented:

Read the rest of this entry »

Posted in Bookmarklet, Conference Topics, Conferences, Development, Event, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

MSI installation error 1603 – Windows Server | Microsoft Learn

Posted by jpluimers on 2024/07/01

This happens a lot with apps that auto-update before package manager contain that update: [Wayback/Archive] MSI installation error 1603 – Windows Server | Microsoft Learn

Cause

You may receive this error message if any one of the following conditions is true:

  • Windows Installer is attempting to install an app that is already installed on your PC.
  • The folder that you are trying to install the Windows Installer package to is encrypted.
  • The drive that contains the folder that you are trying to install the Windows Installer package to is accessed as a substitute drive.
  • The SYSTEM account does not have Full Control permissions on the folder that you are trying to install the Windows Installer package to. You notice the error message because the Windows Installer service uses the SYSTEM account to install software.

Query: [Wayback/Archive] Exit code was ‘1603’ – Google Search

--jeroen

Posted in Chocolatey, Power User, Windows | Leave a Comment »

Rode Kruis on Twitter: “#hittetip voor de komende dagen en de zomer. 👉 Zo herken je de symptomen van oververhitting:…”

Posted by jpluimers on 2024/07/01

Belangrijke tips voor het begin van oververhitting en wanneer je echt 112 moet bellen.

Read the rest of this entry »

Posted in Awareness, Health, LifeHacker, Power User | Leave a Comment »

Firex 230V koppelbare rookmelders, type KF20 en KF20R, levensduur 10 jaar

Posted by jpluimers on 2024/06/28

Een aantal PDF bestanden, omdat we Kidde rookmelders hadden en deze daarmee koppelbaar zijn: “Koppelmogelijkheden: 24 Firex en Kidde melders zijn bedraad koppelbaar”

  • [Wayback PDF View/PDF View] [Wayback/Archive] 14fcff3ca6395ea19180-e28dea9290b98a380fe8af8e9eca99dc.ssl.cf3.rackcdn.com/pdf-16131960.pdf “Firex 230V koppelbare rookmelders, type KF20 en KF20R, levensduur 10 jaar”

    Montage methode

    De Firex melders zijn voorzien van een “push-fit” stekker met 15 cm bekabeling om de melder op de huisbedrading aan te sluiten.

    De KF20 en KF20R passen direct op de montageplaat van de eerdere modellen Firex 4973 en 4985. Om stof tijdens verhuizing te voorkomen wordt een stofkap bijgeleverd.

    Koppelmogelijkheden

    Maximaal 24 Firex en Kidde rook-, hitte-, en CO-melders kunnen doorgekoppeld worden, met 6 melderaccessoires (relaismodule, flitslicht, trilkussen etc.).

    Vervuilingscompensatie

    Vervuiling van de optische kamer wordt automatisch gecompenseerd om onnodige alarmen tegen te gaan.

    Rookmelders worden toegepast in ontsnappingsroutes en verblijf- ruimtes van woonhuizen waar gevaar is voor ontbranding van meubilair en/of elektrische installaties. Plaats de Firex hitte- melder KF30 of KF30R in stoffige, vochtige ruimtes of in keukens.

Read the rest of this entry »

Posted in DIY, Power User, Security | Leave a Comment »

Thread by @malmoeb on attacks: Visibility is key for eradication

Posted by jpluimers on 2024/06/28

[Wayback/Archive] Thread by @malmoeb on Thread Reader App: Visibility is key for eradication.

The thread is about attacks on networks with Windows machines, but the concept works on all networks.

Start of thread: [Wayback/Archive] Stephan Berger on Twitter: “1/ Visibility is key for eradication 🥷 In a recent IR case, the TA created persistences with #QakBot on almost every system in the network. If only individual systems in the network were forensically examined, one or more infected systems would undoubtedly be missed. 🧵”

The gist is to setup your network monitoring in such a way that you can quickly identify compromised systems based on network traffic patterns.

–jeroen

Posted in LifeHacker, Pen Testing, Power User, Security, Windows | Leave a Comment »

Homelab: 2U server, short depth, with front IO, based on Ampere Altra and Asrock Rack ALTRAD8UD-1L2T motherboard

Posted by jpluimers on 2024/06/27

For my link archive: [Wayback/Archive] Homelab: 2U server, short depth, with front IO, based on Ampere Altra and Asrock Rack ALTRAD8UD-1L2T motherboard

Pictures from the above post below the post signature.

Via [Wayback/Archive] Nicolas Massé on X: “I wrote an article on my last build for the Homelab: 2U server, short depth, with front IO, based on @AmpereComputing Altra and @ASROCKRACK ALTRAD8UD-1L2T motherboard. 🥳 ➡️ … /cc @Newegg @JoeSpeeds”.

Motherboard: [Wayback/Archive] Asrock Rack Bundle ALTRAD8UD-1L2T Deep Micro-ATX Server Motherboard Single Socket (LGA 4926) with Ampere Altra M128-26 128 cores & 2U passive cooler, Dual 10G – Integrated by Asrock Rack – Newegg.com

--jeroen

Read the rest of this entry »

Posted in ARM, Assembly Language, Development, Hardware Development, Power User | Leave a Comment »

Diagnosing ThinkPad T510 shutting down after ~30 seconds: heat problem?

Posted by jpluimers on 2024/06/27

A while ago, [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “The ThinkPad T510 problem was easier to resolve than anticipated: a dust problem after all. This video helped opening up the internals: www.youtube.com/watch?v=vrjoiH5LS3g When it re-occurs, the next step is remove fan, re-apply thermal paste then add fan again. Thanks for all the tips!”

Below are some pictures (including some great tools I made/have) which I made after disassembling according to this video: [Wayback/Archive] Lenovo ThinkPad T510 disassembly and fan demontage [no audio]. – YouTube

Read the rest of this entry »

Posted in Hardware, Power User, T510, ThinkPad | Leave a Comment »

GitHub – KirillOsenkov/LargeAddressAware: A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE (and some words on a 64-bit Delphi product)

Posted by jpluimers on 2024/06/26

[Wayback/Archive] GitHub – KirillOsenkov/LargeAddressAware: A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE

Hopefully this can be applied to Delphi projects as well. If not then in Delphi you can manually call this in an post-build task.

Addition late 20240626

[Wayback/Archive] Kirill Osenkov: “@wiert I also found that you can…” – Mastodon

@wiert I also found that you can target AnyCPU 32-bit preferred and it will give you the same address space. So that tool is only for x86.

Via [Wayback/Archive] Meik Tranel on X: “Please for the love of all that is holy. Do not build #dotnet tools to serve a non interactive task that is supposed to be run during a build – use an #MSBuild task package. Also #JS/#NPM devs should not be allowed to write tooling. Thanks for coming to my ted talk…”.

The Delphi bit inspired a few months ago by: [Wayback/Archive] Andreas on X: “Will there ever be a 64bit Delphi IDE or at least a LargeAddressAware version. Our Projekt crashes the IDE between 14-18 compilations because it runs out of memory. Maybe I have to patch the IDE myself by moving all .NET and Compiler memory allocations above the 2 GB address.”

Read the rest of this entry »

Posted in .NET, Conference Topics, Conferences, Continuous Integration, Delphi, Development, Event, msbuild, Software Development | Leave a Comment »

Delphi has had a more type safe FreeAndNil or a while now, but in order to do so it lies to you

Posted by jpluimers on 2024/06/26

During my year+ of cancer treatments, Embarcadero did a tiny thing that makes [Wayback/Archive]FreeAndNil safer to use. In order to do so, the method now lies to you by taking a const [ref] parameter which technically it is not allowed to change, but the internal hackery allows it to. Dalija Prasnikar explained it in 2020: [Wayback/Archive] Magic behind FreeAndNil.

The new signature is this:

procedure FreeAndNil(const [ref] Obj: TObject); inline;

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Delphi 10.4 Sydney (Denali), Delphi 11.0 Alexandria (Olympus), Development, EKON, Event, Software Development | 2 Comments »