Re: WIP: print/scribus (segmentation fault)

2020-02-19 Thread Landry Breuil
On Mon, Feb 03, 2020 at 09:14:19AM +0100, Landry Breuil wrote:
> On Mon, Feb 03, 2020 at 07:05:38AM +0100, Rafael Sadowski wrote:
> > On Sun Feb 02, 2020 at 07:29:56PM -0800, Nam Nguyen wrote:
> > > >>> > Rafael Sadowski writes:

> > > 
> > > To test the port, I followed the tutorial in Help > Scribus Manual >
> > > Scribus Basics > Quick Start Guide. I was able to make this by following
> > > the tutorial: https://namtsui.com/public/rembrandt.jpg
> > > 
> > > Feedback and tests are welcome.
> > > 
> > 
> > Works like a charm. All plugins are found. Tested with the PDF plugin.
> > I'm not a scribus user but it feels stable. Thanks Nam Nguyen, great
> > work!
> 
> I concur, many thanks nam for digging into this and coming with fixes !
> At the time i tried updating it it, didnt get that far..
> 
> Very happy to see this port finally updated :)

The updated has finally been commited, thanks to all involved :)

Landry



Re: WIP: print/scribus (segmentation fault)

2020-02-03 Thread Landry Breuil
On Mon, Feb 03, 2020 at 07:05:38AM +0100, Rafael Sadowski wrote:
> On Sun Feb 02, 2020 at 07:29:56PM -0800, Nam Nguyen wrote:
> > >>> > Rafael Sadowski writes:
> > >>> > 
> > >>> > > Here is an update for scribus to the newest qt5 version. Long time 
> > >>> > > ago
> > >>> > > Landry tried to update scribus without response from ports@.
> > >>> > >
> > >>> > > Here is a new try. Unfortunately this version crashes immediately
> > >>> > > without a backtrace.
> > >>> > >
> > >>> > > Anyone want to take a look at this? I would be very grateful.
> > >>> > >
> > >>> > > Diff below includes patches from ArchLinux to unbreak the build with
> > >>> > > our popper.
> > 
> > I managed to get scribus to work. Here is a diff that additionally:
> > - deletes DOS line endings using Stuart's hint
> > - fixes segfault with patches/patch-scribus_ui_colorlistmodel_{cpp,h}
> > 
> > First, I enabled debugging in the port.
> > DEBUG = -g
> > CFLAGS =-g
> > CXXFLAGS =  -g
> > 
> > Then, I installed debug-qtbase. The debug packages were helpful.
> > $ pkg_add debug-qtbase
> > 
> > The debugger shows:
> > (gdb) run
> > Starting program: /usr/local/bin/scribus 
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x099ac44e44e2 in std::__1::__atomic_base > false>::load(std::__1::memory_order) const () from 
> > /usr/local/lib/libQt5Core.so.2.2
> > (gdb) bt
> > #0  0x099ac44e44e2 in std::__1::__atomic_base > false>::load(std::__1::memory_order) const () from 
> > /usr/local/lib/libQt5Core.so.2.2
> > #1  0x099ac44e4471 in int 
> > QAtomicOps::load(std::__1::atomic const&) () from 
> > /usr/local/lib/libQt5Core.so.2.2
> > #2  0x099ac44e442f in QBasicAtomicInteger::load() const ()
> >from /usr/local/lib/libQt5Core.so.2.2
> > #3  0x099ac44e5176 in QtPrivate::RefCount::ref() ()
> >from /usr/local/lib/libQt5Core.so.2.2
> > #4  0x099ac462fde1 in QString::operator=(QString const&) ()
> >from /usr/local/lib/libQt5Core.so.2.2
> > #5  0x0997f478be60 in _GLOBAL__sub_I_colorlistmodel.cpp ()
> > at 
> > /usr/ports/pobj/scribus-1.5.5/scribus-1.5.5/scribus/ui/colorlistmodel.cpp:13
> > 
> > colorlistmodel.cpp:13 reads:
> > ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), nullptr,
> > CommonStrings::None);
> > 
> > in colorlistmodel.h:
> > //! Dummy object used to represent None Color
> > static ColorPixmapValue m_NoneColor;
> > 
> > Given frame 4's QString, I think the real problem is with the usage of
> > CommonStrings::None. I noticed that m_NoneColor was not actually used in
> > ui/colorlistmodel.{h,cpp} or anywhere else in the project. I just
> > deleted m_NoneColor and that actually resolved the segfault.
> > 
> > I can poke at it some more to see if there is a more optimal solution,
> > but at least the program starts up now. If this is sufficient, it should
> > be ready for testing.
> > 
> > To test the port, I followed the tutorial in Help > Scribus Manual >
> > Scribus Basics > Quick Start Guide. I was able to make this by following
> > the tutorial: https://namtsui.com/public/rembrandt.jpg
> > 
> > Feedback and tests are welcome.
> > 
> 
> Works like a charm. All plugins are found. Tested with the PDF plugin.
> I'm not a scribus user but it feels stable. Thanks Nam Nguyen, great
> work!

I concur, many thanks nam for digging into this and coming with fixes !
At the time i tried updating it it, didnt get that far..

