[RQt-devel] regressions

Deepayan Sarkar deepayan.sarkar at gmail.com
Wed Mar 3 06:08:10 CET 2010


On Mon, Mar 1, 2010 at 2:54 PM, Michael Lawrence
<lawrence.michael at gene.com> wrote:

>> > Qt$QRectF(0, 0, 100, 100) ## or qrect(0, 0, 100, 100)
>> Error in assign(enum, structure(enums[enum], class = "QtEnum"), env) :
>>  attempt to use zero-length variable name
>>
>
> That sucks, because I don't. Maybe a 4.5 vs 4.6 issue? Could you look into
> the qenums code and try to catch where it is reporting an empty string for
> an enum name? If you need help finding your way through the code, just let
> me know.
> Thanks for doing all the grunt work testing here. Sorry I have not been
> taking the time to test things. Hopefully the demo directory will come to
> represent a nice set of tests. Also, Qt itself has tests which we could
> translate to R.

I no longer get the error reproducibly, but I do get (two types of)
errors intermittently. I've tracked down the problem to

QHash<const char *, int> SmokeClass::createEnumValuesMap() const {

and specifically the loop

  for (int i = methmin; i <= methmax; i++) {
    Smoke::Method m = _smoke->methods[_smoke->methodMaps[i].method];
    if ((m.flags & Smoke::mf_ctor))
      continue; // constructors are capitalized, so can be mixed-in
    if ((m.flags & Smoke::mf_enum) == 0)
      break;
    (*_c->classFn)(m.method, 0, stack);
    values[_smoke->methodNames[m.name]] = stack[0].s_enum;
  }

but have not gone any further yet.

When I do

$ Rscript -e "require(qtbase); Qt\$QRectF"

I get three possible outputs:

(1) Everything is; The return value has values.size() == 0

(2) Error: return value has values.size() == 1, leading to

Error in assign(enum, structure(enums[enum], class = "QtEnum"), env) :
  attempt to use zero-length variable name
Calls: <Anonymous> -> qsmokeClass -> assign
Execution halted

(3) Segfault inside the loop:

 *** caught segfault ***
address 0x20, cause 'memory not mapped'

Traceback:
 1: .Call(qt_qenums, x)
 2: qenums(cl)
 3: qsmokeClass(lib, classes[[classAlias]])
 4: function () {    class <- qsmokeClass(lib, classes[[classAlias]])
  rm(list = classAlias, envir = lib)    assign(classAlias, class, lib)
   lockBinding(classAlias, lib)    class}()
aborting ...
Segmentation fault


More information about the Qtinterfaces-devel mailing list