• 12

    posted a message on Crash Reports 101


    Crash Reports 101



    Table of Contents
    1. Part 1: Introduction
    2. Part 2: Getting a crash report
    3. Part 3: Reading the crash report
    4. Part 4: Common crashes
    5. Part 5: Posting Guidelines


    Part 1Introduction[/anchor]

    Note: This topic is not for you to post your crash reports. This is for you to understand and hopefully fix your crashes yourself. As a final options you should always post the crash to the mod responsible for the crash (the final section of the topic suggests what should be included). I will not be fixing your crashes

    Why are you doing this?




    When playing minecraft, occasionally it will close unexpectedly and crash. The most common cause of this behaviour is due to mods (bugs in the game can also cause crashes). Many people will encounter a crash then instantly post on the last recent mod installed topic "This made my game crash". As a modder I cannot stress how annoying this behaviour is, especially when an answer can be obtained by this person by reading and understanding why it happened. Now I know that a great majority of people are not very technically minded, that's ok. It is for these people I have made this post for.

    I will try and keep technical jargon at a minimum and explain any that is unavoidable. Hopefully this post may take the burden of some modders who get bogged down with crash report posts so they can get back to doing what they love, creating mods for the community. Furthermore I will try and keep things a bit more light hearted as well as providing random "Brotips"

    Why does Minecraft crash?

    In my experience there are a couple of main reasons minecraft crashes

    1. Improper installation of a mod or API
    2. Incompatibilities between mods
    3. Some sort of bug in a mod
    4. Pre-existing bug in minecraft

    There can be other "fringe" cases of crashes (eg faulty hardware or not enough RAM) but the above will cover 99% of crashes encountered.

    Now I just want to say, please don't "blame" anyone for a crash. If it is due to an error in the modder coding (eg 2 or 3) cut them some slack. Most modders are not professional coders, they make mods for fun. If it is due to 1 (i.e. you made a mistake) just take a breath and re-read the installation instructions for both the mod and any APIs (as well as the rest of this guide).

    Minecraft didn't crash, it only blackscreened. What Do I do?

    I want to start with the TL;DR version black screen = crash.

    Sometimes rather than coming up with a nice little crash report, Minecraft will just show a black screen (Possibly flashing up "Saving Chunks" first). This is also a crash, and you should follow Part 2 of this guide. Crashes are generally caused by either exceptions or errors. These may or may not be caught by Minecraft's internal error logger. If the error logger does catch it, you will be displayed with the minecraft crash screen, if not just a black screen. There are ways to obtain the crash report as detailed in Part 2 below.

    The META-INF folder

    I just want to digress a bit to discuss what the META-INF folder is. Essentially all you need to know is this needs to be deleted if you want to mod minecraft. If you don't really care why then feel free to move to the next section. If you are curious, read on.

    A java jar file is just a zip file with an optional META-INF folder. Because jars are not just a collection of .class files and resources, extra information is sometimes required (or desired) by application developers. The META-INF folder is a place to store package and extension configuration data, including security, versioning, extension and services. In Minecraft the security is the reason it must be deleted. The META-INF contains a file called "MAJONG_C.SF". This file contains a little code for each file within the jar which can be used to check if any file has been modified or corrupted. Therefore this file must be deleted to prevent the security check if you want to edit any of the files within the jar.

    Now this is a very basic description of the META-INF folder as I was trying to make it as easy to understand as possible. If you are still interested look up the .jar file documentation on the java website


    Part 2Getting a Crash Report[/anchor]
    Help! I don't know what to do




    Ok so you have identified that minecraft has crashed. How do we get the crash report?

    Minecraft output

    If you are lucky a nice screen would have popped up with the crash report right in front, if this is the case move on to Part 3.

    The output should look something like this

    The part you need is in the white box.

    If no crash is displayed on screen there are ways of obtaining the crash report, so use one of the methods detailed below.

    Crash txt files

    Both Modloader and Minecraft Forge try and output any crash reports into folders. This should be the 1st place to check. Now you do have to be carefully because occasionally I get people posting the contents of one of these files that doesn't actually contain the crash log (i.e. not helpful). Don't worry if this is the case, I will detail in Part 3 how to read the crash report meaning you will know if you have the wrong file. If this is the case, try another method described below.

    Note: When I refer to directories in this section, everything is relative to the .minecraft directory. I will assume if you are installing mods you already know how to find it (It is dependent on your operating system)

    BroTip: In windows the directory can be easily found by pressing the windows key + 'R' and typing "%AppData" (without the "'s) in the run dialog and pressing Enter. This should bring up an explorer window withe the .minecraft directory somewhere near the top.

    Modloader
    Modloader generally tries to output it's crash reports in a file called "Modloader.txt". The file should be located in the ".minecraft" directory. This will only be from the last run of minecraft (i.e overwritten on each run). This obviously will only be present if you have modloader installed (Minecraft Forge has a different way of reporting crashes).


    BroTip: If posting from the Modloader.txt file make sure it actually contains a crash, I couldn't tell you how many times people post me the contents of their Modloader.txt file when there is no crash in there.

    Minecraft Forge
    There is a folder that Minecraft Forge creates devoted to crash logs. The folder is located in the .minecraft directory and is called "crash-reports". Each crash will display the date/time of the crash as well as the describing if the crash was in the client or server. Another thing that should be mentioned about this file is that it is set out differently to other crash logs. The Forge crash logs will have the stack trace at the top and the header information below it (they also contain a "witty" comment).

    BroTip: Try to avoid opening the forge crash logs with notepad on windows. Notepad does not recognise the newline character used (because it is quite crappy). Try opening it with wordpad instead (right click, go to open with and selected wordpad or "other programs" and find it).


    Command Line

    Now because you are hear I am going to assume you are not very technically minded, therefore using the command line may scare you a little. I want to start with, don't be scared, the command line is a very powerful tool. Of course there are more "user friendly" ways, but the command line is quick and does not require downloading on any extra files. Now these do depend on your operating system so only read the relevant one below

    Windows

    1. Open the command prompt by pressing windows key + 'R' and typing cmd in the run dialog (and press enter)
    2. Type "cd %AppData%" and press enter
    3. Type "cd .minecraft" and press enter
    4. Enter the following command
    5. java -Xms1G -Xmx1G -cp Minecraft.exe net.minecraft.LauncherFrame


      Brotip This can be pasted by right clicking on the command line window and pressing paste
    6. Login, start minecraft & re-create the crash. The crash should be displayed in the command line window.
    7. Highlight the crash report in the window, right click and press copy.

    Note: for this to work you must have java as an environment variable. Read more here

    OSX
    Warning I do not have an Mac computer so I have not tested this and do not know how user friendly the method is. These instructions are from the Minecraft wiki page

    • Go to Macintosh HD/Applications/Utilities and open Console.app
    • Run minecraft and when it crashes the java log will be added to the console, which you can then select and copy

    Linux

    • Open a terminal (on distributions such as Ubuntu/Linux Mint, this is done with Ctrl + Alt + T)
    • Run
    • java -Xms512m -Xmx1024m -jar minecraft.jar 


    • Watch the console output. You can select and copy it after making the game crash.

    Note: Your current directory MUST be wherever the minecraft.jar file is. If you are using linux I am going to assume you know at least basic command line functions.

    MC Patcher

    MC Patcher can be a great tool for obtaining crash reports (personally I don't like it for it's HD patching capabilities because i don't like it's methods but that's just me). Start by downloading mcpatcher from here

    This is what the default interface should look like.



    For this purpose I recommend unticking all boxes before proceeding and DO NOT hit patch. Hitting patch will make MCPatcher run through it's patching routine, problem is this has been known to interfere with the proper running of some mods including Minecraft Forge. Pressing "Test Minecraft" (Red Arrow) will launch minecraft in offline mode. Recreate the crash. The output will be displayed in the "log" tab (Red arrow in the picture below)



    Now the great thing about mcpatcher is that it actually tries to give you the deobscurificated class/method/field names in the crash report. This can be an unbelievable help to the author of the mod if you have found a new bug or incompatibility.

    Bat script

    Windows Only

    I have also developed a bat script to assist in the gathering of crash logs. Unfortunately I found a bug in it. I will correct the bug and upload it at a later date.


    Part 3Reading the Crash Report[/anchor]
    Ok so you have successfully retrieved your crash report so now we blindly post it on the last mod's forum page right?




    Wrong

    Doing this could result in the modder (or others) politely telling you the problem, the modder not responding (they may be away or busy) or a very grumpy response (modder may have had a hard day and you are the 10th person posting the exact same report). In any case, most of the time by simply reading and understanding the error report you can solve the problem yourself much quicker and easier then posting and waiting for a response. Sometimes posting is unavoidable (maybe you found a new bug) but it really should be the last resort, not the first.

    Now this section actually has a duel purpose, I am writing this both for users who receive crash reports to at least try and diagnose their problems but also for mod makes or just general good guys who are trying to help others with their crashes.

    A crash report generally contains 2 main elements. Now these don't really have formal names, but I generally refer to them as either the header or the stack trace. Also depending how you got the crash log there may also be other information that has been output that was likely left over mod debugging code, this can generally be ignored (although may be useful for the mod author).

    Please note in this section I may interchange the word error and exception. There are important differences between these but I don't think we really need to get bogged down by that right now.

    Header

    The header generally appears at the top of the crash report, it will generally contain things like your version of minecraft as well as the mods you have installed. Just a quick note on this, if you got your crash report from the forge "crash-reports" directory, the header will appear at the bottom and be set out slightly different. It will generally contain the same information just set out differently.

    Here is an example of a header from someone who posted a crash report on my mod topic that uses Minecraft Forge.

    Minecraft has crashed!
    ----------------------

    Minecraft has stopped running because it encountered a problem; Unexpected error
    This error has been saved to /Users/********/Library/Application Support/minecraft/crash-reports/crash-2012-09-24_10.39.53-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.



    --- BEGIN ERROR REPORT e8848218 --------
    Generated 9/24/12 10:39 AM

    - Minecraft Version: 1.3.2
    - Operating System: Mac OS X (x86_64) version 10.7.4
    - Java Version: 1.6.0_33, Apple Inc.
    - Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Apple Inc.
    - Memory: 496632856 bytes (473 MB) / 534708224 bytes (509 MB) up to 1065025536 bytes (1015 MB)
    - JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M
    - FML: FML v3.0.196.366 Minecraft Forge 4.1.1.251 4 mods loaded, 4 mods active
    FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    MB_Core [Mine & Blade: Core] ([1.3.2] Mine & Blade - Core - Preview 1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    MB_Armoury [Mine & Blade: Armoury] ([1.3.2] Mine & Blade - Armoury - Preview 1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    - LWJGL: 2.4.2
    - OpenGL: ATI Radeon HD 4670 OpenGL Engine GL version 2.1 ATI-7.18.18, ATI Technologies Inc.
    - Is Modded: Definitely; 'forge,fml'
    - Type: Client
    - Texture Pack: Default
    - Profiler Position: N/A (disabled)

    Now right away from this we can see that this user is using the 1.3.2 version of minecraft, has minecraft forge installed, is using Mac OS X (64 bit) is using java 1.6, has 2 mods other than Minecraft Forge/FML both of which were loaded successfully (in this case they are both 2 parts of the same mod). Furthermore because the author (me) is so awesome and put the version of minecraft required in the zip name, we can tell that he is using a mod that is designed for the minecraft version he is using. So far everything looks great.

    Brotip: If you are super worried about privacy and do not want to post your username, remove that section of the crash report or start it out like I did above.


    The Modloader styled headers are slightly different, However I do not have access to one on hand right now (I only mod with forge) but they also generally show similar information. Crashes may occur without either modloader or forge (jar mods only or bugs in the vanilla game), again these should show the minecraft version/java version/os etc but for obvious reasons will not show loaded mods.

    Stack Trace

    The stacktrace is the main technical part of the crash log.

    Here is an example (in this case it is the other half of the header posted in the above section)


    java.lang.NoClassDefFoundError: paulscode/sound/SoundSystem
    at ayq.a(SoundManager.java:235)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1937)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1885)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1821)
    at apq.e(SourceFile:142)
    at apq.a(SourceFile:116)
    at apn.a(SourceFile:64)
    at apn.d(SourceFile:112)
    at apn.m(SourceFile:100)
    at net.minecraft.client.Minecraft.l(Minecraft.java:1482)
    at net.minecraft.client.Minecraft.J(Minecraft.java:834)
    at net.minecraft.client.Minecraft.run(Minecraft.java:764)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: paulscode.sound.SoundSystem
    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 13 more
    Caused by: java.lang.NullPointerException
    at org.objectweb.asm.ClassReader.(Unknown Source)
    at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:27)
    at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167)
    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:118)
    ... 15 more
    --- END ERROR REPORT 99c3d4f5 ----------

    Stack traces are always printed from most recent to the least recent step in the trace (kind of like your browser history is ordered from most recently visited sight to the site you viseted a long time ago). The first line will describe the type of error. Take note of this, it can help you diagnose most of the problems. In the example above this is

    java.lang.NoClassDefFoundError: paulscode/sound/SoundSystem


    I will go into more detail about this error in the next section as it can be a common crash.

    Brotip: When dealing with this remember "Google is your friend" googling the 1st part of the error "java.lang.NoClassDefFoundError" can help you diagnose the general cause quite easily. Going to the 4th result (which is the java documentation tells us that this means "Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.". In other words something that minecraft or the mod thinks is there is not actually there. This could be improper installation or a corrupted file, but right away we know quite a bit about the error.


    Under the error name is a whole heap of at (classname).(method).... These can also be quite important to modders as it gives us a way to backtrack through the error to hopefully find the root of it. Again the most recent is at the top and least recent is at the bottom. This can be handy for those even without a background in programing. Sometimes you can find the culprit quite easily by scanning through the trace. For example if you see "mine_and_blade" in any part section, it is a good chance that the Mine & Blade mod is likely the source (In one way or another) of the crash.

    For those who have a bit of programing experience what the above trace tells us is that the method a in ayq class had an error, it was called by the a method in the Minecraft class which was called by the next one down and so forth.


    Now when we see a "Caused by" that means what we have is a "Chained Exception". This is important because it is often the case that one of the fundamental exceptions underlying the last encountered exception is the real culprit that must be appropriately addressed. So in other words, these secondary exceptions may be just as important. I can not tell you when they are and when they are not because it really depends on the particular error report.


    Part 4Causes of Common Crashes[/anchor]
    So now we have the crash report and we have a very basic understanding of it, what now?




    So now we have the crash report and we have a very basic understanding of it, what now?

    I thought I would start with a few common crashes that we might encounter. Again, if this can diagnose your problem we have saved you some time (you don't have to wait for a response) and we are allowing modders to continue modding rather than diagnose and solve Evey error.

    java.lang.NoClassDefFoundError: ...

    I wanted to start with the error I have been using in the examples above. Here is the full crash report

    --- BEGIN ERROR REPORT e8848218 --------
    Generated 9/24/12 10:39 AM

    - Minecraft Version: 1.3.2
    - Operating System: Mac OS X (x86_64) version 10.7.4
    - Java Version: 1.6.0_33, Apple Inc.
    - Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Apple Inc.
    - Memory: 496632856 bytes (473 MB) / 534708224 bytes (509 MB) up to 1065025536 bytes (1015 MB)
    - JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M
    - FML: FML v3.0.196.366 Minecraft Forge 4.1.1.251 4 mods loaded, 4 mods active
    FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    MB_Core [Mine & Blade: Core] ([1.3.2] Mine & Blade - Core - Preview 1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    MB_Armoury [Mine & Blade: Armoury] ([1.3.2] Mine & Blade - Armoury - Preview 1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    - LWJGL: 2.4.2
    - OpenGL: ATI Radeon HD 4670 OpenGL Engine GL version 2.1 ATI-7.18.18, ATI Technologies Inc.
    - Is Modded: Definitely; 'forge,fml'
    - Type: Client
    - Texture Pack: Default
    - Profiler Position: N/A (disabled)

    java.lang.NoClassDefFoundError: paulscode/sound/SoundSystem
    at ayq.a(SoundManager.java:235)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1937)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1885)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1821)
    at apq.e(SourceFile:142)
    at apq.a(SourceFile:116)
    at apn.a(SourceFile:64)
    at apn.d(SourceFile:112)
    at apn.m(SourceFile:100)
    at net.minecraft.client.Minecraft.l(Minecraft.java:1482)
    at net.minecraft.client.Minecraft.J(Minecraft.java:834)
    at net.minecraft.client.Minecraft.run(Minecraft.java:764)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: paulscode.sound.SoundSystem
    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 13 more
    Caused by: java.lang.NullPointerException
    at org.objectweb.asm.ClassReader.(Unknown Source)
    at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:27)
    at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167)
    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:118)
    ... 15 more
    --- END ERROR REPORT 99c3d4f5 ----------

    A NoClassDefFoundError is thrown whenever a java program can't find a particular class that it thinks should be there. The class will be displayed after the ':' as well as the package/folder it is contained in. In the example above that means that the class that cannot be found is called SoundSystem and it is located in the paulscode/sound package.

    There are 3 main reasons this can occur listed below

    1. You have not installed a required dependency. This is probably the most common cause of this error. Most of the time you can guess the missed dependency by looking at the classname/package. One common one I have encountered is when people forget to install PlayerAPI. In this case the crash will display java.lang.NoClassDefFoundError: PlayerBase. Always go back and make sure you have installed all dependencies for a mod
    2. The next most common reason I have seen for this error is due to a corrupted file. This happens occasionally while downloading mods. Just try and re-download the mod or API and try again.
    3. The mod auther has not packaged a particular class file. This will generally mean that part of name/package will have something to do with the mod. Now this is more rare than the other 2 above because if a modder does make a mistake such as this they will generally address it quite quickly. Also remember that your 1st assumption should be a corrupt download (2 above) so try to re-download the mod 1st.

    Now the error posted above was actually due to a corrupted download of Minecraft Forge. After the user re-downloaded Forge everything worked again.

    java.lang.NullPointerException: ...

    The dreaded null pointer exception. The most common cause of this doosy is due to modder error. It can also be caused by incompatible mods or knock on effects from other errors but generally its because of dodgy code. Null pointer exceptions occur when java tried to access an empty object. Because the object doesn't actually exist, java will have a cry and break down. Mostly this can't be fixed by anyone other than the author of the mod(s) in question.

    The only recommendations I can say for this is to

    1. Try and work out the mod causing the error by looking at the stack trace.
    2. Make sure you don't have mods that are known to be incompatible installed
    3. Check the forum page to see if anyone else has already posted this error, if so there may already be a solution in the works and there is little point in re-posting the same error (maybe just a "I got the same error as x") but there is really no point in posting the exact same error log

    Sorry I don't have an example right now, but these errors can be quite varied. If anyone really wants one I will find one later (or generate one myself) and post it.

    Block ID conflict

    This happens when you install a mod that is trying to use the same block ID as another mod. They can be identified by the first error being java.lang.IllegalArgumentException: Slot xxx, where xxx is a number.

    Here is an example

    5 mods loaded
    Minecraft Forge 3.2.5.120
    FML v2.2.17.117
    Forge Mod Loader version 2.2.17.117 for Minecraft 1.2.5
    mod_MinecraftForge : Initialized (minecraft.jar)
    mod_JammyFurniture : Initialized (1.2.5_Jammy_Furniture_Mod_Client_V3.6.zip)
    Mine & Blade: Battlegear - 2.7.7.1 : Pre-initialized ([1.2.5] Mine & Blade Battlegear - 2.7.7.1.zip)
    mod_UpdateManager : Pre-initialized ([1.2.5] Mine & Blade Battlegear - 2.7.7.1.zip)
    mod_Armor : Pre-initialized (ArmorStand.zip)

    Minecraft has crashed!
    ----------------------
    Minecraft has stopped running because it encountered a problem.


    --- BEGIN ERROR REPORT 96fc7838 --------
    Generated 12/06/12 1:46 AM
    Minecraft: Minecraft 1.2.5
    OS: Windows 7 (amd64) version 6.1
    Java: 1.7.0_04, Oracle Corporation
    VM: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 5570 version 4.2.11631 Compatibility Profile Context, ATI Technologies Inc.
    java.lang.IllegalArgumentException: Slot 211 is already occupied by [email protected] when adding [email protected]
    at pb.(Block.java:249)
    at pb.(Block.java:281)
    at agy.(BlockContainer.java:13)
    at mine_and_blade.heraldry.BlockBanner.(BlockBanner.java:29)
    at mine_and_blade.heraldry.BlockBanner_Forge.(BlockBanner_Forge.java:9)
    at mine_and_blade.heraldry.HeraldryForgeInitialiser.initlaliseBanner(HeraldryForgeInitialiser.java:16)
    at mod_MineAndBlade.load(mod_MineAndBlade.java:356)
    at cpw.mods.fml.common.modloader.ModLoaderModContainer.init(ModLoaderModContainer.java:319)
    at cpw.mods.fml.common.Loader.modInit(Loader.java:262)
    at cpw.mods.fml.common.Loader.initializeMods(Loader.java:591)
    at cpw.mods.fml.client.FMLClientHandler.onLoadComplete(FMLClientHandler.java:229)
    at net.minecraft.client.Minecraft.a(Minecraft.java:426)
    at net.minecraft.client.Minecraft.run(Minecraft.java:735)
    at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT 4721735d ----------


    These are generally easy to fix, most mods have some sort of config file (generally in the config directory of the .minecraft folder) that is generated the first time a mod is loaded. A mod can customise the block/item ids used in this file. So your best bet is to find the offending block id and change it in one of the mods and try again. You may have to try a number of times to find free block ids. Also minecraft does have a limited number of block IDs available for vanilla/modloader the limit is 255 (the 1st ~ 150 or so are taken up by normal blocks) while Forge has increased this to a bit over 4000. I believe vanilla will increase this to 4000 but I don't think it is currently implemented.


    Just a note, conflicting Item ids will not cause a crash, but these can be identified by items randomly changing to another item on startup/crafting.

    Brotip 1: A tool such as TMI can be used to help identify free block ids. The TMI side bar interface displays the block id used by whichever block you are overing over.
    Brotip 2: If you can help it, always change the block ID of the most recently installed mod. Blocks in your world will also change.



    Part 5Posting Guidelines[/anchor]
    So I have a crash report, done basic diagnostics and I am ready to post, how should I post it?




    Checklist

    I thought I would start with a basic checklist about posting crash reports.

    1. Obtain the crash report
    2. Make sure it is actually a crash report (i.e. has a java stack trace)
    3. Do basic diagnostics yourself (read the thread)
    4. Make sure it is not one of the common crashes seen here
    5. Identify the mod causing the error
    6. Try the mod on a fresh jar with only the required APIs, this will help determine if the problem is caused by an incompatability.
    7. Read the Troubleshooting/FAQ section of the Mod page to make sure it is not a common problem that can be fixed
    8. Read the known bugs on the Mod page to make sure your are not-reposting a known bug
    9. Read the Incompatible mods section to make sure that you are not using incompatible mods
    10. Read the last page or two to make sure someone hasn't recently posted the same report (no point in reposting unless you have more information to add)
    11. Do a quick search on the forum topic using the most recent error (eg java.lang.NoClassDefFoundError: paulscode/sound/SoundSystem) as someone else may have already posted the same error a while ago and it has since been solved.
    12. Post your error using the guidelines below.

    Always remember that posting the error should generally be your last resort. You will generally solve the problem quicker yourself as a modder is not always online to answer questions. You may not get a response for a few days and you can't blame the modder for this. It is therefore in your best interest to at least try and solve it yourself.

    Posting Guidelines

    Now before I start, if a modder has another way they like to describe an error report follow theirs. This is just a suggestion.


    When posting an crash report having as much detail as possible is the key. If you write stuff that's not needed, who cares? But not having enough detail can be very annoying for those trying to help.

    At minimum you want

    1. The crash report (the most important part)
    2. A detailed description of your problem (when did it crash, what were you doing in game etc). Again the more details the better, even if you don't think they are relevant. Better to be safe then missing an important detail.
    3. A list of mods APIs and patches used, sometimes this may not be needed as the might be displayed in the crash log, however sometimes not all are displayed. This includes APIs such as Minecraft Forge & PlayerAPI as well as patches like McPatcher or jarmods like Optifine.
    4. Generally the OS that you use is not needed, java is generally cross platform. Although some mods may not like some OS because of the way certain features are written. Use your best judgement on this (especially considering it may already be in the crash report).
    5. Any other mod specific information that might be required. This one really depends on the mod you are using and will mainly apply to very special cases\
    6. Be Polite, as a modder I am much more likely to be more helpful to someone who has both been polite and actually tried to do a little homework (i.e stuff on this post) then to someone who as not.

    Brotip: Crash logs can be quite long. Always put them in a spoiler as this will tidy up the post a bit. A spoiler can be made like this

    [spoiler]
    Paste crash log here
    [/spoiler]


    If you do do this it might also be a good idea to also write what the crash was somewhere outside of the spoiler so it can be search for by other users easily.


    An example post might look something like this




    Hi ,

    My minecraft crashed on startup with a java.lang.NoClassDefFoundError: paulscode/sound/SoundSystem.

    I was using no other mods or APIs (other than those required by this mod) at the time. When I installed the APIs I used a fresh jar.

    here is the crash report

    --- BEGIN ERROR REPORT e8848218 --------
    Generated 9/24/12 10:39 AM

    - Minecraft Version: 1.3.2
    - Operating System: Mac OS X (x86_64) version 10.7.4
    - Java Version: 1.6.0_33, Apple Inc.
    - Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Apple Inc.
    - Memory: 496632856 bytes (473 MB) / 534708224 bytes (509 MB) up to 1065025536 bytes (1015 MB)
    - JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M
    - FML: FML v3.0.196.366 Minecraft Forge 4.1.1.251 4 mods loaded, 4 mods active
    FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    MB_Core [Mine & Blade: Core] ([1.3.2] Mine & Blade - Core - Preview 1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    MB_Armoury [Mine & Blade: Armoury] ([1.3.2] Mine & Blade - Armoury - Preview 1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    - LWJGL: 2.4.2
    - OpenGL: ATI Radeon HD 4670 OpenGL Engine GL version 2.1 ATI-7.18.18, ATI Technologies Inc.
    - Is Modded: Definitely; 'forge,fml'
    - Type: Client
    - Texture Pack: Default
    - Profiler Position: N/A (disabled)

    java.lang.NoClassDefFoundError: paulscode/sound/SoundSystem
    at ayq.a(SoundManager.java:235)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1937)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1885)
    at net.minecraft.client.Minecraft.a(Minecraft.java:1821)
    at apq.e(SourceFile:142)
    at apq.a(SourceFile:116)
    at apn.a(SourceFile:64)
    at apn.d(SourceFile:112)
    at apn.m(SourceFile:100)
    at net.minecraft.client.Minecraft.l(Minecraft.java:1482)
    at net.minecraft.client.Minecraft.J(Minecraft.java:834)
    at net.minecraft.client.Minecraft.run(Minecraft.java:764)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: paulscode.sound.SoundSystem
    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 13 more
    Caused by: java.lang.NullPointerException
    at org.objectweb.asm.ClassReader.(Unknown Source)
    at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:27)
    at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167)
    at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:118)
    ... 15 more
    --- END ERROR REPORT 99c3d4f5 ----------




    The above is clear and concise and provides all required information.






    Thank-you for reading this post. I hope this will help out anyone with crashes in the future. Also feel free to post links to this topic to anyone who requires it.


    If you have any suggestions to add to it or to clean up anything please let me know.

    nerd-boy

    Posted in: Mods Discussion
  • 1

    posted a message on Mod Update Detector [WIP]
    I had a bit of time where I couldn't use my main computer, so I knocked up a small app to download the snapshot builds here.

    I wouldn't bother downloading anything yet as the mod will not do anything, but you will see a new build pop up about 2 minutes after I push the latest code to github

    Also for those interested, here is the build tool in action

    Posted in: WIP Mods
  • 2

    posted a message on Mod Update Detector [WIP]

    M.U.D.


    Mod Update Detector

    Introduction

    M.U.D. or Mod Update Detector is a "new" mod that I am currently (re)developing*. The basic Idea of the mod is that it will search through your currently installed compatible mods and notify you when a new version is ready to download. Not only will it notify you, but it will also give you the ability to download the new version of the mod in game.

    Furthermore I plan for this mod to be a little bit of a proof of concept for a process for bringing continuous integration to the minecraft modding community. The plan is to set up a process where after a single push to github, a open source tool will build the mod and deploy each snapshot. Optionally a release can also be deployed. This process coupled with itself MUD should automate the entire process of building, deploying, releasing and downloading mods.

    * I have actually had a similar system used in Mine & Blade Battlegear for quite a while.

    About the Mod (what I plan for it at least)

    For mod users
    MUD will run in the background and check for updates of all compatible mods. If out of date mods are found, MUD will notify the player. At this point the player will be able to bring up the MUD display, read the changelog of the mod and download the new release. After minecraft has been restarted the new version of the mod will be loaded.

    For mod developers
    After vyou have made some changes to the source code of your mod and pushed a commit, the following process should occur

    1. A CI tool (such as Snap CI) will detect the new commit
    2. The CI tool will then automatically run the Forge build scripts, creating a new jar
    3. The CI tool will deploy the newly built mod to a hosting site (likely dropbox or CurseForge)
    4. The CI tool will run a script (which I will provide) which will notify a server that a new mod is ready, its version and it's download url
    5. Any user using your mod will then be notified the next time they run minecraft
    The idea is to make deployment as easy as possible after the process has been set up.

    RoadMap

    1. Build a mod on Snap CI as a proof of concept [done]
    2. Deploy the built artifact to dropbox using a simple shell script [done]
    3. Create a "Minimum Viable Release" that will ONLY notify players of an outdated mod via a mod update file hosted by the modder (eg on github)
    4. Add changelog viewing functionality (both for the server and mod)
    5. Add download functionality
    6. Find some modders who would like to be geneia pigs
    Further down the track


    • Create the server that will allow users to notify when new versions have been released and deploy it to heroku
    • Migrate scripts to gradle
    • Migrate server to AWS (If it is well received and more server power is required)
    Finally here are a couple of images of the current MUD in battlegear to give you an idea of what I am going for






    Posted in: WIP Mods
  • 1

    posted a message on Mine & Blade Battlegear 2 - Bullseye (1.0.9.0)
    Quote from castlehunter

    When I downloaded the new bullseye version, I got this crash report.
    Note, that I had only battkegear 2 installed and no other mods.

    --- snip ---


    Dear god sir, update your forge, it is very out of date
    Posted in: Minecraft Mods
  • 1

    posted a message on Is it possible to have a mod that checks mods for updates?
    Quote from Blazerider11

    It is possible the code would have to go and search the website the mod was downloaded from but most mods have an automatic update checker and the battle gear mod has something called MUD which will detect the update of any mod.


    MUD will only check for updates in mods that are registered to it by the modder who created the mod, as far as I know Battlegear is the only one that takes advantage of it, but we haven't really advertised it.

    source: I wrote it ;)
    Posted in: Mods Discussion
  • 17

    posted a message on [1.6.2] Custom Flags - 1.3.1 [ModJam]
    Custom Flags

    Custom flags was my submition to ModJam. For those who don't know ModJam is a 96 hour coding competition, were a modder has to code, test, bug fix and submit a mod starting from scratch in 96 hours. Voting for modjam mods will begin shortly. It should be noted that I have added a few small features (map item rendering, vertical hanging flags, bock type aware poles), please do not judge based on these features. All modjam entries can be downloaded from here, I will post a link to where you can vote (for me) when one is avaliable

    Custom adds flags to minecraft that allow full customisation by the user. Flags can be attached to a flag pole and be put on display for everyone to see.



    Mod Mechanics

    An instruction manual can be obtained by using the /cf.instructions command.

    The mod revolves around 1 new item (Flag) and 1 new block (Flag pole)

    Flag poles

    4 Flag poles are created by placing 3 wooden logs or 3 iron ingots in a vertical line in the crafting recipe
    [ ][L][ ]
    [ ][L][ ] = Flag Pole
    [ ][L][ ]

    Flag poles can be placed on any block. If you place a flag pole on the top or bottom of a block, you will be able to hag a horizontal flag, if you place it on the side of a block, you will be able to place a vertical hanging flag.

    Flags

    Flags are created by arranging 4 wool blocks (of any colour) in a 2 x 2 square in the crafting grid
    [ ][W][W]
    [ ][W][W] = Flag
    [ ][ ][ ]

    The wool may be any colour (or any combination of colours) and the resulting flag will take the colours of the wool blocks used.

    Flags may be attached to any flag pole by right clicking a flag pole while holding a flag. In survival/hardcore modes, this will consume the flag, in creative mode, no flag is consumed. Each flag pole block can have a maximum of 4 flags attached to it. Each flag placed after the first will be placed after the previous flag. Right clicking on an flag pole with empty hands will remove the most recently attached flag and place it in the players inventory.

    Flags attached to a flag pole will blow in the wind. Due to the fact minecraft wind only blows in the north direction, flags on vertical poles will ALWAYS blow north. The speed of the animation can be changed in the config file, (valid between 1 & 10) higher numbers will speed up the animation, lower nmumbers will slow it down.

    Flag Designer

    Right clicking while holding a flag (with no usable block in front of the player) will open the flag designer gui. The GUI supports a 32x32 12 bit ARGB image. A colour chooser is included on the right of the screen and drawing tools on the left The tools include
    • Pen Tool: Draws a single pixel at the current mouse location when the left mouse button is down
      • Holding shift will draw a straight line from the last location clicked to the current mouse location
    • Rectangle Tool: Draws a rectangle with the corners of the last 2 clicked locations.
      • Holding shift will force the rectangle into a square
    • Oval Tool: Draws an oval with the corners of the last 2 clicked locations.
      • Holding shift will force the oval into a circle
    • Flood Fill: Clicking the left mouse button will change all of the connected pixals of the same colour to the currently selected colour
      • Holding shift while clicking will fill the whole 32x32 area with the colour selected
    • Text Tool: Allows the user to write text at the most recently clicked location.
      • Pressing enter saves the text
    • Colour Picker: Clicking will set the current colour to the colour of the selected pixal
    • Save: Opens a save dialog to allow the user to save the current design to their filesystem for later use
    • Load: Opens a load dialog to allow the user to use an image on their current file system as their current flag. Images will be scaled to 32x32 and converted to 12bit ARGB before being drawn on the canvus
    • Load Section: Opens a load dialog to allow the user to use a section of an image on their current file system as their current flag. After selecting the desired file, a user will be asked how many sections they desire in the X and Y directions (between 1 & 4) and which section they want to use for the current flag. The resulting image will be scaled to 32x32 and converted to 12 bit ARGB colour space.
    • The OK button will save the design to the currently held flag, pressing escape will close the flag designer without changing the design.
    • Undo/Redo: Pressing Ctrl-z will undo and Ctrl-y will re-do.



    Configuration File

    The configuration file for the mod is located in the configs directory under the name custom_flags.cfg The fields correspond to
    • Animation Detail Level: The detail level for the waving animation. 0 will turn the animation off, higher values will produce higher levels of detail (generally 16ish is way more than needed)
    • Cache Size: Not currently in use
    • Flag Speed: The speed of the animation (between 1 & 10). Higher values will speed up the animation
    • Use System L&F: Mimic the system look and feel for swing dialogs. Set to false to use the default look and feel (likely the cross platform metal L&F). Some users may have issues with the save/load buttons, if this is the case try changing this.
    • Load Images in FileChooser: Will preview the images in the filechooser. This feature may also have issues on some systems, turn it off if you have issues with the Save/Load buttons.
    • Flag Pole Id: The Id of the Flag Pole Block (defaults to 2700)
    • Flag Id: The Id of the Flag Item (defaults to 24532)
    Instalation Instructions

    The mod is compiled for Minecraft 1.6.2
    1. Download and Install Minecraft Forge (http://files.minecraftforge.net/)
      • The mod was compiled using Minecraft Forge version 9.10.0.804
    2. Download Custom Flags
    3. Place the downloaded Custom Flags file into the /mods directory in the .minecraft directory (for Client) or the root of the server directory (for Server)
    4. Run the client or server as usual
    Video Demonstration

    Mod Reviews
    By CtrlShiftCreate


    Known Bugs & Issues
    • Crafting an Iron flag pole will give you an oak flag pole
    • Some people may have issues with the Save/Load dialogs, try turning off the "Use System L&F" or the "Load Images in FileChooser" options in the config.
    • The Save dialog sometimes opens behind the minecraft window, causing the appearance of minecraft not responding.
    Posted in: Minecraft Mods
  • 1

    posted a message on (REQUEST) Dual Wielding Mod for Minecraft 1.5.2
    Quote from Xeius

    If no one would do it then I guess I'll have to do it.. Thanks btw, where can I find the source of the mod?


    Link is in the description, just be warned, it will be a very big task as it uses a lot of function in mcForge/minecraft that were not around in 1.5.2. It would be far easier just to update minecraft (and would be next to impossible t do anyway)
    Posted in: Requests / Ideas For Mods
  • 1

    posted a message on Mine & Blade Battlegear 2 - Bullseye (1.0.9.0)
    Quote from Aridhol



    And yet, many mods have updated to REQUIRE Forge versions higher than this.

    I very much doubt it is the fault of Forge. Its an issue for these guys to fix.. I posted this log and asked LexManos, and he told me so himself so...


    Also directly from the main post


    Please note: I do request some patience with these issues. I am extreamey busy with basically no free time right now so I cannot currently look into these now.


    Now this is basically my situation, GoToLink has still been plugging away at fixing bugs, but I suspect this forge crash is an ASM issue meaning I would likely be the one who has to fix it. Yes it will be done eventually, but I have many other responsibilities right now and this is not very high on my priority list in comparison to the other things I have going on in my life.

    People using unstable versions of Forge should realise that there could be major issues especially for mods that have not updated to those (and really why should they?). I have clearly stated that the mod requires a Forge version below 9.10.1.850 and am a little annoyed that I am still getting people pestering me about it. Read the OP and please understand that I also have a life (and right now barely enough time to sleep let alone modding minecraft, which is to me just an enjoyable hobby)
    Posted in: Minecraft Mods
  • 1

    posted a message on Longer Weapons?
    Here is my spear renderer IItemRenderer class if you need it for refrence

    It will produce something like this

    So you may have to play around by translating it a bit
    Posted in: Mods Discussion
  • 3

    posted a message on Mob Morphing mod..
    If you are going to advertise a mod, ONLY post the link to the official source uploaded by the author. That mod was mad by iChun for modjam. It is avaliable at his blog here.

    P.s. please update your post
    Posted in: Mods Discussion
  • To post a comment, please .