RoystonS / BetterBravoLights

Utility for controlling lights on a Honeycomb Bravo Throttle from Microsoft Flight Simulator
MIT License
42 stars 8 forks source link

BBL Wont Install #25

Closed DNM1967 closed 2 years ago

DNM1967 commented 2 years ago

Software version 0.6.0

Describe the bug

When I run install.bat I get the following:-

Little Box Entitled Better Bravo Lights with a red cross in it and the text "Operation failed. System.NullReferenceException:Object Reference not ret to an instance of an object. Please report this to the application author. The Box only had an OK button, which when pressed gets rid of the command prompt that was running the program.

To reproduce

Run install.bat again

RoystonS commented 2 years ago

Interesting - thanks for the report!

Ok, so something quite fundamental has gone wrong whilst BetterBravoLights was trying to figure out where your MSFS files are installed.

Can you tell me if you have either of the following directories on your machine?

(Those aren't the literal filenames: the %variable% parts of those filenames should get turned paths such as C:\Users\royston\AppData\Local depending on your username and drive name and so on...)

If either (or both) of those exist, can you tell me which files exist in each of those places? In particular, do either contain files named FlightSimulator.CFG or UserCfg.opt?

DNM1967 commented 2 years ago

Thank you for the reply. I don't know if this is relevent, but I unzipped BBL to my D:\ drive. I am running install.bat from D:\BetterBravoLights_gZBm4\

My MSFS2020 is the Steam version and it is located on the C:\ drive in the default install directory.

I do NOT have a %localAppData% directory on my C:\ Drive I do NOT have a %Appdata%\Microsoft Flight Simulator directory on my C:\ drive either

The \Microsoft Flight Simulator directory is at C:\Users\Owner\AppData\Roaming\Microsoft Flight Simultator This directory has FlightSimulator.CFG and UserCFG.opt files in it.

I hope this helps. I am off to Hospital for the day but I will be back about 5pm if I can give any more information that is of help

Regards

David

RoystonS commented 2 years ago

Hi David,

Thanks for checking that.

Yes, you won't literally have a folder called %LOCALAPPDATA%. The things between % characters are variables that Windows knows how to expand. If you type d%LOCALAPPDATA% into Windows File Explorer it'll automatically expand that into (in your case) C:\Users\Owner\AppData\Local.

Running BBL from the D: drive shouldn't make any difference. (I've just checked running it from my E: drive and that was all fine.)

Ok, if you wouldn't mind, could we collect some more diagnostics?

Could you download this script: https://gist.githubusercontent.com/RoystonS/b78bca7d04c40918050acb3cafbc2a10/raw/caef239d20956710a6594fa43d370a094bfa1851/bbl-installation-diagnostics.cmd Make sure the name of the saved file ends with .cmd, not .cmd.txt. Then run that script and paste its output into this issue report. You may get a security warning from Windows when running it, because Windows protects you against running random scripts from strangers.

The script will dump out a few bits of information about your installation that'll help me figure out why it's going wrong on your machine.

Here's what it produces on my machine... (Yours will be a little different as yours is a Steam installation whereas mine is a Windows Store installation, but it should be similar.)

START OF BETTER BRAVO LIGHTS INSTALLATION DIAGNOSTICS
Microsoft Store location
"C:\Users\royston\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache"
 Volume in drive C is 980
 Volume Serial Number is E41A-ABF3

 Directory of C:\Users\royston\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache

01/02/2022  17:18    <DIR>          .
14/01/2022  06:06    <DIR>          ..
31/01/2022  19:18             5,672 Cameras.CFG
31/01/2022  19:18             7,077 Content.xml
01/02/2022  17:18               524 exe.xml
31/01/2022  19:45             2,194 FlightSimulator.CFG
31/01/2022  19:18               140 GrantedRewards.BIN
31/01/2022  19:18               112 GrantedRewardsOld.BIN
31/01/2022  19:15    <DIR>          Packages
31/01/2022  19:15    <DIR>          PC
31/01/2022  19:45     8,589,934,592 ROLLINGCACHE.CCC
31/01/2022  19:18    <DIR>          SceneryCache
31/01/2022  19:18    <DIR>          SceneryIndexes
31/01/2022  19:18             1,764 SimConnect.xml
31/01/2022  19:21    <DIR>          SimObjects
31/01/2022  19:45             3,232 UserCfg.opt
               9 File(s)  8,589,955,307 bytes
               7 Dir(s)  159,954,796,544 bytes free
