James Steel 0 Posted June 7, 2023 Hi everyone, We are working on a couple of applications that have been in Delphi 10.2.3 for a few years and we are experiencing a new error that we have never seen from any version of Delphi in the past. There have been no changes to the IDE prior to the start of these errors. Each time we open a project or even try to create a new VCL forms application we get a stack overflow error. The dialog reads "Danger" and the error message reads: "Stack overflow - Save your work and restart Delphi 10.2". Any suggestions on what may be causing this error and how to fix this so we can get back to work would be very much appreciated. Thanks in advance for any help with this! Share this post Link to post
programmerdelphi2k 237 Posted June 7, 2023 @James Steel keep in mind that many "weird" errors as you say, especially when porting old projects to new IDEs, and vice versa, have a lot to do with the project settings files! Thus, whenever porting a project to another IDE, new or old, try to proceed as follows: In the new IDE, create a new project Delete the form that is created automatically, normally "Form1" Now, add all the files (forms, units, etc...) from the old project to this "new" project. Now make the necessary settings in "Project - Options..." and in any other necessary places! Now save this "new" project in a suitable folder for your new IDE. -- use a folder specific for this IDE, ex.: ..\RAD10\prjRAD10 .... ..\RAD11\prjRAD11 .... That's it, if this was the problem, then it won't be anymore! And, finally, you will have a new project preserving the old project, however, using the same files (forms, units, etc...) as you would expect. Now you can make your desired changes, always keeping in mind that, you are developing for two or more IDEs, so use the "compiler directives" when necessary to separate the code pertinent and particular to each IDE involved in your project! Share this post Link to post
James Steel 0 Posted June 7, 2023 Hi, Thanks for your quick response. The projects we are working on have not been ported from another IDE and have been working fine for years. Even creating a new project "File | New | VCL Form Application - Delphi " causes a Stack Overflow error. These errors are entirely new and without any obvious cause, as there have been no changes to the IDE or significant changes to the applications. Any suggestions for what might cause these errors would be welcome, even possible hardware causes. Share this post Link to post
programmerdelphi2k 237 Posted June 7, 2023 (edited) @James Steel let's try a new tip... if the bug is cause by a IDE settings, let's try create a new user for this IDE the RAD allow that you use many "user" in your desktop, then just use a command-line to execute this command> ... << your path where is RAD >> \bin\BDS.exe -r newusername <--- "-R" --> newusername = any name never used yet! ex.: c:\rad11\bin\bds.exe -r HelloWorldUser this way, will be create a new "environment" tottally fresh (none components, none addons) like the "first time" ok! in Registry, will be stored a new key em HCU\Software\Embarcadero\... HelloWorldUser key -> you can delete or not if desire use it another times! if ok, then, now you can create a shortcut for use it , else... let's try another tip: all RAD store your settings in c:\users\<<windows user name>>\AppData\Roamming\Embarcadero\BDS\<<nn.nn version>> then, do the backup and delete this folder << nn.nn version >> run you IDE and see if help you if nothing help, then, I think that the way is "re-install it" using a clean-install!!! Edited June 7, 2023 by programmerdelphi2k 1 Share this post Link to post
James Steel 0 Posted June 14, 2023 Thanks for the new suggestions. Sorry for my slow response. We tried the first option to start with a new user and we can create a new project without the stack overflow error. All of the third-party components are gone of course. Is it possible to copy over the configuration with all of the addons, etc. to the new user? Thanks! Share this post Link to post
programmerdelphi2k 237 Posted June 14, 2023 (edited) @James Steel by default, a new user always will use a "default first time run"... --> all setup is copyed from \HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Embarcadero keys... in fact, all components belong for each "session", then, in each "key" on Registry you can see it! -- and all files/folder is in your disk, nothing is delete of course! of course, a simple copy "values" in key to key would can solve it, but it's not always simple ... and for avoid any problem, you need just open the projects (DPK) "build/install it again (be using "installer" or just "Add BPL = components in your new "session/user", (updateing Path Library/Browser Path/DCU path, etc... ) you see? for that a new "build/install" is preferible! you can try this: ( for yourself risk...) export keys used for "old-sesssion" to reg file... (right-click on key root where you desire export it) now, open this file "reg" with a editor, like Notepad++ and change all old-keys to new keys (new user session) now, "import" this reg file and your Registry will have old values used in new keys(user) theorically, it would can works! --- But my preference is "build/install" or update the paths and add new components (Components-Add = BPLs) Edited June 14, 2023 by programmerdelphi2k Share this post Link to post
Nigel Thomas 35 Posted June 14, 2023 3 hours ago, James Steel said: We tried the first option to start with a new user and we can create a new project without the stack overflow error. All of the third-party components are gone of course. That would seem to indicate that it is indeed a third-party component that is causing the error. On the clean User install and test each component in turn until you hit the error again. Share this post Link to post
James Steel 0 Posted June 14, 2023 Thanks for the additional suggestions. It is very strange that no changes had been made when the stock overflow errors started. Some file may have become corrupted. It would be great if there were a better way to debug the problem rather than starting over and re-installing all the third-party components. Share this post Link to post
Lajos Juhász 293 Posted June 15, 2023 13 hours ago, James Steel said: Thanks for the additional suggestions. It is very strange that no changes had been made when the stock overflow errors started. Some file may have become corrupted. It would be great if there were a better way to debug the problem rather than starting over and re-installing all the third-party components. There is one acient technique: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Testing_Installed_Components Share this post Link to post