Bug 123886 - click-to-jump on error messages doesn't always work
Summary: click-to-jump on error messages doesn't always work
Status: RESOLVED DUPLICATE of bug 65541
Alias: None
Product: kdevelop
Classification: Applications
Component: Output Views (show other bugs)
Version: 3.3.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 81713 87838 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-19 09:19 UTC by Klaus D. Günther
Modified: 2007-01-07 15:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus D. Günther 2006-03-19 09:19:47 UTC
Version:           3.3.1 (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
Compiler:          gcc version 4.0.2 20050901 (prerelease) (SUSE Linux) 
OS:                Linux

If I build my project and the C++ compiler reports a number of errors, then the "errors" tab of the "problems" output view remains empty nevertheless.
Comment 1 Jens Dagerbo 2006-03-19 21:50:12 UTC
The "Problems" view only reports syntax errors the parser has discovered. Commonly, it will only contain entries from the active (visible) file.

There are in other words a large set of cases where the compiler may well discover problems that the syntax problem reporter hasn't reported. It's not possible to derive from your description if what you have observed is one of these cases.

In any case, the parser is non-perfect, and there are likely a number of cases where it doesn't report a problem that exists, or flags something as an error which isn't (common with macros).
Comment 2 Klaus D. Günther 2006-03-19 22:33:53 UTC
I am new to kdevelop and couldn't find anything in the kdevelop manual on compiler error reporting and how you can easily jump to the source line of an error.

So I had assumed that kdevelop resembles other IDEs like Eclipse or SourceNavigator where you can click or double-click on an error message line in a "problems" view (as in Eclipse) or directly on an error message line in the compiler message window (as in SourceNavigator) in order to jump to the erroneous source line.

Isn't there a similar mechanism in kdevelop? Is it really necessary to open the respective source file and to scroll to the respective line number manually?
Comment 3 Jakob Petsovits 2006-03-20 09:59:48 UTC
> Is it really necessary to open the respective source file
> and to scroll to the respective line number manually?

of course not! when you build your project, the "real" compiler errors
(not the internal parser ones) appear in the "Messages" output view,
and from there you can jump to any of the shown errors with a single
click onto the error message.
Comment 4 Klaus D. Günther 2006-03-20 10:43:18 UTC
I have tried this many times, since I have been convinced, of course, that this is what you could expect. But It worked only in some cases; in most cases there wasn't any reaction.
Comment 5 Amilcar do Carmo Lucas 2006-03-20 11:01:26 UTC
Please give more details otherwise we can not track it.
The "messages" view should always jump to the correct line.
Comment 6 Jens Dagerbo 2006-03-20 19:33:51 UTC
Issues with the error-jump feature of the 'Messages' view have been reported many times. The problems involve the buildsystem, the filesystem layout and the precense of symlinks in the project path and KMDI (if the Messages view is detached, clicking in it reportedly doesn't work, IIRC).

So we're pretty far from the 'Problems' view by now, but no closer to understanding the problem.
Comment 7 Klaus D. Günther 2006-03-20 22:51:23 UTC
I think I have now found out under which circumstances the error-jump feature fails, at least in our project context:

Our project consists of several sub-projects, which reside in sub-directories of the workspace root directory and have their own makefiles. The entire project structure has also a global makefile, residing in the root directory.

You can invoke "make" in the root directory as well as in the individual project-specific sub-directories. Every project P may depend on several other projects which are built before P is built. In this case the make utility outputs "entering/leaving directory ..." messages (which presumably are analysed by kdevelop).

I suppose that the error-jump succeeds if and only if the error occurs in one of the directories mentioned in one of these "entering ..." directories, or if there aren't any "entering ..." directories and the error occurs in the only project directory involved.

Or in other words: The error-jump fails if there are "entering ..." directories but the error occurs in the primary project belonging to the main makefile.
Comment 8 Jens Dagerbo 2006-03-21 23:41:11 UTC
Yes, this sounds like a likely explanation of the problem. KDevelop attempts to follow those "entering/leaving" messages, as you say, and in the absense of them, it probably makes a mistake when it attempts to guess what directory the compiler is running in.

It's hard to see how a foolproof solution would work, that works with all buildsystem setups out there.
Comment 9 Klaus D. Günther 2006-03-22 10:01:15 UTC
> It's hard to see how a foolproof solution would work, that works with all
> buildsystem setups out there.

Ok, but I think a most obvious and better guess than now would be to just take the working directory where the original make started. (That would at least solve my problems with kdevelop!)
Comment 10 Klaus D. Günther 2006-03-23 08:20:35 UTC
> Ok, but I think a most obvious and better guess than now would be to just
> take the working directory where the original make started. (That would
> at least solve my problems with kdevelop!)

Sorry, that's only true if you have only one nested make-level.

The general rule is to take the last directory that has been entered but not yet left as the current compile directory, where the initial working directory of the top-level make counts also as "entered" although there is no explicit "entering directory ..." message for this.
Comment 11 Jens Dagerbo 2006-12-30 04:45:40 UTC
This feels like a dupe, but lets start with renaming it to something that matches its contents.
Comment 12 Jens Dagerbo 2006-12-31 15:38:51 UTC
*** Bug 87838 has been marked as a duplicate of this bug. ***
Comment 13 Jens Dagerbo 2007-01-07 15:33:18 UTC
*** Bug 81713 has been marked as a duplicate of this bug. ***
Comment 14 Jens Dagerbo 2007-01-07 15:37:26 UTC
Yup, it's a dupe.

*** This bug has been marked as a duplicate of 65541 ***