Ancient Warfare 2

Ancient Warfare 2

6M Downloads

Crash w/ Immersive Engineering [AW 2.4.112]

dirtyfargo opened this issue · 24 comments

commented

Description: In my modpack, only when run on a server, my client crashes with the report linked below if I throw an ingot from Tinkers' Construct into a Crusher from Immersive Engineering. At first glance this seems as though it has nothing to do with Ancient Warfare, but without it installed in the modpack I cannot replicate the issue.

Client Crash Report: https://gist.github.com/dirtyfargo/a5a1b6b1c3e8081a9447

Any ideas what's going on here? Thank you for your time =)

commented

From what the crash report tell, that crusher thing tries to spawn "crusher fx" (which are particles) based one the texture from the side of an Ancient Warfare engineering station. Even if that block has a custom model, some fallback textures are defined so that kind of thing shouldn't happen.
It looks like the crusher tries to fetch a texture from a side that isn't in any conventional range. (i mean, there are only six faces to a block, not 9 ! ) Which is where the crash happen, i think.

commented

Attempted to reproduce using AW2 version 2.4.83 built freshly against e2e4f03

steps taken

[1] built AW2 freshly from available Github source
[2] inserted the aw2 'full' jar into my modpack install wiith IE version 0.5.4 built against e27d71d
[3] built IE crusher structure correctly and formed the MB
[4] threw a tconstruct ingot into cruser

Result: unable to reproduce

AW2 version 2.4.83 SHA e2e4f03
IE version 0.5.4 SHA e27d71d
Tconstruct version 1.8.5
FTB Infinity version 1.10.1

commented

Yeah apologies, I can't reproduce the issue without my entire modpack basically so I must have done something stupid somewhere. No idea what I did though since it seems to work fine in Singleplayer, but sorry for the waste of time!

commented

ok, thanks.
Installed the pack (client) on top of the Vanila MC client in the FTB launcher and borrowed the pack.json from FTB Infinity.

Built (in singleplayer) the crusher and fed it tconstruct metals(the first 5 in order from NEI). No crash induced.

downloaded server, rebuilt test in the servers MP environment. Unable to reproduce crash

commented

Could it be something to do with the MultiMc launcher then or the way I have my server running on my dedicated machine? Those exact files caused the issue for myself, so thats odd! I do use a different memory allocation for my server than what is listed in the script as well, but yeah.

commented

MultiMC was in the stack trace. However I find that MMC is causing this
error is unlikely. My test had both the server and the client on the same
host. The client connected to localhost. Client was allocated with 5Gb of
memory with the server bring default.
On Aug 29, 2015 1:46 PM, "Fargo" [email protected] wrote:

Could it be something to do with the MultiMc launcher then or the way I
have my server running on my dedicated machine? Those exact files caused
the issue for myself, so thats odd! I do use a different memory allocation
for my server than what is listed in the script as well, but yeah.


Reply to this email directly or view it on GitHub
#380 (comment)
.

commented

Would it make a difference that my server isn't run on a local host but on a Linux machine I have rented, and I allocate much more memory, only because that's all I'm using the machine for so I figured I might as well.
This is the start.sh script I use to boot it up:
#!/bin/bash
while true
do
echo Executing "server.jar" "now..."
java -Xincgc -Xms8G -Xmx24G -jar server.jar
clear
echo -e "Press CTRL+C to stop server restart!"
for i in {5..0}
do
echo $i...
sleep 1
done
echo "Now Restarting!"
done

commented

I don't think so. The JRE is a VM itself, all code executing inside it
should be unaffected by the host. It is highly unlikely the deference in
hardware would induce this particular crash. I will attempt to repo this
with the server in a Linux based VM when I have the chance.

BTW something I your pack is tinkering with particles and textures. All the
particles emitted from the IE crusher appear to be using the vanilla
activated booster rail... only occurred in your pack
On Aug 29, 2015 2:11 PM, "Fargo" [email protected] wrote:

Would it make a difference that my server isn't run on a local host but on
a Linux machine I have rented, and I allocate much more memory, only
because that's all I'm using the machine for so I figured I might as well.
This is the start.sh script I use to boot it up:
#!/bin/bash
while true
do
echo Executing "server.jar" "now..."
java -Xincgc -Xms8G -Xmx24G -jar server.jar
clear
echo -e "Press CTRL+C to stop server restart!"
for i in {5..0}
do
echo $i...
sleep 1
done
echo "Now Restarting!"
done


Reply to this email directly or view it on GitHub
#380 (comment)
.

commented

Well that's odd, the only mod I'm aware of really affecting particles is Fastcraft, but as I mentioned I don't understand too too much about this. Thanks again for all the help =)

commented

As i mentioned previously, the crash itself is block / item id dependent.
Since 1.7, mod ids are dynamically assigned for each world save by Forge.
Meaning the same world save state would also be required for the crash to happen.
Having mismatched particles is probably the most common occurrence of this bug.
This has been reported to IE now, hopefully to be fixed soon.

