WATERMeDIA: Multimedia API

WATERMeDIA: Multimedia API

551k Downloads

[FABRIC/macOS Intel 14.2.1] Black screen on start with WaterMedia v2.0.25

TheModdersDen opened this issue ยท 40 comments

commented

Black screen issue on macOS Intel 14.2.1

The issue?

I get a black screen when I try to load my modpack I am developing with existing mods, with the latest (and other various attempted versions I tried to replace/swap out) of WaterMedia. Just to clarify, I will credit your mod (and help), once I get your mod working. I currently am at a roadblock, however, as I cannot proceed past starting the game without the entire game screen going black. Attached are the log files for the pack I'm developing, as well as a screenshot of the issue. The odd thing is that if I disable the WaterMedia mod, everything loads as per normal. However, if I re-enable it, it results in the game loading into an empty, black void of a screen, with no Mojang logo or anything.

Attempted troubleshooting steps:

  • Tried different versions of VLC (3.X and 4.0)
  • Tried different versions of WaterMedia (All the way down to 2.0.5)
  • Tried disabling WaterMedia (Some success, but isn't my main goal)
  • Tried waiting for extra time (Game didn't progress past the cow egg texture warning)
  • Tried disabling ALL other mods in pack (Still no luck)
  • Tried forcing VLC to use my eGPU (because, yes, I do have an eGPU hooked up to this Mac Mini. Still, no luck)
  • Tried "turning it off and on again" If you don't get the reference, you'll get a laugh watching this: link. If you still know what it is, I recommend watching it to brighten up your day. ๐Ÿ˜„

A sample log of the issue can be found here: link.

The aforementioned screenshot can be viewed below:
Screenshot

Thanks again for the help in advance and Merry Christmas (or happy holidays, whichever is applicable)! ๐ŸŽ„๐ŸŽ…๐Ÿป๐Ÿ˜„

//TheModdersDen

commented

I have so many question right now, specially if waterplayer is a "waterframes" fork or a "videoplayer" fork, or a original project arround watermedia...

WaterPlayer is not a fork. My project was based on the idea of Music Player from U-Team, which combines some services

commented

@kel-cu Thats quite cool, you already are using watermedia on it? i can add your project on the readme

commented

anyway, you answered like what... 6 months late

commented

you already are using watermedia on it?

No, I don't know much about this project yet.

commented

closed for inactivity
please open a new issue if still persists (last call for 2.0.40 milestone)

(i really hope this isn't still happening)

commented

OK. Giving it a shot. I'll post the results soon.

commented

Still not working, as in I still get a black screen with the latest pre-release build.

Logs:
https://mclo.gs/hlhtGrH

I can verify that using the new "disable" flag does let me get past the issue, but I'm assuming that it disables the mod's functionality completely, and thus would rather not use it... ๐Ÿ˜„

Thanks again,

//TheModdersDen

commented

well, i don't understand what i change on master branch to make it work properly, but are good news.
right now i don't have time to find what is causing it (specially for a bug i can't reproduce)

master branch (2.1.X) is still a work in progress and i'll do more breaking changes arround API. so is not the best option right now to use.

if you really need to use watermedia on mac i can do a pre-release for you, breaking changes would be stay on code, not in a build

commented

I did not notice a debug.log in the logs folder.

commented

Tried "turning it off and on again"

Basic enginnering technique JEJE
image

I have so many question right now, specially if waterplayer is a "waterframes" fork or a "videoplayer" fork, or a original project arround watermedia... (i'll asume was a waterframes fork because you open the issue on waterframes repo)

At the moment i will focus on your problem.
About your logs are full of error about baked models but nothing about problems inside watermedia/"waterplayer" API. API is agnostic about minecraft/modloaders code. so is odd it was the cause of it.

I need you do some things to discover what is happening

  • Made a clean installation, using latest version of fabric and latest version of watermedia
  • Check if problem persists, (if not, blame other mod, otherwise, go to next check)
  • Send me a copy of your debug.log file (with watermedia and without watermedia)
commented

Hello, again!

Thanks for the very quick response.

I just realized that I made this issue on the wrong repo. My bad... I should've put it on the WaterMedia repo, not the WaterFrames one... Somehow I got the links mixed up... ๐Ÿ™„

I will be following the above steps, but moving this over to the WaterMedia repo, for further discussion (and tracking), just to keep things simpler. ๐Ÿ˜„

Thanks again,

//TheModdersDen

commented

i can move the issue btw

commented

issue transfered

commented

Oh. Thanks! :)

commented

That made my life A LOT easier.

commented

Alright. Latest log with JUST watermedia:
latest.log

commented

And the log without WaterMedia:
latest.log

commented

and issue persists with watermedia only?ยก

commented

after re-read your issue i need more information beause i was a little bit confused.
you are developing a modpack or a mod? and what is the specific usage of watermedia to get a black screen

commented

It's for a modpack (for right now), but yes, I do also plan on using it in a mod (in the not-so-distant future).

commented

As to what caused the black screen, seemingly just having the jar it in the mods folder is enough to do it...

commented

and issue persists with watermedia only?ยก

And to respond to this question, yes, it is only WaterMedia that is causing the "black screen" on my end, as of the current time (and as to my knowledge).

commented

can you test if same issue happens but using Forge?,just to discard any fabric issue
you can use same jar.

commented

can you test if same issue happens but using Forge?,just to discard any fabric issue

you can use same jar.

Sure thing! Testing soon and will have some results shortly...

commented

Alright. Forge without any other mods does work. Log file here: link. This would suggest that the issue is not in my configuration, but something in the code of the mod, correct?

If so, I'd be more than happy to try to take a crack at fixing the code on my end. I haven't done any major programming since the 1.7.10 days, but I'd be willing to learn. Just point me towards a few up-to-date resources, and you've got yourself a contributor...

commented

then is a fabric issue and a MacOs issue combined. because on my end i can't replicate it on fabric.

If so, I'd be more than happy to try to take a crack at fixing the code on my end.

if you want you can go ahead, it had nothing really "new" inside, you can take a time to check code (and realise) watermedia is minecraft agnostic. basicallly is like any library. except it hads a code to load native libraries and few-required parts of the API. and is compiled in Java 8 so is like code a normal java project

commented

just to note.
master branch right now was prepared for watermedia 2.1.0, my suggestion was do a PR to 2.0.x and i'll do a rebase on my side.

commented

OK. Sounds good. I will fork the mentioned version and begin my tinkering starting tomorrow. I'll let you know if I find anything else in the meantime. ๐Ÿ˜„

commented

Alright, so I think I'm onto something... It appears as if, with a compiled version of the mod, WaterMedia can't do 2 things (which it should be able to do):

  1. Create the logger directory (and thus the log file) for the MediaFactory instance
  2. Create a MediaPlayerFactory instance

Both of these used to not be an issue (and aren't on my Windows 11 system). However, I can't say the same for my macOS machine.

I have tried both the universal binary and the Intel binary for VLC 3.0.20, both with no success.

Here's the latest log I have for the issue:
https://mclo.gs/GRTRcv1
(I stopped the game mid-launch as I believe the issue is due to the FATAL error near the end of the log, or one of the other errors)

Anyway, looking forward to a reply. Thanks again!

//TheModdersDen

EDIT: Figured I'd include the fact that I used the Modrinth launcher, and the Prism Launcher, both to no avail.
EDIT2: Here's a link to a log of an instance with just Fabric, the Fabric API, and WaterMedia on 1.20.1: https://mclo.gs/jA1BV3N.
EDIT3: Also, this is based off a fork that I made of your repo (specifically the 2.0.x branch): link.

commented

OK... So after re-adding the macOS Debug testing file you added to your version of the repo, I got this log file to give you:
videolan.log
(That's the one from the tmp directory)

Basically, after looking it up, it has to do with one of two things:

  1. The way the dylibs are loaded on macOS (and an incorrect path being specified)
    OR
  2. The dynamic linking of the dylibs through VLC (which is apparently still broken on macOS. See here for the issue on VLC's own site: https://code.videolan.org/videolan/LibVLCSharp/-/issues/365.

I am aware that the second issue revolves around the C# language. However, if it has an issue i C#, it could possibly have it in whatever binding LibVLC or VLCj has, correct?

Anyway, these are my findings, thus far. I will continue to crank away at this for a while until I run out of steam or until it gets fixed.

If anyone (and I mean ANYONE) has any ideas, or possible solutions, please let me know! ๐Ÿ˜„

Thanks,

//TheModdersDen

commented

just to be sure, can you test if loading a older watermedia version only causes the issue? try with 1.3.x and 2.0.0. if the issue is still present then maybe issue is on your PC (or is a old undiscovered bug)

commented

Alright, so interesting... I had tried versions after the first release on Modrinth (all of which resulted in the same behavior).

Now, however, I am getting this as the output, after trying the first version of WaterMedia on Modrinth (v1.3.42):
https://mclo.gs/NC76A5Y

I guess it might be something with WaterMedia failing to load the "loading GIF" as I've come across this message before:

Caused by: java.lang.IllegalStateException: Failed loading gif from WaterMedia resources

(Or at least similar messages, if I'm not mistaken, and my memory is sane). ๐Ÿ˜„

Thanks again,

//TheModdersDen

commented

Let me know if there's anything else I can do on my end... I have tried various versions of 1.x and 2.x now, and have gotten the latest result (only on the first version). The rest of my attempts resulted in the black screen.


EDIT: I have tested some more versions, and think that this line might be at the heart of the issue:
https://mclo.gs/4VGW0W4

[16:52:27] [main/WARN]: Reference map 'watermedia.mixin-refmap.json' for watermedia.mixin.json could not be read. If this is a development environment you can ignore this message

As I am not in a development environment, perhaps this is where things are going amiss?

commented

Do note: I have VLC installed in my /Applications/ folder on my macOS installation. Proof:
VLC install location

I also have this version of VLC:
VLC 3 version

commented

GREAT NEWS!!! It appears as if I found a fix! Apparently, the mod was having an issue with Mixins, as I suspected, and (after tinkering for probably WAY too long), I got it working. The "victory" commit can be found here:
link.

If you want, @SrRapero720, I think it's ready to start a PR and merge with the main code base, with your permission and "green check mark," of course. ๐Ÿ˜„

Thanks again,

//TheModdersDen

commented

thats a fix for master branch, but fabric entrypoint is well writed on 2.x branch... so i don't understand what is the fix

commented

thats a fix for master branch, but fabric entrypoint is well writed on 2.x branch... so i don't understand what is the fix

Yes, I'm aware.

While I was doing a lot of testing, between the 1.x versions, 2.x versions, and versions that I compiled myself, I noticed that I would encounter mixin errors with the mod.

After inspecting the various branches and their code, the only functional branch that I could get a fix for was the master branch. I tried for hours to fix the 2.x branch, but had no success.

So, that's why I have a fix for the master branch. I know that's not ideal, but that's the only thing I've found that works.

Thanks again,

//TheModdersDen

EDIT:

TL;DR:
The Fabric entrypoint in 2.X was written in a manner that the mixins weren't compiling/running properly. I have zero experience with mixins, but was able to piece together some code to fix it on the master branch.

I last did modding in-depth in this manner for Minecraft 1.7.10, so I'm still getting my bearings straight when it comes to a lot of stuff like Architectury and Fabric.

Back in my day, we didn't have the complexities of mixins and multiple modloaders. Then again, we didn't have the ability to load 147 mods smoothly using Fabric either...

So... Yeah... That's where I'm coming from.

commented

try this release of 2.x
removed mixins basically https://github.com/SrRapero720/watermedia/releases/tag/2.0.27-pre1

commented

Sorry for the late response, I had family in town for the holidays and was seeing them off.

I'd be down to try a pre-release of sorts... :)

commented

This issue was fixed (finally) few weeks ago. i just forgot about the existance of this issue
but yeah, no more black screens on mac + fabric