Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: Cannot invoke "java.net.InterfaceAddress.getBroadcast()" because "address" is null #67

Open
alstergee opened this issue Feb 17, 2024 · 16 comments
Assignees

Comments

@alstergee
Copy link

Hi

so whenever i launch DSBLT it throws this error:

java.lang.NullPointerException: Cannot invoke "java.net.InterfaceAddress.getBroadcast()" because "address" is null

full log:

2024-Feb-16 21:41:07.940 FLANKER-RESOLUME INFO [beat-link-trigger.logs:62] - Beat Link Trigger version 7.3.0 built Fri Nov 24 20:54:04 UTC 2023
2024-Feb-16 21:41:07.958 FLANKER-RESOLUME INFO [beat-link-trigger.logs:63] - Java version 17.0.9, OpenJDK 64-Bit Server VM, Amazon.com Inc.
2024-Feb-16 21:41:07.959 FLANKER-RESOLUME INFO [beat-link-trigger.logs:64] - Operating system version Windows 10 10.0
2024-Feb-16 21:41:07.960 FLANKER-RESOLUME INFO [beat-link-trigger.logs:65] - Log files can grow to 200000 bytes, with 5 backlog files.
2024-Feb-16 21:41:07.961 FLANKER-RESOLUME INFO [beat-link-trigger.core:195] - Beat Link Trigger starting.
2024-Feb-16 21:41:08.747 FLANKER-RESOLUME INFO [beat-link-trigger.core:114] - Trying to go online, Use Real Player Number? true
2024-Feb-16 21:41:08.988 FLANKER-RESOLUME WARN [beat-link-trigger.core:152] - Unable to create Virtual CDJ
beat_link_trigger.BeatLinkTrigger.main
...
beat-link-trigger.BeatLinkTrigger/-main BeatLinkTrigger.clj: 59
beat-link-trigger.BeatLinkTrigger/-main BeatLinkTrigger.clj: 84
...
beat-link-trigger.core/start core.clj: 272
beat-link-trigger.core/try-going-online core.clj: 150
beat-link-trigger.core/try-going-online/fn core.clj: 150
org.deepsymmetry.beatlink.VirtualCdj.start VirtualCdj.java: 1042
org.deepsymmetry.beatlink.VirtualCdj.createVirtualCdj VirtualCdj.java: 873
org.deepsymmetry.beatlink.VirtualCdj.findMatchingAddress VirtualCdj.java: 542
java.lang.NullPointerException: Cannot invoke "java.net.InterfaceAddress.getBroadcast()" because "address" is null

2024-Feb-16 21:41:10.526 FLANKER-RESOLUME WARN [beat-link-trigger.core:178] - Unable to create Virtual CDJ

i know about the issue of anydesk application competing for ports so ive made damn sure thats not running, i also made sure rekordbox and prodjlink arent up at all and disabled firewall / AV just to be sure

i also uninstalled, found all the folders and registry items left behind and deleted those out, rebooted and reinstalled and no luck.

anyone have any ideas?

@alstergee alstergee added the bug label Feb 17, 2024
@alstergee
Copy link
Author

some DXDiag info for system hw questions:

Operating System: Windows 10 Pro 64-bit (10.0, Build 19045) (19041.vb_release.191206-1406)
Language: English (Regional Setting: English)
System Manufacturer: ASUS
System Model: System Product Name
BIOS: 0402 (type: UEFI)
Processor: Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz (16 CPUs), ~3.8GHz
Memory: 32768MB RAM
Available OS Memory: 32622MB RAM
Page File: 16822MB used, 20664MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 12
DX Setup Parameters: Not found
User DPI Setting: 96 DPI (100 percent)
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
Miracast: Available, no HDCP
Microsoft Graphics Hybrid: Not Supported
DirectX Database Version: 1.0.8
DxDiag Version: 10.00.19041.3636 64bit Unicode

@alstergee
Copy link
Author

I've tried launching it with/without "use real player number"

@brunchboy
Copy link
Member

Hi! Thanks for the report, and for all the investigation you have done and reported. It is premature to be filing a bug here because it’s not yet established there is anything wrong with Beat Link Trigger—or indeed with the Beat Link library where this problem is actually happening. If you study the code (see below for some hints) and find a change that can be made to get past this problem, we can open an issue in the appropriate project, and if you can submit a pull request with a fix, that would be even better. In the mean time, I would strongly encourage you to join the Zulip stream to talk about this, see if you can find other people using BLT with Windows who will troubleshoot with you, and start investigating what is different about your system that is causing this to happen. This is the first time this situation has arisen in all the thousands of downloads and uses of BLT.

Unfortunately, since I don’t have access to any Windows systems, nor Windows development or troubleshooting knowledge, I can’t be much help there. But there are people in the community who might be able to help you, and you will find them on Zulip.

