ac2cz / FoxTelem

AMSAT Fox-1 Telemetry Decoder
GNU General Public License v3.0
52 stars 17 forks source link

SERIOUS ERROR - Uncaught and thrown from GUI ... device.rtl.E4KTunerController cannot be cast to class device.rtl.R820TTunerController #638

Closed denzs closed 3 years ago

denzs commented 4 years ago

I am trying to run Foxtelem with an RTLsdr (Nooelec with E4000) on Debian unstable. RTLsdr is working fine with gqrx.

When trying to start the decoder in Foxtelem an error message with the error below appears and nothing happens. When starting without the wrapper the output is:


$ java -jar FoxTelem.jar
...
LibUSB API Version: 16777474
LibUSB Version: 1.0.18.10866
discovered [6] attached USB devices
usb device [1D6B:0003]
libusb device 0x7f9d043b3060
usb device [05AC:8289]
libusb device 0x7f9d043a9e10
usb device [0A5C:4500]
libusb device 0x7f9d043a9d10
usb device [05AC:0263]
libusb device 0x7f9d043b3100
usb device [0BDA:2838]
libusb device 0x7f9d043b3520
FOUND DEVICE!
USB Source Selected: RTL
RTL sampling at: 240000
Loaded mComboSampleRate: 0
Loaded mComboMasterGain: 0
SERIOUS ERROR - Uncaught and thrown from GUI
java.lang.ClassCastException: class device.rtl.E4KTunerController cannot be cast to class device.rtl.R820TTunerController (device.rtl.E4KTunerController and device.rtl.R820TTunerController are in unnamed module of loader 'app')
    at device.rtl.RTLPanel.setGain(RTLPanel.java:214)
    at device.rtl.RTLPanel.actionPerformed(RTLPanel.java:350)
    at java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1264)
    at java.desktop/javax.swing.JComboBox.setSelectedItem(JComboBox.java:589)
    at java.desktop/javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
    at device.DevicePanel.loadParam(DevicePanel.java:43)
    at device.rtl.RTLPanel.initializeGui(RTLPanel.java:158)
    at device.rtl.RTLPanel.setDevice(RTLPanel.java:168)
    at gui.SourceTab.processStartButtonClick(SourceTab.java:1762)
    at gui.SourceTab.<init>(SourceTab.java:282)
    at gui.MainWindow.<init>(MainWindow.java:191)
    at FoxTelemMain$1.run(FoxTelemMain.java:643)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

My java version:

$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Debian-3)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3, mixed mode, sharing)

Am i missing something? If this is a bug let me know how i can help debugging!

ac2cz commented 4 years ago

Definitely a bug. Will try to look at it soon though I do not have that type of tuner.

On Sat, Jun 13, 2020, 15:10 Sebastian Denz notifications@github.com wrote:

I am trying to run Foxtelem with an RTLsdr (Nooelec with E4000) on Debian unstable. RTLsdr is working fine with gqrx.

When trying to start the decoder in Foxtelem an error message with the error below appears and nothing happens. When starting without the wrapper the output is:

$ java -jar FoxTelem.jar ... LibUSB API Version: 16777474 LibUSB Version: 1.0.18.10866 discovered [6] attached USB devices usb device [1D6B:0003] libusb device 0x7f9d043b3060 usb device [05AC:8289] libusb device 0x7f9d043a9e10 usb device [0A5C:4500] libusb device 0x7f9d043a9d10 usb device [05AC:0263] libusb device 0x7f9d043b3100 usb device [0BDA:2838] libusb device 0x7f9d043b3520 FOUND DEVICE! USB Source Selected: RTL RTL sampling at: 240000 Loaded mComboSampleRate: 0 Loaded mComboMasterGain: 0 SERIOUS ERROR - Uncaught and thrown from GUI java.lang.ClassCastException: class device.rtl.E4KTunerController cannot be cast to class device.rtl.R820TTunerController (device.rtl.E4KTunerController and device.rtl.R820TTunerController are in unnamed module of loader 'app') at device.rtl.RTLPanel.setGain(RTLPanel.java:214) at device.rtl.RTLPanel.actionPerformed(RTLPanel.java:350) at java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1264) at java.desktop/javax.swing.JComboBox.setSelectedItem(JComboBox.java:589) at java.desktop/javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624) at device.DevicePanel.loadParam(DevicePanel.java:43) at device.rtl.RTLPanel.initializeGui(RTLPanel.java:158) at device.rtl.RTLPanel.setDevice(RTLPanel.java:168) at gui.SourceTab.processStartButtonClick(SourceTab.java:1762) at gui.SourceTab.(SourceTab.java:282) at gui.MainWindow.(MainWindow.java:191) at FoxTelemMain$1.run(FoxTelemMain.java:643) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

