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 6173153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:31:05+00:00 2026-05-23T23:31:05+00:00

So I am running into an odd problem. I have a pointer to a

  • 0

So I am running into an odd problem. I have a pointer to a struct, and I am passing it to a function. Once inside that function, one of the variables I am interested in appears to be 0, but before passing the struct to the function I check to make sure that specific variable is not 0. The weird thing is this does not happen every time, only once in a while. Has anyone ever seen something like this happen before?

Source Code:

if( expand->num == 0)
    return status;

status = decode( expand );

...


Status_type decode ( expand_type * expand )
{
    if(expand->cur_num >= expand->num) // Here is where my error occurs
                                       // 'num' is 0.
    {
    // Do stuff
    }
}
  • 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-23T23:31:06+00:00Added an answer on May 23, 2026 at 11:31 pm

    Finally found the problem. There are multiple threads, and two threads were trying to access the same variable at the same time (the expand variable), causing it to be overwritten! So I had to stop one of the threads at a certain point so both wouldn’t be accessing the same stuff.

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

Sidebar

Related Questions

I have a really odd issue with WMI that I'm running into on a
I'm running into an odd problem with concatenating or printing strings. I have a
I'm running into an odd failure. It seems that if I have both an
I'm running into an odd problem with a mail sending component in one of
I'm building my first Facebook Connect application, and am running into an odd problem.
I'm running into an odd issue with itemRenderers inside a TileList. Here is a
Running into a problem where on certain servers we get an error that the
Running into a problem. I have a table defined to hold the values of
I am running into an odd problem, and this is the only thing I
I'm running into an odd problem where window.addEventListener (or window.attachEvent) doesn't seem to be

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.