Why does LAZARUS open stdctrls.pp when I hit F9? - lazarus

I've been working on a project. I just hit F9 and instead of any results, the stdctrls.pp file gets opened on the IDE.
Why is this? It's the first time that this has happened.
In the messages window at the bottom, I see this message:
stdctrls.pp(9,52) Fatal: Circular unit reference between StdCtrls and
LCLIntf

Try shift+F9 (Rebuild All). It should rebuild whole project. In most cases it helps.

Related

Xcode project crashing every time it is opened

Every time I open my project in Xcode ( Version 10.0 beta (10L176w) ) I get a crash.
What have I TRIED to do to fix the problem?
I have tried using Xcode 9 but that didn't seem to work either.
I have tried clicking another file as soon as I open the
project, but that does not seem to work.
I have tried going to the directory in the error log, but it would not take me there.
I have tried right-clicking on xxx.xcodeproj and then clicking Show Packaged Contents then deleting the xcuserdata folder (also tried with xxx.xcworkspace).
Expected result:
For my project not to crash every time it is opened.
Actual result:
A crash every time I open my project.
What caused it?
I can't know for sure what caused it, but it happened when I was adding Binaries and Libraries I created (I am new to it, so may have done something wrong). You can also see a few lines in the log screenshot about Frameworks, so this might have been the cause.
Why does it matter?
I am unable to work on my project, halting progress, as neither the .xcodeproj or the .xcworkspace will open. I am hesitant (and also it's bit of a pain) to edit the files to write my code. I wouldn't like to start ALL over again.
I am not looking to remake my project, and that is a last resort.
Is there some sort of project/cache cleaning I can do without opening the project (something similar to ⌘ + ⇧ + K)?
If you have any questions, please ask me. If you require a certain part of the crash log, let me know.
In the end, I just re-made the project. I started using git for the first time as well, so I will stay with that from now on, as it will reduce the chances of this happening again :)

VS2013 or VS2015 shows "unspecified error"

