![ServerSync](https://media.forgecdn.net/avatars/thumbnails/254/696/256/256/637199290945083080.png)
[Client] Null pointer in mod comparison
SvEgiiVEteR opened this issue ยท 11 comments
Serversync Version:
2.6.15
Minecraft Version:
1.7.10
Issue:
after turning on
B:PUSH_CLIENT_MODS=true
in serversync-server.cfg and adding mod folders clientmods on server
and start serversync in client error in cmd
https://gist.github.com/b2207f035ccd059f9fd96318b1c2929c
and
http://i.imgur.com/FHajLYN.png
log serversync-detailed:
https://gist.github.com/358bb7e0bf3a1db4d523dd139cbb0125
Logs (clien)
Establishing a socket connection to the server... < Connecting to server > Creating input/output streams... Checking config... Configs out of sync, updating... Checking if update is needed Syncable client mods are: [0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, LAN_GUI_ReAuth-1.7.10-3.4.1-FA0V.jar, LAN_SER_Login_Shield-1.2-10-gd36e6a4-FA0V.jar, OptiFine_1.7.10_HD_U_D8.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Syncable server mods are: [XRay-39.jar, [1.7.10]bspkrsCore-universal-6.16.jar, 232Opti32432Fine_1.7.10_HD_U_D9.jar, Opti32432Fine_1.7.10_HD_U_D9.jar, 0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Update required The mods between server and client are incompatable... Updating... <------> Getting files <------> Getting mods... Recieved server file tree Accepting client mods! Added client mods to server list Recieved client only files Ignoring [serversync-*.jar, mods/SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jarSERmod, mods/SER_Morpheus-1.7.10-1.6.21-FAxV.jarSERmod, mods/SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jarSERmod, mods/*OptiFine*.jar, mods/*ReAuth-*.jar, mods/*Login_Shield*.jar, mods/VoxelMods/**/*.zip] <------> Starting Update Process <------> 0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar is up to date INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar is up to date SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar is up to date SER_Morpheus-1.7.10-1.6.21-FAxV.jar is up to date SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar is up to date test.cfg is up to date testCLI.cfg is up to date Client only mod added: XRay-39.jar XRay-39.jar Does not exist... Fetching file size from server Sending file path to server Attempting to write file (com.superzanti.serversync.util.SyncFile@7fc9bb77) Sucessfully updated: XRay-39.jar Client only mod added: [1.7.10]bspkrsCore-universal-6.16.jar [1.7.10]bspkrsCore-universal-6.16.jar Does not exist... Fetching file size from server Sending file path to server Attempting to write file (com.superzanti.serversync.util.SyncFile@5b95d639) Sucessfully updated: [1.7.10]bspkrsCore-universal-6.16.jar Client only mod added: 232Opti32432Fine_1.7.10_HD_U_D9.jar 232Opti32432Fine_1.7.10_HD_U_D9.jar Does not exist... Fetching file size from server Sending file path to server Attempting to write file (com.superzanti.serversync.util.SyncFile@5dca109f) Sucessfully updated: 232Opti32432Fine_1.7.10_HD_U_D9.jar Client only mod added: Opti32432Fine_1.7.10_HD_U_D9.jar Opti32432Fine_1.7.10_HD_U_D9.jar Does not exist... Fetching file size from server Sending file path to server Attempting to write file (com.superzanti.serversync.util.SyncFile@788ebaa4) Sucessfully updated: Opti32432Fine_1.7.10_HD_U_D9.jar <------> Starting deletion process <------> Checking client's 0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar
Logs ( server)
Found 4 files in: clientmods XRay-39.jar [1.7.10]bspkrsCore-universal-6.16.jar 232Opti32432Fine_1.7.10_HD_U_D9.jar Opti32432Fine_1.7.10_HD_U_D9.jar Starting scan for sync files: 12.06.2017 Scanning mods Found 5 files in: mods Found 4 files in: config Including config: test.cfg Including config: testCLI.cfg Creating new server socket Now accepting clients... Connection established with Socket[addr=/127.0.0.1,port=50973,localport=38067]12.06.2017 12:41:09 [mods] Recieved message from: /127.0.0.1 Sending coms messages Recieved message from: /127.0.0.1 Sending list of syncable directories: [mods] Recieved message from: /127.0.0.1 Sending config info to client... Recieved message from: /127.0.0.1 Client is refusing client only files, sending standard file list Sending list of syncable mods Syncable mods are: [0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Recieved message from: /127.0.0.1 Sending servers file list to Socket[addr=/127.0.0.1,port=50973,localport=38067] Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Recieved message from: /127.0.0.1 Closing connection with: Socket[addr=/127.0.0.1,port=50973,localport=38067] Connection established with Socket[addr=/127.0.0.1,port=50974,localport=38067]12.06.2017 12:41:21 [mods] Recieved message from: /127.0.0.1 Sending coms messages Recieved message from: /127.0.0.1 Sending list of syncable directories: [mods] Recieved message from: /127.0.0.1 Sending config info to client... Recieved message from: /127.0.0.1 Client is refusing client only files, sending standard file list Sending list of syncable mods Syncable mods are: [0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Recieved message from: /127.0.0.1 Closing connection with: Socket[addr=/127.0.0.1,port=50974,localport=38067] Connection established with Socket[addr=/127.0.0.1,port=50975,localport=38067]12.06.2017 12:41:22 [mods] Recieved message from: /127.0.0.1 Sending coms messages Recieved message from: /127.0.0.1 Sending list of syncable directories: [mods] Recieved message from: /127.0.0.1 Sending config info to client... Recieved message from: /127.0.0.1 Client is refusing client only files, sending standard file list Sending list of syncable mods Syncable mods are: [0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Recieved message from: /127.0.0.1 Closing connection with: Socket[addr=/127.0.0.1,port=50975,localport=38067] Connection established with Socket[addr=/127.0.0.1,port=50976,localport=38067]12.06.2017 12:41:22 [mods] Recieved message from: /127.0.0.1 Sending coms messages Recieved message from: /127.0.0.1 Sending list of syncable directories: [mods] Recieved message from: /127.0.0.1 Sending config info to client... Recieved message from: /127.0.0.1 Client is refusing client only files, sending standard file list Sending list of syncable mods Syncable mods are: [0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Recieved message from: /127.0.0.1 Closing connection with: Socket[addr=/127.0.0.1,port=50976,localport=38067] Connection established with Socket[addr=/127.0.0.1,port=50977,localport=38067]12.06.2017 12:41:44 [mods] Recieved message from: /127.0.0.1 Sending coms messages Recieved message from: /127.0.0.1 Sending list of syncable directories: [mods] Recieved message from: /127.0.0.1 Sending config info to client... Recieved message from: /127.0.0.1 Client Requested a list of all files Sending list of syncable mods Syncable mods are: [XRay-39.jar, [1.7.10]bspkrsCore-universal-6.16.jar, 232Opti32432Fine_1.7.10_HD_U_D9.jar, Opti32432Fine_1.7.10_HD_U_D9.jar, 0EXT_0_NotEnoughIDs-1.4.3.4-FA0V.jar, INFO_GUI_3_S_NotEnoughItems-1.7.10-1.0.5.120-universal-FA0V.jar, SER_DeathQuotes-1.2.0-mc1.7.10-forge-FAxV.jar, SER_Morpheus-1.7.10-1.6.21-FAxV.jar, SER_SignPicture-1.7.10-2.7.1-universal-FAxV.jar, test.cfg, testCLI.cfg] Recieved message from: /127.0.0.1 Sending servers file list to Socket[addr=/127.0.0.1,port=50977,localport=38067] Recieved message from: /127.0.0.1 Sending client only file list Recieved message from: /127.0.0.1 Writing filesize to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Recieved message from: /127.0.0.1 Writing clientmods\1.7.10\XRay-39.jar to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Finished writing file to client Socket[addr=/127.0.0.1,port=50977,localport=38067] Recieved message from: /127.0.0.1 Writing filesize to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Recieved message from: /127.0.0.1 Writing clientmods\1.7.10\[1.7.10]bspkrsCore-universal-6.16.jar to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Finished writing file to client Socket[addr=/127.0.0.1,port=50977,localport=38067] Recieved message from: /127.0.0.1 Writing filesize to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Recieved message from: /127.0.0.1 Writing clientmods\232Opti32432Fine_1.7.10_HD_U_D9.jar to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Finished writing file to client Socket[addr=/127.0.0.1,port=50977,localport=38067] Recieved message from: /127.0.0.1 Writing filesize to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Recieved message from: /127.0.0.1 Writing clientmods\Opti32432Fine_1.7.10_HD_U_D9.jar to client Socket[addr=/127.0.0.1,port=50977,localport=38067]... Finished writing file to client Socket[addr=/127.0.0.1,port=50977,localport=38067] Client connection timed out, closing Socket[addr=/127.0.0.1,port=50977,localport=38067] Closing connection with: Socket[addr=/127.0.0.1,port=50977,localport=38067]
serversync-client.cfg
https://gist.github.com/6bbebb3a17a6c0dfb0864d30531db5cd
serversync-server.cfg
https://gist.github.com/d2e7aab75eeba402640417d70178574b
Closing in favor of tracking via #99.
Need to fix that logs template ๐
Looks like theres a good old null in mod comparison, never enough null checks.
Code if you are interested, shall check it out next chance I get.
@SvEgiiVEteR Added a pre release version to the releases tab.
This probably wont solve the problem directly, but it will prevent SS from hard crashing and should give us some more information about when & why there is null present.
@SvEgiiVEteR Apologies for taking ages, don't get a lot of time these days.
Going to test out sync with death quotes as it is one of the files failing to be parsed.
I run my instance from inside Google drive folder so it could be due to aggressive writing permission or "file in use" handles. I had some of these problems before when I was still using Dropbox. Then I had to disable syncing before running anything from inside the synced folder.
Running Multimc instances from inside Google Drive has worked fine though. It appears to be much more careful with its writing permission and handles compared to dropbox.
EDIT: These type of problems can also appear when running agressive antivirus software.
Hm it happened again today but this time it deleted all mods in the mod folder. Gonna check if setting serversync-client.cfg to writing protected works around this issue. Weird.
Setting serversync-client.cfg to writing protected appears to have worked for now. I get an error in the log but it continues nevertheless. Maybe it happens when a connection cant be established with the server or download getting interrupted due to unstable connection? Lost my logs again and it only happened the first time sorry.
Error when setting the config to writing protected:
Java is version 1.8.0_131, using 64-bit architecture.
Running Pre-Launch command: java -jar "D:/Portable/Dropbox/GameSaves/MultiMC/instances/MCForge1112/minecraft/serversync-2.6.15.jar" "progress-only"
finished loading config
Loading language file: en_us
No language file available for: en_us, defaulting to en_US
finished loading config
{UPDATE=6c946bd65063ca4360b012571e3004ffb5d1e1f5, UPDATE_NEEDED=d809bd91d0393334d754e91de99f48bf3c79ccd9, UPDATE_GET_SYNCABLE_DIRECTORIES=59647a21029c84864defe96d0fd4ff0da6fe1b42, UPDATE_GET_CLIENT_ONLY_FILES=ea1421d944f3d9bd203331a70cc44f179415261d, FILE_GET_CONFIG=e4212e7e8b96844d426ded742fb505aa79193ccd, FILE_GET_LIST=4ab32554e2a75f0322b6a9361fc038ea43c746cb, FILE_COMPARE=205e231922fae1060f403c2473470139d6cd1c3c, FILE_EXISTS=bcf0b667b857af4b03dcf8c1e253b08e2fbeb999, HANDSHAKE=261a7252d1158133c954da84db9c3f3e30e5aed4, INFO_LAST_UPDATE=7b2de715b5f0a731fcd335549e2ed1a296fc041f, INFO_GET_FILESIZE=1a4c9cbbd4258b7631b338b78c6fe0d5e748ddf3, EXIT=7bc0291025ca96fa8765592e493472a999f33cba}
java.nio.file.AccessDeniedException: config\serversync\serversync-client.cfg
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source)
at java.nio.file.Files.newOutputStream(Unknown Source)
at java.nio.file.Files.newBufferedWriter(Unknown Source)
at java.nio.file.Files.newBufferedWriter(Unknown Source)
at com.superzanti.serversync.SyncConfig.writeConfigUpdates(SyncConfig.java:214)
at com.superzanti.serversync.util.Server.getConfig(Server.java:289)
at com.superzanti.serversync.ClientWorker.run(ClientWorker.java:153)
at java.lang.Thread.run(Unknown Source)
Sending update check to server
Server: [actuallyadditions.cfg, akashictome.cfg, baubles.cfg, betterbuilderswands.cfg, alps.json, alps_foothills.json, bamboo_forest.json, bayou.json, bog.json, boreal_forest.json, brushland.json, chaparral.json, cherry_blossom_grove.json, cold_desert.json, coniferous_forest.json, coral_reef.json, corrupted_sands.json, crag.json, dead_forest.json, dead_swamp.json, eucalyptus_forest.json, fen.json, flower_field.json, flower_island.json, fungi_forest.json, glacier.json, grassland.json, gravel_beach.json, grove.json, highland.json, kelp_forest.json, land_of_lakes.json, lavender_fields.json, lush_desert.json, lush_swamp.json, mangrove.json, maple_woods.json, marsh.json, meadow.json, moor.json, mountain.json, mountain_foothills.json, mystic_grove.json, oasis.json, ominous_woods.json, orchard.json, origin_island.json, outback.json, overgrown_cliffs.json, phantasmagoric_inferno.json, polar_chasm.json, prairie.json, quagmire.json, rainforest.json, redwood_forest.json, sacred_springs.json, seasonal_forest.json, shield.json, shrubland.json, snowy_coniferous_forest.json, snowy_forest.json, steppe.json, temperate_rainforest.json, tropical_island.json, tropical_rainforest.json, tundra.json, undergarden.json, visceral_heap.json, volcanic_island.json, wasteland.json, wetland.json, white_beach.json, woodland.json, xeric_shrubland.json, birch_forest.json, birch_forest_hills.json, desert.json, desert_hills.json, extreme_hills.json, extreme_hills_with_trees.json, forest.json, forest_hills.json, hell.json, ice_flats.json, ice_mountains.json, jungle.json, jungle_hills.json, mesa.json, mesa_clear_rock.json, mushroom_island.json, ocean.json, plains.json, redwood_taiga.json, redwood_taiga_hills.json, roofed_forest.json, savanna.json, savanna_rock.json, sky.json, swampland.json, taiga.json, taiga_cold.json, taiga_cold_hills.json, taiga_hills.json, Put biome config files here, biome_ids.json, gameplay.cfg, misc.cfg, BloodMagic.cfg, DiamondMeteor.json, GoldMeteor.json, IronMeteor.json, botania.cfg, bottledmilk.cfg, BrandonsCore.cfg, Custom Fusion Recipe Info.txt, DraconicEvolution.cfg, detailed.properties, main.cfg, objects.cfg, ChickenChunks.cfg, chisel.cfg, chiselsandbits.cfg, chiselsandbits_clipboard.cfg, client.cfg, common.cfg, friends.cfg, client.cfg, common.cfg, client.cfg, common.cfg, client.cfg, common.cfg, florbs.cfg, client.cfg, common.cfg, lexicon-whitelist.cfg, thermalfoundation_clathrates.json, thermalfoundation_oil.json, thermalfoundation_ores.json, vanilla.json, compactsolars.cfg, ctm.cfg, machines.cfg, main.cfg, version.cfg, denseores.cfg, dimensionalores.cfg, dsurround.cfg, eleccore.cfg, ElevatorMod.cfg, enderstorage.cfg, extrautils2.cfg, Extreme Reactors.cfg, fastleafdecay.cfg, apiculture.cfg, backpacks.cfg, common.cfg, farm.cfg, fluids.cfg, EASY.cfg, HARD.cfg, NORMAL.cfg, OP.cfg, lepidopterology.cfg, plugins.cfg, forge.cfg, forgeChunkLoading.cfg, readme.txt, gravestone.cfg, Guide-API.cfg, harvestcraft.cfg, IC2.ini, immersiveengineering.cfg, immersivepetroleum.cfg, jeibees.cfg, journeymap_ModInfo.cfg, mcjtylib.cfg, Mercurius.cfg, morpheus.cfg, morphtool.cfg, multipart.cfg, balance.cfg, core.cfg, instabilities.cfg, symbols.cfg, natura.cfg, NaturaModules.cfg, notenoughwands.cfg, openglider.cfg, packingtape.cfg, psi.cfg, quark.cfg, randomthings.cfg, rangedpumps.cfg, reborncore.cfg, redstonepaste.cfg, refinedstorage.cfg, control.cfg, dimensions.cfg, dimlets.json, rftools.cfg, roguelike.cfg, roots.cfg, serversync-client.cfg, serversync-server.cfg, simplegenerators.cfg, splash.properties, stevescarts.cfg, storagedrawers.cfg, tconstruct.cfg, energy_priority.json, TinkerModules.cfg, torchmaster.cfg, translocator.cfg, IntegrationModule.cfg, UniDict.cfg, waila.cfg, wailaharvestability.cfg, wawla.cfg, wearablebackpacks.cfg, worldstripper.cfg, xnet.cfg, BrandonsCore-1.11.2-2.2.1.115-universal.jar, Draconic-Evolution-1.11.2-2.2.1.248-universal.jar, refinedstorage-1.4.18.jar] | Client: [refinedstorage-1.4.20.jar]
reached end of update needed
I also got a NullPointerException now somehow randomly. To fix it I had to replace configs again in order to fix it.
Looks like it corrupted serversync-client.cfg when downloading resulting in endless NullPointerException loops.
The error i got was the following + screenshot from MultiMC:
Running Pre-Launch command: java -jar "D:/Portable/Dropbox/GameSaves/MultiMC/instances/MCForge1112/minecraft/serversync-2.6.15.jar" "progress-only" finished loading config Loading language file: sv_se No language file available for: sv_se, defaulting to en_US finished loading config Exception in thread "Thread-4" java.lang.NullPointerException at com.superzanti.serversync.util.Server.exit(Server.java:132) at com.superzanti.serversync.util.Server.close(Server.java:148) at com.superzanti.serversync.ClientWorker.closeWorker(ClientWorker.java:66) at com.superzanti.serversync.ClientWorker.run(ClientWorker.java:97) at java.lang.Thread.run(Unknown Source) Process exited with code 0. Pre-Launch command ran successfully.
This how my corrupted serversync-client.cfg looks like:
# Configuration file
general {
B:REFUSE_CLIENT_MODS=false
}
serverconnection {
S:SERVER_IP=127.0.0.1
I:SERVER_PORT=38067
}
rules {
S:CONFIG_INCLUDE_LIST <
>
S:FILE_IGNORE_LIST <
>
}
misc {
S:LOCALE=sv_SE
}
The error reverted the server port and IP back to localhost 127.0.0.1 and also set LOCALE=sv_SE which is the operating system language I'm using. Swedish sv_SE.
Maybe you need to add a try catch statement when writing to serversync-client.cfg or if there is no change needed, not write to it at all. Just speculating :D
EDIT: I accidentally overwrote serversync-detailed.log sorry.
Cheers
Interesting, this is a different null. When exiting the server.
The config gets built as default when SS can't find it. Is possible that it managed to delete it during sync.