HeliosVirtualCockpit / Helios

Helios Distribution
https://github.com/HeliosVirtualCockpit/Helios/wiki
GNU General Public License v3.0
207 stars 35 forks source link

Unhandled Error in PresentationCore: Overflow or underflow in the arithmetic operation. #843

Closed ANDRIUS-D-ILGUNAS closed 4 weeks ago

ANDRIUS-D-ILGUNAS commented 1 month ago

HELP US TO HELP YOU

If you are having problems installing / configuring / using a profile then you should use the support process for the provider of that profile.

Steps to Reproduce the problem

Steps to reproduce the behaviour:

  1. Open the attached profile and click on the cog to open the Profile tab (See attached image 'Step1.png')
  2. Click on 'Reset Monitors'('Step2.png')
  3. Change the second row so that 'content from old Monitor 2 is placed on new Monitor 3' and click 'OK'. ('Step3.png')
  4. Notice that the preview image is very small. And if I save this profile as-is, indeed the panel appears on "monitor 3" but is too small to be useable. ('Step4.png')
  5. So I try to fix by going to 'Profile'=>'Reset Monitors' again ('Step5.png')
  6. This time, I select monitor 3 to 'Scale to fit content'.('Step6.png')
  7. The universe implodes and ('crash1.png')
  8. then tells me what to do ('crash2.png')

P.S. This happens whether I use Ice's profile for BMS or any of the Capt Zeen ones for DCS. I don't believe this issue is related to either game, nor specific to this profile. But that doesn't mean much.

Expected behavior

I expect the profile to load like it did previously.

Screenshots

Step1 Step2 Step3 Step4 Step5 Step6

Error Message

Helios_Error.txt

Please complete the following information:

The problem happened while using

(place an 'x' between the square brackets for all that apply)

Additional context

I've tried uninstalling Helios, deleting (most) keys in the Registry that have the string 'Helios', removed any vetigial files in ~/AppData and ~/Documents, etc. Short of wiping the OS, I cleaned as much as I dared, but obviously something remains. Please let me know if there's any other info I may provide.

ANDRIUS-D-ILGUNAS commented 1 month ago

Oh, I forgot to include some screenshots of the universe imploding.

crash1

crash2

BlueFinBima commented 1 month ago

@ANDRIUS-D-ILGUNAS Thanks for all of the information. I can't say I've seen this problem before, and I can't understand why you're experiencing it. |Searching around, this type of problem is usually caused by processing exceptionally large images which should not be the case here. Can you please reproduce using the Profile Editor Debug shortcut found in %programfiles%\HeliosVirtualCockpit\Helios\ and attach the files Profile Editor.log and Profile Editor Problems.log from %userprofile%\Documents\Helios\. Hopefully these will contain some information to shed ore light on the problem.

ANDRIUS-D-ILGUNAS commented 1 month ago

Here are the logs that you've asked for, I belive. Please let me know if you were asking for something different. Profile Editor Problems.log Profile Editor.log

I did get a new error that I've attached here when using the Profile Editor Debug, but it didn't add much information to me. Helios_Error.txt

Yah, that error message is rather direct as to the cause of this issue; either a buffer, stack, or heap over/underflow. But as to what is overflowing, I can't tell.

If I could direct your attention to fourth image I posted, which has a red circle surrounding the preview of the cockpit, I think you'll find that the preview of the cockpit is extremely small, as compared to "Monitor 3". In my previous installations of Helios, the cockpit would strech to the screen dimensions as best it could. However, in this case, do you think that the small image is another symptom of the problem (besides the yuuge windows telling me about the recent implosion of the known universe)?

The abnormally small preview image feels like it's hinting to me that the bug (even if it IS a bug within Helios) might be in the scaling algorithm(s)?

In addition, because multiple windows open with the error messages, feels like some recursion happening, and something (the OS, the framework/driver/whatever?) halted a potentially infinite recursion.

But I haven't studied this codebase, so I might be talking out the wrong end here.

BlueFinBima commented 1 month ago

@ANDRIUS-D-ILGUNAS Thanks for providing the information. Unfortunately, it adds little to my understanding of the problem. The new problem looks pretty similar / identical to the original. When this issue was first raised, I did have a think about the extremely small preview, however I assumed that this was because the visual elements were contained within a panel which was the size of Monitor 1, and that when this panel was rescaled (width 2560 down to 1200), the visual size looked plausible.

Can you please provide me with two sets of the .hpf and .hply files you used for the lastest test, the first set before the first Reset Monitors and the second after you save the profile before the second Reset Monitors. It might be recursion as you suggest, or it might simply be the large number of visual elements which the thread has been requested to rescale however the two profiles you mention are very popular, and while large, are not the largest Helios profiles.

One question occurs to me, why do you feel you need to do two Reset Monitors to get to your desired configuration?

What I would comment is that this problem appears to be unique to your environment. My first guess would have been a corrupt image file if it was not for the fact that your first Reset Monitors worked.

ANDRIUS-D-ILGUNAS commented 4 weeks ago

I apologize for the delayed response; life keeps getting in the way of a good flight sim session!

In the attached zipfile are three files:

  1. The "Falcon BMS CPD 4.37_before_first_reset_monitors.hpf" is a copy of the original I tried to install. I don't have an .hply file since I've never saved it.
  2. After opening that file, I went to File->Save and that yielded the other two files: Falcon BMS CPD 4.37_after_save_before_reset_monitors.hpf and Falcon BMS CPD 4.37_after_save_before_reset_monitors.hply. And then I closed the Helios Profile Editor.

At this point, I do agree with your assessment that this issue is particular to my setup. Frankly, I'm just getting back into flight sims, and in my fervor, I may have installed some display drivers, or "helper programs" or something that is, for lack of a better description, "interfering". Or not.

And I can understand if these symptoms aren't enough for you to say "oh, I know what that is". So unless the "Great Idea Fairie" comes to visit you, I'll close this issue and bang on it when it becomes important enough for me.

Thank you for taking the time at all to work with me on this!

Falcon BMS CPD 4.37_profiles.zip