That said, we can look at the line of code where the exception is occurring. If you look at that context, you see we have asked the Java networking library for a list of all the addresses on your machine, and it has given an answer that is null in that list. That should not be possible, so perhaps you have found a bug in Java.

Indeed, a quick search reveals that there is an open bug in Java itself that this sometimes happens in Windows. It has been open since 2013, and the developers seem to think it is unlikely to occur in realistic network configurations, so this underlines my suggestion that you are going to want to talk to other Windows users to figure out what is different about your situation that is causing this. That is likely going to lead you to a much faster resolution, given that your alternative is to lobby Oracle to fix this bug in Java.

If you have tried that for a while and are reaching dead ends on all fronts, we can also investigate trying to work around the problem in Beat Link itself, but it is always best to first try to fix bugs where they are actually found.

@brunchboy brunchboy added help wanted and removed bug labels Feb 17, 2024
@alstergee
Copy link
Author

alstergee commented Feb 17, 2024 via email

@brunchboy
Copy link
Member

Thanks for the update! And I was not complaining about your post here, I was just trying to focus our search in the proper directions to help you find an answer faster. I know a lot more about the projects than people exploring them do, so I am not offended when people don’t start out in the right spot.

I also appreciate learning what your report taught me: there is a problem with Java on Windows with certain kinds of network interfaces that can cause some people problems. Even though we got your system working with a workaround, I would like to try to avoid people stumbling into that trap in the future. Would you be willing to comment on that Java bug explaining that it caused you problems, and telling the developers about your system? For example, what is tailscale? This might help motivate them to fix the problem in Java itself, which will be the best place to avoid anyone running into it again.

If they are not willing to do that (and I can’t say I am too optimistic that they will be), I can also try to put some defensive programming in Beat Link so that it can recover from the problem in Java. I would like to understand a bit better about what is causing it, from the network side, but I have an idea of how I might do that.

@brunchboy
Copy link
Member

Forget I asked about updating the Java bug. I just wasted half an hour seeing if I could do that myself, and the answer seems to be a flat no. So let’s switch to the area we can control, and try to protect Beat Link against the bug. I’ll start by trying to move this issue to that project.

@brunchboy brunchboy transferred this issue from Deep-Symmetry/beat-link-trigger Feb 17, 2024
@brunchboy brunchboy self-assigned this Feb 17, 2024
@brunchboy
Copy link
Member

This is unbelievably frustrating but I have to go to bed. I added code to Beat Link to protect against this problem, and tried kicking off a build of Beat Link Trigger using that new version. And for reasons seemingly completely unrelated to any of that, the Github Actions workflow that tries to build the Windows installer is suddenly failing inexplicably. I am going to have to ask the colleague who originally created that script (and used to let me run it on his own server) to take a look and see if he has any insight into it, but I can’t predict when I will next be able to release Windows installers. I was hoping you might be willing to test again with tailscale once this workaround is in, but I can’t predict when that might be now.

@brunchboy
Copy link
Member

My build is still broken, but I was able to semi-manually create a Windows installer with the proposed fix for you. If you are willing to try that preview release, you can find it here: https://github.com/Deep-Symmetry/beat-link-trigger/releases/tag/v7.4.0-SNAPSHOT

@alstergee
Copy link
Author

alstergee commented Feb 17, 2024 via email

@brunchboy
Copy link
Member

No worries, there is no rush! Whenever you have time to try the preview release to let me know if it has resolved the problematic interaction between them, I would greatly appreciate it, and then we can close this issue if it works. With the help of Kevin in the Netherlands who was up researching while I slept (albeit not for enough hours), we have resolved the Windows build problem. Evidently GitHub upgraded their Actions infrastructure to PowerShell 7.3.0 which changed the way quoting works for arguments, and broke many people’s builds. Kevin found a setting we can use to restore the old behavior, which was weird, but which the script relied on, until we have time to switch to a newer version of the Wix installer toolkit. So the preview builds are back to supporting all platforms and on track for a future formal release.

@brunchboy
Copy link
Member

If I don’t hear anything back soon, I’ll close this issue just hoping that my fix was successful.

@alstergee
Copy link
Author

alstergee commented Jun 2, 2024 via email

@brunchboy
Copy link
Member

OK, there is probably nothing I can do about it in a cross-platform way, then. People will have to just not use that kind of network configuration, or use a separate Raspberry Pi or something to run BLT.

@brunchboy
Copy link
Member

But just to be totally thorough, can you confirm you are using the latest 8.0.0 preview release, and share the log file with stack trace that still happens?

@brunchboy brunchboy reopened this Jun 2, 2024
@alstergee
Copy link
Author

alstergee commented Jun 2, 2024 via email

@brunchboy
Copy link
Member

No need to apologize. I have invested many thousands of dollars in equipment to be able to further these projects, but I don’t expect most people to be able to do that! I appreciate your contributions whenever you do have time to make them. Even if I end up closing this issue again before you have time, I would still appreciate the information and we can reopen it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants