View Issue Details

IDProjectCategoryView StatusLast Update
0002051DarkRadiantDesign/Codingpublic29.05.2010 16:36
Reportermattn Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.2 
Target Version1.1.0Fixed in Version1.1.0 
Summary0002051: gtk_source_buffer_new_with_language fails
DescriptionGtkSourceView-CRITICAL **: gtk_source_buffer_new_with_language: assertion `GTK_IS_SOURCE_LANGUAGE (language)' failed
aborting...

Program received signal SIGABRT, Aborted.
0x00007ffff250a4b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    in ../nptl/sysdeps/unix/sysv/linux/raise.c
Current language: auto
The current source language is "auto; currently c".
(gdb) bt
#0 0x00007ffff250a4b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
0000001 0x00007ffff250df50 in *__GI_abort () at abort.c:92
0000002 0x00007ffff4506dfa in g_logv () from /lib/libglib-2.0.so.0
0000003 0x00007ffff4506e93 in g_log () from /lib/libglib-2.0.so.0
0000004 0x00007fffec0f617b in gtk_source_buffer_new_with_language () from /usr/lib/libgtksourceview-2.0.so.0
0000005 0x00007ffff3431aea in SourceView (this=0x7fffe75fe910, language=..., readOnly=false) at SourceView.cpp:45
0000006 0x00007fffe71a9e1f in ScriptWindow (this=0x7fffe75fe8c0) at ScriptWindow.cpp:26
0000007 0x00007fffe71aa2db in script::ScriptWindow::Instance () at ScriptWindow.cpp:60
#8 0x00007fffe7163491 in script::ScriptingSystem::initialise (this=0xd44740) at ScriptingSystem.cpp:179
0000009 0x00007fffe716b1f8 in script::StartupListener::onRadiantStartup (this=0x25e0c20) at StartupListener.h:22
0000010 0x00000000004e960b in radiant::RadiantModule::broadcastStartupEvent (this=<value optimized out>) at RadiantModule.cpp:109
0000011 0x000000000062664b in ui::MainFrame::construct (this=<value optimized out>) at ui/mainframe/MainFrame.cpp:135
0000012 0x00000000004e3b7f in main (argc=1, argv=0x7fffffffe3e8) at main.cpp:160
(gdb) f 5
0000005 0x00007ffff3431aea in SourceView (this=0x7fffe75fe910, language=..., readOnly=false) at SourceView.cpp:45
45 _buffer = gtk_source_buffer_new_with_language(lang);
Current language: auto
The current source language is "auto; currently c++".
(gdb) l
40 {
41 globalErrorStream() << "SourceView: Cannot find language " << language << " in " << langFilesDir << std::endl;
42 }
43
44 // Remember the pointers to the textbuffers
45 _buffer = gtk_source_buffer_new_with_language(lang);
46 gtk_source_buffer_set_highlight_syntax(_buffer, TRUE);
47
48 _view = GTK_SOURCE_VIEW(gtk_source_view_new_with_buffer(_buffer));
49
(gdb) p _buffer
$1 = (GtkSourceBuffer *) 0x0
TagsNo tags attached.

Activities

mattn

mattn

21.12.2009 09:12

updater   ~0002783

btw. running darkradiant with --g-fatal-warnings is really useful to root out such issues.
greebo

greebo

21.12.2009 17:12

administrator   ~0002785

This should not fail, can you confirm that the python.lang file can be found in the sourceviewer folder (in the install folder)?
mattn

mattn

21.12.2009 17:57

updater   ~0002787

i've installed via make install and the data was copied to /usr/share/darkradiant (--prefix=/usr) - but no sourceviewer nor script folder there. so maybe it's a bug in the install target.

but in this case darkradiant should error out or should not try to create the sourceview imo.
greebo

greebo

22.12.2009 16:53

administrator   ~0002791

Last edited: 22.12.2009 16:55

That's what I thought should be happening already:

GtkSourceLanguage* lang = gtk_source_language_manager_get_language(_langManager, language.c_str());

    if (lang == NULL)
    {
        globalErrorStream() << "SourceView: Cannot find language " << language << " in " << langFilesDir << std::endl;
    }


The code is expecting the sourceviewer/ folder in the PKGDATADIR:

#if defined(POSIX) && defined(PKGDATADIR)
    std::string langFilesDir = std::string(PKGDATADIR) + "/sourceviewer/";

And the install script should copy this over. I seem to recall doing that change to the makefiles, but maybe I missed that one?

greebo

greebo

22.12.2009 16:54

administrator   ~0002792

Though I guess I can see the problem now, as there is no "return" after the warning string. I'll see whether some reasonable fallback value can be provided.
greebo

greebo

22.12.2009 17:09

administrator   ~0002793

I checked in a fix such that the SourceView is falling back to a non-highlighting sourcebuffer.
greebo

greebo

22.12.2009 17:10

administrator   ~0002794

Set this to resolved - any makefile issues should be tracked separately, please.

Issue History

Date Modified Username Field Change
21.12.2009 09:09 mattn New Issue
21.12.2009 09:12 mattn Note Added: 0002783
21.12.2009 17:12 greebo Note Added: 0002785
21.12.2009 17:12 greebo Status new => feedback
21.12.2009 17:57 mattn Note Added: 0002787
22.12.2009 16:53 greebo Note Added: 0002791
22.12.2009 16:53 greebo Note Edited: 0002791
22.12.2009 16:54 greebo Note Added: 0002792
22.12.2009 16:55 greebo Note Edited: 0002791
22.12.2009 17:09 greebo Note Added: 0002793
22.12.2009 17:09 greebo Status feedback => assigned
22.12.2009 17:09 greebo Assigned To => greebo
22.12.2009 17:10 greebo Note Added: 0002794
22.12.2009 17:10 greebo Status assigned => resolved
22.12.2009 17:10 greebo Fixed in Version => 1.1.0
22.12.2009 17:10 greebo Resolution open => fixed
22.12.2009 17:10 greebo Projection none => minor fix
22.12.2009 17:10 greebo ETA none => 5 minutes
22.12.2009 17:10 greebo Build => 5123
22.12.2009 17:10 greebo Target Version => 1.1.0
29.05.2010 16:36 greebo Status resolved => closed