crashlog 101

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Yusunoha

New Member
Jul 29, 2019
6,440
-4
0
I've always been wondering... how do you read a crashlog? sometimes I'm able to understand what's causing the crash, but other times I'm just looking at the log going like "..... yup, something broke"

so I've been wondering, how should you read a crashlog?
for example, where do you start if you want to figure out a crash through a crashlog? what do certain words or phrases mean? what is the crashlog trying to tell you?

perhaps if someone who's good at reading crashlogs could enlighten me, and perhaps others aswell...
 
  • Like
Reactions: RedBoss

trajing

New Member
Jul 29, 2019
3,091
-14
1
Typically it'll mention the mod or block that caused the crash. If you get something that mentions 'Tesseract', TE is probably involved. The other day on IRC someone was getting a render error causing a crash. However, sometimes it isn't clear what block exactly is causing the error. It's clear what type of block, but it doesn't show the coordinates.
 
  • Like
Reactions: RealSketch

Narc

New Member
Jul 29, 2019
259
0
0
There's no generic crash log: each one is different, and depends entirely on what generated it and how; unless you're the one who wrote the code, the best you can do is guess.

That said, guessing can get you a fair way forward, especially when methods are named sanely. Take this example, for instance -- the stack trace (in Java, this is always latest-first) tells what happened in almost plain English. I'll admit to have cheated a bit and read the Logistics Pipes source to find out the ultimate source of the crash, but everything leading up to it was sufficiently straightforward.

The worst crashes, from this point of view, are the ones that happen wholly inside Minecraft's code due to some data that was mis-initialized or just plain broken. There's usually no indication of what got Minecraft in that broken state to begin with, so you end up with threads like this. In those cases, your only defense is to find someone who's seen it before (and be fairly certain it's the same crash!); sometimes you can take educated guesses, but it doesn't get much better than "it could possibly be X".

Well, okay, there is one other thing -- if a lot of people use OpenEye, and get the same crash on many different mod packs, you can eventually get enough statistical data to be able to point a finger at a specific mod (by eliminating all the other mods that were only present in some of the reports of the same crash). I've yet to see that actually work, though -- most mod packs are too similar to be able to exclude enough mods, and most crashes are of the simpler variety as in my second paragraph. Nonetheless, it's technically possible.


As to your more specific questions:

for example, where do you start if you want to figure out a crash through a crashlog?
Typically, start with the stack trace. That tells you what the exception was, where it happened, and what called what to get to that point.

what do certain words or phrases mean? what is the crashlog trying to tell you?
Uh, how much programming do you know? I'll try to be very basic:
- Java programs are composed of functions, which contain specific bits of behaviour, and may call other functions.
- As functions call into other functions, the callers get put into a call stack, so the Java virtual machine knows where to return when the callees finish their operation.
- As part of their behaviour, functions operate on data, but some operations may raise errors (e.g. because the data doesn't exist).
- Functions can catch the raised errors, but if they don't, the JVM tries to find error handlers higher in the call stack ("maybe the one who called you knows how to deal with this").
- If nobody handles it all the way up to the Minecraft launcher, then the game is halted, a crash log is generated, and you have to launch the game again.

Important key phrases to look out for:
- [whatever]Exception (e.g. java.util.ConcurrentModificationException) -- what went wrong
- Stacktrace -- how we got there

Occasionally, there may be useful information in the entity dump, and there's always the possibility of spotting a couple of mods that really don't work well together in the mod list, but for the general case, this is all you have that's likely to be useful. This is probably why that's the first section of the crash report.
 

belgabor

New Member
Jul 29, 2019
574
0
0
Great explanation. Note though that even if a crashlog seems to point at a specific mod a different one might still be the culprit. For example DartCraft recently had a bug in the worldgen code where accidentally a block was generated using the default ID instead of the configured one. The default ID in the generic FTB configs is the Witchery leech chest, so the resulting crash occured in Witchery functions (bug is fixed now).