When I open my worked solution (after merge from other branch) VS2013 shows error message "unspecified error" and I cannot close the window (the error's dialog jumps each time when I close it).
VS2012 opens the solution without error messages.
I suspect issue related to TFS configuration.
How can I found actual reason of the error?
I have searched a lot about its root cause but couldn't found any concrete information.
For me,
Deleting the solution's .suo file.
resolve this problem.
I still don't understand the actual reason for this error, but I found a workaround.
According to "Change source control" window (VS) solution file (.sln) not connected to TFS
When I connected the solution to TFS in VS2012 (with the help of this link), VS2013 opened the solution too without error message.
Found a solution at this address:
Go at File -> Source Control -> Advanced -> Change Source Control
Select your projects and unbind them
Rebind them.
The problem should be solved.
I have removed and recreated new workspace for the project and its works for me
This always works for me 100% of the time.
Make sure your solution is closed.
Open your solution.
As QUICKLY
AS YOU CAN press Ctrl-Shift-B.
Your solution will build and the error message will disappear. When it reappears do the same thing again.
May be URL of TFS server is mentioned wrongly in solution file.

This Breakpoint Will Not Currently Be Hit, The Source Code is Different from the Original (even after cleaning/rebuilding)

.NET 4, console application. The project is set to 'Debug' mode. The breakpoint being set is in the primary/startup project. I have right-clicked -> Clean, and right-clicked -> rebuild, both on the Solution and project levels.
Following the instructions in this SO question, I have confirmed that my "Build and Run" options are set to 'prompt' for both 'When projects are out of date' and 'when build or deployment errors occur', and I am NOT getting a prompt when I F5 to build/run.
Also, the 'save all changes' under 'before building' is also selected (plus I manually saved them myself).
I monitored the output window of the application, see this line:
'MyApplication.exe': (Managed (v4.0.30319)): Loaded 'C:\exepath' Symbols Loaded.
I restarted the VS2010 instance. I restarted all open VS2010 instances (of other projects). I've even gone through a reboot.
However, the breakpoint I am setting in the startup project is a hollow-red circle, with the notice that 'This breakpoint will not currently be hit, The source code is different from the original', and, in fact, is never hit.
So, this is really 2 questions:
1) How do I fix this problem so I can properly breakpoint
2) When I see this, does that mean my code is executing from an older build?
I've had this problem once myself but that was on a vsto addin. In that case there were left over intermediate files under the users/appdata directories that were actually loaded instead of my app.
There is this blog article that has a whole load of possible reasons for this error and then a whole bunch more in the comments from other users
This can also happen if you have a solution with multiple projects, and have the wrong project selected as your startup project in VS2010 and VS2012.
Now, obviously, I wouldn't expect debugging to work if I have the wrong startup project selected -- the debugger is attaching itself to the wrong process!
But this error message (in my case) was terribly misleading. It made me think something else was wrong. I tried a bunch of solutions in this thread (nuking various /bin and output directories) when really it was something very simple (wrong startup process).
If you are using vb, check that you are building the project for the active solution configuration (Build, Configuration Manager..., Column under Build is checked. Also check the project properties, Compile tab, Advanced Compile Options, and Generate debug info is set to Full. Sorry I can't tell you where this may be in C#.
The only other time I've seen this is when two projects in the solution are referencing the same dll but they are referencing from different sources. One from a project reference and another from a file reference for example. If the "copy local" option is true, there would be the potential of overwriting the dll with an older version of the same dll.
My solution might help people who have signed the assembly.
After lot of head scratching for the past two days, I was able to resolve the same issue by doing the following simple steps:
Go to your Visual Studio project properties.
Go to the "Signing" tab.
Uncheck "Delay sign only" option if it is checked.
Now run your project and it should work.For me it did work.
In my case was this same problem (“The breakpoint will not currently be hit. The source code is different from the original version.”) caused by fact, that I tried add breakpoint to declaration:
DateTime dt;
bool b = DateTime.TryParse(null, out dt);
(first line of code)
So I assume that message is "universal" and may have many different causes.
This can happen if your system clock was changed since the last compile. Your PDB file will be different date than the one your are trying to debug. Delete the PDB files in the project and recompile.
I experienced the problem when Project > Properties > Web did not have "Enable Edit and Continue" selected. After enabling this feature the issue was corrected.
It is important to note that under Tools > Options > Debugging > Edit and Continue "Enable Edit and Continue" was selected, but it was not enabled for this project.
Just go to Tools / Import and Export Settings
Choose reset all settings then click Next
No, just resetl settings, ovewriting my current settings then click next
Choose your current language, por example C#. then click Finish
If you have multiple solutions open, try simply closing all Visual Studio instances and restarting only the instance you need.
In my experience this has happened when two branches of nearly identical code are open in different instances.
doing a "clean solution" from VS Build Menu might help you.
I had to go over all those steps to fix the issue on my computer.
Make sure that debug = "true" on your web.config
Clean and rebuild all projects
Delete every file inside the bin folder of all projects
Close and open Visual Studio, rebuild, and run the project again.
Go to your solution folder -> obj -> Debug - > delete the .dll file and build the solution again.

Xcode "index is corrupt, will rebuild" message followed by "Segmentation fault" when running under root

Can anybody explain to me the cause of the following message, perhaps along with suggestions as to how to fix it?
I'm running XCode under root using sudo <path to xcode because I need to debug a daemon that has to run as root.
I've done this several times successfully, but now when I try to open the project in Xcode I get the following message from XCode:
2009-06-09 10:04:25.521 Xcode[434:a0b] index is corrupt, will rebuild
Segmentation fault
Other projects open fine, and this project opens fine in a non-root instance of Xcode.
I've tried restarting the computer and deleting all of root's pbxuser files etc from inside the project.
Also, if now I go in and try to rebuild the index in Xcode running under my own user I get the following assertion failure. If I hit continue Xcode crashes.
ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1114/pbxindex/PBXProjectIndex.m:305
Details: NULL symbol vector with value 278024
Function: _symbolKeyForValue
The solution to this is to completely remove Xcode's current index, which is in the build folder of the project. So delete the entire build folder and then reopen the project and it should be fixed.
For those still looking for the answer to this issue, it might be easier to follow these instructions from Andrew Pontious:
Open Xcode, go to its preferences,
then Code Sense, and uncheck "Enable
indexing for all projects". Press the
Apply button in the prefs window.
Once that's turned off, open your
project. It shouldn't crash anymore.
Then, go back to the preferences, and
turn indexing back on. (Click Apply.)
Again, it shouldn't crash, but it
should completely reindex your
project.
Re-enabling indexing made Xcode (3.1.3) crash again for my project, so I have left it disabled.

How to set breakpoint in a dependent xcode project

i have a XCode project (my main xcode project which has its executable). It has dependencies on a few other projects (under the Project tab in Detail View, there are a few other xcode project that it depends on).
My question is how can I setup breakpoint in the code of the dependent project?
I tried this, but this does not work
1. open my main xcode project
2. double click one of the dependent xcode project
3. in the source directory, find the file I want to break and add a breakpoint (by click at the side of the border of the editor, a blue 'bookmark thing' shows up)
4. Go back to 'Build and Go', my application does run but it never breaks at the break point I set in #3.
Can someone please help me? I have spent days on this, I can't figure it why.
Thank you.
1) Add the breakpoint in your project
2) Go into breakpoints view in xcode (top left besides project navigator) The view's icon is like a breakpoint icon
3) Right click on the required breakpoint and select "Move to" -> "User"
If the breakpoint is under "User" project, then it is accessible by all projects.
Whenever I've had trouble setting breakpoints with the Xcode GUI, I've managed to do it with the debugger command line (that is to say, the "lldb" prompt in the output window). For example, to set a breakpoint in source file "client.m" at line 42, type:
(lldb) b client.m:42
Besides being a fix for this particular problem, debugging on the command-line offers far more flexibility and automatability than any GUI could. A good place to start would be the LLDB tutorial. (Full disclosure: I'm a longtime fan of unix and gdb, so there's some bias here).
Of course, as others have mentioned, make sure the library/dependant project is compiled with debug symbols. Hope this helps; good luck.
I'll echo Jon-Eric here and also add that if you habitually run your project with Cmd+Enter, you should consider switching to Cmd+Y to enable gdb each time.
a few things here...(some obvious some not)
1) be sure that the dependant project is compiled with debug symbols (i'm assuming its a library)
2) be sure that your active executable is linking against the debug version of your dependent library
3) set a breakpoint in your main project just before calling into the entry point of your lib, and set a bp on the entry-point of the lib... (in addition to the real breakpoint you are looking to hit...)
I have found that the best way to debug a library is to open the lib project and set the active executable to be the main project, and then just hit "build and debug" directly from the library project.
I hope this helps, good luck, and have fun!
I've had similar problems with Xcode. The solution for me is to make sure that there is also a breakpoint in the main project that gets hit (as Kent mentions in his third point). I don't understand why this works though.
You should also only set breakpoints in a project when you've got it open. If you don't, they can start misbehaving: still stopping the flow of execution after you've disabled or deleted them, or not working when you think they're enabled.
Make sure you select 'Build and Debug' (for step #4). 'Go' sometimes means 'Run' (breakpoints disabled) and sometimes means 'Debug' (breakpoints enabled).
Also, make sure that you leave the dependent project open while you debug the main project.
In addition to kent reply about debug symbols, check COPY_PHASE_STRIP value in the build settings of the main project, and be sure it is set to NO in debug.

Resources