hankhank10 / MSFS2020-cockpit-companion

Web wrapper for reading and writing data from Microsoft Flight Simulator 2020
https://msfs2020.cc
GNU General Public License v3.0
117 stars 24 forks source link

Windows Error 0xc00000b0 when requesting /ui #3

Closed lostfocus closed 4 years ago

lostfocus commented 4 years ago

I'm not too sure if this should go here or over to Python-SimConnect, but I'll start here. Once in a while when requesting a variable (in this case here it was FUEL_TOTAL_CAPACITY but I've seen it with other ones) the whole thing just falls apart and delivers a 500:

127.0.0.1 - - [13/Sep/2020 10:30:38] "←[35m←[1mGET /ui HTTP/1.1←[0m" 500 -
Traceback (most recent call last):
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "D:\Tests\msfscc\MSFS2020-cockpit-companion\glass_server.py", line 301, in output_ui_variables
    fuel_percentage = (aq.get("FUEL_TOTAL_QUANTITY") / aq.get("FUEL_TOTAL_CAPACITY")) * 100
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\SimConnect\RequestList.py", line 157, in get
    return request.value
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\SimConnect\RequestList.py", line 10, in value
    self.sm.run()
  File "C:\Users\domin\AppData\Local\Programs\Python\Python38\Lib\site-packages\SimConnect\SimConnect.py", line 88, in run
    self.dll.CallDispatch(self.hSimConnect, self.my_dispatch_proc_rd, None)
  File "_ctypes/callproc.c", line 948, in GetResult

OSError: [WinError -1073741648] Windows Error 0xc00000b0

I'm wondering if this is something that can be caught here? If so I'd be okay with trying to learn some Python to help. Or would that be an issue for the SimConnect package?

lostfocus commented 4 years ago

Hm, it didn't happen anymore - and I did notice it's the same error that shows up when one shuts down Flight Simulator before the Cockpit Companion. So I guess for some reason I had a wonky SimConnect connection for a few moments, it has been working fine since then.