projecthorus / horus-gui

Project Horus Telemetry Decoder
GNU General Public License v3.0
35 stars 9 forks source link

Stability Horus Gui #24

Closed edegraaff closed 1 year ago

edegraaff commented 2 years ago

Hi, version 3.6 and 3.7 are suffering of instabilty. I am using win 10, latest updates. Horus is running several minutes or serveral hours and then it stops and the process is gone without warning. I am running 64 bit os, and the 64 bit version of horus

Eventlog shows: Faulting application name: horus-gui.exe, version: 0.0.0.0, time stamp: 0x62523fce Faulting module name: Qt5Core.dll, version: 5.15.2.0, time stamp: 0x5fa4dd3b Exception code: 0xc0000005 Fault offset: 0x00000000001d69db Faulting process id: 0x44c8 Faulting application start time: 0x01d8683221719193 Faulting application path: C:\sdr\hab\horus-gui.exe Faulting module path: C:\Users\edg\AppData\Local\Temp_MEI165482\Qt5Core.dll Report Id: 02d8ca6f-0eb7-4b57-88fa-044779638e8f Faulting package full name: Faulting package-relative application ID:

If needed i can debug more, i will use next time 3.8 and see if it is more stable.

regards Eelco nl13974

darksidelemm commented 2 years ago

The eventlog information really tells me nothing unfortunately.

Try starting horus-gui from a command prompt. That way if it's an uncaught error it should at least stay in the command prompt instead of just disappearing.

In 0.3.8 I have added the ability to select different sound 'drivers' (e.g. MME vs DirectSound), in case the issue is related to one particular driver.

edegraaff commented 2 years ago

The eventlog information really tells me nothing unfortunately.

Try starting horus-gui from a command prompt. That way if it's an uncaught error it should at least stay in the command prompt instead of just disappearing.

In 0.3.8 I have added the ability to select different sound 'drivers' (e.g. MME vs DirectSound), in case the issue is related to one particular driver.

Ok i will next time, at this moment i don't have any extra info, it is at random. It seems to me some sort of memory allocation issue. I have closed the memory consuming chrome.exe and since then it is more stable. Keep you posted.

edegraaff commented 2 years ago

I have runned it from the command prompt, the only thing i see, is the process on the command prompt stopped. No error nothing, arrow up, enter, and running again.

darksidelemm commented 2 years ago

OK, that makes this considerably harder to debug then, especially since I've never encountered this error on my Windows 10 machine...

Can you try the other sound-card options and see if any of them make a difference to stability?

ManoDaSilva commented 2 years ago

Hi Mark, I've been having similar issues on a fresh Win10 install (w/ SDR++ with Network pipe). Apparently, it seems to quit once the tracker gets a valid GPS position and uploads it to Habitat:

2022-09-05 19:56:43,027 INFO: Started Audio Processing. 2022-09-05 19:56:48,734 INFO: Habitat - Uploaded sentence: $$ON4IR,62,17:56:46,50.70950,4.52640,121,0,5,41,3.16,0.18,0.0,0,0.0,154*D8B8 2022-09-05 19:56:49,599 INFO: Sondehub Amateur Uploader - Uploaded 1 telemetry packets to Sondehub Amateur in 0.6 seconds. It then quits without any error message...

EDIT: sometimes it runs for longer before quitting.

darksidelemm commented 2 years ago

Ahh, that it's occurring with SDR++ using UDP audio makes this even more interesting - that suggests there's something else going on. Again, highly difficult for me to debug :-/

darksidelemm commented 2 years ago

A test you could run, is setting up a python environment under windows and running it within that to see if the issues persist. It's a bit of an effort to do, but is possible. There's some notes I made (mainly to myself...) here: https://github.com/projecthorus/horus-gui/wiki/Creating-Binary-Packages#windows Once you get to the point of grabbing the libhorus.dll file (use this one: https://github.com/projecthorus/horusdemodlib/releases/download/v0.1.21/libhorus.dll ) then you should be able to run horus-gui with (within the venv you created): python horus-gui.py

I'd be interested to know if the issues occur when running like that.

