Delphi fails to start after Windows did some "Program Compatibility Assistant" magic to it when BDS.exe crashed because the compiler ran out of memory:

Delphi fails to start after Windows did some "Program Compatibility Assistant" magic to it when BDS.exe crashed because the compiler ran out of memory:

https://www.dropbox.com/s/cmhv5lz2zehq7yp/Screenshot%202017-04-18%2013.17.49.png?raw=1

How can I undo the magic?

The last entry in procmon is this (but I've seen that entry in many normal BDS.exe sessions as well):

13:32:34,5910460 bds.exe 3516 RegOpenKey HKLM\SOFTWARE\Wow6432Node\Microsoft\CTF\KnownClasses NAME NOT FOUND Desired Access: Read


The "what settings are applied" link does not provide any details on what was changed:

https://www.dropbox.com/s/rnrvc0nakupfxz6/Screenshot%202017-04-18%2013.21.12.png?raw=1

https://www.dropbox.com/s/cmhv5lz2zehq7yp/Screenshot%202017-04-18%2013.17.49.png?dl=0

Comments

  1. Jeroen Wiert Pluimers I suspect this will depend on the version of windows but can you not bring up the shortcut properties of the application and change its compatibility settings from there (There is a compatibility tab in the windows property dialogue in Win 7)?

    ReplyDelete
  2. Have you tried opening properties window for bds.exe in Windows explorer, Compatibility settings? Anything unusual there?

    ReplyDelete
  3. do you get the same issue if you start BDS from a new shortcut or command line?

    ReplyDelete
  4. David Hoyle yes I do. Command is

    "C:\Program Files (x86)\Embarcadero\Studio\16.0\bin\bds.exe" -pDelphi

    ReplyDelete
  5. Jeroen Wiert Pluimers Are you running as Administrator or restricted user? If not Admin or another user, do you get the same thing (might suggest a profile issue)?

    ReplyDelete
  6. Jeroen Wiert Pluimers Also what happens if you use another profile for BDS using the -r command line, i.e. bds.exe -rMyNewRegProfile

    ReplyDelete
  7. [50829289]{vcl220.bpl } Vcl.AppEvnts.TMultiCaster.DoActivate (Line 422, "Vcl.AppEvnts.pas" + 5) + $8
    [507CA8E6]{vcl220.bpl } Vcl.Forms.TApplication.WndProc (Line 9949, "Vcl.Forms.pas" + 126) + $C
    [50060313]{rtl220.bpl } System.TMonitor.Exit (Line 17758, "System.pas" + 2) + $7
    [50664E27]{vcl220.bpl } Vcl.Graphics.FreeMemoryContexts (Line 7051, "Vcl.Graphics.pas" + 12) + $8
    [506871B0]{vcl220.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9786, "Vcl.Controls.pas" + 3) + $6
    [506871C5]{vcl220.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9789, "Vcl.Controls.pas" + 6) + $0
    [50172DF4]{rtl220.bpl } System.Classes.StdWndProc (Line 16882, "System.Classes.pas" + 8) + $0
    [507CB41F]{vcl220.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10352, "Vcl.Forms.pas" + 23) + $1
    [507CB462]{vcl220.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10382, "Vcl.Forms.pas" + 1) + $4
    [507CB795]{vcl220.bpl } Vcl.Forms.TApplication.Run (Line 10520, "Vcl.Forms.pas" + 26) + $3
    -------------------------
    OK Details >>
    -------------------------



    ReplyDelete
  8. It looks like the default profile is called BDS, so I will compared these directories and see which difference breaks stuff.

    C:\Users\<>\AppData\Roaming\Embarcadero\JeroenProfile
    C:\Users\<>\AppData\Roaming\Embarcadero\BDS

    Same for:

    HKEY_CURRENT_USER\Software\Embarcadero\BDS
    HKEY_CURRENT_USER\Software\Embarcadero\JeroenProfile

    ReplyDelete
  9. Jeroen Wiert Pluimers it could be Castilian as it's in the stack trace and should NOT be IMHO

    ReplyDelete
  10. Jeroen Wiert Pluimers It also creates a different reg key for the installation. Instead of Embarcadero\Studio\18.0\BDS\... you get
    Embarcadero\Studio\18.0\MyNewProfile\... which would allow you to switch on and off things.

    ReplyDelete
  11. And out of nowhere Delphi started to work again. I hate those situations.

    ReplyDelete
  12. Jeroen Wiert Pluimers I just hate that when it happens. I take it you didn't do anything that would have changed the behaviour?

    ReplyDelete
  13. The annoying thing about miracles is that you can't repeat them.

    ReplyDelete
  14. So you have Microsoft code competing with Embarcadero code to see which one can screw up your system worse? This isn't going to end well. Just be glad they're battling each other and not working together.

    ReplyDelete
  15. David Hoyle indeed: I didn't change the BDS parts of the registry or AppData. I did a lot of things outside Delphi (mainly querying various Firebird databases with Database Workbench, searching log files with gnu grep then postprocessing them with notepad++ and Excel, maintaining a bunch of Proxmox VMs and firewall settings in FireFox). Then I needed to browse some Delphi code and started the regular Delphi shortcut: it just worked without throwing any errors.

    ReplyDelete

Post a Comment