UserCfg.opt InstalledPackage

---------- C:\USERS\ROYSTON\APPDATA\LOCAL\PACKAGES\MICROSOFT.FLIGHTSIMULATOR_8WEKYB3D8BBWE\LOCALCACHE\USERCFG.OPT
InstalledPackagesPath "C:\FSData"
exe.xml
<?xml version="1.0" encoding="windows-1252"?>
<SimBase.Document Type="SimConnect" version="1,0">
  <Descr>Auto launch external applications on MSFS start</Descr>
  <Filename>exe.xml</Filename>
  <Disabled>False</Disabled>
  <Launch.Addon>
    <Name>BravoLights</Name>
    <Disabled>False</Disabled>
    <ManualLoad>False</ManualLoad>
    <Path>E:\BBL\Program\BetterBravoLights.exe</Path>
    <CommandLine>/startedbysimulator</CommandLine>
    <NewConsole>False</NewConsole>
  </Launch.Addon>
</SimBase.Document>Steam location
"C:\Users\royston\AppData\Roaming\Microsoft Flight Simulator"
 Volume in drive C is 980
 Volume Serial Number is E41A-ABF3

 Directory of C:\Users\royston\AppData\Roaming

File Not Found
END OF BETTER BRAVO LIGHTS INSTALLATION DIAGNOSTICS
DNM1967 commented 2 years ago

I am sorry, I have run the script but cannot see the output anywhere?

Could yiou assist me further. Sorry to be a numpty

DNM1967 commented 2 years ago

I tried running from powershell as I donr know how to get a good old DOS prompt in Windows 10, all I got was as below:

PS C:\users\owner\desktop> bbl-installation-diagnostics.cmd bbl-installation-diagnostics.cmd : The term 'bbl-installation-diagnostics.cmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

RoystonS commented 2 years ago

No problem at all! If you're using PowerShell you'll need to add .\ before the name of the script, confusingly.

For example:

image
DNM1967 commented 2 years ago

Ok, finally got it. I'm only using powershell as I can't find the DOS prompt on this stupid windows 10. I started with PC in the 80's on CPM. I moved to MS-DOS 3.3 cos I had to. Can't be doing with GUI's/Windows at all to be honest. Anyway, here is the result, hiope it helps:-

PS C:\users\owner\desktop> .\bbl-installation-diagnostics.cmd START OF BETTER BRAVO LIGHTS INSTALLATION DIAGNOSTICS Microsoft Store location "C:\Users\owner\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache" .\bbl-installation-diagnostics.cmd : The system cannot find the file specified. At line:1 char:1

Steam location "C:\Users\owner\AppData\Roaming\Microsoft Flight Simulator" Volume in drive C is OS Volume Serial Number is 8A2C-80DE

Directory of C:\Users\owner\AppData\Roaming\Microsoft Flight Simulator

01/02/2022 18:20

