Bug 190308

Summary: emulators/higan crashes with GLX video output
Product: Ports & Packages Reporter: Arto Pekkanen <aksyom>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: cyberbotx, marino
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
GLX patch from byuu none

Description Arto Pekkanen 2014-05-27 15:40:01 UTC
NOTE: my kernel is same as GENERIC, except I've disabled "options vesa" to make suspend/resume work. This should not affect how higan works.

When you compile emulators/higan with GLX video output option, the game tries to first enable GLX and then crashes.
 
The actual error is:
 
The program 'phoenix' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 33 error_code 1 request_code 153 minor_code 34)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Segmentation fault (core dumped)
[adm@aakkeri /usr/home/adm]$ higan --help
The program 'phoenix' received an X Window System error
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no s
  (Details: serial 33 error_code 1 request_code 153 min
  (Note to programmers: normally, X errors are reported
   that is, you will receive the error a while after ca
   To debug your program, run it with the --sync comman
   option to change this behavior. You can then get a m
   backtrace from your debugger if you break on the gdk.)
Segmentation fault (core dumped)
 
You can get the core dump from here:
http://koti.kapsi.fi/~isoa/pr/2014-05-21/higan.core
 
The segfault with GLX driver is almost the same as this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730836
 
Error string is different though.
 
There are similar crashes with higan in other Linuxen too. You can google with "higan crash" and see what shows up.

Fix: 

Disable GLX video output option, recompile higan.
 
I compiled mine with SDL video output, no idea if the other options work.
 
SUGGESTION: turn off the GLX video output option by default, because now all binary packages in official repo have this problem. SDL video output works for me and should work for others too.
How-To-Repeat: 1) enable option "GLX"
2) compile and install higan
3) start higan
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-05-27 15:40:08 UTC
Maintainer of emulators/higan,

Please note that PR ports/190308 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/190308

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-05-27 15:40:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Naram Qashat 2014-05-28 03:12:44 UTC
This is acceptable to me. It would just be removing GLX from OPTIONS_DEFAULT, 
which should be fine since there are still the other 3 video drivers enabled 
without the GLX driver being there.

Thanks,
Naram Qashat

On 05/27/14 10:40, Edwin Groothuis wrote:
> Maintainer of emulators/higan,
>
> Please note that PR ports/190308 has just been submitted.
>
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
>
> The full text of the PR can be found at:
>      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/190308
>
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2014-05-28 23:27:18 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Naram Qashat 2014-06-03 03:44:09 UTC
Created attachment 143311 [details]
GLX patch from byuu

After some discussion on the Ports mailing list with Arto (the submitter) and byuu (higan's developer), I am adding a patch from byuu that corrects the problem by giving an error message to the user instead of crashing entirely. Please use the patch and do not disable the GLX option in OPTIONS_DEFAULT. Thanks!
Comment 6 John Marino freebsd_committer freebsd_triage 2014-07-26 12:45:15 UTC
maintainer provided fix.
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-07-28 19:15:03 UTC
A commit references this bug:

Author: marino
Date: Mon Jul 28 19:14:37 UTC 2014
New revision: 363232
URL: http://svnweb.freebsd.org/changeset/ports/363232

Log:
  emulators/higan: Fix GLX support

  PR:		190308
  Reported by:	aksyom (gmail)
  Fixed by:	maintainer (Naram Qashat)

Changes:
  head/emulators/higan/Makefile
  head/emulators/higan/files/patch-ruby__video__glx.cpp