Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7896867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:00:16+00:00 2026-06-03T08:00:16+00:00

My C program gives segmentation fault when I try to run on Ubuntu.Here is

  • 0

My C program gives segmentation fault when I try to run on Ubuntu.Here is the stack trace.Any help is appreciated

0  0x015383f1 in ?? () from /lib/tls/i686/cmov/libc.so.6
#1  0x01538075 in strdup () from /lib/tls/i686/cmov/libc.so.6
#2  0x00c0a4af in cvtToString (ign=0xc10b80, target=0x83ba0a8, off=56, 
    source=0x0, setter=0xc044c3 <UxString_SetValue>) at xmlSerialPrimitives.c:28
#3  0x00c09adb in _setValue (xs=0x83b3520, inst=0x83ba0a8 "\020", prop=0xc103dc, 
    value=0x0) at xmlDeserializer.c:214
#4  0x00c09b71 in ctSetValue (xs=0x83b3520, property=0xc103dc, parent=0x83ba0a8, 
    val=0x0) at xmlDeserializer.c:237
#5  0x00c0a1aa in _closeElement (xs=0x83b3520, element=0x83ba1a0)
    at xmlDeserializer.c:419
#6  0x00c0a3da in xmlDeserialize (xs=0x83b3520, xtr=0x83b6218)
    at xmlDeserializer.c:533
#7  0x00c0ab14 in xmlDeserializeFromFile (xs=0x83b3520, 
    file=0x83b34f0 "/usr/v/xlayout.xml")
    at xmlSerializer.c:60
#8  0x00c07280 in load_uxUserModel (
    file=0x83b34f0 "/usr/v/xlayout.xml", data=0xbffff4dc)
    at UxUserModel.c:718
#9  0x00c073d0 in UxUserModel_LoadUserModel (name=0x8148e60 "x.xml")
    at UxUserModel.c:771
#10 0x00bf7f5d in UxModelLoad (umif=0x8397c58, filename=0x8148e60 "x.xml")

Here is the function where it is crashing

static int cvtToString( PCType * ign, void * target, int off, char * source, 
                        void_f    setter)
   {
        /* do we want to copy the string? */
        if (source && strncmp( source, "usermodel://", 12) == 0)
                return 0;
        source = strdup( source);
        if (setter)
               (*setter)( target, source);
        else
               (void) memcpy( target+off, &source, sizeof(char*));

        return 1;
   }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:00:17+00:00Added an answer on June 3, 2026 at 8:00 am
    if (!source || !strncmp( source, "usermodel://", 12))
                return 0;
    

    BTW: this line:

    (void) memcpy( target+off, &source, sizeof(char*));
    

    Attempts to performs arithmetic on a void pointer. The compiler should (at least) complain.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My c++ program gives me a seg fault when I run as root from
consider the program below char str[5]; strcpy(str,Hello12345678); printf(%s,str); When run this program gives segmentation
EDIT: running it through the gdb gives Program received signal SIGSEGV, Segmentation fault. 0x0000000000400e4c
Here is a simple php program which gives a strange output. Can anyone explain
I am getting a Segmentation Fault error when running my program in GCC. This
GDB tells me that pthread_kill is causing a segmentation fault in my program. Basically
The following program gives me a bus error... any ideas why? program main integer,
I've read upstream program from here ... http://xunitpatterns.com/Back%20Door%20Manipulation.html If the data store is external
This portion of my code (for this project ) gives me a segmentation fault.
I get the SIGSEGV - Segmentation Fault on the run-time for the code below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.