Bug 53213 - Syntax Highlighting Crash Backtrace
Summary: Syntax Highlighting Crash Backtrace
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: 2.1
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-21 00:17 UTC by Andreas Klauer
Modified: 2003-08-16 13:48 UTC (History)
0 users

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 Andreas Klauer 2003-01-21 00:17:44 UTC
Version:           2.1 (using KDE 3.1.0)
Installed from:     (3.0)
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.4.20

I'm currently tryin to do some custom syntax highlighting for LPC (lars pensjo C).

I just activated this highlighting for my own syntax.xml file, and kate crashed.
here's the backtrace (cut several 'no debug symbols' messages):

[New Thread 1024 (LWP 2230)]
0x40ea2609 in wait4 () from /lib/libc.so.6
#0  0x40ea2609 in wait4 () from /lib/libc.so.6
#1  0x40f17dd0 in __check_rhosts_file () from /lib/libc.so.6
#2  0x40d6eeeb in waitpid () from /lib/libpthread.so.0
#3  0x4055701a in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4
#4  0x40d6ca44 in pthread_sighandler () from /lib/libpthread.so.0
#5  0x40e2b518 in sigaction () from /lib/libc.so.6
#6  0x4188220d in Highlight::doHighlight () from /usr/lib/kde3/libkatepart.so
#7  0x4185f64e in KateBuffer::needHighlight ()
   from /usr/lib/kde3/libkatepart.so
#8  0x4185f968 in KateBuffer::updateHighlighting ()
   from /usr/lib/kde3/libkatepart.so
#9  0x4185fa25 in KateBuffer::slotBufferUpdateHighlight ()
   from /usr/lib/kde3/libkatepart.so
#10 0x4185e636 in KateBuffer::qt_invoke () from /usr/lib/kde3/libkatepart.so
#11 0x4088bef9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#12 0x4185e0e9 in KateBuffer::pleaseHighlight ()
   from /usr/lib/kde3/libkatepart.so
#13 0x4185f3cb in KateBuffer::line () from /usr/lib/kde3/libkatepart.so
#14 0x4187f344 in KateDocument::kateTextLine ()
   from /usr/lib/kde3/libkatepart.so
#15 0x418a4b0e in KateViewInternal::updateView ()
   from /usr/lib/kde3/libkatepart.so
#16 0x4187c734 in KateDocument::tagAll () from /usr/lib/kde3/libkatepart.so
#17 0x41878626 in KateDocument::updateFontData ()
   from /usr/lib/kde3/libkatepart.so
#18 0x418785f5 in KateDocument::makeAttribs ()
   from /usr/lib/kde3/libkatepart.so
#19 0x41872bc1 in KateDocument::internalSetHlMode ()
   from /usr/lib/kde3/libkatepart.so
#20 0x41872b23 in KateDocument::setHlMode () from /usr/lib/kde3/libkatepart.so
#21 0x41895370 in KateViewHighlightAction::setHl ()
   from /usr/lib/kde3/libkatepart.so
#22 0x41894b0c in KateViewHighlightAction::qt_invoke ()
   from /usr/lib/kde3/libkatepart.so
#23 0x4088bef9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#24 0x4088c074 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#25 0x40aecaed in QSignal::intSignal () from /usr/lib/libqt-mt.so.3
#26 0x408a15a8 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#27 0x4095361f in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#28 0x408b67a6 in QWidget::event () from /usr/lib/libqt-mt.so.3
#29 0x40839b53 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#30 0x408395fb in QApplication::notify () from /usr/lib/libqt-mt.so.3
#31 0x404f877a in KApplication::notify () from /usr/lib/libkdecore.so.4
#32 0x407ee33a in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3
#33 0x407ec958 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#34 0x407fde42 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#35 0x4084b31e in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#36 0x4084b27b in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#37 0x40839caa in QApplication::exec () from /usr/lib/libqt-mt.so.3
#38 0x40016544 in main () from /usr/lib/kate.so
#39 0x0804d3fd in strcpy ()
#40 0x0804e0fb in strcpy ()
#41 0x0804e545 in strcpy ()
#42 0x0804f316 in strcpy ()
#43 0x40e1b0bf in __libc_start_main () from /lib/libc.so.6

The xml file that made kate crash can be found at http://www.metamorpher.de/files/lpc-crash.xml


I can't get this syntax highlighting file to work at all. Syntax Highlighting works for me with small examples, but when adding some more context's and itemdatas it just ceases to work. I don't know what I'm doing wrong, and the tutorials seem to be somewhat 
outdated. Maybe you can have a look and help me out? My try can be found at http://www.metamorpher.de/files/lpc.xml


Thanks
Comment 1 Joseph Wenninger 2003-01-21 09:53:52 UTC
That's most probably a problem with the comments
<!--  --> 

They are known to cause problems.

If it doesn't work without the comments either, please let me know.

Kind regards
Joseph Wenninger
Comment 2 Andreas Klauer 2003-01-21 10:18:54 UTC
Subject: Re:  Syntax Highlighting Crash Backtrace

> That's most probably a problem with the comments
> They are known to cause problems.
> If it doesn't work without the comments either, please let me know.

Omfg, it was the comments. Did nothing but remove all of them and everything 
just works fine... and stupid me was looking for syntax errors for hours! 
Thanks!

(However... this should be fixed...)


Regards
Andreas Klauer

Comment 3 Hamish Rodda 2003-01-21 11:20:47 UTC
I was looking at this one earlier today... the problem is that no attributes 
are created, and when the view goes to paint the text, it tries to access the 
first attribute's colour (nonexistant) and crashes.... 
 
I was going to fix the crash cases, but I was wondering if the proper fix is 
somewhere else, like in the highlighting parser itself so that there is always 
one attribute? 
Comment 4 Christoph Cullmann 2003-03-07 00:04:28 UTC
would be better if at least one fallback attribute would be there, normal
somebody interested in fixing it ?
Comment 5 Andreas Klauer 2003-07-02 17:46:04 UTC
Problem still exists... I have to take comments and indentation out to make the 
highlighting definitions work... otherwise, it just crashes. There must be some error in 
your xml parser, whitespace and comments should be ignored... 
Comment 6 Christoph Cullmann 2003-07-22 21:00:48 UTC
could you recheck now, somebody has fixed some commeting, ... bugs 
Comment 7 Christoph Cullmann 2003-08-05 00:43:57 UTC
does that now still happen or not ? 
Comment 8 Christoph Cullmann 2003-08-16 13:48:49 UTC
comments seems to work now, reopen it if still happens with current cvs