[Qbs] --more-verbose causes segfault
Wookey
wookey at wookware.org
Sat Dec 22 01:24:49 CET 2018
On 2018-12-21 16:08 +0000, Christian Kandeler wrote:
> On Fri, 21 Dec 2018 15:31:44 +0000
> Wookey <wookey at wookware.org> wrote:
>
> > Thread 3 "QThread" received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 0x7fff72e89700 (LWP 16286)]
> > 0x00007ffff78ca457 in QStringRef::toString() const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> >
> > gdb qbs
> > (gdb) run build --settings-dir /tmp --log-level debug --command-echo-mode command-line --no-install profile:deb modules.qbs.installRoot:/home/wookey/packages/cavewhere/dewalls/debian/dewalls-1.0.0/debian/tmp project.libDir:lib/x86_64-linux-gnu config:qbs-build
> > (gdb) bt
> > #0 0x00007ffff78ca457 in QStringRef::toString() const ()
> > from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> > #1 0x00007ffff7e659e7 in qbs::Internal::ModuleLoader::adjustDefiningItemsInGroupModuleInstances (
> > this=<optimized out>, module=..., dependentModules=std::vector of length 1, capacity 1 = {...})
> > at language/value.h:124
> > #2 0x00007ffff7e6cfab in qbs::Internal::ModuleLoader::propagateModulesFromParent (
> > this=0x7fff72e88590, productContext=0x7fff6c070850, groupItem=<optimized out>,
> > reverseDepencencies=...) at language/moduleloader.cpp:2214
>
> Thanks. Can you try applying the attached diff?
>
>
> Christian
> diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp
> index 583354c4d..41727f5da 100644
> --- a/src/lib/corelib/language/moduleloader.cpp
> +++ b/src/lib/corelib/language/moduleloader.cpp
> @@ -2341,9 +2341,11 @@ void ModuleLoader::adjustDefiningItemsInGroupModuleInstances(const Item::Module
> << ", old defining item was " << v->definingItem()
> << " with scope" << v->definingItem()->scope()
> << ", new defining item is" << replacement
> - << " with scope" << replacement->scope()
> - << ", value source code is "
> + << " with scope" << replacement->scope();
> + if (v->type() == Value::JSSourceValueType) {
> + qCDebug(lcModuleLoader) << "value source code is"
> << std::static_pointer_cast<JSSourceValue>(v)->sourceCode().toString();
> + }
> replacement->setPropertyDeclaration(propName, decl);
> replacement->setProperty(propName, v);
> } else {
Well spotted. That fixes it.
The old log was:
qbs.moduleloader: Resolving Probe at "/usr/share/qbs/modules/bundle/BundleModule.qbs:46:5"
qbs.moduleloader: Probe disabled; skipping
qbs.moduleloader: reset instance scope of module "Qt.core" in property "cxxFlags" of module ("cpp")
<unfinished ...>) = ?
+++ killed by SIGSEGV (core dumped) +++
Now we get:
qbs.moduleloader: Resolving Probe at "/usr/share/qbs/modules/bundle/BundleModule.qbs:46:5"
qbs.moduleloader: Probe disabled; skipping
qbs.moduleloader: reset instance scope of module "Qt.core" in property "cxxFlags" of module ("cpp")
qbs.moduleloader: replacing defining item for prototype; module is cpp0x7fcda08d1840, property is cxxFlags, old defining item was 0x7fcda08d1450 with scope0x7fcda0021270, new defining item is0x7fcda08d1f00 with scope0x7fcda08d1840
qbs.moduleloader: reset instance scope of module "Qt.core" in property "cxxLanguageVersion" of module ("cpp")
qbs.moduleloader: replacing defining item for prototype; module is cpp0x7fcda08d1840, property is cxxLanguageVersion, old defining item was 0x7fcda08d1450 with scope0x7fcda0021270, new defining item is0x7fcda08d1f00 with scope0x7fcda08d1840
qbs.moduleloader: value source code is ""
qbs.moduleloader: reset instance scope of module "Qt.core" in property "cxxStandardLibrary" of module ("cpp")
qbs.moduleloader: reset instance scope of module "Qt.core" in property "defines" of module ("cpp")
qbs.moduleloader: replacing defining item for prototype; module is cpp0x7fcda08d1840, property is defines, old defining item was 0x7fcda08d1450 with scope0x7fcda0021270, new defining item is0x7fcda08d1f00 with scope0x7fcda08d1840
qbs.moduleloader: reset instance scope of module "Qt.core" in property "driverFlags" of module ("cpp")
qbs.moduleloader: replacing defining item for prototype; module is cpp0x7fcda08d1840, property is driverFlags, old defining item was 0x7fcda08d1450 with scope0x7fcda0021270, new defining item is0x7fcda08d1f00 with scope0x7fcda08d1840
qbs.moduleloader: value source code is ""
Thanks for the very prompt fix.
I'll file a bug to get this fixed in the current debian package.
Wookey
--
Principal hats: Linaro, Debian, Wookware, ARM
http://wookware.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20181222/03df1c2b/attachment.sig>
More information about the Qbs
mailing list