[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSOpenGLView

From: German Arias
Subject: Re: Problem with NSOpenGLView
Date: Sat, 21 Aug 2010 13:28:12 -0600
User-agent: Thunderbird (X11/20090817)

I added the line in awakeFromNib method, but the same problem. This is the gdb output:

(gdb) run
Starting program: /home/german/Practicas/GL/GL.app/GL
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x0018e246 in glGetError () from /usr/lib/libGL.so.1
(gdb) backtrace
#0  0x0018e246 in glGetError () from /usr/lib/libGL.so.1
#1  0x0122ad01 in -[XGGLPixelFormat drawableForWindow:] (self=0x8339c20,
   _cmd=0x124d120, xwindowid=27263014) at XGGLFormat.m:417
#2  0x0122d1a3 in -[XGGLContext setView:] (self=0x8158798, _cmd=0x559828,
   view=0x83387f8) at XGGLContext.m:485
#3 0x00399544 in -[NSOpenGLView openGLContext] (self=0x83387f8, _cmd=0x559888)
   at NSOpenGLView.m:133
#4 0x00399772 in -[NSOpenGLView _lockFocusInContext:inRect:] (self=0x83387f8,
   _cmd=0x59c0d0, ctxt=0x83343a8, rect=...) at NSOpenGLView.m:225
#5  0x00439955 in -[NSView displayRectIgnoringOpacity:inContext:] (
   self=0x83387f8, _cmd=0x59c130, aRect=..., context=0x83343a8)
   at NSView.m:2478
#6  0x00439c6f in -[NSView displayRectIgnoringOpacity:inContext:] (
   self=0x8337460, _cmd=0x59c130, aRect=..., context=0x83343a8)
   at NSView.m:2512
#7  0x00439c6f in -[NSView displayRectIgnoringOpacity:inContext:] (
   self=0x8330408, _cmd=0x59c130, aRect=..., context=0x0) at NSView.m:2512
#8  0x0042bb7c in -[NSView displayRectIgnoringOpacity:] (self=0x8330408,
   _cmd=0x59c120, aRect=...) at NSView.m:2425
#9  0x00439449 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
   self=0x8330408, _cmd=0x59c110, aRect=...) at NSView.m:2357
#10 0x0042b9d7 in -[NSView displayIfNeededInRect:] (self=0x8330408,
   _cmd=0x59c108, aRect=...) at NSView.m:2335
---Type <return> to continue, or q <return> to quit---
#11 0x0042b7dc in -[NSView displayIfNeeded] (self=0x8330408, _cmd=0x5a2db0)
   at NSView.m:2317
#12 0x00442a0e in -[NSWindow orderWindow:relativeTo:] (self=0x8330300,
   _cmd=0x5a2d78, place=NSWindowAbove, otherWin=-1) at NSWindow.m:1735
#13 0x0043e418 in -[NSWindow orderFrontRegardless] (self=0x8330300,
   _cmd=0x502010) at NSWindow.m:1652
#14 0x002c85bd in -[NSApplication activateIgnoringOtherApps:] (self=0x815da18,
   _cmd=0x5020c0, flag=1 '\001') at NSApplication.m:1272
#15 0x002c76e3 in -[NSApplication finishLaunching] (self=0x815da18,
   _cmd=0x502398) at NSApplication.m:1095
#16 0x002ca07f in -[NSApplication run] (self=0x815da18, _cmd=0x4f8180)
   at NSApplication.m:1508
#17 0x002a9c0a in NSApplicationMain (argc=1, argv=0xbfffe544) at Functions.m:89
#18 0x08048c27 in main (argc=1, argv=0xbfffe544) at GL_main.m:28

Eric Wasylishen escribió:
Could you run it in gdb and post the stack trace?

I had some trouble with pixel formats causing segfaults. In a Cocoa app I was 
working on porting, I had to add this line in the NSOpenGLView subclass's 
-awakeFromNib method:

[self setPixelFormat: [NSOpenGLView defaultPixelFormat]];

Perhaps GNUstep's NSOpenGLView -initWithCoder method needs some tweaking?


On Aug 20, 2010, at 5:20 PM, German Arias wrote:

I'm trying to use NSOpenGLView, but I'm facing some problems. And I'm not sure 
if this is a problem with my GL installation or a problem on GNUstep. I have a 
simple app:

1) Make a new app with PC.
2) Edit the gorm file: Add a window and a CostomView.
3) Make a subclass of NSOpenGLView.
4) Set the class of CustomView to the new subclass.
5) Add the necessary flags and directories to use GL.
6) Compile the app.
7) Test the app: Segmentation fault.

Any suggestion? I have some code into the method drawRect:. But even if I 
comment this code, the app crash.

Discuss-gnustep mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]