Strange error compiling Asphyre in degug mode, but not in release mode lazarus / 39-Graphics ---------------------------------------------------------------------- BlueIcaro · 2018-09-17 18:05 Hi, I downloaded Asphyre from its page https://asphyre.net/8-news/20-platform-extended-library-re-licensed- under-mpl I compile the basic example, using default mode in lazarus, and it's works nice but if I change to debug mode in lazarus I got a compile error: QuotePXL.Devices.DX9.pas(161,15) Error: Incompatible type for arg no. 2: Got "Class Of IDirect3D9Ex", expected "TClass"The error is in unit PXL.Devices.DX9. This is the line:  Code: [Select]   if Failed(IDirect3D9Ex(FContext.Direct3D).GetAdapter DisplayModeEx(D3DADAPTER_DEFAULT, @DisplayModeEx, nil)) then       Exit(False);  Why this problem? /BlueIcaro ---------------------------------------------------------------------- JuhaManninen · 2018-09-17 18:12 Quote from: BlueIcaro on September 17, 2018, 08:05:36 pmI compile the basic example, using default mode in lazarus, and it's works nice but if I change to debug mode in lazarus I got a compile error: QuotePXL.Devices.DX9.pas(161,15) Error: Incompatible type for arg no. 2: Got "Class Of IDirect3D9Ex", expected "TClass"It is clearly a compilation error and has nothing to do with debugging. Do you mean that "debug" build mode makes a difference here? It shouldn't. I didn't look at the actual code yet, sorry. ---------------------------------------------------------------------- BlueIcaro · 2018-09-17 18:29 Hi, I found that the problem with the option "Verify method calls" in debuging option. If I remove this option the code can be compiled. Debug mode actives this option, and this is the problem. May be same expert in free pascal compiler can explain it, I don't know why, but now I can use break points and debug. /BlueIcaro ---------------------------------------------------------------------- JuhaManninen · 2018-09-17 19:42 Quote from: BlueIcaro on September 17, 2018, 08:29:37 pmHi, I found that the problem with the option "Verify method calls" in debuging option. Ok, yes. Lazarus itself has similar problems:  https://bugs.freepascal.org/view.php?id=11697 Even the often used accessor class hacks can trigger it. " -CR Generate checks when calling methods to verify if the virtual method table for that object is valid. "