bugGNUstep - Bugs: bug #34433, NSOpenGLPixelFormatAttribute...

Group
 
 

bug #34433: NSOpenGLPixelFormatAttribute completely broken

Submitter:  julian <julian_>
Submitted:  Thu 29 Sep 2011 01:01:13 PM UTC
Votes: 2
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 08 Nov 2011 10:12:15 PM UTC, comment #4: 

yes sorry you are right. i reinstalled base and gui, but not back.

NSOpenGLPixelFormat no longer crashes.

i can also confirm that the CocoaGL sample i attached runs fine except for one problem:

in XGGLContext.m this method throws an exception:


- (void)setValues:(const long *)vals
     forParameter:(NSOpenGLContextParameter)param
{
  [self notImplemented: _cmd];
}


when the sample calls
[[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval|;

commenting out the line makes it work and look fine.

julian <julian_>
Tue 08 Nov 2011 08:43:41 PM UTC, comment #3: 

I am not that convinced. Your screen shot reads: "Source file is more recent than executable"
Are you sure you did recompile and install back?

Fred Kiefer <FredKiefer>
Group Member
Tue 08 Nov 2011 01:27:08 PM UTC, comment #2: 

still doesn't seem to work. new crash attached as PNG.

btw i'm also attaching a gnustep port of Apple's (NS)OpenGL sample code called CocoaGL which exercises basic NSOpenGLView usage including NSOpenGLPixelFormat etc etc.

if there is someday interest in fixing NSOpenGLView, getting this sample to run would be a good starting point.

file #24328)

julian <julian_>
Mon 07 Nov 2011 09:07:08 PM UTC, comment #1: 

I had a look at the specification at
http://www.opengl.org/sdk/docs/man/xhtml/glXGetConfig.xml

and decided that we should use GLX_BUFFER_SIZE as a replacement for NSOpenGLPFAColorSize instead of setting all the colours to this value. In your case the old code resulted in each colour having 24 bits which sounds to much to me.

Could you please give it another try as I don't have code to exercise this case.

Fred Kiefer <FredKiefer>
Group Member
Thu 29 Sep 2011 01:01:13 PM UTC, original submission:  

any usage of NSOpenGLPixelFormatAttribute is completely broken and leads to segfaults. just add this to any executed code of a gnustep app:


NSOpenGLPixelFormatAttribute attribs[] = {
NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute) 24,
NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute) 24,
NSOpenGLPFAWindow,
(NSOpenGLPixelFormatAttribute) 0 };
NSOpenGLPixelFormat *pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];



the requested attributes are irrelevant, it will always lead to a segfault here:

Program received signal SIGSEGV, Segmentation fault.
0x01333db4 in -[XGGLPixelFormat initWithAttributes:] (self=0x8570370,
    _cmd=0x8050660, attribs=0xbfffd830) at XGGLFormat.m:344
344       visualinfo = glXGetVisualFromFBConfig(display,fbconfig[0]);


at least thats the case on ubuntu 11.04, either on actual hardware with working opengl or even just in a vmware virtual machine. true for a-few-months old gnustep as well as for SVN trunk as of yesterday.

julian <julian_>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24328:  CocoaGL.zip added by julian_ (470KiB - application/zip)
file #24327:  problem.png added by julian_ (33KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by julian_ (Voted in favor of this item)
  • -email is unavailable- added by julian_ (Submitted the item)
  •  

    There are 2 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-08 FredKiefer StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2011-11-08 FredKiefer StatusReady For Test In Progress
        Open/ClosedIn Test Open
    2011-11-08 julian_ Attached File- Added problem.png, #24327
        Attached File- Added CocoaGL.zip, #24328
    2011-11-07 FredKiefer StatusNone Ready For Test
        Assigned toNone FredKiefer
        Open/ClosedOpen In Test
    2011-10-01 julian_ Carbon-Copy- Added julian_

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code