Re: [stellarium/qt5] uncaught exception of type std::bad_alloc

2021-02-01 Thread Rafael Sadowski
On Mon Feb 01, 2021 at 05:27:18PM +, Stuart Henderson wrote:
> On 2021/01/28 21:41, Rafael Sadowski wrote:
> > On Mon Jan 25, 2021 at 01:32:42PM +, Stuart Henderson wrote:
> > > astro/stellarium build is now failing on i386:
> > > 
> > > FAILED: translations/stellarium-planetary-features/af.qm 
> > > cd /pobj/stellarium-0.20.4/build-i386/po/stellarium-planetary-features && 
> > > /usr/local/lib/qt5/bin/lconvert -i 
> > > /pobj/stellarium-0.20.4/stellarium-0.20.4/po/stellarium-planetary-features/af.po
> > >  -o 
> > > /pobj/stellarium-0.20.4/build-i386/translations/stellarium-planetary-features/af.qm
> > > terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
> > > Abort trap (core dumped) 
> > > ninja: build stopped: subcommand failed.
> > 
> > I'm quite sure lconvert is running out of memory. The lconvert tasks
> > also consume over 4GB of memory on amd64.
> > 
> > We could disable NLS (-DENABLE_NLS=OFF)
> > 
> > > 
> > > Built OK on 20210118 (post libc++ update), failed on 20210121, so I
> > > think this must have been following the Qt update.
> > > 
> > 
> 
> this is likely to fix it.

Oh! Yes please, ok rsadowski

> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/x11/qt5/qtbase/Makefile,v
> retrieving revision 1.40
> diff -u -p -r1.40 Makefile
> --- Makefile  19 Jan 2021 06:16:29 -  1.40
> +++ Makefile  1 Feb 2021 17:25:50 -
> @@ -10,6 +10,8 @@ COMMENT-psql =  PostgresSQL plugin for Q
>  COMMENT-sqlite2 =SQLite 2.x plugin for Qt5
>  COMMENT-tds =TDS plugin for Qt5
>  
> +REVISION-main =  0
> +
>  PKGNAME-mysql =  qt5-mysql-${VERSION}
>  PKGNAME-global = qt5-global-${VERSION}
>  PKGNAME-psql =   qt5-postgresql-${VERSION}
> Index: patches/patch-src_corelib_io_qiodevice_cpp
> ===
> RCS file: patches/patch-src_corelib_io_qiodevice_cpp
> diff -N patches/patch-src_corelib_io_qiodevice_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-src_corelib_io_qiodevice_cpp1 Feb 2021 17:25:50 
> -
> @@ -0,0 +1,28 @@
> +$OpenBSD$
> +
> +https://codereview.qt-project.org/c/qt/qtbase/+/317907
> +
> +From 6485b6d45ad165cf976138cf8ab683c42515e794 Mon Sep 17 00:00:00 2001
> +From: Kai Koehne 
> +Date: Tue, 13 Oct 2020 15:47:31 +0200
> +Subject: [PATCH] Fix allocated memory of QByteArray returned by
> + QIODevice::readLine
> +
> +Index: src/corelib/io/qiodevice.cpp
> +--- src/corelib/io/qiodevice.cpp.orig
>  src/corelib/io/qiodevice.cpp
> +@@ -1480,10 +1480,12 @@ QByteArray QIODevice::readLine(qint64 maxSize)
> + } else
> + readBytes = readLine(result.data(), result.size());
> + 
> +-if (readBytes <= 0)
> ++if (readBytes <= 0) {
> + result.clear();
> +-else
> ++} else {
> + result.resize(readBytes);
> ++result.squeeze();
> ++}
> + 
> + return result;
> + }
> 



Re: [stellarium/qt5] uncaught exception of type std::bad_alloc

2021-02-01 Thread Stuart Henderson
On 2021/01/28 21:41, Rafael Sadowski wrote:
> On Mon Jan 25, 2021 at 01:32:42PM +, Stuart Henderson wrote:
> > astro/stellarium build is now failing on i386:
> > 
> > FAILED: translations/stellarium-planetary-features/af.qm 
> > cd /pobj/stellarium-0.20.4/build-i386/po/stellarium-planetary-features && 
> > /usr/local/lib/qt5/bin/lconvert -i 
> > /pobj/stellarium-0.20.4/stellarium-0.20.4/po/stellarium-planetary-features/af.po
> >  -o 
> > /pobj/stellarium-0.20.4/build-i386/translations/stellarium-planetary-features/af.qm
> > terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
> > Abort trap (core dumped) 
> > ninja: build stopped: subcommand failed.
> 
> I'm quite sure lconvert is running out of memory. The lconvert tasks
> also consume over 4GB of memory on amd64.
> 
> We could disable NLS (-DENABLE_NLS=OFF)
> 
> > 
> > Built OK on 20210118 (post libc++ update), failed on 20210121, so I
> > think this must have been following the Qt update.
> > 
> 