My java version:

$ java -version openjdk version "11.0.7" 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Debian-3) OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3, mixed mode, sharing)

Am i missing something? If this is a bug let me know how i can help debugging!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ac2cz/FoxTelem/issues/638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRDKWIKTGGZRFIXYXMV3LTRWPFI5ANCNFSM4N5DNZFA .

denzs commented 4 years ago

Thx fo replying! :) If i can help with testing patches or anything else, just let me know!

ac2cz commented 4 years ago

The RTLPanel.java class assumes the device is an R820T. I need to code a new panel for the E4K tuner, which has a different API.

ac2cz commented 3 years ago

I've refactored the class that was complaining about the E4000 dongle. You can run the test version 1.10c from here: https://www.g0kla.com/foxtelem/downloads/test/

I don't have a dongle to test with, so it may well crash. Report back here.

denzs commented 3 years ago

The issue still exists...

LibUSB API Version: 16777474
LibUSB Version: 1.0.18.10866
discovered [13] attached USB devices
usb device [05AC:8406]
libusb device 0x7f14bc599360
usb device [05E3:0612]
libusb device 0x7f14bc5980a0
usb device [1D6B:0003]
libusb device 0x7f14bc597e40
usb device [05AC:8289]
libusb device 0x7f14bc597d80
usb device [0A5C:4500]
libusb device 0x7f14bc597c80
usb device [0BDA:2838]
libusb device 0x7f14bc597730
FOUND DEVICE!
USB Source Selected: RTL
RTL sampling at: 240000
Loaded mComboSampleRate: 0
SERIOUS ERROR - Uncaught and thrown from GUI
java.lang.ClassCastException: class device.rtl.E4KTunerController$E4KGain cannot be cast to class device.rtl.R820TTunerController$R820TGain (device.rtl.E4KTunerController$E4KGain and device.rtl.R820TTunerController$R820TGain are in unnamed module of loader 'app')
    at device.rtl.RTLPanelE4K.initializeGui(RTLPanelE4K.java:128)
    at device.rtl.RTLPanelE4K.setDevice(RTLPanelE4K.java:171)
    at gui.SourceTab.processStartButtonClick(SourceTab.java:1846)
    at gui.SourceTab.<init>(SourceTab.java:299)
    at gui.MainWindow.<init>(MainWindow.java:196)
    at FoxTelemMain$1.run(FoxTelemMain.java:643)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

I double checked, that i am running 1.10c :)

denzs commented 3 years ago

I just realized, the stack trace is different in the current version :) full log here: foxtelem.log

ac2cz commented 3 years ago

Thanks for testing. That is progress because the error is in the new RTLPanelE4K that I created. I'll make another build for you to test that tries to fix that.

denzs commented 3 years ago

Thank you so much - I really appreciate what you are doing! :) Let me know if i can help with testing or anything else..

ac2cz commented 3 years ago

You can test version 1.10c2, which is here: https://www.g0kla.com/foxtelem/downloads/test/ You don't need the whole release unless that is easier for you. You can just grab the FoxTelem.jar file that is in that folder and patch the test version you installed. Just replace the jar file.

Let me know if it works or what the next error is. Many thanks!

denzs commented 3 years ago

This looks very promising :)

While starting up this message appears: device_error

After confirming the dialog it seems to be working!

Here is the full log: FoxTelem_working.log

As i have no experience with running FoxTelem til now, i cant really say if everything is working. But this already looks really promising, i will mount my antenna, play with it and let you know if i find something interessing :)

denzs commented 3 years ago

The message from above shows up every time the decoder starts running.

Til now i was not able to decode a single frame, but i think this is due to my very simple antenna (without filters or lna). I will improve my setup and let you know when i decoded something or when i find further issues..

ac2cz commented 3 years ago

I have update this to fix the issue where it won't set the frequency. It is again here: https://www.g0kla.com/foxtelem/downloads/test/ And again you don't need the whole release unless that is easier for you. You can just grab the FoxTelem.jar file that is in that folder and patch the test version you installed. Just replace the jar file.

denzs commented 3 years ago

I can confirm that the messagebox is gone with 1.10c3 :+1:

I've used my Arrow 146/437 in combination with an FM filter and LNA and et voila: https://www.amsat.org/tlm/ground_station.php?id=0&db=FOXDB&station=DL3SD

So from my point of view this can be closed and rtlsdr@E4000 can be added to the list of supported devices.. Thank you Chris! :)

ac2cz commented 3 years ago

This is working, but this crash seen on windows 10: image