Segfault on shutdown if glutMainLoop not called (fglrx)

Bug #1369365 reported by Richard Bruce Baxter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
freeglut (Ubuntu)
New
Undecided
Unassigned

Bug Description

Freeglut will segfault when exiting the application if glutMainLoop is not called (with the fglrx video drivers). A patch has been posted on Sourceforge;
https://sourceforge.net/p/freeglut/bugs/206
https://sourceforge.net/p/freeglut/code/1640

Here is a modified version of the patch for Ubuntu 14.04 (freeglut3_2.8.1-1_amd64.deb/freeglut3-dev_2.8.1-1_amd64.deb) based on Bruce Merry's fix.

A method to build a custom version of the freeglut3 package on Ubuntu 14.04;

sudo apt-get install freeglut3 freeglut3-dev [this should install all necessary dependencies for freeglut]
sudo apt-get remove freeglut3 freeglut3-dev
sudo apt-get install build-essential [in order to compile your own programs in Ubuntu] [+ bison debuild(?)]
sudo apt-get install autotools-dev autoconf automake libtool dh-autoreconf [install all build dependencies for freeglut]
mkdir ~/freeglut3-development
cd ~/freeglut3-development
manually download freeglut_2.8.1.orig.tar.gz from http://packages.ubuntu.com/source/trusty/freeglut
manually download freeglut_2.8.1-1.debian.tar.gz from http://packages.ubuntu.com/source/trusty/freeglut
manually download freeglut_2.8.1-1.dsc from http://packages.ubuntu.com/source/trusty/freeglut
dpkg-source -x freeglut_2.8.1-1.dsc [this will create folder freeglut-2.8.1 with a debian subfolder]
rm freeglut_2.8.1-1.debian.tar.gz
rm freeglut_2.8.1-1.dsc

[Ensure patch has been created; see "Record of freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch patch creation" below]
cp freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch freeglut-2.8.1/debian/patches/
nedit freeglut-2.8.1/debian/patches/series
  add reference to freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch
cd freeglut-2.8.1
dpkg-buildpackage -uc -us
cd ..
sudo dpkg -i freeglut3_2.8.1-1_amd64.deb freeglut3-dev_2.8.1-1_amd64.deb

---
Record of freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch patch creation;

cd ~/freeglut3-development/virtualPatchCreationFolder/
mkdir a
mkdir b
mkdir a/src
mkdir b/src
cp orig/freeglut_init.c a/src/
cp patched/freeglut_init.c b/src/
diff -urNad a/src b/src > freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch

Tags: patch
Revision history for this message
Richard Bruce Baxter (richardbrucebaxter) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH (Ubuntu 14.04)" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.