Bug 213650

Summary: devel/simgear version 2016.3.1 can cause flightgear to crash with assertion failure when changing radio frequencies
Product: Ports & Packages Reporter: russo
Component: Individual Port(s)Assignee: Ganael LAPLANCHE <martymac>
Status: Closed FIXED    
Severity: Affects Only Me CC: russo
Priority: --- Flags: bugzilla: maintainer-feedback? (martymac)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch combining simgear git commits b9deeb and a97c14 none

Description russo 2016-10-20 17:18:56 UTC
Created attachment 175987 [details]
Patch combining simgear git commits b9deeb and a97c14

A known bug in the release version of the simgear 2016.3.1 can lead to flightgear crashing with an assertion failure when the pilot changes a comm radio frequency or silences the radio.

A forum thread describing the issue is at 
https://sourceforge.net/p/flightgear/mailman/message/35388214/

The bug has been fixed in the simgear project's git repo, but until the next release that leaves FreeBSD's port somewhat broken.

To reproduce, one has to have flightgear set up so that it starts up with the radios turned on and receiving ATIS information.  If you then turn the volume knob to zero or click the "swap frequency" button on the com1 radio, the code exits with the assertion failure.

I have applied the changes made in simgear's git commits b9deeb and a97c14, and found that it fixes the problem with flightgear.  These commits may be found at 
https://sourceforge.net/p/flightgear/simgear/ci/b9deebb59d872169eb164101b83b6ba957583ee2/
and https://sourceforge.net/p/flightgear/simgear/ci/a97c145f56233f2b4df633c13e5767d3a1b8617b/.

The attached patch, if dropped into devel/simgear/files will fix the problem until the next release of simgear and flightgear, which won't have the bug.
Comment 1 russo 2016-10-20 17:20:36 UTC
I should note that because the simgear port produces only static libraries, after the patch is applied and the port rebuilt, one also has to rebuild and reinstall flightgear to get the fix.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-10-24 10:13:58 UTC
A commit references this bug:

Author: martymac
Date: Mon Oct 24 10:13:50 UTC 2016
New revision: 424558
URL: https://svnweb.freebsd.org/changeset/ports/424558

Log:
  Backport radio bug patch from upstream

  PR:		213650
  Submitted by:	russo@bogodyn.org

Changes:
  head/devel/simgear/Makefile
  head/devel/simgear/files/
  head/devel/simgear/files/patch-simgear-sound-soundmgr_openal.cxx
  head/games/flightgear/Makefile
Comment 3 Ganael LAPLANCHE freebsd_committer freebsd_triage 2016-10-24 10:17:54 UTC
Hi,

Thanks a lot for your patch, it has been committed with a few changes as the patch provided didn't match exactly the changes brought by b9deeb and a97c14: the return statement should be outside the #ifdef/#endif block.

Regards,

Ganael.
Comment 4 russo 2016-10-24 13:40:09 UTC
Egad.  I saw that the return statement was supposed to be outside the ifdef/endif (it is the entire point of commit a97c14), and then goofed myself when applying the change  by hand to produce my patch.  I'm sorry it wasn't correct.  

But thanks for catching that and merging the change.
Comment 5 Ganael LAPLANCHE freebsd_committer freebsd_triage 2016-10-24 17:00:19 UTC
No pb! Thanks to you :)