Recent

Author Topic: Windows 2026_7 update and Lazarus 4.8  (Read 977 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12641
  • Debugger - SynEdit - and more
    • wiki
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #15 on: July 17, 2026, 03:54:21 pm »
Ok so if that is when you start Lazarus from the desktop ...


@Martin_fr

The debugger is the default FpDebug. IDE is the default IDE

Didn't find View>DebugWindows>Stacktrace. but did find >Call Stack ...same thing? Attached screen shot.

@Jamie thanks but switching off Smart App didn't make any difference

Yes same thing. Sorry I didn't check the name correctly (I just typed from memory).


Keeping in mind their is a small chance stacks can be wrong (e.g. corrupted at the time of an error) => It looks like this is the OS loading libraries.

If (another big if)  I read it correctly, then this is even before FPC's system init code runs. (though that may have been called, and control may be back to Windows).

That would mean, at this point the OS is loading libraries (and that can be libraries imposed by the OS, so not even controlled by your code or fpc). And one of those libraries fails.

If that is the case, that can be an OS lib (but then others should have it too). Or it can be something from a 3rd party app (well I know that from when you open the file dialog, when libraries from office, pdf, and many other apps are all loaded into your app / if you want it or not does not matter). I don't know for sure at app-startup...
Though I hear, that some games install very intrusive "anti cheat" stuff... And I have no idea what else may do so...

So their is a change that this is an interaction with some other software that you have on your system. (And I would then consider it a bug in that software).



In the menu "debug windows" there is also "event log"
=> open that,
=> right click, and open options
=> enable "module" in the checkbox-list
=> then see if it reports any library loaded. I don't know if it will (at that early stage). But if it does, then maybe it will tell the name of the dll.



EDIT
For me the following libs get loaded (when starting a 32 bit app in a 32 bit IDE on Win 11 64 bit OS). Order may vary sometimes
Code: Text  [Select][+][-]
  1. Loaded: ntdll.dll (\\?\C:\Windows\SysWOW64\ntdll.dll)
  2. Loaded: KERNEL32.DLL (C:\WINDOWS\SysWOW64\KERNEL32.DLL)
  3. Loaded: KERNELBASE.dll (C:\WINDOWS\SysWOW64\KERNELBASE.dll)
  4. Loaded: oleaut32.dll (C:\WINDOWS\SysWOW64\oleaut32.dll)
  5. Loaded: msvcp_win.dll (C:\WINDOWS\SysWOW64\msvcp_win.dll)
  6. Loaded: ucrtbase.dll (C:\WINDOWS\SysWOW64\ucrtbase.dll)
  7. Loaded: combase.dll (C:\WINDOWS\SysWOW64\combase.dll)
  8. Loaded: RPCRT4.dll (C:\WINDOWS\SysWOW64\RPCRT4.dll)
  9. Loaded: user32.dll (C:\WINDOWS\SysWOW64\user32.dll)
  10. Loaded: win32u.dll (C:\WINDOWS\SysWOW64\win32u.dll)
  11. Loaded: GDI32.dll (C:\WINDOWS\SysWOW64\GDI32.dll)
  12. Loaded: gdi32full.dll (C:\WINDOWS\SysWOW64\gdi32full.dll)
  13. Loaded: advapi32.dll (C:\WINDOWS\SysWOW64\advapi32.dll)
  14. Loaded: msvcrt.dll (C:\WINDOWS\SysWOW64\msvcrt.dll)
  15. Loaded: sechost.dll (C:\WINDOWS\SysWOW64\sechost.dll)
  16. Loaded: shell32.dll (C:\WINDOWS\SysWOW64\shell32.dll)
  17. Loaded: ole32.dll (C:\WINDOWS\SysWOW64\ole32.dll)
  18. Loaded: shlwapi.dll (C:\WINDOWS\SysWOW64\shlwapi.dll)
  19. Loaded: imm32.dll (C:\WINDOWS\SysWOW64\imm32.dll)
  20. Loaded: comdlg32.dll (C:\WINDOWS\SysWOW64\comdlg32.dll)
  21. Loaded: shcore.dll (C:\WINDOWS\SysWOW64\shcore.dll)
  22. Loaded: ws2_32.dll (C:\WINDOWS\SysWOW64\ws2_32.dll)
  23. Loaded: version.dll (C:\WINDOWS\SysWOW64\version.dll)
  24. Loaded: comctl32.dll (C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.26100.8875_none_85ba9419f7ac12e3\comctl32.dll)
  25. Loaded: winmm.dll (C:\WINDOWS\SysWOW64\winmm.dll)
  26. Loaded: wsock32.dll (C:\WINDOWS\SysWOW64\wsock32.dll)
  27. Loaded: winspool.drv (C:\WINDOWS\SysWOW64\winspool.drv)
  28. Loaded: cfgmgr32.dll (C:\WINDOWS\SysWOW64\cfgmgr32.dll)
  29. Loaded: uxtheme.dll (C:\WINDOWS\SysWOW64\uxtheme.dll)
  30. Loaded: msimg32.dll (C:\WINDOWS\SysWOW64\msimg32.dll)
  31. Loaded: dwmapi.dll (C:\WINDOWS\SysWOW64\dwmapi.dll)
  32. Loaded: shfolder.dll (C:\WINDOWS\SysWOW64\shfolder.dll)
  33. Loaded: windows.storage.dll (C:\WINDOWS\SysWOW64\windows.storage.dll)
  34. Loaded: profapi.dll (C:\WINDOWS\SysWOW64\profapi.dll)
  35. Loaded: kernel.appcore.dll (C:\WINDOWS\SysWOW64\kernel.appcore.dll)
  36. Loaded: bcryptPrimitives.dll (C:\WINDOWS\SysWOW64\bcryptPrimitives.dll)
  37. Loaded: MSCTF.dll (C:\WINDOWS\SysWOW64\MSCTF.dll)
  38. Loaded: textinputframework.dll (C:\WINDOWS\SysWOW64\textinputframework.dll)
  39. Loaded: CoreMessaging.dll (C:\WINDOWS\SysWOW64\CoreMessaging.dll)
  40. Loaded: CoreUIComponents.dll (C:\WINDOWS\SysWOW64\CoreUIComponents.dll)
  41. Loaded: wintypes.dll (C:\WINDOWS\SysWOW64\wintypes.dll)
  42. Loaded: CRYPTBASE.DLL (C:\WINDOWS\SysWOW64\CRYPTBASE.DLL)
  43. Loaded: TextShaping.dll (C:\WINDOWS\SysWOW64\TextShaping.dll)
« Last Edit: July 17, 2026, 05:18:55 pm by Martin_fr »

morknot

  • Jr. Member
  • **
  • Posts: 63
  • still learning
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #16 on: July 17, 2026, 07:10:36 pm »
Yes 'start up' was vague. Apologies.

Lazarus starts OK.

When a New Project (no code, no components) is run the Choose Debug Information window shows (Enable Dwarf 3). Click OK and the external exception occurs.

For an existing project, the exception occurs when it is run.

I have attached a screenshot of the event log. Very different to your example.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12641
  • Debugger - SynEdit - and more
    • wiki
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #17 on: July 17, 2026, 08:07:36 pm »
When a New Project (no code, no components) is run the Choose Debug Information window shows (Enable Dwarf 3). Click OK and the external exception occurs.
For an existing project, the exception occurs when it is run.

Ok. And it says "ProjectName raised exception class access violation" (or similar)? The important part is the reference to the project.
It should, since that explains why you get an asm window.


Ok the next set of questions:

1) If you compile and chose "run without debugger" does it start ok?
If you find the exe outside the IDE, and double click it in the explorer, does it start ok?

