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

Windows 10 Creators Edition - WindowsAnsiOutputStream #686

Closed
WASasquatch opened this issue May 10, 2017 · 26 comments
Closed

Windows 10 Creators Edition - WindowsAnsiOutputStream #686

WASasquatch opened this issue May 10, 2017 · 26 comments
Assignees
Labels
resolution: cannot reproduce Paper team is unable to replicate the issue.

Comments

@WASasquatch
Copy link

WASasquatch commented May 10, 2017

Description of issue:

When the server starts the there is a error regarding Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream which, naturally kills color in the console. The only time I've seen this was with Spigot 1.11 on Windows Server 2008.

Plugin list:

None.

Paper build number:

git-Paper-"6c3faf6" (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)

What behaviour is expected:

ANSI Color Support

What behaviour is observed:

No ANSI Color Support

Steps/models to reproduce:

Run freshly compiled paperclip.jar from Debian on Windows 10 Creators Edition

Crash, Stacktrace

https://pastebin.com/XmVjXQCK

@WASasquatch WASasquatch changed the title Windows 10 Creator Edition - WindowsAnsiOutputStream Windows 10 Creators Edition - WindowsAnsiOutputStream May 10, 2017
@zachbr
Copy link
Contributor

zachbr commented May 10, 2017

colors

The only place I can reproduce this issue is in Git Bash's bundled MinGW, but every other console worked fine, Window's Conhost, ConEmu, etc. If you are running it from MinGW (such as GIt Bash) you should take it up with them.

And verify your system meets the requirements listed for basic color support with CraftBukkit on Windows.
Make sure you have the Visual C++ 2008 Redistributable installed. x64, x86

@mikroskeem
Copy link
Contributor

Upstream (jansi/jline to be specific) issue.

I don't have Windows machine nearby to try, but this might help

@WASasquatch
Copy link
Author

WASasquatch commented May 11, 2017 via email

@electronicboy
Copy link
Member

Can't really advise all too much on windows as I don't use it (and would prefer to not have to boot up my VM), however; what is the chance that you've got the bash support for windows installed, as well as git bash? output of which bash?

That class that it's complaining about is also in the jar I've just built, so maybe try running the paper jar from inside the cache folder and seeing if the exception is still thrown?

@WASasquatch
Copy link
Author

WASasquatch commented May 11, 2017

I tried building in Git Bash, as well as Babun's bash. Both had the same issue with empty NMS classes dir.

I am a Microsoft employee and past beta tester and still help with issues so Windows is my host machine, while I do prefer *NIX.

Git Bash

    which bash
    /usr/bin/bash

Babun

    which bash                                                                             ~
    /usr/bin/bash

@zachbr
Copy link
Contributor

zachbr commented May 11, 2017

I will try starting up a from scratch Windows VM sometime soon, but I cannot reproduce any of the issues you're reporting across any of my W10 devices.

@zachbr zachbr self-assigned this May 11, 2017
@WASasquatch
Copy link
Author

WASasquatch commented May 11, 2017 via email

@zachbr
Copy link
Contributor

zachbr commented May 11, 2017

Yes, I specifically pushed both systems to that version in order to test some of the latest WSL developments

@zachbr
Copy link
Contributor

zachbr commented May 11, 2017

@WASasquatch For testing purposes can you confirm your windows version from winver.exe, your method of running paperclip (powershell, cmd, WSL, mingw32 (git bash)), and anything else you deem important that I know when trying to reproduce your issue?

We do specifically target UTF-8 encoding across all platforms when building the paperclip jars so I don't believe that is the issue either, but if you disagree feel free to let me know your build environment as well (since I see you're compiling from scratch).

I just don't want to miss something glaring.

@WASasquatch
Copy link
Author

WASasquatch commented May 12, 2017

I compiled in Debian 8.7 (BASH).

I am running in cmd.exe on Windows and a simple batch file (as I see no reason to run in anything else). If I do run under Babun or something, which is extra startup steps, I have color just fine.

    @echo off
    java -jar paperclip.jar
    pause

http://prntscr.com/f72zq8

All for testing purposes so no real configuration, all default settings bare startup procedure.

Update: This may be souly related to windows as a tool I made to check my latency (I use 4G internet) is also not printing colors based on the latency timing (to show if it's a bad or good response). And it's compiled from byte code.

Than again maybe not. I tried running the server in BASH (under Windows) and while it didn't spill it's whole beans, it was still unable to instantiate the class.

    { Server }  » ./start                                     /cygdrive/c/Users/User/paperclip/Server
    Loading libraries, please wait...
    2017-05-12 13:32:49,621 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [13:32:53 INFO]: Starting minecraft server version 1.11.2
    [13:32:53 INFO]: Loading properties
    ...

@electronicboy
Copy link
Member

electronicboy commented May 13, 2017

Figured I'd chime back in on this after the windows update decided to break my touchpad I almost threw it out the window, but;

git bash wouldn't let me run the paper build scripts as it would cause some error and cause bash and sh to both throw some exception and create a dump file... Beyond that, running a build from the CI server worked fine

I did however notice that you're running a somewhat later release than what I have on my machine, might come through now that I've just changed it to the fast release, however, that class that is throwing the exception relies on JNI, Bukkits modified version of the log4js ConsoleAppender also appears to squashes any exception thrown while attempting to create an instance of that:

Paper-Server/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java: LOGGER.warn("Unable to instantiate {}", JANSI_CLASS);
I would say that, even moreso based upon what you've said, that MS has changed something that is causing jansi to break

@zachbr
Copy link
Contributor

zachbr commented May 13, 2017

On a brand new install in a VM, running on Windows 10 1703 (build 15063.0) I can just go get the JRE, install it, download the jar and run it and have colors working. As seen here:
https://zbob750.keybase.pub/paper/github/issues/686/clean-install-and-run-in-vm.webm

I then went and updated that VM as far as it'd let me (to match your build number precisely, as well as that of my main PC) but I'm sad to say it didn't change anything.

updated-still-colors

So then I thought maybe it's an issue specific to Java x64 builds perhaps, but unfortunately no, it still works.

updated-x64-java-still-colors

The only thing I can think of is that Microsoft botched the update process somehow for certain users. As I said, I cannot reproduce this behavior on my main system, but @electronicboy seems to be having weird encoding issues of his own.

With all that in mind, I see no reason to suspect this is related to Paper or that it is even possible for us to fix this. I will leave this open a while longer, in case I am mistaken.

@WASasquatch
Copy link
Author

WASasquatch commented May 14, 2017 via email

@zachbr
Copy link
Contributor

zachbr commented May 14, 2017

As far as anyone can tell this is specific to your system and your system alone.
If you find some way to break my Windows VM so that it behaves the same way, let me know and we'll dig. As it stands I cannot reproduce this behavior on my PCs that have gone through the upgrade, or on a clean install.
There's nothing here for me to look at.

@zachbr zachbr closed this as completed May 14, 2017
@zachbr zachbr added the resolution: cannot reproduce Paper team is unable to replicate the issue. label May 14, 2017
@zachbr
Copy link
Contributor

zachbr commented May 14, 2017

The ONLY thing I can think of is try running the paper server component directly from ~/cache/patched_1.11.2.jar and see if that acts any differently.

@WASasquatch
Copy link
Author

WASasquatch commented May 14, 2017 via email

@electronicboy
Copy link
Member

That's jansi throwing an exception and bukkit is squashing it, you could modify the class file I noted above to remove the squelching of the message and see what it is exactly being thrown.

paperclip also twiddles with the classloader, which shouldn't but can cause odd effects in certain cases e.g. a plugin for bukkit is designed in a way that paperclips twiddling breaks something, this is unlikely to be such a case.

@WASasquatch
Copy link
Author

I'm just so confused. I'll try seeing if I can't get the a better stack trace, though as noticed in the original post it did initially come with one, wasn't just the warning: https://pastebin.com/XmVjXQCK

@electronicboy
Copy link
Member

Biggest guess would be that you've not got the VS c++ 2008 redistributable installed on your system and so jansi is failing to co-operate, either that or your kernel library is busted/changed.

@WASasquatch
Copy link
Author

WASasquatch commented May 14, 2017 via email

@electronicboy
Copy link
Member

paper doesn't make any modifications whatsoever to that area of code. Log file from a spigot install on the same OS install? Did you try running the jar in the cache folder directly?

@WASasquatch
Copy link
Author

WASasquatch commented May 14, 2017

Yeah it's the same current warning with paper-1.11.2.jar

Same goes for paperclip-1.11.2.jar in work folder, though I assumed that's the un-renamed final?

And if you want to email me a RSA auth string and try on an account (as I am not as familiar with debugging these compilers/builders) I am willing to do that. Just a testing dedi I picked up on a sale.

@DenWav
Copy link
Member

DenWav commented May 14, 2017

paperclip-1.11.2.jar and paper-1.11.2.jar are not the same thing.

I can also confirm that I cannot reproduce this.

@WASasquatch
Copy link
Author

WASasquatch commented May 15, 2017 via email

@DenWav
Copy link
Member

DenWav commented May 15, 2017

Please re-open if you are able to determine a way to reproduce the issue from a clean install of Windows, otherwise no one has been able to reproduce this issue in any way, and your aggressiveness and bad attitude is not helping the situation.

@zachbr
Copy link
Contributor

zachbr commented May 15, 2017

You're making a lot of noise about an issue that not a single person on any of my teams can reproduce, or anyone other than you actually.

It's starting to get downright rude and I'm done sitting here reading about it.

Feel free to submit a PR resolving this issue if it's such a big deal. Thanks.

@PaperMC PaperMC locked and limited conversation to collaborators May 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: cannot reproduce Paper team is unable to replicate the issue.
Projects
None yet
Development

No branches or pull requests

5 participants