April 20, 200719 yr 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
April 20, 200719 yr 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.
April 20, 200719 yr 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
April 20, 200719 yr 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
April 20, 200719 yr 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.
April 21, 200719 yr Author Moderator 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
Create an account or sign in to comment