Very happy to see this port finally updated :)

Landry



Re: WIP: print/scribus (segmentation fault)

2020-02-02 Thread Rafael Sadowski
On Sun Feb 02, 2020 at 07:29:56PM -0800, Nam Nguyen wrote:
> >>> > Rafael Sadowski writes:
> >>> > 
> >>> > > Here is an update for scribus to the newest qt5 version. Long time ago
> >>> > > Landry tried to update scribus without response from ports@.
> >>> > >
> >>> > > Here is a new try. Unfortunately this version crashes immediately
> >>> > > without a backtrace.
> >>> > >
> >>> > > Anyone want to take a look at this? I would be very grateful.
> >>> > >
> >>> > > Diff below includes patches from ArchLinux to unbreak the build with
> >>> > > our popper.
> 
> I managed to get scribus to work. Here is a diff that additionally:
> - deletes DOS line endings using Stuart's hint
> - fixes segfault with patches/patch-scribus_ui_colorlistmodel_{cpp,h}
> 
> First, I enabled debugging in the port.
> DEBUG = -g
> CFLAGS =-g
> CXXFLAGS =  -g
> 
> Then, I installed debug-qtbase. The debug packages were helpful.
> $ pkg_add debug-qtbase
> 
> The debugger shows:
> (gdb) run
> Starting program: /usr/local/bin/scribus 
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x099ac44e44e2 in std::__1::__atomic_base false>::load(std::__1::memory_order) const () from 
> /usr/local/lib/libQt5Core.so.2.2
> (gdb) bt
> #0  0x099ac44e44e2 in std::__1::__atomic_base false>::load(std::__1::memory_order) const () from 
> /usr/local/lib/libQt5Core.so.2.2
> #1  0x099ac44e4471 in int 
> QAtomicOps::load(std::__1::atomic const&) () from 
> /usr/local/lib/libQt5Core.so.2.2
> #2  0x099ac44e442f in QBasicAtomicInteger::load() const ()
>from /usr/local/lib/libQt5Core.so.2.2
> #3  0x099ac44e5176 in QtPrivate::RefCount::ref() ()
>from /usr/local/lib/libQt5Core.so.2.2
> #4  0x099ac462fde1 in QString::operator=(QString const&) ()
>from /usr/local/lib/libQt5Core.so.2.2
> #5  0x0997f478be60 in _GLOBAL__sub_I_colorlistmodel.cpp ()
> at 
> /usr/ports/pobj/scribus-1.5.5/scribus-1.5.5/scribus/ui/colorlistmodel.cpp:13
> 
> colorlistmodel.cpp:13 reads:
> ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), nullptr,
> CommonStrings::None);
> 
> in colorlistmodel.h:
> //! Dummy object used to represent None Color
> static ColorPixmapValue m_NoneColor;
> 
> Given frame 4's QString, I think the real problem is with the usage of
> CommonStrings::None. I noticed that m_NoneColor was not actually used in
> ui/colorlistmodel.{h,cpp} or anywhere else in the project. I just
> deleted m_NoneColor and that actually resolved the segfault.
> 
> I can poke at it some more to see if there is a more optimal solution,
> but at least the program starts up now. If this is sufficient, it should
> be ready for testing.
> 
> To test the port, I followed the tutorial in Help > Scribus Manual >
> Scribus Basics > Quick Start Guide. I was able to make this by following
> the tutorial: https://namtsui.com/public/rembrandt.jpg
> 
> Feedback and tests are welcome.
> 

Works like a charm. All plugins are found. Tested with the PDF plugin.
I'm not a scribus user but it feels stable. Thanks Nam Nguyen, great
work!

RS



Re: WIP: print/scribus (segmentation fault)

2020-02-02 Thread Stuart Henderson
On 2020/02/02 20:06, Rafael Sadowski wrote:
> On Sun Feb 02, 2020 at 10:59:13AM -0800, Nam Nguyen wrote:
> > Rafael Sadowski writes:
> > 
> > > Here is an update for scribus to the newest qt5 version. Long time ago
> > > Landry tried to update scribus without response from ports@.
> > >
> > > Here is a new try. Unfortunately this version crashes immediately
> > > without a backtrace.
> > >
> > > Anyone want to take a look at this? I would be very grateful.
> > >
> > > Diff below includes patches from ArchLinux to unbreak the build with
> > > our popper.
> > 
> > Please reattach the diff because it has ^M endings.

Please fix those up in the file in post-extract so the diff doesn't have to cope
with these.

post-extract:
@cd ${WRKSRC} && perl -i -pe 's/\r$$//' $somefile




Re: WIP: print/scribus (segmentation fault)

2020-02-02 Thread Nam Nguyen
Rafael Sadowski writes:

> Here is an update for scribus to the newest qt5 version. Long time ago
> Landry tried to update scribus without response from ports@.
>
> Here is a new try. Unfortunately this version crashes immediately
> without a backtrace.
>
> Anyone want to take a look at this? I would be very grateful.
>
> Diff below includes patches from ArchLinux to unbreak the build with
> our popper.

Please reattach the diff because it has ^M endings.

>
> Best regards,
>
> Rafael