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
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
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)?
ReplyDeleteThe shortcut does not show any compatibility mode settings enabled: https://www.dropbox.com/s/jfozvt8pv912ev2/Screenshot%202017-04-18%2013.40.30.png?raw=1
ReplyDeletedropbox.com - Screenshot 2017-04-18 13.40.30.png
Have you tried opening properties window for bds.exe in Windows explorer, Compatibility settings? Anything unusual there?
ReplyDeletedo you get the same issue if you start BDS from a new shortcut or command line?
ReplyDeleteStack trace: https://www.dropbox.com/s/5etuzu020a4mvnb/Screenshot%202017-04-18%2013.46.30.png?raw=1
ReplyDeletedropbox.com - Screenshot 2017-04-18 13.46.30.png
David Hoyle yes I do. Command is
ReplyDelete"C:\Program Files (x86)\Embarcadero\Studio\16.0\bin\bds.exe" -pDelphi
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)?
ReplyDeleteJeroen Wiert Pluimers Also what happens if you use another profile for BDS using the -r command line, i.e. bds.exe -rMyNewRegProfile
ReplyDelete[50829289]{vcl220.bpl } Vcl.AppEvnts.TMultiCaster.DoActivate (Line 422, "Vcl.AppEvnts.pas" + 5) + $8
ReplyDelete[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 >>
-------------------------
It looks like the default profile is called BDS, so I will compared these directories and see which difference breaks stuff.
ReplyDeleteC:\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
Jeroen Wiert Pluimers it could be Castilian as it's in the stack trace and should NOT be IMHO
ReplyDeleteJeroen Wiert Pluimers It also creates a different reg key for the installation. Instead of Embarcadero\Studio\18.0\BDS\... you get
ReplyDeleteEmbarcadero\Studio\18.0\MyNewProfile\... which would allow you to switch on and off things.
And out of nowhere Delphi started to work again. I hate those situations.
ReplyDeleteJeroen Wiert Pluimers I just hate that when it happens. I take it you didn't do anything that would have changed the behaviour?
ReplyDelete/sub
ReplyDeleteThe annoying thing about miracles is that you can't repeat them.
ReplyDeleteSo 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.
ReplyDeleteDavid 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