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.
> 0x0000099ac44e44e2 in std::__1::__atomic_base<int, 
> false>::load(std::__1::memory_order) const () from 
> /usr/local/lib/libQt5Core.so.2.2
> (gdb) bt
> #0  0x0000099ac44e44e2 in std::__1::__atomic_base<int, 
> false>::load(std::__1::memory_order) const () from 
> /usr/local/lib/libQt5Core.so.2.2
> #1  0x0000099ac44e4471 in int 
> QAtomicOps<int>::load<int>(std::__1::atomic<int> const&) () from 
> /usr/local/lib/libQt5Core.so.2.2
> #2  0x0000099ac44e442f in QBasicAtomicInteger<int>::load() const ()
>    from /usr/local/lib/libQt5Core.so.2.2
> #3  0x0000099ac44e5176 in QtPrivate::RefCount::ref() ()
>    from /usr/local/lib/libQt5Core.so.2.2
> #4  0x0000099ac462fde1 in QString::operator=(QString const&) ()
>    from /usr/local/lib/libQt5Core.so.2.2
> #5  0x00000997f478be60 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

Reply via email to