Thanks, this should be fixed. Smoke uses negative indices for ambiguous (overloaded) methods, which were happening in constructors. Just had to check for that.<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 9:08 PM, Deepayan Sarkar <span dir="ltr"><<a href="mailto:deepayan.sarkar@gmail.com">deepayan.sarkar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On Mon, Mar 1, 2010 at 2:54 PM, Michael Lawrence<br>
<div class="im"><<a href="mailto:lawrence.michael@gene.com">lawrence.michael@gene.com</a>> wrote:<br>
<br>
</div><div class="im">>> > Qt$QRectF(0, 0, 100, 100) ## or qrect(0, 0, 100, 100)<br>
>> Error in assign(enum, structure(enums[enum], class = "QtEnum"), env) :<br>
>> attempt to use zero-length variable name<br>
>><br>
><br>
> That sucks, because I don't. Maybe a 4.5 vs 4.6 issue? Could you look into<br>
> the qenums code and try to catch where it is reporting an empty string for<br>
> an enum name? If you need help finding your way through the code, just let<br>
> me know.<br>
> Thanks for doing all the grunt work testing here. Sorry I have not been<br>
> taking the time to test things. Hopefully the demo directory will come to<br>
> represent a nice set of tests. Also, Qt itself has tests which we could<br>
> translate to R.<br>
<br>
</div>I no longer get the error reproducibly, but I do get (two types of)<br>
errors intermittently. I've tracked down the problem to<br>
<br>
QHash<const char *, int> SmokeClass::createEnumValuesMap() const {<br>
<br>
and specifically the loop<br>
<br>
for (int i = methmin; i <= methmax; i++) {<br>
Smoke::Method m = _smoke->methods[_smoke->methodMaps[i].method];<br>
if ((m.flags & Smoke::mf_ctor))<br>
continue; // constructors are capitalized, so can be mixed-in<br>
if ((m.flags & Smoke::mf_enum) == 0)<br>
break;<br>
(*_c->classFn)(m.method, 0, stack);<br>
values[_smoke->methodNames[<a href="http://m.name" target="_blank">m.name</a>]] = stack[0].s_enum;<br>
}<br>
<br>
but have not gone any further yet.<br>
<br>
When I do<br>
<br>
$ Rscript -e "require(qtbase); Qt\$QRectF"<br>
<br>
I get three possible outputs:<br>
<br>
(1) Everything is; The return value has values.size() == 0<br>
<br>
(2) Error: return value has values.size() == 1, leading to<br>
<div class="im"><br>
Error in assign(enum, structure(enums[enum], class = "QtEnum"), env) :<br>
attempt to use zero-length variable name<br>
</div>Calls: <Anonymous> -> qsmokeClass -> assign<br>
Execution halted<br>
<br>
(3) Segfault inside the loop:<br>
<br>
*** caught segfault ***<br>
address 0x20, cause 'memory not mapped'<br>
<br>
Traceback:<br>
1: .Call(qt_qenums, x)<br>
2: qenums(cl)<br>
3: qsmokeClass(lib, classes[[classAlias]])<br>
4: function () { class <- qsmokeClass(lib, classes[[classAlias]])<br>
rm(list = classAlias, envir = lib) assign(classAlias, class, lib)<br>
lockBinding(classAlias, lib) class}()<br>
aborting ...<br>
Segmentation fault<br>
<div><div></div><div class="h5">_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org">Qtinterfaces-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel</a><br>
</div></div></blockquote></div><br>