ManoDaSilva commented 2 years ago

Will do! I have some free time tomorrow morning, I'll let you know how it goes :)

darksidelemm commented 2 years ago

Thanks! It's really difficult to debug this kind of stuff when I can't replicate it. Given Horus-GUI is likely to see a lot more use in the coming months as Habhub is retired (and dl-fldigi will stop working!), more people assisting with debugging is appreciated :-)

ManoDaSilva commented 2 years ago

Oh, the whole habhub platform (+tracker?) is being retired? Are there some alternatives present?

darksidelemm commented 2 years ago

Yep. The Habhub servers are going away. The current best alternative is amateur.sondehub.org, which horus-gui supports uploading to.

edegraaff commented 2 years ago

Thanks! It's really difficult to debug this kind of stuff when I can't replicate it. Given Horus-GUI is likely to see a lot more use in the coming months as Habhub is retired (and dl-fldigi will stop working!), more people assisting with debugging is appreciated :-)

Today i was folowing a balloon, and the only thing i can add here: starting horus, when i wend down, and up, it was crashed and gone, same thing happend twice, started for the thirt time, it runned the whole day without any issues. Something in the initualisation processes ?Proccess started with a dependency, cleaning up memory frames? i am not a programmer, but it is a stange issue, and i can imagine it is not an easy one to debug indeed.

edegraaff commented 2 years ago

I can at least share one devision by 0 error. When Horus is running and the audio chanel is gone, like no datastream you het an dev by 0 error. In my case i have openwebrx running capturing the data from my sdr, and ported virtual cable to horus, when i close my browser with openwebrx, the schreen that is running the python script is dumping the dev by 0 errors and in fact, only option is to close it completely

ManoDaSilva commented 2 years ago

A test you could run, is setting up a python environment under windows and running it within that to see if the issues persist. It's a bit of an effort to do, but is possible. There's some notes I made (mainly to myself...) here: https://github.com/projecthorus/horus-gui/wiki/Creating-Binary-Packages#windows Once you get to the point of grabbing the libhorus.dll file (use this one: https://github.com/projecthorus/horusdemodlib/releases/download/v0.1.21/libhorus.dll ) then you should be able to run horus-gui with (within the venv you created): python horus-gui.py

I'd be interested to know if the issues occur when running like that.

Okay, I gave it a try yesterday with the whole python env; but no crashes there. I restarted the "released" horus gui exe, and it's still running strong today...

edegraaff commented 1 year ago

Last week the horusgui did run a whole day without issues. Today it crashed again, can't figure out what is causing this. Today i tried to build up the whole horus-gui from scratch on my PI4 with raspbian 64 bits, and i are close to a working build but i need some help to get this further. I also will try to run horusgui in the python venv environment as mano suggested.

qtbuild/builder.py", line 69, in apply_user_defaults raise PyProjectOptionException('qmake', sipbuild.pyproject.PyProjectOptionException [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

edegraaff commented 1 year ago

A test you could run, is setting up a python environment under windows and running it within that to see if the issues persist. It's a bit of an effort to do, but is possible. There's some notes I made (mainly to myself...) here: https://github.com/projecthorus/horus-gui/wiki/Creating-Binary-Packages#windows Once you get to the point of grabbing the libhorus.dll file (use this one: https://github.com/projecthorus/horusdemodlib/releases/download/v0.1.21/libhorus.dll ) then you should be able to run horus-gui with (within the venv you created): python horus-gui.py

I'd be interested to know if the issues occur when running like that. Hi question's :-) I have python installed i created under home a folder horusgui, i put there the wheel, and then from there?

