Bug 204350 - [new port] net-im/cutegram: free and opensource telegram client
Summary: [new port] net-im/cutegram: free and opensource telegram client
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on: 204348 204349
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-07 03:45 UTC by Henry Hu
Modified: 2016-02-03 16:04 UTC (History)
2 users (show)

See Also:


Attachments
port shar file (221.71 KB, patch)
2015-11-07 03:45 UTC, Henry Hu
no flags Details | Diff
poudriere log on 11/amd64 (278.77 KB, text/x-log)
2015-11-07 03:47 UTC, Henry Hu
no flags Details
core dump backtrace (4.21 KB, text/plain)
2015-11-10 16:24 UTC, Guido Falsi
no flags Details
test program (227.61 KB, application/octetstream)
2015-11-13 06:13 UTC, Henry Hu
no flags Details
Upgraded submission (446.78 KB, application/x-shar)
2016-01-25 10:53 UTC, Guido Falsi
henry.hu.sh: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2015-11-07 03:45:35 UTC
Created attachment 162868 [details]
port shar file

Cutegram is a free and opensource telegram clients for Linux, Windows, OS X and
OpenBSD, focusing on user friendly, compatibility with desktop environments.
Cutegram using Qt5, QML, libqtelegram, libappindication, AsemanQtTools
technologies and Faenza icons and Twitter emojies graphic sets. It's free and
released under GPLv3 license.
Comment 1 Henry Hu 2015-11-07 03:47:12 UTC
Created attachment 162869 [details]
poudriere log on 11/amd64

poudriere build log
Comment 2 Guido Falsi freebsd_committer 2015-11-09 07:39:04 UTC
Hi,

I'm testing the port. I tried to run it but it's crashing recularli for me as soon as I input my phone number.

Have you experienced this? any suggestions on how to avoid this?

BTW, in these ports you are misusing the GITHUB options, I have fixed it.

You should define "USE_GITHUB=yes" and define the needed GH options, only GH_ACCOUNT, GH_PROJECT and GH_TAGNAME are supported at present, any difference in the distribution name should be fixed by modifing DISTVERSIONSUFFIX, DISTVERSIONPREFIX or, if really needed the DISTNAME variable. In this way the common code for GITHUB support will take care of all the details.

Plese refer to https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#makefile-master_sites-github-description for further documentation about GITHUB support.

