The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Xlib - Mapping Pixel Values to RGB Colors thebin High Level Programming 1 03-21-2008 11:55 PM
xlib blues (XFree86 - Linux) Alux High Level Programming 1 12-01-2005 07:44 AM
segmentation fault wojtyla High Level Programming 3 02-19-2005 02:53 PM
segmentation fault omran High Level Programming 2 08-01-2003 09:19 AM
Xlib: Invalid MIT-MAGIC-COOKIE-1 errolg UNIX for Dummies Questions & Answers 1 07-25-2002 05:05 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-04-2008
wolwy_pete wolwy_pete is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 13
Unhappy Xlib Problem: XCloseDisplay seg fault

Hi,
First of all forgive me if Xlib related problems does not go under this thread.

In my main program, im using Xlib`s XImage type object which contains a regularly updating bitmap, and maps the XImage to a Xwindow using XPutImage.
( XCreateImage is used to create the XImage. )

The program also have another thread as the X-Event handler. there at an expose event, XPutImage is used to update the XWindow.

The XLib functions works fine and does the job, but the problems occurs when tried to exit the main, before exiting im calling the following functions in order to release the X-System resources taken.
Code:
	/* Destroy the XImage - de alloc memory */
	XDestroyImage( xImage );

	/* destroy specified window */
	XDestroyWindow( pDisplay, showWindow );
		
	/* disconnect from X server */
	XCloseDisplay( pDisplay );    -------> give a segmentation fault
When @ the XCloseDisplay( pDisplay ); function call it gives a segmentation fault.
I tried different solutions but never went right. can anybody have any comments on what im doing wrong here.
Thankx.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0