Re: qcad segfault on 7.1 amd64

2022-08-12 Thread Andy Bradford
Thus said Stuart Henderson on Fri, 12 Aug 2022 13:34:57 +0100:

> It  should  work  with  "make clean;  make  DEBUG=-g  repackage"  (see
> https://www.openbsd.org/faq/ports/ports.html#Backtrace) - this doesn't
> use the  DEBUG_PACKAGES mechanism  to produce detached  debug symbols,
> and so shouldn't fail in the same way.

Aha, I'll  give that a try.  I thought that  DEBUG was a "boolean"  so I
just set it as  "make DEBUG=1" and when that failed I  looked at the man
page and found DEBUG_PACKAGES.

> I have one possible  idea which I am trying now (it  will be some time
> before my build finishes to test it).

I'll try  with DEBUG=-g as well,  but as you  say, it will be  some time
before it finishes.

Andy



Re: qcad segfault on 7.1 amd64

2022-08-12 Thread Stuart Henderson
On 2022/08/12 16:07, Rafael Sadowski wrote:
> On Fri Aug 12, 2022 at 01:34:57PM +0100, Stuart Henderson wrote:
> > [moving to ports@ where there's a slightly higher chance someone
> > else reading might have an idea what's happening]
> > 
> > On 2022-08-11, Andy Bradford 
> >  wrote:
> > > Hello,
> > >
> > > I was  running qcad without  problems on 6.9  and decided to  upgrade to
> > > 7.1. After upgrading from 6.9->7.0->7.1 qcad now segfaults.
> > 
> > Confirmed on -current as well.
> 
> Me too and also with an update qcad-3.27.6.7.

My idea was USE_WXNEEDED (because the trace was somewhere in scripting)
but that didn't help.


> > 
> > > $ qcad 
> > > QCAD version  3.24.3
> > > Warning:  RPropertyTypeId::generateId: property already initialized:  
> > > 7RObject : "" : "Invisible"
> > > Segmentation fault 
> > >
> > > Unfortunately it does not leave a core file (ulimit -c is "unlimited"):
> > >
> > > I installed gdb to see if that would provide any info (of course without
> > > symbols it may not be as helpful):
> > >
> > > (gdb) run
> > > Starting program: /usr/local/bin/qcad 
> > > QCAD version  3.24.3
> > > Warning:  RPropertyTypeId::generateId: property already initialized:  
> > > 7RObject : "" : "Invisible"
> > > [New thread 291749]
> > > [New thread 341567]
> > >
> > > Thread 1 received signal SIGSEGV, Segmentation fault.
> > > 0x00e806e924e0 in QScriptEnginePrivate::mark(QTJSC::MarkStack&) () 
> > > from /usr/local/lib/qt5/libQt5Script.so.3.0
> > > (gdb) bt
> > > #0  0x00e806e924e0 in QScriptEnginePrivate::mark(QTJSC::MarkStack&) 
> > > () from /usr/local/lib/qt5/libQt5Script.so.3.0
> > > #1  0x00e806e0db6c in QTJSC::Heap::markRoots() () from 
> > > /usr/local/lib/qt5/libQt5Script.so.3.0
> > > #2  0x00e806e0c905 in QTJSC::Heap::allocate(unsigned long) () from 
> > > /usr/local/lib/qt5/libQt5Script.so.3.0
> > > #3  0x00e806e9b4ee in QScriptEnginePrivate::newVariant(QVariant 
> > > const&) () from /usr/local/lib/qt5/libQt5Script.so.3.0
> > > #4  0x00e806e9cb71 in QScriptEngine::newVariant(QVariant const&) () 
> > > from /usr/local/lib/qt5/libQt5Script.so.3.0
> > > #5  0x00e7e648c3b1 in qtscript_create_Qt_class(QScriptEngine*) () 
> > > from /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> > > #6  0x00e7e65315f9 in 
> > > qtscript_initialize_com_trolltech_qt_core_bindings(QScriptValue&) () from 
> > > /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> > > #7  0x00e7e6390b43 in non-virtual thunk to 
> > > com_trolltech_qt_core_ScriptPlugin::initialize(QString const&, 
> > > QScriptEngine*) () from 
> > > /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> > > #8  0x00e806ea3719 in QScriptEngine::importExtension(QString const&) 
> > > () from /usr/local/lib/qt5/libQt5Script.so.3.0
> > > #9  0x00e7881d2eb0 in RScriptHandlerEcma::RScriptHandlerEcma() () 
> > > from /usr/local/lib/libqcadecmaapi.so.1.0
> > > #10 0x00e7881dee8b in RScriptHandlerEcma::factory() () from 
> > > /usr/local/lib/libqcadecmaapi.so.1.0
> > > #11 0x00e7defcb0cd in 
> > > RScriptHandlerRegistry::createScriptHandler(QString const&) () from 
> > > /usr/local/lib/libqcadcore.so.1.0
> > > #12 0x00e7defcb1fe in 
> > > RScriptHandlerRegistry::getGlobalScriptHandler(QString const&) () from 
> > > /usr/local/lib/libqcadcore.so.1.0
> > > #13 0x00e57ffd0393 in ?? ()
> > > #14 0x00e57ffcf6a2 in ?? ()
> > > #15 0x in ?? ()
> > > (gdb) 
> > > (gdb) quit
> > > A debugging session is active.
> > >
> > > Inferior 1 [process 56629] will be killed.
> > >
> > > Quit anyway? (y or n) n
> > > Not confirmed.
> > > (gdb) next
> > > Single stepping until exit from function 
> > > _ZN20QScriptEnginePrivate4markERN5QTJSC9MarkStackE,
> > > which has no line number information.
> > >
> > > Program terminated with signal SIGSEGV, Segmentation fault.
> > > The program no longer exists.
> > > (gdb) quit
> > >
> > >
> > > I tried to build the port by altering the Makefile by adding:
> > >
> > > DEBUG_PACKAGES =  ${BUILD_PACKAGES}
> > >
> > > But it failed to build the package:
> > >
> > >> Extracting debug info from 
> > >> /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/libqgif.so
> > > Warning: no debug-info in 
> > > /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/libqgif.so
> > > dwz: 
> > > /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg:
> > >  .debug_info section not present
> > > objcopy: 
> > > /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg:
> > >  Invalid operation
> > > *** Error 1 in /usr/ports/pobj/qcad-3.24.3.0/fake-amd64 
> > > (debug-pkg/Makefile:74 
> > > '/usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg')
> > > *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3070 
> > > 

Re: qcad segfault on 7.1 amd64

2022-08-12 Thread Rafael Sadowski
On Fri Aug 12, 2022 at 01:34:57PM +0100, Stuart Henderson wrote:
> [moving to ports@ where there's a slightly higher chance someone
> else reading might have an idea what's happening]
> 
> On 2022-08-11, Andy Bradford 
>  wrote:
> > Hello,
> >
> > I was  running qcad without  problems on 6.9  and decided to  upgrade to
> > 7.1. After upgrading from 6.9->7.0->7.1 qcad now segfaults.
> 
> Confirmed on -current as well.

Me too and also with an update qcad-3.27.6.7.

> 
> > $ qcad 
> > QCAD version  3.24.3
> > Warning:  RPropertyTypeId::generateId: property already initialized:  
> > 7RObject : "" : "Invisible"
> > Segmentation fault 
> >
> > Unfortunately it does not leave a core file (ulimit -c is "unlimited"):
> >
> > I installed gdb to see if that would provide any info (of course without
> > symbols it may not be as helpful):
> >
> > (gdb) run
> > Starting program: /usr/local/bin/qcad 
> > QCAD version  3.24.3
> > Warning:  RPropertyTypeId::generateId: property already initialized:  
> > 7RObject : "" : "Invisible"
> > [New thread 291749]
> > [New thread 341567]
> >
> > Thread 1 received signal SIGSEGV, Segmentation fault.
> > 0x00e806e924e0 in QScriptEnginePrivate::mark(QTJSC::MarkStack&) () from 
> > /usr/local/lib/qt5/libQt5Script.so.3.0
> > (gdb) bt
> > #0  0x00e806e924e0 in QScriptEnginePrivate::mark(QTJSC::MarkStack&) () 
> > from /usr/local/lib/qt5/libQt5Script.so.3.0
> > #1  0x00e806e0db6c in QTJSC::Heap::markRoots() () from 
> > /usr/local/lib/qt5/libQt5Script.so.3.0
> > #2  0x00e806e0c905 in QTJSC::Heap::allocate(unsigned long) () from 
> > /usr/local/lib/qt5/libQt5Script.so.3.0
> > #3  0x00e806e9b4ee in QScriptEnginePrivate::newVariant(QVariant const&) 
> > () from /usr/local/lib/qt5/libQt5Script.so.3.0
> > #4  0x00e806e9cb71 in QScriptEngine::newVariant(QVariant const&) () 
> > from /usr/local/lib/qt5/libQt5Script.so.3.0
> > #5  0x00e7e648c3b1 in qtscript_create_Qt_class(QScriptEngine*) () from 
> > /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> > #6  0x00e7e65315f9 in 
> > qtscript_initialize_com_trolltech_qt_core_bindings(QScriptValue&) () from 
> > /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> > #7  0x00e7e6390b43 in non-virtual thunk to 
> > com_trolltech_qt_core_ScriptPlugin::initialize(QString const&, 
> > QScriptEngine*) () from 
> > /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> > #8  0x00e806ea3719 in QScriptEngine::importExtension(QString const&) () 
> > from /usr/local/lib/qt5/libQt5Script.so.3.0
> > #9  0x00e7881d2eb0 in RScriptHandlerEcma::RScriptHandlerEcma() () from 
> > /usr/local/lib/libqcadecmaapi.so.1.0
> > #10 0x00e7881dee8b in RScriptHandlerEcma::factory() () from 
> > /usr/local/lib/libqcadecmaapi.so.1.0
> > #11 0x00e7defcb0cd in 
> > RScriptHandlerRegistry::createScriptHandler(QString const&) () from 
> > /usr/local/lib/libqcadcore.so.1.0
> > #12 0x00e7defcb1fe in 
> > RScriptHandlerRegistry::getGlobalScriptHandler(QString const&) () from 
> > /usr/local/lib/libqcadcore.so.1.0
> > #13 0x00e57ffd0393 in ?? ()
> > #14 0x00e57ffcf6a2 in ?? ()
> > #15 0x in ?? ()
> > (gdb) 
> > (gdb) quit
> > A debugging session is active.
> >
> > Inferior 1 [process 56629] will be killed.
> >
> > Quit anyway? (y or n) n
> > Not confirmed.
> > (gdb) next
> > Single stepping until exit from function 
> > _ZN20QScriptEnginePrivate4markERN5QTJSC9MarkStackE,
> > which has no line number information.
> >
> > Program terminated with signal SIGSEGV, Segmentation fault.
> > The program no longer exists.
> > (gdb) quit
> >
> >
> > I tried to build the port by altering the Makefile by adding:
> >
> > DEBUG_PACKAGES =${BUILD_PACKAGES}
> >
> > But it failed to build the package:
> >
> >> Extracting debug info from 
> >> /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/libqgif.so
> > Warning: no debug-info in 
> > /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/libqgif.so
> > dwz: 
> > /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg:
> >  .debug_info section not present
> > objcopy: 
> > /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg:
> >  Invalid operation
> > *** Error 1 in /usr/ports/pobj/qcad-3.24.3.0/fake-amd64 
> > (debug-pkg/Makefile:74 
> > '/usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg')
> > *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3070 
> > '_copy-debug-info': @cd /usr/ports/pobj/qcad-3.24.3.0/fake-amd64 &&  exec 
> > /u...)
> > *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2142 
> > '/usr/ports/packages/amd64/all/qcad-3.24.3.0p2.tgz': @cd 
> > /usr/ports/cad/qcad...)
> > *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2628 
> > '_internal-package': @case X${_DEPENDS_CACHE} 