2) if you change the debugger backend to gdb: does it work?
Either in project options > debugger
or in Tools > options > debugger > backend


----------------
If you install 4.6 (or whatever you had before) again.
You can do that as "secondary install" => it will ask for a separate config path, and not interfere with your current install.

Does it (still) work ok?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12641
  • Debugger - SynEdit - and more
    • wiki
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #18 on: July 17, 2026, 08:09:13 pm »
And double, tripple check that you have Windows defender set to ignore this.

- Ignore your program (ideally the entire project folder)
- Ignore the IDE
- Ignore FPC


jamie

  • Hero Member
  • *****
  • Posts: 7902
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #19 on: July 17, 2026, 11:22:49 pm »
can you configure the debug information so that it uses an external file, instead of the attachment to the resource?

Do a full build and try running it.

 Also, where is your output file pointed to?

Jamie
« Last Edit: July 17, 2026, 11:24:30 pm by jamie »
The only true wisdom is knowing you know nothing

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12641
  • Debugger - SynEdit - and more
    • wiki
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #20 on: July 18, 2026, 12:11:25 am »
Just did some googling, semi random result, that could be of interest.

One suggestion was that in older app "DEP (Data Execution Prevention) " could cause failures in start up. It is possible that Win11 becomes more aggressive in applying such protections.

