Search found 17 matches

by EllipticCurve
Tue May 07, 2019 1:58 am
Forum: SimConnect Interface Questions
Topic: Bug: Body acceleration not applied correctly
Replies: 5
Views: 1033

Re: Bug: Body acceleration not applied correctly

Setting an acceleration value like this does not prevent the internal simulation from also writing to the acceleration data. So you are probably just fighting with the forces generated from the simulation. Depending on the rate at which you are sending, and the rate at which the aircraft is simulat...
by EllipticCurve
Tue Apr 30, 2019 6:50 pm
Forum: SimConnect Interface Questions
Topic: Memory leak in Managed SimConnect SetDataOnSimObject?
Replies: 9
Views: 1266

Re: Memory leak in Managed SimConnect SetDataOnSimObject?

Thanks Elliptic, but this is C# code. You don't need to delete objects in the same way as is done in C++. The code you posted isn't recognised by C# in any event. I've done some performance profiling using Visual Studio and all I can see from that is that the additional memory that is being used is...
by EllipticCurve
Mon Apr 29, 2019 5:12 pm
Forum: SimConnect Interface Questions
Topic: Memory leak in Managed SimConnect SetDataOnSimObject?
Replies: 9
Views: 1266

Re: Memory leak in Managed SimConnect SetDataOnSimObject?