I have figured out a lot but this is where i am now: 2022-12-04 21:19:33,911 INFO: Sondehub Amateur Uploader - Uploaded station information to Sondehub. Traceback (most recent call last): File "C:\Users\edg\horusgui\horus-gui\horusgui\gui.py", line 1029, in start_decoding horus_modem = HorusLib( File "C:\Users\edg\horusgui\horus-gui\horus\lib\site-packages\horusdemodlib\demod.py", line 160, in init self.c_lib = ctypes.cdll.LoadLibrary(libpath) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\ctypes__init__.py", line 452, in LoadLibrary return self._dlltype(name) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\ctypes__init.py", line 374, in init__ self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'libhorus.dll' (or one of its dependencies). Try using the full path with constructor syntax.

i can create the venv environment, pip is updated and so on, the Install PyAudio from wheel here also done.

Should i also link en compile the demo lib? I like the notes, but could you add some extra tips?

half hour later: i have been able to build the horusgui, and when i start the exe it does indeed run :-) but it is in fact the copy of the distributed exe file at least it seems that way, i build with the latest gcc libs version 10

added in my manual install > pip install pyinstaller and watch out, command under linux for python do differ from windows in some places.

if you use python -m venv venv and other examples use similar, issues could occur. i used python -m venv horus and then .\horus\Scripts\activate and pip install pip -U etc

darksidelemm commented 1 year ago

I'd suggest trying to run horus-gui not as the exe, just from python. That way it removes separates out any issues pyinstaller may be introducing.

edegraaff commented 1 year ago

Update on previous solutions and ways to go forward: the exe does work, but ... similar behaviour it crashed but the eventlog shows what dll is crashed, that makes it a bit more clear. I am running windows 10 64 bit, with also the 64 bit dlls from winlibs-x86_64-posix-seh-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.7z It could be something with versions of dll's and or 32 or 64 bit dlls? Qt5Core.dll,

the eventlog shows Fault bucket 1336396444050984451, type 5 Event Name: MoAppHang Response: Not available Cab Id: 0

Problem signature: P1: PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0 P2: praid:Python P3: 3.10.8150.1013 P4: 63459f80 P5: 25a7 P6: 134217728 P7: P8: P9: P10:

Attached files: \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB41F.tmp.WERInternalMetadata.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB43F.tmp.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB44D.tmp.csv \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB46E.tmp.txt \?\C:\Users\edg\AppData\Local\Temp\WERC603.tmp.appcompat.txt

These files may be available here: \?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppHang_PythonSoftwareFo_f85bd8441b62e3825a26f15bd118b2929437456_f2226512_8be72fa8-2685-423b-bfb5-91b1164c4c15

Analysis symbol: Rechecking for solution: 0 Report Id: 3d94b157-2eb1-4938-8ac0-9d729054b566 Report Status: 268435456 Hashed bucket: 5a6c11b2df0b7695428bd57c3ec10e03 Cab Guid: 0

The program python3.10.exe version 3.10.8150.1013 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel. Process ID: 482c Start Time: 01d9081d5cab8b58 Termination Time: 16 Application Path: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\python3.10.exe Report Id: 3d94b157-2eb1-4938-8ac0-9d729054b566 Faulting package full name: PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0 Faulting package-relative application ID: Python Hang type: Unknown

Faulting application name: horus-gui.exe, version: 0.0.0.0, time stamp: 0x638d0519 Faulting module name: Qt5Core.dll, version: 5.15.2.0, time stamp: 0x5fa4dd3b Exception code: 0xc0000005 Fault offset: 0x00000000001d69db Faulting process id: 0x46ec Faulting application start time: 0x01d9082058283f65 Faulting application path: C:\Users\edg\horusgui\horus-gui\dist\horus-gui.exe Faulting module path: C:\Users\edg\AppData\Local\Temp_MEI170562\PyQt5\Qt5\bin\Qt5Core.dll Report Id: 2b4feab3-9b58-496b-b666-b00db4c517a5 Faulting package full name: Faulting package-relative application ID:

build-horus.txt

edegraaff commented 1 year ago

i agree how to get it running? i have issues witj the horus.dll

darksidelemm commented 1 year ago

Hmm, as long as libhorus.dll is in the same directory as where the python script is run, it should work...

edegraaff commented 1 year ago