I will try to code defensively that area in the meantime.

commented

The 'Crusher' from Immersive Engineering is a multiblock 3x5x3 structure, so technically it can have more than 6 sides, not sure if that helps at all!

commented

But what does the engineering station do in that structure ?

commented

Nothing at all, the structure is comprised entirely of blocks from within Immersive Engineering, and I don't even need to have an AW Engineering Station placed nearby in order to get this crash to occur. Sorry I don't understand too much code or anything so I'm just troubleshooting using trial and error pretty much :P

commented

I just realized that I do have Fastcraft 1.22ctest13 installed server/client side as it has dramatically improved FPS for everyone, and I'm supposed to always mention that when reporting a bug. Not sure if it's relevant, but sorry for not mentioning that previously! I can check if removing it fixes anything now.

commented

IE declare its particle system differently from how AW2 declares its particle system from what i can tell. IE uses 9 arguments during its FX call where AW2 is expecting six. Now i do not have a great understanding on how particle stuff like this works, but it appears to me that there is more than one approach and more than one application. there may be only six sides to a block, but there is more information relevant to particle physics. IE's particle Fx takes a different approach to particles, using particles as free-moving entities not bound to a rotational axis or a block once emitted.

AW2's system seems to expect 6 points of reference, the six sides of the block that is rotating. AW2 was attempting to treat IE's free-moving particle effects as its own block rotation Fx. This is where the error occurs.

All the above is based on what i can derive from the source code of both mods, and my understanding is limited.

commented

I dived into IE code a bit. And it was actually block damage value being wrong.

Apparently, those "crusher" particles effect are set from the first stack input in the crusher tile entity.
Spawn here on the client side.
Based on "block event" here
unfortunately, the "block event" piggy-back on the S24PacketBlockAction, which is a vanilla packet.
The data sent is thus written as a signed byte, whose range does not cover most of the block/item ids possible (0-4096 for blocks, 32000 for items, while byte is 256).
So the particles are totally inaccurate and make no sense (which is a minor side-effect, but should be visible).

In summary, you have an item in your crusher that you are trying to "crush", or whatever.
This item has an high id (say 12123, for example).
The server tries to send this id over the network, but mess it up as it doesn't cover that high id.
Ends up on the client with wrong id (123 for example).
By pure randomness, this happens to be the id of the engineering station when you have ancient warfare installed.
This could end up nicely, but the process also sends its "damage value", which is the damage on the item being "crushed". (which could be anything, including being messed up too, if too high)

Conclusion:
Immersive Engineering should replace vanilla packet for this (tile "description packets", for example).

commented

@GotoLink I am just going to point out now that the OP's issue seems to have been resolved by updating AW2 and there may be something funky going on with his modpack. the latest versions of both AW2 And IE do not induce this crash.
the latest builds of AW2 do not have this issue, though if you want @blusunrise to fix the potential issue you have pointed out then create an issue thread in his repository

commented

It would be nice to know what @dirtyfargo tried to crushed in this case.
The item being crushed is important to reproduce this.

commented

copper ingot, tin ingot, both from Tinkers' Construct version 1.8.7. TConstruct:materials:9 i think is cooper if im remembering correctly, on mobile though.
Also, I have been using the latest version of AW (2.4.112) the entire time. The mods in my modpack are rarely ever too out of date actually. I havent fixed my issue, but I have mentioned that it could very well be due to some derp I have made somewhere, just not sure where as I have gone through my entire modpack configs and all, sorry again for any trouble caused!

commented

@dirtyfargo said any Tconstruct ingot. I attempted to reproduce (unsuccessfully) with cobalt ingots

commented

ah, its ok. there is a software error somewhere between Tconstruct, IE, and AW2. Now that you have reported it we are attempting to get to the bottom of it.
May i ask exactly what modpack you are using, assuming its a public one. If not, please provide a list of exactly which mods are in use.

commented

The version of the modpack Im using isn't public as it is pending the FTB team uploading it to the launcher. I have a link below to a spreadsheet where I document cfg changes, and have a modlist, and could provide a link to the modpack and a server to test on if need be!
https://docs.google.com/spreadsheets/d/1Rsk1-c-TwCOC6VNneNvjUEfyYr2uB-y-ZwwBUGLhITA/edit?usp=docslist_api

commented

Providing a link to the pack would be of convenience to me,given the size of the pack, as to prevent simple errors in acquiring the correct modpack versions and config modifications. I do use the FTB launcher as is, if its available as a 'private pack' pending public release the pack code would suit my needs

commented

https://www.dropbox.com/s/hhqyj0qyylyj9yg/Trinity-1.0.5-client.zip?dl=0
https://www.dropbox.com/s/p672n6fljm6uvqn/Trinity-1.0.5-server.zip?dl=0
I use MultiMc, although Im sure that doesnt matter, these are the links pending FTB approval for that launcher though