• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Not the code, the computer running it.

Messages
57
Country
unitedstates
Hey guys,

I wrote a simple gauge for FSX, but I get access violation errors running it in my sim. FsPanelStudio can read it just fine, but FSX crashed at ntdll.dll with access violation errors. I have checked my code and had others check it, and no one can find the problem.

Other developers can run it, does anyone have any ideas? I used Windows 7 and VS11 Beta (same results with VS2010 as a compiler, which has worked for me before).

Thanks
 
I guess you have something in your code related to memory allocation that conflicts with your copy of ntdll.dll. It's certainly not an specific FSX error otherwise it would'nt work fine in other computers.
If I were you I would first check by changing the size of the bitmap, then searching for code that kinda allocs memory, if any (ie array definitions, etc)

Tom
 
I have nothing more than the gauge header, mouse rectangle, and MAKESTATIC(stuff). I tried removing the mouse begin and end and entering null in the header. I also tried changing the bitmap to a different size, to no avail. The error has moved to panels.dll after rebuilding the project from scratch.
 
I reviewed the ESP SDK, and I rewrote one of the Macro calls. Additionally, I tried compiling it in VS2010, which worked, and then 11, which also worked now.

I believe I had structured one of the macro's wrong (MAKE_STATIC()) I believe, and once rewritten and with a MAKE_NEEDLE() added, it worked beautifly.

Word to the wise: ALWAYS review your macros - even if it compiles, it may not be right, and be weary of Visual Studio 11.
 
Hmm...You say that the problem was in a bad FS macro definition, but before you told that other developers tested the gauge and it worked on their systems (:eek:) I believe if a macro is bad coded FS shouldn't work on any system, so if it is not the case then I'd appreciate that you tell us the difference between the bad macro and what you changed to make it work fine; would be of a great help in case some of us has to deal with a similar problem in the future.

Tom
 
Yes, I should have been more specific. I was getting an error in panels.dll which was present on all systems, the ntdll.dll access violation was resolved by a project rebuild in Visual Studio, and at the same time I added another element to the code (a needle).

I believe I sent something alone the lines of:
Code:
MAKE_STATIC(alt_back,ALTITUDE_BACKGROUND_BMP,altitude_list1,IMAGE_USE_TRANSPARENCY,0,0,0,0)

Instead of:
Code:
MAKE_STATIC(alt_back,ALTITUDE_BACKGROUND_BMP,altitude_list1,altitude_fail,IMAGE_USE_TRANSPARENCY,0,0,0)

(the above example is not exactly what I did, but is close.) It resulted in a semi-functional gauge (i.e. legibly by FsPanelStudio, but causing FSX CTD's.

I have a question now regarding the actual information in the gauge: I wrote a nonlinearity table for the longer altitude gauge needle in order to get it to display, and used a callback to report the altitude of the plane in connection with the ground altitude, but it is giving me wierd numbers. The callback DID modify the function of the gauge, and it moves in sync with the altitude, just points to the wrong location. Does FSX altitude units come out in feet, is there something special I should know?
 
I learned it on my own - I had to rotate the actual bitmap. I had to think outside of the box and make it vertical, when it should be horizontal lol.
 
Unless otherwise specified explicitly in your code, all "needle objects" must "point east" (IOW, to the right).
 
Back
Top