Thanks for your submission.
Comment 3 Guido Falsi freebsd_committer 2015-11-09 07:39:29 UTC
s/recularli/regularly/
Comment 4 Henry Hu 2015-11-10 01:13:03 UTC
(In reply to Guido Falsi from comment #2)

It works well here. What's the stacktrace?  I'm running it on 11-CURRENT/amd64.

Thanks for fixing the GITHUB usage.
Comment 5 Guido Falsi freebsd_committer 2015-11-10 16:24:37 UTC
Created attachment 162965 [details]
core dump backtrace

Here is the backtrace. I'm going to investigate a little more.

I'm runing on 11/amd64 too.
Comment 6 Guido Falsi freebsd_committer 2015-11-10 16:25:18 UTC
I'm running on an nvidia card, maybe that's related?
Comment 7 Henry Hu 2015-11-11 05:42:06 UTC
(In reply to Guido Falsi from comment #6)
No idea.... I set a breakpoint and it breaks once at the same place, so it seems like that it's also executed at my side.
Seems to be related to qt5-multimedia and gstreamer. (I'm surprised that qt5 is still using gst 0.10...)

> pkg info -d qt5-multimedia
qt5-multimedia-5.4.1_1:
        qt5-gui-5.4.1_2
        qt5-quick-5.4.1
        libX11-1.6.3,1
        libXv-1.0.10_3,1
        qt5-widgets-5.4.1
        qt5-network-5.4.1
        gstreamer-plugins-0.10.36_6,3
        qt5-qml-5.4.1
        qt5-opengl-5.4.1
        qt5-core-5.4.1_2
        libXext-1.3.3_1,1
        gstreamer-plugins-bad-0.10.23_2,3

Are the versions the same at your side?
Let me try on the latest current snapshot....
Comment 8 Guido Falsi freebsd_committer 2015-11-11 11:32:32 UTC
(In reply to Henry Hu from comment #7)

I have the same version you got of those packages. I'll test recompiling a few, just in case.
Comment 9 Guido Falsi freebsd_committer 2015-11-11 16:28:35 UTC
I have some news.

I tested on another machine getting the same failure, but if I compile qt5-multimedia with gstreamer option disabled the port stops dumping core.

So, the port itself is ok, but could fail for users with default options. Fault seems to be in gstreamer though.

I'd like to get this tested on 10.2 at least, just to check.

Not sure how to handle this right now. I'd really like to avoid adding a port with a risk of generating a core dumping official binary.

What head release have you tested it on before submitting? Maybe we can get some insight from this information.
Comment 10 Henry Hu 2015-11-12 01:03:51 UTC
(In reply to Guido Falsi from comment #9)
When I submitted, I was on r287992.
I'll check the latest current snapshot to see if it works.
Comment 11 Henry Hu 2015-11-12 02:22:35 UTC
(In reply to Henry Hu from comment #10)
I tried on the latest snapshot (amd64, r290273) in a virtualbox VM and it works well.
I installed everything with pkg, except the 3 new ports.
I tested it in a basic xfce4 environment.
Something special about real machines?
Comment 12 Guido Falsi freebsd_committer 2015-11-12 09:57:14 UTC
(In reply to Henry Hu from comment #11)

Thanks for the testing.

This could also related to running on real hardware but I'd say that's improbable.

I'd like to get more testing for this ports, to understand if it's just me seeing this happening.

Looks like the problem lies in gstreamer 0.10 but being it a default dependency of qt5-multimedia it isn't something I can ignore.

I have been unable to find the gst_video_connector_get_type() function code in qt5-multimedia, do you know where I could look for it's implementation?

I'm sorry and please understand I'm not blaming you in any way. As I said I just don't want to commit a port which could happen to dump core for many users.
Comment 13 Henry Hu 2015-11-13 05:34:12 UTC
(In reply to Guido Falsi from comment #12)
Never mind, I totally agree that we should figure this out before committing this. I just hope that I can reproduce the error so I can debug it.

I found that gst_video_connector_get_type() is generated from the line
GST_BOILERPLATE_FULL (GstVideoConnector, gst_video_connector, GstElement,
                      GST_TYPE_ELEMENT, _do_init);

and GST_BOILERPLATE_FULL is defined in /usr/local/include/gstreamer-0.10/gst/gstutils.h, which defines the gst_video_connector "class" and some basic functions.

It's possible that gst_video_connector_get_type() is called in src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp in qt5-multimedia, at line 188, and there's a comment "floating ref" at that line. Maybe that's somehow related. You can try to assign all the refs to some variable and see if something changes.

There's a possible difference: I have different number of gstreamer plugins installed, so the static class registration process has some difference.

gstreamer-0.10.36_4            Development framework for creating media applications
gstreamer-plugins-0.10.36_6,3  GStreamer written collection of plugins handling several media types
gstreamer-plugins-a52dec-0.10.19_1,3 Gstreamer ATSC A/52 stream aka AC-3 (dvd audio) plugin
gstreamer-plugins-bad-0.10.23_2,3 Bad gstreamer-plugins
gstreamer-plugins-dts-0.10.23_1,3 Gstreamer dts plugin
gstreamer-plugins-dvd-0.10.19_4,3 Gstreamer dvd plugin set
gstreamer-plugins-good-0.10.31_2,3 Good gstreamer-plugins
gstreamer-plugins-libpng-0.10.31_2,3 Gstreamer png plugin
gstreamer-plugins-mad-0.10.19_3,3 Gstreamer mp3 decoder plugin
gstreamer-plugins-mp3-0.10.0_1 Gstreamer Plugins Mp3 decoder meta-port
gstreamer-plugins-ogg-0.10.36_1,3 Gstreamer Ogg bitstream plugin
gstreamer-plugins-pango-0.10.36_2,3 Gstreamer pango textoverlay plugin
gstreamer-plugins-theora-0.10.36_1,3 Gstreamer theora plugin
gstreamer-plugins-ugly-0.10.19_1,3 Ugly gstreamer-plugins
gstreamer-plugins-v4l2-0.10.31_1,3 Gstreamer Video 4 Linux 2 source plugin
gstreamer-plugins-vorbis-0.10.36_1,3 Gstreamer vorbis encoder/decoder plugin
gstreamer-plugins-xvid-0.10.23_1,3 Gstreamer xvid plugin
gstreamer1-1.6.0               Media applications framework
gstreamer1-libav-1.6.0         GStreamer plug-in with many audio/video decoders/encoders
gstreamer1-plugins-1.6.0       GStreamer written collection of plugins handling several media types
gstreamer1-plugins-a52dec-1.6.0 Gstreamer ATSC A/52 stream aka AC-3 (dvd audio) plugin
gstreamer1-plugins-bad-1.6.0   Bad gstreamer-plugins
gstreamer1-plugins-core-1.4.0  Core set of typical audio and video gstreamer-plugins
gstreamer1-plugins-dts-1.6.0   Gstreamer dts plugin
gstreamer1-plugins-dvdread-1.6.0 Gstreamer dvdread plugin
gstreamer1-plugins-good-1.6.0  Good gstreamer-plugins
gstreamer1-plugins-mad-1.6.0   Gstreamer mp3 decoder plugin
gstreamer1-plugins-ogg-1.6.0   Gstreamer Ogg bitstream plugin
gstreamer1-plugins-pango-1.6.0 Gstreamer pango textoverlay plugin
gstreamer1-plugins-png-1.6.0   Gstreamer png plugin
gstreamer1-plugins-resindvd-1.6.0 Gstreamer resindvd plugin
gstreamer1-plugins-theora-1.6.0 Gstreamer theora plugin
gstreamer1-plugins-ugly-1.6.0  Ugly gstreamer-plugins
gstreamer1-plugins-vorbis-1.6.0 Gstreamer vorbis encoder/decoder plugin
gstreamer1-plugins-x-1.6.0     Gstreamer X and Xvideo output plugins
gstreamer1-plugins-x264-1.6.0  Gstreamer x264 plugin
gstreamer1-plugins-ximagesrc-1.6.0 Gstreamer X source plugin
gstreamer1-vaapi-0.6.1         GStreamer hardware video decoding via VA-API plug-in

Did you start from a clean environment, or with many plugins already installed?
Comment 14 Henry Hu 2015-11-13 06:13:48 UTC
Created attachment 163074 [details]
test program

I've created a very basic qt5 multimedia player.
Just put some media file path into the text box (like file:///home/xxx/yyy.mp4) and click in the window, it would be played.
I confirmed that it calls gst_video_connector_get_type().
Does it work at your side? If it does not work, then it means that qt5-multimedia or gstreamer is broken.
Comment 15 Guido Falsi freebsd_committer 2015-11-21 09:07:28 UTC
(In reply to Henry Hu from comment #14)

Sorry for the delay.

The test sofware you sent works on my machine.
Comment 16 Henry Hu 2015-11-22 21:18:07 UTC
(In reply to Guido Falsi from comment #15)
ok, so qt5's media player seems to be working....
Can you reproduce it in a virtual machine? Or would you please share your core file?
You may also try to rebuild glib20 with DEBUG on, or build cutegram ports with WITH_DEBUG=yes so we have more debug information.
Comment 17 Guido Falsi freebsd_committer 2015-11-22 21:25:33 UTC
(In reply to Henry Hu from comment #16)

Sure I can share the core dump.

I'll try to build the ports with debug options before doing that anyway, so we can get more information.

I'll try to get back to you soon.

Sorry this is taking so long.
Comment 18 Guido Falsi freebsd_committer 2015-12-23 18:14:20 UTC
(In reply to Guido Falsi from comment #17)

Have you found anything new?

Did you get the link to the coredump I sent you via email?
Comment 19 Guido Falsi freebsd_committer 2016-01-25 10:53:42 UTC
Created attachment 166090 [details]
Upgraded submission

I tested the new releases of the ports composing this submission.

Unluckily the crash I noticed still happens, but with the workaround of disabling gstreamer support this new release works fine.

Were you able to discover anything about the crash?
Comment 20 Guido Falsi freebsd_committer 2016-02-01 14:47:55 UTC
Hi,

For unrelated reasons I performed a refresh of all the packages installed on my machines and now the core dump I was seeing isn't happening anymore.

So maybe it really was just a local problem on my machines.

If you approve the updated patches with the new versions of the ports I'll commit these.

Thanks!
Comment 21 Henry Hu 2016-02-02 06:33:50 UTC
(In reply to Guido Falsi from comment #20)
The updated patch looks good. I'm not sure why you want to replace aseman-qt-tools, but if it's necessary please go ahead and commit it.
Comment 22 Guido Falsi freebsd_committer 2016-02-02 08:56:42 UTC
(In reply to Henry Hu from comment #21)

I had to make the port fetch aseman-qt-tools because of these changes in the upstream repository:

https://github.com/Aseman-Land/Cutegram/commit/2a89fa7c03dcb9dd5e203d828eac16b5b9ba0c50
https://github.com/Aseman-Land/Cutegram/commit/a4b0860e2ad2ac896096f8b1628b68a06ea74c3b


It's now a submodule, not included in the main package, and I've followed the porter's handbook suggestion for how to mange that.

I hope this clarifies my changes.
Comment 23 commit-hook freebsd_committer 2016-02-02 23:36:35 UTC
A commit references this bug:

Author: madpilot
Date: Tue Feb  2 23:35:54 UTC 2016
New revision: 407913
URL: https://svnweb.freebsd.org/changeset/ports/407913

Log:
  Cutegram is a free and opensource telegram clients for Linux, Windows, OS X and
  OpenBSD, focusing on user friendly, compatibility with desktop environments.
  Cutegram using Qt5, QML, libqtelegram, libappindication, AsemanQtTools
  technologies and Faenza icons and Twitter emojies graphic sets. It's free and
  released under GPLv3 license.

  WWW: http://aseman.co/en/products/cutegram/

  PR:		204350
  Submitted by:	Henry Hu <henry.hu.sh@gmail.com>

Changes:
  head/net-im/Makefile
  head/net-im/cutegram/
  head/net-im/cutegram/Makefile
  head/net-im/cutegram/distinfo
  head/net-im/cutegram/pkg-descr
  head/net-im/cutegram/pkg-plist
Comment 24 Guido Falsi freebsd_committer 2016-02-02 23:39:12 UTC
I committed the tree ports.

Before closing this PR, I noticed you're not included in the Additional FreeBSD Contributors list here:

https://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/contrib-additional.html

Standard procedure is to add people who contribute to the ports tree theere, unless you have objections I'd list you there as:

Henry Hu <henry.hu.sh@gmail.com>


Are you Ok with this?
Comment 25 Henry Hu 2016-02-03 03:29:06 UTC
(In reply to Guido Falsi from comment #24)
Yes, thank you!
Comment 26 commit-hook freebsd_committer 2016-02-03 16:03:50 UTC
A commit references this bug:

Author: madpilot
Date: Wed Feb  3 16:03:36 UTC 2016
New revision: 48145
URL: https://svnweb.freebsd.org/changeset/doc/48145

Log:
  Add Henry Hu for net-im/cutegram.

  PR:		204350

Changes:
  head/en_US.ISO8859-1/articles/contributors/contrib.additional.xml
Comment 27 Guido Falsi freebsd_committer 2016-02-03 16:04:47 UTC
Committed! Thanks.