private void timer1_Tick(object sender, EventArgs e) { if (UpdateObjects) { // So send a simobject update to the sim. SimObjectState state = new SimObjectState(); // <<<<<<<<<<< THIS IS YOUR PROBLEM HERE! Heading++; if (Heading > 360) Heading = 0; state.Heading = Heading; foreach (uint a in _objectl...
by EllipticCurve
Mon Apr 29, 2019 5:02 pm
Forum: SimConnect Interface Questions
Topic: Memory leak in Managed SimConnect SetDataOnSimObject?
Replies: 9
Views: 1266

Re: Memory leak in Managed SimConnect SetDataOnSimObject?

Hi, Are you using Reflection? IIRC it is YOUR duty to clean up memory when the call returns. Can you post how you are handling the data? Be sure that you are de-allocating the object before you return. If you just keep allocating and not freeing, the Garbage Collector can sometimes fail and so an ob...
by EllipticCurve
Mon Apr 29, 2019 4:44 pm
Forum: SimConnect Interface Questions
Topic: Bug: Body acceleration not applied correctly
Replies: 5
Views: 1033

Re: Bug: Body acceleration not applied correctly

I made a typographical error in my above post yesterday. It is BODY WORLD ACCELERATION Z that is malfunctioning (I did not test X or Y, but presume they are equally affected). The correct code snippet follows: SimConnect_AddToDataDefinition(hSc,DEF_BODY_ACCEL_Z,"ACCELERATION BODY Z","meter per secon...
by EllipticCurve
Sun Apr 28, 2019 10:52 pm
Forum: Prepar3D Professional Plus Client Application Questions
Topic: Am I allowed to upload weapons config's?
Replies: 2
Views: 1420

Re: Am I allowed to upload weapons config's?

If you need to ask, the answer is likely "no".
by EllipticCurve
Sun Apr 28, 2019 10:48 pm
Forum: Prepar3D Client Application Questions
Topic: 35 Minute Load times
Replies: 7
Views: 1153

Re: 35 Minute Load times

Move the port the drive is connected to. Not all motherboards can support multiple I/O operations without killing disk I/O.
by EllipticCurve
Sun Apr 28, 2019 10:29 pm
Forum: SimConnect Interface Questions
Topic: SimConnect Events Issue
Replies: 2
Views: 1666

Re: SimConnect Events Issue

See the following code snippet: case SIMCONNECT_RECV_ID_OPEN: { hr = SimConnect_SubscribeToSystemEvent(hSc,EVENT_SIM_START,"SimStart"); hr = SimConnect_SubscribeToSystemEvent(hSc,EVENT_SIM_STOP,"SimStop"); hr = SimConnect_SubscribeToSystemEvent(hSc,EVENT_SIM_PAUSE,"Pause"); } ...... case SIMCONNECT_...
by EllipticCurve
Sun Apr 28, 2019 10:24 pm
Forum: SimConnect Interface Questions
Topic: Visual studio 2019 and P3D SDK ?
Replies: 2
Views: 2254

Re: Visual studio 2019 and P3D SDK ?

Unless you're building static libraries, compilers should be (not always) backwards compatible.

What they are not, is forwards-compatible.

Static libs are a PITA, and often require specific compiler versions, even within the same generation of compilers.
by EllipticCurve
Sun Apr 28, 2019 10:14 pm
Forum: SimConnect Interface Questions
Topic: Bug: Body acceleration not applied correctly
Replies: 5
Views: 1033

Bug: Body acceleration not applied correctly

Hi, I have the following: SimConnect_AddToDataDefinition(hSc,DEF_BODY_VEL_Z,"VELOCITY BODY Z","feet per second"); Bug: The acceleration as set by: bvz.bvz = "7.31"; // ft sec^-2 SimConnect_SetDataOnSimObject(hSc,DEF_BODY_VEL_Z,SIMCONNECT_OBJECT_ID_USER,0,0,sizeof(_body_vel_z),&bvz); is not applied t...
by EllipticCurve
Tue Aug 21, 2018 1:19 am
Forum: Simulation Object Development Questions
Topic: Crash When Aircraft is Default
Replies: 0
Views: 3168

Crash When Aircraft is Default

Hi, When our aircraft is set as the default, it crashes the sim on load. Note that the "Fly Now" UI is set to appear first and not directly load into the flight. The P3D load screen appears first, then the "Loading terrain" progress bar appears for approx. 1 second and moves from 0 to 99% then disap...
by EllipticCurve
Tue Aug 21, 2018 1:15 am
Forum: Simulation Object Development Questions
Topic: Serialization Error
Replies: 1
Views: 3280

Serialization Error

Hi,

In the aircraft project, when serialization is enabled, we get a crash.

What needs to be done to correct this? As far as we know, none of our code does anything with serialization, so we're unsure where to even start looking.

Thanks!
by EllipticCurve
Sat Aug 05, 2017 2:24 am
Forum: Software Development Kit (SDK) Questions
Topic: Enable Debug?
Replies: 2
Views: 2423

Crash on Load of Module

Unhandled exception at 0x00007FFB1DEA34BE (ucrtbase.dll) in Prepar3D.exe: Fatal program exit requested. The project builds fine, and runs under FSX/P3D v2/v3 fine, but when built for P3Dv4 under VS2015, this is the crash that is encountered if the aircraft is loaded from the start screen. If the ai...
by EllipticCurve
Sat Aug 05, 2017 1:54 am
Forum: Software Development Kit (SDK) Questions
Topic: warning C4838: conversion from 'unsigned int' to 'FLAGS' requires a narrowing conversion
Replies: 1
Views: 1669

Re: warning C4838: conversion from 'unsigned int' to 'FLAGS' requires a narrowing conversion

unsigned int on 64-bit is IMPLEMENTATION SPECIFIC, and could be 64-bits wide, or it could be 32-bits wide! How wide is FLAGS under 64-bit? Dump the return value of sizeof(int) and see what it says. EDIT: doing a bit more reading, the following code will also produce this error: int a[] = { 1.0 }; Th...
by EllipticCurve
Sat Aug 05, 2017 1:47 am
Forum: Software Development Kit (SDK) Questions
Topic: Enable Debug?
Replies: 2
Views: 2423

Enable Debug?

Hi, How do I enable debug in P3D? I attach my debugger and it is apparently working, but I have a module that crashes immediately on load, and I can't debug it as it doesn't trap, and it doesn't even trigger a Windows log message about application failure. The sim will just freeze, show a busy curso...

Go to advanced search