Java language support

Stefan Valouch stefanvalouch at googlemail.com
Fri Aug 7 14:40:30 UTC 2009


On Tuesday 04 August 2009 14:26:12 Aleix Pol wrote:
> On Tue, Aug 4, 2009 at 2:07 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> > Don't worry, I'll just commit it as is, but keep that in mind for the
> > next patch :)

Okay. I just generated two diffs containing the same like the original (deleted 
that to avoid confusion), so here are they:
make the plugin compile: patches/kde/playground-
devtools/make_plugin_compile.patch
silent some g++ warnings: patches/kde/playground-
devtools/silent_warnings.patch

> >
> > No, I wasn't sure wether you're subscribed to the list, hence cc'ed you.
> >
> > Andreas

Ah well, I am subscribed, but I really have to make sure to use the correct 
smtp ;)

>
> You can use reviewboard.kde.org, makes it easier to review the patches.

I tried it some minutes ago, but I don't really have understood it. I clicked 
on New Review Request, repos: KDE, Base Diff Path: trunk/playground/devtools 
and the diff from my harddisk. Result:
No valid separator after the filename was found in the diff header
Could someone please explain what I did wrong?

So, i encountered the next problem: The generated code segfaults when KDevelop 
parses a project. I'm unsure why the java parser is used for C++ projects. The 
Backtrace is as follows:

Thread 4 (Thread 0xa8bfcb90 (LWP 18356)):
[KCrash Handler]
#6  java::DefaultVisitor::visitPackageDeclaration (this=0xa8bfc074, node=0x0) 
at /home/stefan/KDE4/kdesvn/build/playground-
devtools/parser/javadefaultvisitor.cpp:810
#7  0xa7aef6cd in java::ContextBuilder::visitCompilationUnit (this=0xa8bfc044, 
node=0xa807570)
    at /home/stefan/KDE4/kdesvn/playground-devtools/kdevelop4-extra-
plugins/java/duchain/contextbuilder.cpp:339
#8  0xa7ae82f1 in java::Visitor::visitNode (this=0xa8bfc074, node=0xa7b1dee0) 
at /home/stefan/KDE4/kdesvn/build/playground-devtools/parser/javavisitor.h:22
#9  0xa7aeddfb in java::ContextBuilder::startVisiting (this=0xa8bfc044, 
node=0xa807570) at /home/stefan/KDE4/kdesvn/playground-devtools/kdevelop4-
extra-plugins/java/duchain/contextbuilder.cpp:83
#10 0xa7ae8845 in KDevelop::AbstractContextBuilder<java::AstNode, 
java::IdentifierAst>::supportBuild (this=0xa8bfc044, node=0xa807570, 
context=0x0)
    at 
/usr/local/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:201
#11 0xa7ae7d0f in KDevelop::AbstractUseBuilder<java::AstNode, 
java::IdentifierAst, java::ContextBuilder>::buildUses (this=0xbd97970)
    at 
/usr/local/include/kdevplatform/language/duchain/builders/abstractusebuilder.h:70
#12 java::ParseJob::run (this=0xbd97970) at 
/home/stefan/KDE4/kdesvn/playground-devtools/kdevelop4-extra-
plugins/java/parsejob.cpp:197
#13 0xb786ce7c in ThreadWeaver::JobRunHelper::runTheJob (this=0xa8bfc25c, 
th=0xa4f5290, job=0xbd97970) at 
/home/stefan/KDE4/kdesvn/kdelibs/threadweaver/Weaver/Job.cpp:106
#14 0xb786d19c in ThreadWeaver::Job::execute (this=0xbd97970, th=0xa4f5290) at 
/home/stefan/KDE4/kdesvn/kdelibs/threadweaver/Weaver/Job.cpp:135
#15 0xb786f037 in ThreadWeaver::JobCollection::execute (this=0xbd97970, 
t=0xa4f5290) at 
/home/stefan/KDE4/kdesvn/kdelibs/threadweaver/Weaver/JobCollection.cpp:207
#16 0xb786c057 in ThreadWeaver::ThreadRunHelper::run (this=0xa8bfc334, 
parent=0x9384560, th=0xa4f5290) at 
/home/stefan/KDE4/kdesvn/kdelibs/threadweaver/Weaver/Thread.cpp:95
#17 0xb786c5dc in ThreadWeaver::Thread::run (this=0xa4f5290) at 
/home/stefan/KDE4/kdesvn/kdelibs/threadweaver/Weaver/Thread.cpp:142
#18 0xb6c8f522 in QThreadPrivate::start (arg=0xa4f5290) at 
thread/qthread_unix.cpp:188
#19 0xb6c264b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#20 0xb6052a5e in clone () from /lib/i686/cmov/libc.so.6

java::DefaultVisitor::visitPackageDeclaration accesses the node parameter, 
which seems to be NULL at that point, but when i look at the calling code, I 
can't see why. For now, I try to find out how the generator for that code 
works.

Stefan




More information about the KDevelop-devel mailing list