Jump to content
Sign in to follow this  
n4gix

C-gauge working in FS9 but not in FSX

Recommended Posts

Guest coal

HelloI'm trying to use a C-gauge (which uses gdi+) with FSX.The gauge works fine in FS9, and in FSX too, IF you load the panel after loading any other aircraft, but if you try to load from the start screen of FSX then it gives a message telling something like "...memory cannot be read..." and FSX shuts down.Can anyone give me a clue about why happens this or give me a thread in any forum? I cannot find one.Thanks

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Try having all your panels "open" (displayed) when you first start the aircraft (either from a saved state, or with the panel.cfg configured to display them).If that fixes your issue, then you have a variable in a panel that is not initially opened.Another possibility, depending on how you are doing things is the dreaded "order of initialization" issue, and are trying to initialize a static GDI+ brush, for example, before GDI+ is initilaized.

Share this post


Link to post
Share on other sites
Guest coal

Thanks Patrick. The panel is just one, and FSX fails to open even if I write visible=0 in panel.cfg.I've searching more and I'm quite sure that the problem has to do with shared variables, but I have not too much experience with them, I have to study much more...thanks

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

My point was you need to have visible=1.However, if you are using inter-gauge communication, your broadcast gauge must be above the receiving gauge in the panel.cfg file (ie loaded first).Good luck

Share this post


Link to post
Share on other sites
Guest coal

Yes, I knew that. But something else is wrong. I migrate a similar gauge to FSX, made by me too, and it's working fine, the worst is that I cannot see any differences in C code, as much in the structure as in intercomunication.thanks again for helping.

Share this post


Link to post
Share on other sites

Have you "bullet-proofed" your received variables?Instead of:local_var = *share ;do something like this:if (share != NULL) then { local_var = *share ; }Note that we are checking to see if the pointer "share" exists, whereas "*share" is looking for the contents at that memory location where the pointer "share" is pointing... :-sun1


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...