. 01/02/2022 18:20 .. 05/12/2021 12:39 22,095 Birm to Manc.FLT 05/12/2021 12:39 8,244 Birm to Manc.FLT.FSSAVE 05/12/2021 12:39 2,953 BIRM TO MANC.PLN 05/12/2021 12:39 225 Birm to Manc.SPB 29/12/2021 13:51 19,137 Borderaux to Bilboa (ILS ).FLT 29/12/2021 13:51 8,244 Borderaux to Bilboa (ILS ).FLT.FSSAVE 29/12/2021 13:51 5,381 BORDERAUX TO BILBOA (ILS ).PLN 29/12/2021 13:51 225 Borderaux to Bilboa (ILS ).SPB 11/12/2021 15:20 21,267 Brindisi to Corfu.FLT 11/12/2021 15:20 8,244 Brindisi to Corfu.FLT.FSSAVE 11/12/2021 15:20 3,857 BRINDISI TO CORFU.PLN 11/12/2021 15:20 225 Brindisi to Corfu.SPB 01/02/2022 18:19 1,843 BuilderLogError.txt 26/11/2021 20:09 5,672 Cameras.CFG 01/02/2022 18:18 7,340 Content.xml 26/11/2021 16:27 DCE 25/01/2022 11:15 3,653 DevMode.xml 26/01/2022 13:30 732 exe.xml 26/01/2022 13:30 732 exe_backup.xml 30/12/2021 13:18 18,470 Faro to Lisbon.FLT 30/12/2021 13:18 8,244 Faro to Lisbon.FLT.FSSAVE 30/12/2021 13:18 3,553 FARO TO LISBON.PLN 30/12/2021 13:18 225 Faro to Lisbon.SPB 01/02/2022 18:20 2,194 FlightSimulator.CFG 09/12/2021 14:52 20,990 Gatwick to CDG Paris.FLT 09/12/2021 14:52 8,244 Gatwick to CDG Paris.FLT.FSSAVE 09/12/2021 14:52 3,977 GATWICK TO CDG PARIS.PLN 09/12/2021 14:52 225 Gatwick to CDG Paris.SPB 17/01/2022 14:19 112 GrantedRewards.BIN 17/01/2022 14:19 84 GrantedRewardsOld.BIN 12/12/2021 15:14 6,059 Groton to La Gaudia New York.PLN 29/11/2021 15:36 16,429 Heathrow to Amsterdam.FLT 29/11/2021 15:36 8,244 Heathrow to Amsterdam.FLT.FSSAVE 29/11/2021 15:36 5,493 HEATHROW TO AMSTERDAM.PLN 29/11/2021 15:36 225 Heathrow to Amsterdam.SPB 02/12/2021 13:47 18,851 Heathrow to CDG Paris.FLT 02/12/2021 13:47 8,244 Heathrow to CDG Paris.FLT.FSSAVE 09/12/2021 14:10 3,859 HEATHROW TO CDG PARIS.PLN 02/12/2021 13:47 225 Heathrow to CDG Paris.SPB 04/12/2021 12:24 18,997 Heathrow to Manc.FLT 04/12/2021 12:24 8,244 Heathrow to Manc.FLT.FSSAVE 04/12/2021 12:24 60,009 Heathrow to Manc.SPB 04/12/2021 12:29 18,429 Heathrow to Manc2.FLT 04/12/2021 12:29 8,244 Heathrow to Manc2.FLT.FSSAVE 04/12/2021 12:33 4,081 HEATHROW TO MANC2.PLN 04/12/2021 12:29 225 Heathrow to Manc2.SPB 11/12/2021 10:29 8,905 Heathrow to Rome (Fumi).PLN 01/02/2022 18:20 449 imgui.ini 30/12/2021 13:56 23,491 Leeds to Edinburgh.FLT 30/12/2021 13:56 8,244 Leeds to Edinburgh.FLT.FSSAVE 30/12/2021 13:56 11,018 LEEDS TO EDINBURGH.PLN 30/12/2021 13:56 225 Leeds to Edinburgh.SPB 29/12/2021 15:13 19,439 Liverpool to Belfast.FLT 29/12/2021 15:13 8,244 Liverpool to Belfast.FLT.FSSAVE 29/12/2021 15:13 6,462 LIVERPOOL TO BELFAST.PLN 29/12/2021 15:13 225 Liverpool to Belfast.SPB 13/12/2021 12:05 3,946 Manc to Heath ILS27R.PLN 04/12/2021 15:30 18,791 Manc to heathrow.FLT 04/12/2021 15:30 8,244 Manc to heathrow.FLT.FSSAVE 04/12/2021 15:30 4,466 MANC TO HEATHROW.PLN 04/12/2021 15:30 225 Manc to heathrow.SPB 01/01/2022 15:22 MISSIONS 09/12/2021 14:54 3,515 Munich to Zurich.PLN 14/12/2021 10:54 19,162 Nice to Rome ILS16L.FLT 14/12/2021 10:54 8,244 Nice to Rome ILS16L.FLT.FSSAVE 14/12/2021 10:54 5,672 NICE TO ROME ILS16L.PLN 14/12/2021 10:54 225 Nice to Rome ILS16L.SPB 27/11/2021 15:50 Packages 26/11/2021 16:25 PC 01/01/2022 12:29 18,858 Saint Expury to Marsellies.FLT 01/01/2022 12:29 8,244 Saint Expury to Marsellies.FLT.FSSAVE 01/01/2022 12:29 4,675 SAINT EXPURY TO MARSELLIES.PLN 01/01/2022 12:29 225 Saint Expury to Marsellies.SPB 12/12/2021 15:10 3,025 Santa B to LAX.PLN 26/11/2021 20:09 SceneryCache 01/02/2022 18:18 SceneryIndexes 27/11/2021 13:48 135 simconnect.ini 26/11/2021 20:09 1,764 SimConnect.xml 26/11/2021 20:09 SimObjects 10/01/2022 14:30 18,196 TemporaryFlight.Flt 10/01/2022 14:30 8,244 TemporaryFlight.Flt.FSSAVE 10/01/2022 14:30 2,779 TemporaryFlight.SPB 01/02/2022 18:20 3,296 UserCfg.opt 10/01/2022 14:44 25,117 way to tunis.FLT 10/01/2022 14:44 8,244 way to tunis.FLT.FSSAVE 10/01/2022 14:44 59,375 way to tunis.SPB 26/11/2021 16:25 Weather 30/12/2021 15:14 19,908 zurich to saint expery.FLT 30/12/2021 15:14 8,244 zurich to saint expery.FLT.FSSAVE 30/12/2021 15:14 8,100 ZURICH TO SAINT EXPERY.PLN 30/12/2021 15:14 225 zurich to saint expery.SPB 83 File(s) 730,091 bytes 10 Dir(s) 711,892,566,016 bytes free UserCfg.opt InstalledPackage