Re: qcad segfault on 7.1 amd64

2022-08-12 Thread Stuart Henderson
[moving to ports@ where there's a slightly higher chance someone
else reading might have an idea what's happening]

On 2022-08-11, Andy Bradford 
 wrote:
> Hello,
>
> I was  running qcad without  problems on 6.9  and decided to  upgrade to
> 7.1. After upgrading from 6.9->7.0->7.1 qcad now segfaults.

Confirmed on -current as well.

> $ qcad 
> QCAD version  3.24.3
> Warning:  RPropertyTypeId::generateId: property already initialized:  
> 7RObject : "" : "Invisible"
> Segmentation fault 
>
> Unfortunately it does not leave a core file (ulimit -c is "unlimited"):
>
> I installed gdb to see if that would provide any info (of course without
> symbols it may not be as helpful):
>
> (gdb) run
> Starting program: /usr/local/bin/qcad 
> QCAD version  3.24.3
> Warning:  RPropertyTypeId::generateId: property already initialized:  
> 7RObject : "" : "Invisible"
> [New thread 291749]
> [New thread 341567]
>
> Thread 1 received signal SIGSEGV, Segmentation fault.
> 0x00e806e924e0 in QScriptEnginePrivate::mark(QTJSC::MarkStack&) () from 
> /usr/local/lib/qt5/libQt5Script.so.3.0
> (gdb) bt
> #0  0x00e806e924e0 in QScriptEnginePrivate::mark(QTJSC::MarkStack&) () 
> from /usr/local/lib/qt5/libQt5Script.so.3.0
> #1  0x00e806e0db6c in QTJSC::Heap::markRoots() () from 
> /usr/local/lib/qt5/libQt5Script.so.3.0
> #2  0x00e806e0c905 in QTJSC::Heap::allocate(unsigned long) () from 
> /usr/local/lib/qt5/libQt5Script.so.3.0
> #3  0x00e806e9b4ee in QScriptEnginePrivate::newVariant(QVariant const&) 
> () from /usr/local/lib/qt5/libQt5Script.so.3.0
> #4  0x00e806e9cb71 in QScriptEngine::newVariant(QVariant const&) () from 
> /usr/local/lib/qt5/libQt5Script.so.3.0
> #5  0x00e7e648c3b1 in qtscript_create_Qt_class(QScriptEngine*) () from 
> /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> #6  0x00e7e65315f9 in 
> qtscript_initialize_com_trolltech_qt_core_bindings(QScriptValue&) () from 
> /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> #7  0x00e7e6390b43 in non-virtual thunk to 
> com_trolltech_qt_core_ScriptPlugin::initialize(QString const&, 
> QScriptEngine*) () from 
> /usr/local/share/qcad/plugins/script/libqtscript_core.so.1.0
> #8  0x00e806ea3719 in QScriptEngine::importExtension(QString const&) () 
> from /usr/local/lib/qt5/libQt5Script.so.3.0
> #9  0x00e7881d2eb0 in RScriptHandlerEcma::RScriptHandlerEcma() () from 
> /usr/local/lib/libqcadecmaapi.so.1.0
> #10 0x00e7881dee8b in RScriptHandlerEcma::factory() () from 
> /usr/local/lib/libqcadecmaapi.so.1.0
> #11 0x00e7defcb0cd in RScriptHandlerRegistry::createScriptHandler(QString 
> const&) () from /usr/local/lib/libqcadcore.so.1.0
> #12 0x00e7defcb1fe in 
> RScriptHandlerRegistry::getGlobalScriptHandler(QString const&) () from 
> /usr/local/lib/libqcadcore.so.1.0
> #13 0x00e57ffd0393 in ?? ()
> #14 0x00e57ffcf6a2 in ?? ()
> #15 0x in ?? ()
> (gdb) 
> (gdb) quit
> A debugging session is active.
>
> Inferior 1 [process 56629] will be killed.
>
> Quit anyway? (y or n) n
> Not confirmed.
> (gdb) next
> Single stepping until exit from function 
> _ZN20QScriptEnginePrivate4markERN5QTJSC9MarkStackE,
> which has no line number information.
>
> Program terminated with signal SIGSEGV, Segmentation fault.
> The program no longer exists.
> (gdb) quit
>
>
> I tried to build the port by altering the Makefile by adding:
>
> DEBUG_PACKAGES =  ${BUILD_PACKAGES}
>
> But it failed to build the package:
>
>> Extracting debug info from 
>> /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/libqgif.so
> Warning: no debug-info in 
> /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/libqgif.so
> dwz: 
> /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg:
>  .debug_info section not present
> objcopy: 
> /usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg:
>  Invalid operation
> *** Error 1 in /usr/ports/pobj/qcad-3.24.3.0/fake-amd64 
> (debug-pkg/Makefile:74 
> '/usr/ports/pobj/qcad-3.24.3.0/fake-amd64/usr/local/share/qcad/plugins/imageformats/.debug/libqgif.so.dbg')
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3070 
> '_copy-debug-info': @cd /usr/ports/pobj/qcad-3.24.3.0/fake-amd64 &&  exec 
> /u...)
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2142 
> '/usr/ports/packages/amd64/all/qcad-3.24.3.0p2.tgz': @cd 
> /usr/ports/cad/qcad...)
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2628 
> '_internal-package': @case X${_DEPENDS_CACHE} in  X) _DEPENDS_CACHE=$( 
> mktem...)
> *** Error 2 in /usr/ports/cad/qcad 
> (/usr/ports/infrastructure/mk/bsd.port.mk:2607 'package': 
> @lock=qcad-3.24.3.0p2;  export _LOCKS_HELD=" qc...)

Seems that's failing because it does not actually build these files
itself, rather copies them from /usr/local/lib/qt5/plugins/imageformats/
in