Hmm, as long as libhorus.dll is in the same directory as where the python script is run, it should work... I agree but i get this error: 2022-12-05 21:13:19,252 INFO: Sondehub Amateur Uploader - Uploaded station information to Sondehub. Traceback (most recent call last): File "C:\Users\edg\horusgui\horus-gui\horusgui\gui.py", line 1029, in start_decoding horus_modem = HorusLib( File "C:\Users\edg\horusgui\horus\lib\site-packages\horusdemodlib\demod.py", line 160, in init self.c_lib = ctypes.cdll.LoadLibrary(libpath) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\ctypes__init__.py", line 452, in LoadLibrary return self._dlltype(name) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\ctypes__init.py", line 374, in init__ self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'libhorus.dll' (or one of its dependencies). Try using the full path with constructor syntax.

script is started here am i right? "C:\Users\edg\horusgui\horus-gui\horusgui\gui.py" in this folder some extra dlls added: libgcc_s_seh-1.dll libhorus.dll libstdc++-6.dll libwinpthread-1.dll

so file is there but the error stays if i check taskmanager and look at the location where this is running it is this folder: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0 putting the dll there is impossible

then i looked what other calls are made and some where made from here c:\Users\edg\horusgui\horus-gui\horusgui\ Here to the libhorus.dll is placed and stil no luck

Somewhere i am searching for the missing link

The cookbook is now: home cd horusgui\horus-gui python -m venv horus .\horus\Scripts\activate pip install -r requirements.txt python horus-gui.py and there i have the gui started but when i press the button START the error is FileNotFoundError: Could not find module 'libhorus.dll' (or one of its dependencies). Try using the full path with constructor syntax.

darksidelemm commented 1 year ago

Try putting the dlls in the same directory as the horus-gui.py script.

edegraaff commented 1 year ago

They are there c:\Users\edg\horusgui\horus-gui.git\ c:\Users\edg\horusgui\horus-gui\build\ c:\Users\edg\horusgui\horus-gui\dist\ c:\Users\edg\horusgui\horus-gui\doc\ c:\Users\edg\horusgui\horus-gui\horus\ c:\Users\edg\horusgui\horus-gui\horusgui\ c:\Users\edg\horusgui\horus-gui.gitignore c:\Users\edg\horusgui\horus-gui\horus-gui.py c:\Users\edg\horusgui\horus-gui\horus-gui.spec c:\Users\edg\horusgui\horus-gui\horus-gui_osx.spec c:\Users\edg\horusgui\horus-gui\horus-gui_win.spec c:\Users\edg\horusgui\horus-gui\libgcc_s_seh-1.dll c:\Users\edg\horusgui\horus-gui\libhorus.dll c:\Users\edg\horusgui\horus-gui\libstdc++-6.dll c:\Users\edg\horusgui\horus-gui\libwinpthread-1.dll c:\Users\edg\horusgui\horus-gui\LICENSE c:\Users\edg\horusgui\horus-gui\Makefile c:\Users\edg\horusgui\horus-gui\PyAudio-0.2.11-cp37-cp37m-win_amd64.whl c:\Users\edg\horusgui\horus-gui\pyproject.toml c:\Users\edg\horusgui\horus-gui\README.md c:\Users\edg\horusgui\horus-gui\requirements.txt c:\Users\edg\horusgui\horus-gui\setup.py That is what puzzeling me It works until the start button is pressed to pickup the audio stream

image

it could be one component is missing, and not the ones listed but someting to tap the audio stream? when you press the start button? Traceback (most recent call last): File "C:\Users\edg\horusgui\horus-gui\horusgui\gui.py", line 1029, in start_decoding horus_modem = HorusLib( File "C:\Users\edg\horusgui\horus-gui\horus\lib\site-packages\horusdemodlib\demod.py", line 160, in init self.c_lib = ctypes.cdll.LoadLibrary(libpath) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\ctypes__init__.py", line 452, in LoadLibrary return self._dlltype(name) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\ctypes__init.py", line 374, in init__ self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'libhorus.dll' (or one of its dependencies). Try using the full path with constructor syntax.

i could try to hack the libhorus in the python folder but it could also be something that can be fixed in the code by adding a path?

darksidelemm commented 1 year ago

It should work with the library in the main directory of the repository. I think it just needs to be in the same directory as wherever you are running the "python horus-gui.py" command.

Unfortunately I am 800km away from the Windows machine i use to do the builds on, so I can't check my own setup.

darksidelemm commented 1 year ago

It may be a dependency of libhorus.dll that is missing, not libhorus.dll itself. Unsure what dependency though...

edegraaff commented 1 year ago

It should work with the library in the main directory of the repository. I think it just needs to be in the same directory as wherever you are running the "python horus-gui.py" command.

Unfortunately I am 800km away from the Windows machine i use to do the builds on, so I can't check my own setup.

no problem, it is just i want to find a way to stabilize horus-gui and also share the solution if we found one. I also tried to get it running on my Pi4 that to could be a solution path on linux No problem if we need time, it is an technical issue we will figure out, but will cost some time and energy :-) Using the experiance to get it runnung om raspbian could also be a solution route.

edegraaff commented 1 year ago

It may be a dependency of libhorus.dll that is missing, not libhorus.dll itself. Unsure what dependency though...

That was the area i was thinking indeed, error message is not complete or partly incorrect. I am willing to do some debugging and at least deliver some sort of a solution for those that are facing similar issues, so we can point them into an alternative direction.

darksidelemm commented 1 year ago

OK, so on my PC I have the following in my horus-gui directory: Screenshot 2022-12-10 140524

Once entering the venv, I am able to run horus-gui, and have it start processing with the command: python horus-gui.py

edegraaff commented 1 year ago

OK, so on my PC I have the following in my horus-gui directory: Screenshot 2022-12-10 140524

Once entering the venv, I am able to run horus-gui, and have it start processing with the command: python horus-gui.py

Thanks, when i compare the folders, it looks similar, but the dates (and maybe the versions) seems to differ, could there be the case? i am running Windows 10 Btw image I will give it an extra try to see if i can find other issues. The gui is shown but pressing the button to proces the audio stream seems to be the issue. I will also give the pi4 an extra try. When i have some sort of a workin procedure i will write it down. Eelco

darksidelemm commented 1 year ago

The dates are probably unimportant, they are probably just when I moved the files in. Still unsure why its not working :-(

edegraaff commented 1 year ago

The dates are probably unimportant, they are probably just when I moved the files in. Still unsure why its not working :-(

Suggestion to pack your folder in a zip, and i unpack it over my folder and see if it will work? We could dig into the versions of every file. I will give it a try today again, i hope it is not something to do with the fact i run a surface or other product related issues. Will test also some other hardware :-) keep you posted

darksidelemm commented 1 year ago

Hmm, that's still an intel machine, right?

edegraaff commented 1 year ago

Hmm, that's still an intel machine, right?

Yes Device name DESKTOP-S8EM1UU Processor Intel(R) Core(TM) i5-1035G4 CPU @ 1.10GHz 1.50 GHz Installed RAM 8,00 GB (7,60 GB usable) Device ID D434E645-6D06-49B3-9317-045A1EBA2DCE Product ID 00330-63045-08356-AAOEM System type 64-bit operating system, x64-based processor Pen and touch Pen and touch support with 10 touch points

darksidelemm commented 1 year ago

Yep ok, just checking it wasn't an ARM or something...

edegraaff commented 1 year ago

I close the the discussion, it could be memory that gets exhaused. Until now, i could not find any logical explanation. We discussed all options. Since it is currently stable again, i think it could be something with windows updates, it stays strange but python is something a bit reluctant. I like the software, the projects, so please continue making this great programs!

darksidelemm commented 1 year ago

I also had a hint that it might become more stable by running it in a compatibility mode (I think the compatibility mode for Windows 8 was used? )

ManoDaSilva commented 1 month ago

Hi! I'm still having that issue under the same Windows 10 instance, and with ver v0.3.19

darksidelemm commented 1 month ago

Since i've been unable to replicate this issue on any of my windows machines, all I can really suggest is seeing if you can get python 3.11 installed and try and run horus-gui directly under that: https://github.com/projecthorus/horus-gui/wiki/Creating-Binary-Packages#python-311-notes-windows-10-or-newer-only