---------- C:\USERS\OWNER\APPDATA\ROAMING\MICROSOFT FLIGHT SIMULATOR\USERCFG.OPT InstalledPackagesPath "C:\Users\owner\AppData\Roaming\Microsoft Flight Simulator\Packages" exe.xml <?xml version="1.0" encoding="Windows-1252"?>

SimConnect SimConnect.xml Logitech Microsoft Flight Simulator Plugin Steam False C:\Program Files\Logitech\Microsoft Flight Simulator Plugin\LogiMicrosoftFlightSimulator.exe -r AFCBridge False C:\Users\owner\AppData\Roaming\Microsoft Flight Simulator\Packages\community\AFC_Bridge\bin\AFC_Bridge.exe END OF BETTER BRAVO LIGHTS INSTALLATION DIAGNOSTICS If I canprovide anything further please let me know. Best Regards David
RoystonS commented 2 years ago

Thanks for that. Wow, a fellow CP/M user. I learned so much on that thing, writing assembly language back in the day...

Btw, you can get a plain old command prompt on Windows by just running cmd. Tap the windows key on your keyboard, type 'cmd' and you're there.

RoystonS commented 2 years ago

Aha! That revealed the problem!

I'll put a proper fix into the product itself shortly but in the meantime you can work around it by removing the empty <Launch.Addon> section from your C:\Users\owner\AppData\Roaming\Microsoft Flight Simulator\exe.xml file.

That is, in that file, delete the bit that looks like:

        <Launch.Addon>
        </Launch.Addon>

(But leave the other two (Logitech and AFCBridge) Launch.Addon entries alone.)

BBL should then install cleanly.

(In case you're curious about the problem, BBL is trying to find the Name of that particular Launch.Addon, but the entry is completely empty, with no name, so BBL goes pop. I'll teach BBL to ignore such entries, and in the meantime you can safely remove that redundant empty one.)

DNM1967 commented 2 years ago

That worked! It installed perfectly and runs fine.

If I run the BBLights executionable, I can't see the program running. Am I doing something wrong there now please?

RoystonS commented 2 years ago

Glad you got it installed.

As it starts up you should see a splash screen for a few seconds, then that'll go away. After that point it just runs in the background and doesn't show a user interface. It'll automatically start and exit with the simulator, btw, so you shouldn't need to start it manually.

There is however a little diagnostic/debugger UI hiding in the system tray, available from the light bulb icon:

image

Right-click on that and you can bring up the Debugger UI, which is useful if you're working on BBL configuration entries, or you can Exit.

Configuration information is available here if you have an aircraft that we haven't already provided configuration for: https://roystons.github.io/BetterBravoLights/configuration.html

DNM1967 commented 2 years ago

Thanks for all your comprehensive help.

I fly the bredock3d 737max.

DNM1967 commented 2 years ago

As you fixed everything I closed this hope I did right