Bug 237585

Summary: graphics/hugin dumps core on startup
Product: Ports & Packages Reporter: Ludger Bolmerg <lbolmerg>
Component: Individual Port(s)Assignee: Greg Lehey <grog>
Status: New ---    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (grog)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ludger Bolmerg 2019-04-26 17:30:00 UTC
hugin-2019.0.0_1 on FreeBSD 12.0-RELEASE-p3 dumps core on startup

% hugin                                                                       ~

(hugin:6057): Gtk-CRITICAL **: 19:18:27.474: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:27.803: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.374: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.378: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.383: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.387: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.387: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.415: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.419: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.424: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.428: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:6057): Gtk-CRITICAL **: 19:18:28.428: gtk_widget_set_size_request: assertion 'height >= -1' failed
/usr/local/share/hugin/data/plugins/crop_cp.py
   CAT:Control Points
   NAM:Crop Control Points
   fails @api-max
/usr/local/share/hugin/data/plugins/shooting_pattern.py
   CAT:initial distribution
   NAM:6-1-1 Shooting Pattern
   fails @api-max
/usr/local/share/hugin/data/plugins/top_five.py
   CAT:Control Points
   NAM:keep 5 CPs per image pair
   fails @api-max
/usr/local/share/hugin/data/plugins/woa.py
   CAT:Control Points
   NAM:Warped Overlap Analysis
   fails @api-max

(hugin:6057): Gtk-WARNING **: 19:18:30.940: gtk_window_present_with_time() should not be called with 0, or GDK_CURRENT_TIME as a timestamp, the timestamp should instead be gathered at the time the user initiated the request for the window to be shown
zsh: segmentation fault (core dumped)  hugin
Comment 1 Greg Lehey freebsd_committer 2019-04-29 08:15:15 UTC
That's a strange message.  A few questions:

1.  Has this version of Hugin ever worked, or was this the first
    attempt to run it?
2.  Have prior versions of Hugin worked?
3.  Are you doing anything "interesting" with X?  For example,
    multiple servers or displays, setting DISPLAY to something other
    than :0?