this is likely to fix it.

Index: Makefile
===
RCS file: /cvs/ports/x11/qt5/qtbase/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- Makefile19 Jan 2021 06:16:29 -  1.40
+++ Makefile1 Feb 2021 17:25:50 -
@@ -10,6 +10,8 @@ COMMENT-psql =PostgresSQL plugin for Q
 COMMENT-sqlite2 =  SQLite 2.x plugin for Qt5
 COMMENT-tds =  TDS plugin for Qt5
 
+REVISION-main =0
+
 PKGNAME-mysql =qt5-mysql-${VERSION}
 PKGNAME-global =   qt5-global-${VERSION}
 PKGNAME-psql = qt5-postgresql-${VERSION}
Index: patches/patch-src_corelib_io_qiodevice_cpp
===
RCS file: patches/patch-src_corelib_io_qiodevice_cpp
diff -N patches/patch-src_corelib_io_qiodevice_cpp
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_corelib_io_qiodevice_cpp  1 Feb 2021 17:25:50 -
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+https://codereview.qt-project.org/c/qt/qtbase/+/317907
+
+From 6485b6d45ad165cf976138cf8ab683c42515e794 Mon Sep 17 00:00:00 2001
+From: Kai Koehne 
+Date: Tue, 13 Oct 2020 15:47:31 +0200
+Subject: [PATCH] Fix allocated memory of QByteArray returned by
+ QIODevice::readLine
+
+Index: src/corelib/io/qiodevice.cpp
+--- src/corelib/io/qiodevice.cpp.orig
 src/corelib/io/qiodevice.cpp
+@@ -1480,10 +1480,12 @@ QByteArray QIODevice::readLine(qint64 maxSize)
+ } else
+ readBytes = readLine(result.data(), result.size());
+ 
+-if (readBytes <= 0)
++if (readBytes <= 0) {
+ result.clear();
+-else
++} else {
+ result.resize(readBytes);
++result.squeeze();
++}
+ 
+ return result;
+ }



Re: [stellarium/qt5] uncaught exception of type std::bad_alloc

2021-01-28 Thread Rafael Sadowski
On Mon Jan 25, 2021 at 01:32:42PM +, Stuart Henderson wrote:
> astro/stellarium build is now failing on i386:
> 
> FAILED: translations/stellarium-planetary-features/af.qm 
> cd /pobj/stellarium-0.20.4/build-i386/po/stellarium-planetary-features && 
> /usr/local/lib/qt5/bin/lconvert -i 
> /pobj/stellarium-0.20.4/stellarium-0.20.4/po/stellarium-planetary-features/af.po
>  -o 
> /pobj/stellarium-0.20.4/build-i386/translations/stellarium-planetary-features/af.qm
> terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
> Abort trap (core dumped) 
> ninja: build stopped: subcommand failed.

I'm quite sure lconvert is running out of memory. The lconvert tasks
also consume over 4GB of memory on amd64.

We could disable NLS (-DENABLE_NLS=OFF)

> 
> Built OK on 20210118 (post libc++ update), failed on 20210121, so I
> think this must have been following the Qt update.
> 



[stellarium/qt5] uncaught exception of type std::bad_alloc

2021-01-25 Thread Stuart Henderson
astro/stellarium build is now failing on i386:

FAILED: translations/stellarium-planetary-features/af.qm 
cd /pobj/stellarium-0.20.4/build-i386/po/stellarium-planetary-features && 
/usr/local/lib/qt5/bin/lconvert -i 
/pobj/stellarium-0.20.4/stellarium-0.20.4/po/stellarium-planetary-features/af.po
 -o 
/pobj/stellarium-0.20.4/build-i386/translations/stellarium-planetary-features/af.qm
terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
Abort trap (core dumped) 
ninja: build stopped: subcommand failed.

Built OK on 20210118 (post libc++ update), failed on 20210121, so I
think this must have been following the Qt update.