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

  • Home
  • SEARCH
  • 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 6019373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:24:45+00:00 2026-05-23T03:24:45+00:00

Is there any reason why a c++ program that runs perfectly on a 64

  • 0

Is there any reason why a c++ program that runs perfectly on a 64 bit system crashes on a 32 bit system? I have a program tested on 2 servers. one a 64bit and other 32bit. The program doesnt have bit specific commands. Initially it was working in both until i made a chage and added a structure and called it. The program crashed when this structure object was called for the first time. But if i print the value of the elements 1 line before the crash it, the values are there. Btw, the by value i mean integers and no pointers or other funny stuff.
I tried initiating these integers as uint32_t and such experiments. But to meet a dead end.

the structure is like this

struct info {
    int id1, id2;
    string test;
};

map<string, info> allInfo
vector<string> temp;
/* temp populated */

info details = {atoi(temp[0].c_str()),atoi(temp[2].c_str()),temp[3].c_str()};
allInfo[temp[1].c_str()] = details; 

/*somewhere after this it is accessed */

map<string, info>::iterator i;
/* printing the values here seems ok.. */
cout << (*i).second.id1 << endl << (*i).second.id2 << endl;
string first_id = "idOne : " + (*i).second.id1; 
string second_id = "idTwo: " + (*i).second.id2;
  • 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-05-23T03:24:46+00:00Added an answer on May 23, 2026 at 3:24 am

    There’s multiple things that could go wrong, and without a debugger it’s going to be a nightmare to find out.

    Option 1: Convince whoever has admin rights to the server to install gdb.

    Option 2: Add print statements everywhere to figure out exactly which line the segfault occurs on a post it here (or try and figure it out from that on your own).

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

Sidebar

Related Questions

Is there any reason to start a GUI program (application for Windows) written in
Is there any reason not to set up the install so that major upgrade
Is there any objective reason not to remove unused default includes from C# program?
is there any pgp key dumping program like http://www.pgpdump.net/ that also shows the MPI
I have written a simple database program in android. It runs fine, there is
Is there any reason why this would send duplicate emails? I have a PHP
Is there any reason not to use the bitwise operators &, |, and ^
Is there any reason something like this would not work? This is the logic
Is there any reason why I should pick JSON over XML, or vice-versa if
Is there any reason to use a varchar field instead of a date field

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.