Could you please try renaming ~/.hugin and ~/.hugindata/ to something
else (so that you don't lose them) and start again.  It will create
new versions.  If the problem persists, please send the output of 'pkg info hugin'.
Comment 2 Ludger Bolmerg 2019-04-29 19:20:47 UTC
To answer your questions

1. It was the first time I ran hugin.

2. I never used it before.

3. I am doing nothing special with X

After renaming ~/.hugin and ~/.hugindata/ the problems persists.
Here is the output of 'pkg info hugin'

hugin-2019.0.0_1
Name           : hugin
Version        : 2019.0.0_1
Installed on   : Mon Apr 22 18:19:28 2019 CEST
Origin         : graphics/hugin
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : graphics
Licenses       : 
Maintainer     : grog@FreeBSD.org
WWW            : http://hugin.sourceforge.net/
Comment        : GUI for Panorama Tools, to stitch panoramic images
Options        :
	AUTOPANOSIFTC  : off
	PANOMATIC      : on
	PYTHON         : on
Shared Libs required:
	libwx_gtk3u_html-3.0.so.0
	libwx_baseu_xml-3.0.so.0
	libGLU.so.1
	libfftw3.so.3
	libwx_gtk3u_gl-3.0.so.0
	libjpeg.so.8
	libsqlite3.so.0
	libwx_gtk3u_core-3.0.so.0
	libIlmThread-2_3.so.24
	libpython2.7.so.1
	libexiv2.so.27
	libpano13.so.3
	libtiff.so.5
	libwx_baseu-3.0.so.0
	libIlmImf-2_3.so.24
	libX11.so.6
	libIex-2_3.so.24
	libGL.so.1
	libvigraimpex.so.11
	libwx_gtk3u_aui-3.0.so.0
	libboost_filesystem.so.1.70.0
	libwx_gtk3u_adv-3.0.so.0
	libImath-2_3.so.24
	libboost_system.so.1.70.0
	libpng16.so.16
	libwx_gtk3u_xrc-3.0.so.0
	libGLEW.so.2
	libwx_baseu_net-3.0.so.0
	libwx_gtk3u_qa-3.0.so.0
	liblcms2.so.2
	libHalf.so.24
Shared Libs provided:
	libhugin_python_interface.so.0.0
	libhuginbasewx.so.0.0
	libicpfindlib.so.0.0
	liblocalfeatures.so.0.0
	libceleste.so.0.0
	libhuginbase.so.0.0
Annotations    :
	FreeBSD_version: 1200086
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 39.5MiB
Description    :
A GUI for Panorama Tools, to stitch panoramic images.

With hugin you can assemble a mosaic of photographs into a complete
immersive panorama, stitch any series of overlapping pictures and much
more.

WWW: http://hugin.sourceforge.net/
Comment 3 Greg Lehey freebsd_committer 2019-06-04 04:55:12 UTC
The only difference I can see here is that you have libboost 1.70, and
I have 1.69.  That doesn't seem in any way related to your issues.

I've also asked the Hugin developer community, and the lead developer,
Thomas Modes, says that, effectively, "that can't happen", because the
function is never called.

Maybe it's some issue with the package itself.  Can you try building
from source?
Comment 4 Ludger Bolmerg 2019-06-04 13:01:53 UTC
(In reply to Greg Lehey from comment #3)
When building from source I run into an error. Here is what I did.

1. removed hugin installed from packages

2. ran portmaster graphics/hugin
   this shows that the following ports will be installed
   
===>>> The following actions will be taken if you choose to proceed:
	Install graphics/hugin
	Install devel/cmake
	Install devel/jsoncpp
	Install devel/scons
	Install devel/m4
	Install print/texinfo
	Install converters/p5-Text-Unidecode
	Install devel/p5-Locale-libintl
	Install misc/help2man
	Install devel/p5-Locale-gettext
	Install textproc/p5-Unicode-EastAsianWidth
	Install devel/libuv
	Install devel/autoconf
	Install devel/autoconf-wrapper
	Install devel/automake
	Install devel/libtool
	Install security/rhash
	Install textproc/py-sphinx
	Install devel/py-babel@py36
	Install devel/py-pytz@py36
	Install devel/py-Jinja2@py36
	Install textproc/py-MarkupSafe@py36
	Install graphics/py-imagesize@py36
	Install textproc/py-alabaster@py36
	Install textproc/py-docutils@py36
	Install textproc/py-pygments@py36
	Install textproc/py-snowballstemmer@py36
	Install textproc/py-pystemmer@py36
	Install lang/cython@py36
	Install textproc/py-sphinx_rtd_theme@py36
	Install textproc/py-sphinxcontrib-websupport@py36
	Install www/py-requests@py36
	Install dns/py-idna@py36
	Install net/py-urllib3@py36
	Install net/py-pysocks@py36
	Install security/py-cryptography@py36
	Install devel/py-asn1crypto@py36
	Install devel/py-cffi@py36
	Install devel/py-pycparser@py36
	Install security/py-openssl@py36
	Install security/py-certifi@py36
	Install textproc/py-chardet@py36
	Install devel/py-pytest-runner@py36
	Install devel/py-setuptools_scm@py36
	Install devel/ninja
	Install devel/swig30

portmaster gives the following error message

...
c++: error: unsupported argument 'libomp  -I/usr/local/include -L/usr/local/lib' to option 'fopenmp='
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/hugin
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/hugin

===>>> make build failed for graphics/hugin
===>>> Aborting update
Comment 5 Greg Lehey freebsd_committer 2019-06-13 06:05:02 UTC
As you say, that's an issue with portmaster.  You don't need portmaster to install the ports collection, and it seems to be getting in the way.  Can you install the ports collection from scratch and try like that?

Sorry for the trouble, but I really don't know how else to attack this problem.  I hate to say it, but it really seems that you're the only person who can reproduce it.
Comment 6 Ludger Bolmerg 2019-06-16 16:00:50 UTC
(In reply to Greg Lehey from comment #5)
After installing the ports collection from scratch I ran into the same error. I then removed tesseract-4.0.0_3 and openmp-8.0.0_1 which where a left-over from some other installs. After that I was able to build and install hugin.

Unfortunatedly hugin stills dumps core on startup. 

% hugin                                                                       ~

(hugin:7823): Gtk-CRITICAL **: 17:47:49.569: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:49.956: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.507: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.511: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.516: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.520: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.520: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.544: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.548: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.553: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.557: gtk_widget_set_size_request: assertion 'height >= -1' failed

(hugin:7823): Gtk-CRITICAL **: 17:47:50.557: gtk_widget_set_size_request: assertion 'height >= -1' failed
/usr/local/share/hugin/data/plugins/crop_cp.py
   CAT:Control Points
   NAM:Crop Control Points
   fails @api-max
/usr/local/share/hugin/data/plugins/shooting_pattern.py
   CAT:initial distribution
   NAM:6-1-1 Shooting Pattern
   fails @api-max
/usr/local/share/hugin/data/plugins/top_five.py
   CAT:Control Points
   NAM:keep 5 CPs per image pair
   fails @api-max
/usr/local/share/hugin/data/plugins/woa.py
   CAT:Control Points
   NAM:Warped Overlap Analysis
   fails @api-max

(hugin:7823): Gtk-WARNING **: 17:47:52.900: gtk_window_present_with_time() should not be called with 0, or GDK_CURRENT_TIME as a timestamp, the timestamp should instead be gathered at the time the user initiated the request for the window to be shown
zsh: segmentation fault (core dumped)  hugin
Comment 7 Greg Lehey freebsd_committer 2019-06-19 06:04:21 UTC
I continue to be baffled by this problem.  I've tried installing a
base FreeBSD-12 system on a VM, installed Hugin from the package, and
ran it without problems.  If you want I can provide you with the VM
image.

So what else can it be?  Something in your X environment?  It would be
interesting to know what graphics card and window manager you're
using, and if there's something else involved (display manager, for
example).  You could also try starting a second X server and running
Hugin there.  For that,

  export DISPLAY=:2
  echo xterm > /var/tmp/.xinitrc-2
  startx /var/tmp/.xinitrc-2 -- :2

This will give you a bare xterm on a new server.  You can switch
between servers with ctrl-alt-F9 and (probably) ctrl-alt-F10, and you
can exit the server by exiting the xterm.  Let me know if that works.
Comment 8 Ludger Bolmerg 2019-06-20 18:25:50 UTC
(In reply to Greg Lehey from comment #7)
I started a second X server and tried to run hugin which failed with the same error.
I am using a Lenovo T410 laptop with the onboard Intel graphics card. openbox is my display manager. 
I would appreciate if you could provide your virtualbox image. But I can only pick it up next week as I am on a trip right now and have only limited resources available. When I am back I will also set up a VM and install hugin.