Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Kit not saving depending on the contents. #798

Closed
merjilin opened this issue Apr 13, 2017 · 35 comments
Closed

Kit not saving depending on the contents. #798

merjilin opened this issue Apr 13, 2017 · 35 comments

Comments

@merjilin
Copy link

Hey, dual. I've recently ran into an issue where if I add a machine from Thermal Expansion, such as a pluverizer, the kit isn't saving and giving an error stating:
Configuration does not accept objects of type class [B
Tested on FTB Beyond 1.4.2
Nucleus: 27.1
Spongeforge: 1.10.2-2254-5.2.0-BETA-2272

@dualspiral
Copy link
Member

Ugh, stupid Configurate. It's a problem I've hacked around before, I'll look into how I did it and try to fix it...

@dualspiral
Copy link
Member

...do you have the complete stack trace?

@merjilin
Copy link
Author

I'll reproduce it and see whether I can. However, just so I'm not getting confused, where/when would I find it?

@dualspiral
Copy link
Member

Turn on debug mode (main.conf, core.debug-mode), /nucleus reload, then save the kit again. You'll see it on the console.

@merjilin
Copy link
Author

awesome. Give me a few minutes

@dualspiral
Copy link
Member

No rush! :)

@merjilin
Copy link
Author

here we go: https://pastebin.com/skmHDArN

@dualspiral
Copy link
Member

Nucleus-0.28.0-SNAPSHOT-S5.1-plugin.jar.zip

I think this should fix it, but it's untested. If you have an inconspicuous area to test this on first, that would be helpful!

@merjilin
Copy link
Author

I'll have to test it later on when the players slow down. Thanks!

@dualspiral
Copy link
Member

Was there any luck with this @merjilin?

@merjilin
Copy link
Author

Oh sorry, not yet. I've been having other troubles which had to take priority. I've got it on my to do list for tomorrow since I'll be playing around with more plugins.

@dualspiral
Copy link
Member

No problem!

@merjilin
Copy link
Author

Okay, I just tested and it doesn't appear to be working. Still getting the same error in console.

@dualspiral
Copy link
Member

I think I'm gonna have to set up a test case locally at some point then.

@dualspiral
Copy link
Member

So, I just created some test cases for this, and what I've done seems to work alright for me. I'll try to get a proper setup where this is tested loaded soon and I should be able to determine what needs to be done from there.

@dualspiral
Copy link
Member

I added the array serialisers (Configuration does not accept objects of type class [B indicates that it can't serialise byte arrays) to the Neutrino library that Nucleus is using, and wrote automated tests to check it deals with them. It seems to work OK in the automated tests - I'd hope it works here too...

@merjilin
Copy link
Author

okay, awesome! I'll look for the next release then and test

@dualspiral
Copy link
Member

Do you know if this works now?

@merjilin
Copy link
Author

merjilin commented May 1, 2017

let me go check right now. You caught me at a good time since I'm overhauling the kits

@merjilin
Copy link
Author

merjilin commented May 1, 2017

nope. Just tested again with a thermal expansion pulveriser and it didn't save across a restart and still had the "Configuration does not accept objects of type class [B" error.

@dualspiral
Copy link
Member

OK, something is iffy with using my shiny new serialisers then. I'll try to trace it properly, given I'm looking at #810 now.

So, Thermal Expansion and Pulveriser item, right? Anything special I need to do?

@merjilin
Copy link
Author

merjilin commented May 1, 2017

nope. Just make a kit and place the pulveriser in it.

@dualspiral
Copy link
Member

OK, spent a fair amount of time on this. I know what the problem is, but I'm probably going to have to change a fair amount in the back end for this, and even then, I'm not sure I'd be able to fix it that way. Configurate doesn't support arrays, and when I try to hack that in, it just complains at me.

I may have to just start storing kits as NBT blobs, which I don't really want to do, but might just avoid a lot of this kits mess. I don't want to do it because it destroys visibility, but it may just end up being the safest option here.

@ghost
Copy link

ghost commented Jul 31, 2017

Any progress? Cannot save kits when item has nbt tags. For Example from Modern Warfare mod cannot save kit with pistols, magazines....

@ghost
Copy link

ghost commented Jul 31, 2017

when enable debug:
https://pastebin.com/80Pukb2w

1.11.2 SF build 2484, Nucleus-1.0.1-LTS-1.11.2-1.12-S6.0-plugin

@ghost
Copy link

ghost commented Aug 14, 2017

There is ingame gui showing/editing items in kit, I think binary NBT blob is fine.

@idnthvn
Copy link

idnthvn commented Aug 16, 2017

I have this issue to, even with the Latest 1.1.0 using 1.10.2 Sponge . I notice that if a MOD like Thermal expansion, that uses the same Block Name example: Thermalexpansion:machine- Has 5 Tags and that Nuclues cannot determine which machine it is. Please help fix. Thank you -- Ill test as i have Zero players ATM before launch

@dualspiral
Copy link
Member

The problem is that Sponge doesn't really handle some data types very well. I started looking at sorting it out on the Sponge end, but that just turned into a rabbit hole. It's to do with how Configurate and arrays don't play together very well, tried to fix it on the Nucleus end with no luck. Probably going to need to rip out a lot of the current data view in Sponge and redo it.

@idnthvn
Copy link

idnthvn commented Aug 16, 2017

@dualspiral. I am not a coder or programmer at all, but is there a way they can go back to the numbers of the items. Instead of their names?

@idnthvn
Copy link

idnthvn commented Aug 16, 2017

Can't edit my comment?? Hmmm. Anyways. I also want to point out, that in the gui and kit when you create or edit the kit. It's there. The items that I want. So no issue of getting the items to the player once the kit is made. It just doesn't save it to the server file. Example. I have my thermal expansion blocks that I want. Do /kit add test. Great. /kit test works every time. Just as it should. It's listed. But in server reboot it isn t there anymore. However in the console. When I create that kit. That's when this error occurs and that it doesn't save it to the kit.json untill I take out the erroring thermal expansion block. Hope this helps

@dualspiral
Copy link
Member

Yeah, it's because it holds it in memory fine, but when Sponge tries to save it, it can't handle the data type - so it doesn't save it. It's entirely the same as what @merjilin suggests.

I'll have to go to Sponge on this one and try to solve it there.

@idnthvn
Copy link

idnthvn commented Aug 16, 2017

Okay. Thank you for the speedy responses

@idnthvn
Copy link

idnthvn commented Aug 16, 2017

Dual, is there a link that we can have to see progress from sponge on this?

@idnthvn
Copy link

idnthvn commented Aug 16, 2017

ALSO, did some testing.
I can get the Items to work in the kit. BUT, i have to MANUALLY add them into the kit.json file.
I got it to work for Thermal Expansion BASIC Furnace and now testing the accumulator.

@ghost
Copy link

ghost commented Oct 26, 2017

Any progress? problem still persist in the 1.12.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants