[Kde-bindings] Containers passed by reference

David Palacio dpalacio at uninorte.edu.co
Thu Dec 18 16:56:24 UTC 2008


On Thu, Dec 18, 2008 at 10:04, Richard Dale <rdale at foton.es> wrote:
> On Friday 12 December 2008 20:23:04 David Palacio wrote:
>> >* When an overriden virtual method with a non-const QVector/QList argument
>> >  was called, such as Generator.openDocument() in Okular, the Ruby values
>> >  in the Ruby Array were not being converted back to the values in the
>> >  C++ list after the method call.
>>
>> With the latest commit it is not fixed for me. It never enters the new
>> conditional block. Did the script work for you?
> No for some reason the plugin isn't working for me as the keyword argument
> passed to KRubyPluginFactory::create() is empty. I can't see anything wrong
> with the .desktop file that it uses and so I'm not sure what is happening.
That is a bug that was fixed recently:
https://bugs.kde.org/show_bug.cgi?id=177537

> irb_kapp(1388) KStandardDirs::findResourceDir: filename for type  data  in
> KStandardDirs::findResourceDir is not supposed to be empty!!
> irb_kapp(1388) KRubyPluginFactory::create: Ruby script "" missing
> irb_kapp(1388)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing
> "/usr/share/mime/magic"
> irb_kapp(1388)/kdecore (KMimeType) KMimeTypeFactory::parseMagic: Now parsing
> "/opt/kde4/share/mime/magic"
> irb_kapp(1388)/kdecore (trader) KMimeTypeTrader::query: query for mimeType
> "application/zip" ,  "okular/Generator"  : returning  1  offers
> ASSERT failure in Document::load(): "null generator?!", file
> /home/rdale/kde/src/4/kdegraphics/okular/core/document.cpp, line 627
> KCrash: crashing... crashRecursionCounter = 2
> KCrash: Application Name = okularpart.rb path = <unknown> pid = 1388
> sock_file=/home/rdale/.kde/socket-mardigras/kdeinit4__0
>
> With your problem have you done a 'make clean' in the ruby okular extension
> directory and rebuilt and re-installed it? The marshaller is template based in
> a header and so just rebuilding qtruby itself wouldn't make the okular
> extension use the new code.
Yes, I have done that. On GDB I set some breakpoints.

Breakpoint 2, marshall_ItemList<Okular::Page, QVector<Okular::Page*>,
((const char*)((char*)(&<unnamed>::OkularPageListSTR)))>
(m=0x7fff49955350)
    at /home/kde/src/KDE/kdebindings/ruby/qtruby/src/marshall_macros.h:131
131                               int count = RARRAY_LEN(av);
(gdb) c
Continuing.

Breakpoint 4, marshall_ItemList<Okular::Page, QVector<Okular::Page*>,
((const char*)((char*)(&<unnamed>::OkularPageListSTR)))>
(m=0x7fff49955350)
    at /home/kde/src/KDE/kdebindings/ruby/qtruby/src/marshall_macros.h:133
133                               cpplist->clear();
(gdb) p count
$2 = 0

As you can see, RARRAY_LEN reports a 0 elements.



More information about the Kde-bindings mailing list