[SOLVED] How can I track down the error if the program doesn't even start? lazarus / 21-General ---------------------------------------------------------------------- flowCRANE · 2024-10-13 18:58 I am adapting my game sources to the new SDL3 library (I wrote the SDL3 headers myself, all functions are loaded automatically, so LoadLibrary etc. are not used). Most of it is done, but I have an unusual problem that I don't know how to solve. When I run the program from the IDE, in debugging mode (of course debug symbols are generated), the only thing that appears on the screen is an error window (see the attachment). The debugger doesn't start, so I can't even check what is causing the error. Does anyone know how to track down the error in such a situation? ---------------------------------------------------------------------- flowCRANE · 2024-10-13 19:05 Okay, I know what the problem is. If I run the project from the IDE, I only get a window with an error number (or address). The problem was that the program did not find the procedure entry point in the .dll and this can only be found out by running the exe directly from the disk, outside the IDE. It's a pity that the IDE does not inform that the procedure entry point in the DLL was not found, but instead displays a window with a worthless and meaningless error code/address. ---------------------------------------------------------------------- MarkMLl · 2024-10-13 19:51 Do we see a bug report arising out of this? Quote from: furious programming on October 13, 2024, 09:05:13 pmIt's a pity that the IDE does not inform that the procedure entry point in the DLL was not found, but instead displays a window with a worthless and meaningless error code/address. I've not been a serious Windows user for 20 years or so, but I almost commented earlier that that looked like a Windows error number which you should find documented in the SDK: so it's anything but worthless or meaningless. If it's a missing DLL entry point and you're relying on the OS to resolve it, then control was never transferred into your program. So arguably, the IDE could have said "The kernel gave me this error code when I told it to run the program..." which I suspect is what the first nibble would translate to. So: do we see a bug report and patch arising out of this ? >:-) MarkMLl ---------------------------------------------------------------------- 440bx · 2024-10-13 20:34 Quote from: furious programming on October 13, 2024, 09:05:13 pmIt's a pity that the IDE does not inform that the procedure entry point in the DLL was not found, but instead displays a window with a worthless and meaningless error code/address. The error is from the Windows loader and, IIRC, there are some instances where the loader does _not_ report which dll caused the problem. Anyway, you should get the same error running the program from Explorer or the CLI which makes it quite easy to find out what applies in your particular case. ETA: You may find the information in the following thread useful: https://forum.lazarus.freepascal.org/index.php/topic,55189.msg410196.h tml#msg410196 HTH. ---------------------------------------------------------------------- flowCRANE · 2024-10-14 11:30 Ok, thanks for the clarification — I didn't know this was controlled by the OS. ---------------------------------------------------------------------- Thaddy · 2024-10-14 11:41 The error code itself is likely related to a .net framework dll. See: https://answers.microsoft.com/en-us/windows/forum/all/i-am- getting-0xc0000135-error-when-opening- any/c80f6cd2-dcb1-4475-9e76-3edc80f86d29 ---------------------------------------------------------------------- flowCRANE · 2024-10-14 16:48 No, the error concerned the SDL2.dll, required by the SDL2_image.dll — both are coded in pure C.