-
Content Count
2857 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Anders Melander
-
Nested TParallel.For: Immediate deadlock
Anders Melander replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
That was really helpful. Thanks. If you view the PPL as an opaque general-purpose library then documentation will not help. Even if the problem/limitation is known by the user of the library, its existence means that the PPL can only be used when running on known configurations (# of CPUs) and cannot safely be used with other libraries that might also use the PPL. In other words: It's a bug; The situation should either be handled or it should fail with an exception. As far as I can see the concrete problem is in TParallel.ForWorker64 on the statement RootTask.Start.Wait. All the inner loop tasks are hanging there, waiting for their code to execute, but since all threads are occupied (by the outer loop tasks), none will ever become available. Deadlock. This situation should be detectable and I think a simple solution would be to temporarily increase the size of the threadpool when it occurs. For example in TThreadPool.TThreadPoolMonitor.GrowThreadPoolIfStarved. -
Writing a property sheet shell extension (IShellPropSheetExt)
Anders Melander replied to FPiette's topic in Windows API
Yes; That's what I wrote. procedure InjectMyForm(HandleOfControlOnPropertyPage: HWND; MyForm: TForm); begin SetParent(MyForm.Handle, HandleOfControlOnPropertyPage); ...lots of stuff to do with positioning and window style... end; -
Writing a property sheet shell extension (IShellPropSheetExt)
Anders Melander replied to FPiette's topic in Windows API
I can't see any way to create a property sheet without using a dialog template. Maybe you can just use an empty dialog template and then inject your Delphi form when the page is displayed? -
Nested TParallel.For: Immediate deadlock
Anders Melander replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
...and now I can again. Race conditions. Pfft! 🙂 -
Nested TParallel.For: Immediate deadlock
Anders Melander replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
...and now I can't. I tried debugging it and the IDE froze. After a restart of the IDE I can't reproduce it anymore. -
Nested TParallel.For: Immediate deadlock
Anders Melander replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
Reproduced. Delphi 11.2, 32- and 64-bit 4-core CPU. -
-
Everything you need is available through the COM+ Tracking API. If you just need the statistics you will probably need to use the IGetAppTrackerData interface.
-
Unsupported 16-bit resource in *.RC file
Anders Melander replied to lookin030577's topic in General Help
I can confirm that there are no errors in the res file. This is because Delphi will generate the "default" res file thus overwriting your custom one. The default res file is the one referenced by the directive "{$R *.res}". I suggest you name your res file so it doesn't conflict with the default project res file. I also suggest you either remove the MAINICON icon from your res file or delete the "{$R *.res}" directive. Otherwise, you will get a duplicate resource warning (because the project res file also contains a MAINICON icon) and the linker will have to discard one of them. With regard to "RLINK32: Unsupported 16bit resource in file" it could be many different things that cause this and without knowing exactly what your rc file looks like it's impossible to guess which one it is. You could try making sure that the rc file is in UTF-8 format. -
Unsupported 16-bit resource in *.RC file
Anders Melander replied to lookin030577's topic in General Help
Post your RES file. The fact that PEResourceExplorer can read it is no guarantee that it is correct. You might also try using the SDK resource compiler instead of brcc32 (which has known limitations). You can select the RC compiler to use in the project options. -
One compiles a 32-bit application, the other a 64-bit.
-
ChatGPT, is that you? Okay, now I've had too much coffee.
-
WOW, indeed 🙂 Your subconsciousness at work.
-
https://learn.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
-
Ah!... Have a look at C:\Windows\SysWOW64\fr-FR instead See it now?
-
Sorry, I should have been more clear in my sarcasm. I probably haven't had enough coffee yet. What I meant to "say" was that external tools are irrelevant in this context. The OP asked for a Delphi solution for use with FMX.
-
Reproduced. Not only does the file open dialog not show all files. It refuses to accept the names of the files it doesn't show. I have reproduced with both Delphi applications ** and notepad++ (which presumably isn't written in Delphi). Notepad.exe can see the files. Intriguing... **) Resource Editor 🙂
-
Does it work well with FMX? I like cats.
-
Some more fun with ChatGPT and Delphi
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Sure; It's a nice party trick. But it gets old. Exactly. Most of the examples I have seen so far of ChatGPT magically writing code usually involves the operator coaching it through iterations of incorrect answers toward the known correct answer. ChatGPT's linguistic abilities are very impressive. The rest, not so much. -
Some more fun with ChatGPT and Delphi
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Um... An explanation of why it's interesting for example. As far as I can tell it performed just as one could expect. Is that interesting? -
Some more fun with ChatGPT and Delphi
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I think you're assuming that I find the answers interesting, which I do not. I'm asking why he thinks they're "quite interesting". From a socio-psychological viewpoint, I think people's view of ChatGPT is "quite interesting". Beyond that, from what I've seen so far, the only practical use for ChatGPT is to waste everybody's time. YMMV -
Some more fun with ChatGPT and Delphi
Anders Melander replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
How so? -
I wouldn't be surprised. After all, there was a time when Basic programs ran faster if you used short variable names 🙂
-
Have you tried resetting the component list?
-
WHAT? I DON'T UNDERSTAND YOU. SPEAK LOUDER! I'M A BIT DUMB SO YOU'LL HAVE TO SPEAK REALLY, REALLY SLOW - AND LOUD.