There should be a way somewhere in the Windows settings, google says: Open the Start menu, search for Advanced system settings, and press Enter.Under the Performance section, click Settings.Go to the Data Execution Prevention tab.


May be worth a try...

jamie

  • Hero Member
  • *****
  • Posts: 7902
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #21 on: July 18, 2026, 12:24:32 am »

I'll have to install a 32 bit version of Laz on my Win11 flaptop to see what happens. 64 bit version works.

Jamie
The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 7902
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #22 on: July 18, 2026, 01:45:40 am »
I loaded the 32-bit version of Laz on my Win 11 laptop with all the recent updates, it works fine.

of course I don't have any additional controls installed in it.

Jamie

The only true wisdom is knowing you know nothing

morknot

  • Jr. Member
  • **
  • Posts: 63
  • still learning
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #23 on: July 18, 2026, 02:32:05 pm »
I have done some experimenting......

'Run without Debugging'.....the project runs correctly. Played around with alternative debuggers but still got the exception when used.

Disable antivirus and reload and run the project without restarting Lazarus, still get the exception.

Disable antivirus, restart Lazarus...project runs correctly.

I am pretty sure now that there is a conflict between the Lazarus debugger and Kaspersky antivirus. I didn't think of this immediately because up until the Windows update, they had been working together correctly. I'm guessing that there was an update to Kaspersky at about the same time that caused this problem.

I have now uninstalled Kaspersky and I will rely on Windows Defender.

@Martin_fr. Thank you very, very much for all the time and effort you have put into solving this. I apologize for creating a 'wild goose chase' when I should have put more thought into the possible reasons at the outset. Thanks too to @Jamie

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #24 on: July 18, 2026, 02:41:58 pm »
I have now uninstalled Kaspersky and I will rely on Windows Defender.
That is a very!! good call! Recommended to everyone!
But for home use only. For corporates additional third-party anti-virus features may still be beneficial.
Otherwise uninstall the lot: Defender is better and also for a good many years.
« Last Edit: July 18, 2026, 02:47:28 pm by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12641
  • Debugger - SynEdit - and more
    • wiki
Re: Windows 2026_7 update and Lazarus 4.8
« Reply #25 on: July 18, 2026, 06:23:32 pm »
@Martin_fr. Thank you very, very much for all the time and effort you have put into solving this. I apologize for creating a 'wild goose chase' when I should have put more thought into the possible reasons at the outset. Thanks too to @Jamie

Oh yes, Anti virus can interfere. While I think Defender is the choice today, if anyone has other preferences, such problems can usually be reported and should be solved by the companies in a few days.

 

TinyPortal © 2005-2018