LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2009, 10:54 AM   #1
pramod.srk
Member
 
Registered: Feb 2009
Posts: 47

Rep: Reputation: 15
ImageMagick : SIGSEGV, Segmentation fault


Dear All,

We are migrating an application from TRUE UNIX 64 to RHEL - 5.

I have a cgi written C language which creates an image on web browser. But giving "Premature end of script headers: abc.cgi " error.

It uses ImageMagick library, i found that it is failing in the following statement

GetImageInfo( &imageInfo );

The imageInfo is of type ImageInfo.

I installed ImageMagick library provided by client.

This is the very first step to create an image using Image Magick.

Please help to come out of this situation.


Thanks and Regards
Pramod
 
Old 06-18-2009, 02:27 AM   #2
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
It's a memory violation problem I guess. I would say check your pointers. Cause that's how I always get that error.
 
Old 06-18-2009, 04:51 AM   #3
pramod.srk
Member
 
Registered: Feb 2009
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks for the reply.
After debugging the application i found that there is an API from LibMagick giving segmentation fault.


The invokation looks like this;
org = ReadImage(&org_info, &exception))


The variables defination is
Image *org = (Image *)NULL;
Image *final = (Image *)NULL;
ImageInfo org_info;
ExceptionInfo exception;


And the signature of ReadImage is
Image *ReadImage ( const ImageInfo *image_info, ExceptionInfo *exception );

returns NULL if an error occurs by writing the details on exception header.

But i am not able to read the exception, it has following members

ExceptionInfo Structure Members


Member Type Description
severity ExceptionType warning or error severity
message char * warning or error message
qualifier char * warning or error qualifier



Thanks and Regards
Pramod
 
Old 06-18-2009, 05:48 AM   #4
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
ummm, What do u mean by u can't view the exception header? Do u mean u can't access it? or just can't print the data??
 
Old 06-18-2009, 07:07 AM   #5
pramod.srk
Member
 
Registered: Feb 2009
Posts: 47

Original Poster
Rep: Reputation: 15
yeah i cannot read the exception data..

But in the apache error log file i have the following error


constitute.c:1784: ReadImage: Assertion `image_info->signature == 0xabacadab' failed.


With Regards
Pramod
 
Old 06-18-2009, 07:14 AM   #6
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
Well, I have no clue. I need to look at where Exception headers defined. I never worked with that API before.
 
Old 06-18-2009, 07:59 AM   #7
pramod.srk
Member
 
Registered: Feb 2009
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks NightHorse for looking my issue.

Any way i never used this API before. I will do some Googling and will try to solve bug.

Thanks and Regards
Pramod
 
Old 06-18-2009, 08:20 AM   #8
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
u r welcome. wish i could help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Program received signal SIGSEGV, Segmentation fault. in newtDrawForm mbprajapati Linux - General 1 05-24-2008 11:33 PM
Program received signal SIGSEGV, Segmentation fault go939 Programming 4 08-22-2007 07:54 PM
Program received signal SIGSEGV, Segmentation fault dayalan_cse Linux - Newbie 8 12-15-2006 01:05 AM
Program received signal SIGSEGV, Segmentation fault ims_mca Linux - Distributions 0 03-09-2005 05:16 AM
SIGSEGV- segmentation fault during execution ashwinipahuja Programming 5 05-02-2004 11:02 PM


All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration