1.0.0: Errors ...

Status
Not open for further replies.

Sen-Mithrarin

New Member
Jul 29, 2019
129
0
0
Version:
1.0.0

What is the bug:
Well, to be honest : "What is the bug?" seems not to really fit this post, cause there are many programming errors wich can be avoided. So, the following are not "bugs" but rather "programmers not able to write clean code".

Let's start with the launcher itself :

I set up a fresh clean install of FTB. Then i renamed the folder created by the first run and started the launcher again. And what i got is this :
Code:
[02:06:20] [DEBUG] FileOutputStream.open:-2->Main.main:137: Could not create LogWriters.: java.io.FileNotFoundException: E:\minecraft\ftb\FTBLauncherLog.txt (Das System kann den angegebenen Pfad nicht finden)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(Unknown Source)
java.io.FileOutputStream.<init>(Unknown Source)
net.ftb.log.LogWriter.<init>(LogWriter.java:31)
net.ftb.main.Main.main(Main.java:133)
[02:06:20] [ERROR] Main.main:138: Check your FTB installation location's write access. Launch button is disabled until installation location is fixed.
Ok, STOP right there. This is so obvious a beginners mistake when new to Java File-I/O. When you are new to Java the first rule you learn is : DON'T use Exceptions for program-flow-control.
What I guess is in the code:
Code:
try{
new FileOutputStream()
}
catch(Exception e)
{
log(e)
createNewFolder()
}
// go on as there was never an error
What there should be is some like this :
Code:
if(!file.exsists())
{
createNewFolder
}
// go on ...
As a Java programmer myself I first *facepalm* and then tried to understand : How can someone did such a good work make such beginners mistakes ?
I mean : is it really that hard to implement a correct if()-check rather than just using a lazy try-catch ? Such things should never happen and just show : bad code.

Ok, next error : download assets. In my case : I use Kaspersky and the built-in Anti-Banner. Sadly in the links to the assets it matches the phrase "/ad/" and blocks it cause it thinks this is spam/advertisement. Easy solve : turning off the Anti-Banner for downloading. Ok, this is Mojangs fault, but as the log shows you catch this Exception for making log-output. Why you just don't abort downloading and inform the user with a dialog that there was a problem downloading the assets and offer a manual download like a zip-pack ? This would solve so many wrong bug requests as users get informed there is something wrong on there end and not with MC itself. You could do it better than Mojang, so just do it.

Third error in current launcher : bad selection detection. If you just select the new pack and hit the launch-button it happens that the pack.json doesn't get installed correctly and so vanilla launches. To test it I removed again anything related to MC and FTB and just double-clicked on the pack. It work the first time even without hitting "force update". I guess a simple fix could be checking whats currently selected in the list. Again : a simple if() rather than a crappy try-catch.


Well, thats the launcher itself, no lets go on to the pack :

As launching the clean setup you get so much Exceptions, just ridiculous. To qoute Dire:
The pack isn't out yet cause we currently beta-testing it.
Again I have to ask : did anyone just read the log-output and tried to solve the problems ? Seems like : nope, we don't care.
Ok, I can agree with this cause the Exceptions thrown are not FTB-related but errors in the mods themselfs. But allow me to ask : why no-one talked to the mod-authors and said : Hey budy, there some errors with you mod, see the logs and try to fix.
It starts from simple file-errors like this :
Code:
[01:52:24] [Client thread/ERROR] [FML]: The mcmod.info file in IC2NuclearControl-2.0.0b.jar cannot be parsed as valid JSON. It will be ignored
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 4 column 4
    at com.google.gson.internal.Streams.parse(Streams.java:56) ~[Streams.class:?]
    at com.google.gson.JsonParser.parse(JsonParser.java:84) ~[JsonParser.class:?]
    at com.google.gson.JsonParser.parse(JsonParser.java:59) ~[JsonParser.class:?]
    at cpw.mods.fml.common.MetadataCollection.from(MetadataCollection.java:55) [MetadataCollection.class:?]
    at cpw.mods.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:53) [JarDiscoverer.class:?]
    at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42) [ContainerType.class:?]
    at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71) [ModCandidate.class:?]
    at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:127) [ModDiscoverer.class:?]
    at cpw.mods.fml.common.Loader.identifyMods(Loader.java:347) [Loader.class:?]
    at cpw.mods.fml.common.Loader.loadMods(Loader.java:468) [Loader.class:?]
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480) [bao.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867) [bao.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_20]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_20]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_20]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated object at line 4 column 4
    at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) ~[JsonReader.class:?]
    at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:480) ~[JsonReader.class:?]
    at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403) ~[JsonReader.class:?]
    at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:666) ~[TypeAdapters$25.class:?]
    at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:659) ~[TypeAdapters$25.class:?]
    at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:642) ~[TypeAdapters$25.class:?]
    at com.google.gson.internal.Streams.parse(Streams.java:44) ~[Streams.class:?]
    ... 19 more
Goes over some "random mod incompatibles" wich should noticed and get fixed when "beta-testing" a pack ... and ends at almost "destroyed" mods with missings textures and some more lazy code.

I don't know if it's just a "fun sport" or a "mission objective to accomplish", but it seems no mod-author thinks about adding a correct mcmod.info or even a correct MC-Version Annotation. Ok, it works wich just says : hey, don't bother, it works anyways. But the need for these files wasn't added just to annoy mod-authors but to check mods before loading them.

For instance : some mods using git-content to check for new versions like COFH. Why no-one talked to them : Hey, there is something wrong with your version-checker ?
I guess the correct question should be : why those mod-authors are not able to test there mods and check themselfs they work correctly ? It's just sad to see that someone making such good work fails at such simple tasks.

There are even more funny things I read like "no class should be in net.minecraft.src > fml".
Wait a second : cpw set this rule and than its own code gets such an error ? What's missing here ? Not checking for it's own code ? Not able to just use a different package ? Creating a rule and not following it self is just ... I don't even know how to name it.


I could go on just counting down the errors a "clean install" throws, but after this long text my browser starts to lag while typing.

So, here you have the logs. Please read them fully and try to fix these avoidable Exceptions. And please : talk to the mod-authors and try to develop a solution together.

https://gist.github.com/anonymous/ea479c68881bda66a665
https://gist.github.com/anonymous/2a94ca3fb5432b13feee
https://gist.github.com/anonymous/3a69954d333f4cd4d722
https://gist.github.com/anonymous/da49047d68e3f0a3c436
https://gist.github.com/anonymous/e4135c1f2bfee3815672

Mod & Version:
FTB-1.4.4 MC-1.7.10 DW20-1.0.0

Paste.feed-the-beast.com log:


Can it be repeated:
Well, obviously : sure, they can repeated anytimes.

Known Fix:
Clean up the code, track down thrown Exceptions and fix them as every single Exception thrown is avoidable by correct coding.
 

progwml6

Launcher Dev
Launcher Developer
Mod Developer
Nov 15, 2013
51
31
53
if you have bugs with the launcher itself please file those on github or the support site.
 

Sen-Mithrarin

New Member
Jul 29, 2019
129
0
0
Well, in order to keep my reply polite : the "problems" i mentioned are not "bugs" in the normal term of use but rather "beginners grade" programming-errors made by "professionals".
 

totalhamman

New Member
Jul 29, 2019
26
0
0
In an effort to stay polite:

1) You are posting arrogant opinions of mod-makers code in the absolute WRONG place to do so. This forum is for bugs with the modpack itself, not opinions on individual mods code. The proper place to report those is individually in each mods individual forum / issue tracker / github issues page.

2) You are disparaging people who spend many hours of their personal time to craft mods for people to use. Their monetary return for this is minimal at best, non-existent in a lot of cases which makes your post even more offensive.

3) You are intentionally being as non-polite as you can without swearing. While else would you post on a public forum and use extremely arrogant language as you have?
 

Sen-Mithrarin

New Member
Jul 29, 2019
129
0
0
Uhm, but you do know that your post is even more useless than mine, do you ?
You said that this is for bug-reporting only but instead you judging me ? I guess THAT is really offensive. Also it shows you don't understood my post.

If you have any problem-related tipps how I could fix theses (obviously coding-) errors I will try it, but unless I just can inform the one who made this that something went wrong.

Btw : yes, for me is the one who puts such a pack together responsible to ensure it works without errors by testing it correctly. "Correctly testing" also includes reporting errors to the relative responsives, in this case the mod-coders.
Also : this thread is surely not meant to be like one of those "you suxx, I hate you, I punch you in the face" but rather to give a second mind of the view of another programmer. As a user and therefor a Minecraft-player I'm pretty impressed by what all those people just done. But as a Java-programmer I'm upset about the made errors, the lack of testing and the missing communication between the mod-devs and the pack creators.
And as I mentioned : some (or even all) of the errors are just tiny "beginners grade" errors wich shouldn't be made by someone who is so advanced he could write a mod for a game, even if some rely to Mojang itself. But reading all those "patched"-logs it seems that there is a way these "bugs" can be corrected by a 3rd party, and I'm just sad about that the one who did this just used it to insert logging instead of fixing the actual problem.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Thank you for the critical feedback in an environment where many of the mod devs out there are beginners and this is a way to learn. Every person here creating mods, packs, and other content do so for free and/or as a hobby. While critical feedback is always a welcome verbose from anyone, the way this article goes about it is not in the proper context. You can either choose to a) approach and discuss the coding issues with the mod authors or b) create a set of tutorials for others to follow.

I review a massive amount of java code every week and some of it is just not pretty. I understand many of those people are literally just learning to program and do not have any semblance of knowledge as to what a "good standard" entails. I don't post how bad their mistakes are, and I usually warn/timeout those that do so in such a manner as this (and usually it is far worse than this.)

However, since this is not a bug report and is a post on the subjective standards of programming I am locking this thread from further replies. We do not dictate how any mod author writes code in this community, period.
 
Last edited:
Status
Not open for further replies.