Bug 196036 - audio/tuxguitar: doesn't start
Summary: audio/tuxguitar: doesn't start
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-16 20:42 UTC by Loïc Bartoletti
Modified: 2018-12-08 18:29 UTC (History)
5 users (show)

See Also:
tobik: maintainer-feedback? (yuri)


Attachments
Changes forced os.name variable from "linux" to "FreeBSD" (378 bytes, patch)
2015-03-21 04:36 UTC, Reuben Kebreau
rjk: maintainer-approval?
Details | Diff
Removes "os.name=linux" hack. (512 bytes, patch)
2015-03-27 02:35 UTC, Reuben Kebreau
no flags Details | Diff
svn-diff-tuxguitar-libxul (1.40 KB, patch)
2018-06-23 16:51 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer freebsd_triage 2014-12-16 20:42:43 UTC
Error when launching tuxguitar:

java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:454)
	at java.lang.Integer.parseInt(Integer.java:527)
	at org.herac.tuxguitar.gui.helper.FileHistory.loadHistory(Unknown Source)
	at org.herac.tuxguitar.gui.helper.FileHistory.<init>(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.getFileHistory(Unknown Source)
	at org.herac.tuxguitar.gui.items.menu.FileMenuItem.updateHistoryFiles(Unknown Source)
	at org.herac.tuxguitar.gui.items.menu.FileMenuItem.showItems(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.showMenuItems(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.createMenu(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.loadItems(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.<init>(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.getItemManager(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.createComposites(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
	at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)
Exception in thread "main" java.lang.AssertionError: Platform not recognized
	at sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:89)
	at java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108)
	at java.nio.file.FileSystems$DefaultFileSystemHolder.access$000(FileSystems.java:89)
	at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98)
	at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:96)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:95)
	at java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:90)
	at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
	at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:483)
	at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:478)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.util.calendar.ZoneInfoFile.<clinit>(ZoneInfoFile.java:477)
	at sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:663)
	at java.util.TimeZone.getTimeZone(TimeZone.java:566)
	at java.util.TimeZone.setDefaultZone(TimeZone.java:663)
	at java.util.TimeZone.getDefaultRef(TimeZone.java:630)
	at java.util.Date.normalize(Date.java:1193)
	at java.util.Date.toString(Date.java:1027)
	at java.util.Properties.store0(Properties.java:823)
	at java.util.Properties.store(Properties.java:812)
	at org.herac.tuxguitar.gui.helper.FileHistory.saveHistory(Unknown Source)
	at org.herac.tuxguitar.gui.helper.FileHistory.addURL(Unknown Source)
	at org.herac.tuxguitar.gui.helper.FileHistory.reset(Unknown Source)
	at org.herac.tuxguitar.gui.helper.FileHistory.<init>(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.getFileHistory(Unknown Source)
	at org.herac.tuxguitar.gui.items.menu.FileMenuItem.updateHistoryFiles(Unknown Source)
	at org.herac.tuxguitar.gui.items.menu.FileMenuItem.showItems(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.showMenuItems(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.createMenu(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.loadItems(Unknown Source)
	at org.herac.tuxguitar.gui.items.ItemManager.<init>(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.getItemManager(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.createComposites(Unknown Source)
	at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
	at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)
Comment 1 John Marino freebsd_committer freebsd_triage 2015-01-25 17:55:10 UTC
There's no port maintainer here.
I'll just open the PR w/o assigning it to anybody.
It gets it out of the "triage" queue yet still documents the issue for portsmon.
Comment 2 Reuben Kebreau 2015-03-21 04:36:31 UTC
Created attachment 154609 [details]
Changes forced os.name variable from "linux" to "FreeBSD"
Comment 3 Reuben Kebreau 2015-03-21 04:42:58 UTC
On lines 17 and 18 of /usr/local/bin/tuxguitar I found the following:

# We need this because FreeBSD's SWT lacks browser support
SWT_HACK="-Dos.name=linux"

TuxGuitar then attempts to launch with ${SWT_HACK} as an argument. As it turns
out, linux must be capitalized for Java to recognize the OS as Linux. However,
Java then goes looking for the LinuxFileSystemProvider class, which I assume is
not in FreeBSD's default OpenJDK 7 package/port. Changing the -Dos.name variable
to "FreeBSD" instead of "linux" (or removing it altogether) seems to allow TuxGuitar to start.

I don't know what that does for FreeBSD's SWT browser support, though.
Comment 4 Reuben Kebreau 2015-03-27 02:35:57 UTC
Created attachment 154852 [details]
Removes "os.name=linux" hack.

This file can patch the tuxguitar.in file in the audio/tuxguitar/files directory.
Comment 5 Friedrich Volkmann 2016-02-03 00:42:03 UTC
I experienced the same problem, and your second patch makes tuxguitar start. I don't know exactly what the SWT browser is, but it seems to be broken as you suspected. When I click Help -> Documentation, an error box appears saying:

No more handles [MOZILLA_FIVE_HOME='/usr/local/lib/'] (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
	no swt-mozilla-gtk-3738 in java.library.path
	no swt-mozilla-gtk in java.library.path
	Can't load library: /home/volki/.swt/lib/FreeBSD/x86_64/libswt-mozilla-gtk-3738.so
	Can't load library: /home/volki/.swt/lib/FreeBSD/x86_64/libswt-mozilla-gtk.so
)
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2017-03-04 14:47:11 UTC
Hi,

Is this PR still relevant?
Comment 7 Friedrich Volkmann 2017-03-05 01:06:33 UTC
I just reinstalled it and I don't get an error at startup, even without any patch applied. The problem I described in my previous comment persists.

I also get tons of warnings like these on STDERR:
(TuxGuitar:69343): GLib-GObject-WARNING **: gclosure.c:720: unable to remove uninstalled invalidation notifier: 0x81e7cb070 (0x8034b63c0)
(TuxGuitar:69343): GLib-GObject-CRITICAL **: g_closure_add_invalidate_notifier: assertion 'closure->n_inotifiers < CLOSURE_MAX_N_INOTIFIERS' failed
...but that doesn't seem connected to the SWT issue.
Comment 8 Walter Schwarzenfeld freebsd_triage 2017-03-05 03:48:34 UTC
There is a newer version:

https://sourceforge.net/projects/tuxguitar/files/TuxGuitar/TuxGuitar-1.3.2/
Comment 9 Walter Schwarzenfeld freebsd_triage 2018-06-23 16:50:58 UTC
This is an old patch, but a quick look in the source, tells me it could be the right (maybe, I have the next few days the time, too look further in it)

https://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=gsignal

and changes causes of removal of libxul in the attached svn diff.
Comment 10 Walter Schwarzenfeld freebsd_triage 2018-06-23 16:51:42 UTC
Created attachment 194539 [details]
svn-diff-tuxguitar-libxul
Comment 11 Tobias Kortkamp freebsd_committer freebsd_triage 2018-12-08 10:28:23 UTC
Assign to new maintainer.
Comment 12 Yuri Victorovich freebsd_committer freebsd_triage 2018-12-08 17:32:12 UTC
(In reply to lbartoletti from comment #0)

Can't reproduce "Error when launching tuxguitar:".
It does launch for me.
Comment 13 Yuri Victorovich freebsd_committer freebsd_triage 2018-12-08 18:28:55 UTC
Committed, thanks!
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-12-08 18:29:00 UTC
A commit references this bug:

Author: yuri
Date: Sat Dec  8 18:28:48 UTC 2018
New revision: 486972
URL: https://svnweb.freebsd.org/changeset/ports/486972

Log:
  audio/tuxguitar: Several changes

  Port changes:
  * Remove unnecesary -Dos.name={os-name} passed to Java VM
  * Remove Gecko
  * Remove the browser-ftp plugin
  * Share the soundfont with FluidSynth, update pkg-message accordingly

  PR:		196036
  Submitted by:	Reuben Kebreau <kyamashita@openmailbox.org> (-Dos.name= removal)
  Submitted by:	w.schwarzenfeld@utanet.at (Gecko/browser-ftp removal)

Changes:
  head/audio/tuxguitar/Makefile
  head/audio/tuxguitar/files/pkg-message.in
  head/audio/tuxguitar/files/tuxguitar.in
  head/audio/tuxguitar/pkg-plist