cartman-2000 / Warps

Adds named teleport points to a server.
3 stars 4 forks source link

Plugin not working #2

Open Russ1anAlpha opened 5 years ago

Russ1anAlpha commented 5 years ago

Warps.Warp.set_XmlLocation (System.String value) (at <16ff6ff2aa7f46edb446f89797487b6b>:0) Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderWarpsConfig.Read3_Warp (System.Boolean isNullable, System.Boolean checkType) (at :0) Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderWarpsConfig.Read4_WarpsConfig (System.Boolean isNullable, System.Boolean checkType) (at :0) Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderWarpsConfig.Read5_WarpsConfig () (at :0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as InvalidOperationException: There is an error in XML document (25, 149). System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) (at <03e950671d964403ab67ff751c460757>:0) System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle) (at <03e950671d964403ab67ff751c460757>:0) System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.TextReader textReader) (at <03e950671d964403ab67ff751c460757>:0) Rocket.Core.Assets.XMLFileAsset1[T].Load (Rocket.API.AssetLoaded1[T] callback) (at <42b9432d1ede4060ab7b64e73c43b05c>:0) Rethrow as Exception: Failed to deserialize XMLFileAsset: Plugins/Warps/Warps.configuration.xml Rocket.Core.Assets.XMLFileAsset1[T].Load (Rocket.API.AssetLoaded1[T] callback) (at <42b9432d1ede4060ab7b64e73c43b05c>:0) Rocket.Core.Assets.XMLFileAsset1[T]..ctor (System.String file, System.Type[] extraTypes, Warps.WarpsConfig defaultInstance) (at <42b9432d1ede4060ab7b64e73c43b05c>:0) Rocket.Core.Plugins.RocketPlugin1[RocketPluginConfiguration]..ctor () (at <42b9432d1ede4060ab7b64e73c43b05c>:0) Warps.Warps..ctor () (at <16ff6ff2aa7f46edb446f89797487b6b>:0)

Please fix this.

cartman-2000 commented 5 years ago

That isn't the full trace for a xml config file formatting error, in the plugin. if the xml file formatting is wrong, it can generate an error on plugin load. If you could upload the config file that you have for the plugin, I could see what the issue is in the file.

Russ1anAlpha commented 5 years ago

That isn't the full trace for a xml config file formatting error, in the plugin. if the xml file formatting is wrong, it can generate an error on plugin load. If you could upload the config file that you have for the plugin, I could see what the issue is in the file.

https://yadi.sk/d/zUrKRS_o2-n2yg

cartman-2000 commented 5 years ago

I'd also need a copy of the config file too, so I can trace the position the trace has to the file.

Russ1anAlpha commented 5 years ago

I'd also need a copy of the config file too, so I can trace the position the trace has to the file.

https://yadi.sk/d/kkOApqAo07lX5Q

cartman-2000 commented 5 years ago

if it's the same config that had the trace from above, it would probably be from the unicode characters in it, It is possible for it to kill a config, if it's handled as a binary value in the config, for a unicode value.

Russ1anAlpha commented 5 years ago

if it's the same config that had the trace from above, it would probably be from the unicode characters in it, It is possible for it to kill a config, if it's handled as a binary value in the config, for a unicode value.

and what to do? The plugin does not work only on windows

cartman-2000 commented 5 years ago

does it work if you try to delete the character out of the file?

cartman-2000 commented 5 years ago

https://www.dropbox.com/s/j2hpv2i3cpihxai/Screenshot%202019-03-20%2000.50.59.png?dl=0

cartman-2000 commented 5 years ago

^xml is a bit finiky with with unicode characters, I could try to switch it to a base64 encoding for the string values in the xml file, which wouldn't have an encoding issue.

cartman-2000 commented 5 years ago

it's the most finiky with binary characters in particular, but it can potentially have issues with normal unicode characters.

^the internal xml serializer would output them to the xml file, but fail to re-read the file again, in that instance.

Russ1anAlpha commented 5 years ago

https://www.dropbox.com/s/j2hpv2i3cpihxai/Screenshot%202019-03-20%2000.50.59.png?dl=0

does not work :c

cartman-2000 commented 5 years ago

try removing all of those characters from the file, will it work then?

Russ1anAlpha commented 5 years ago

try removing all of those characters from the file, will it work then?

I deleted all the characters. And i also reinstalled the plugin.

cartman-2000 commented 5 years ago

^the original error is possibly a xml file conversion type error, "Rethrow as InvalidOperationException: There is an error in XML document (25, 149)." if it failed to read the file in the plugin, which is potentially possible with unicode characters in the file(it shows the line and column in the file at the time it was thrown.).

cartman-2000 commented 5 years ago

^reloading the file, while removing the character works properly on my test server.

cartman-2000 commented 5 years ago

The file that you sent me "does" also load prorperly on my server, which is a Windows test server. (There can be differences between the linux and windows server's which could cause issues, one of which is that linux is still using the old .net 2.0-3.5 mono, while the windows one is using the 4.0+ version of .net in mono.

https://yadi.sk/d/kkOApqAo07lX5Q

Russ1anAlpha commented 5 years ago

The file that you sent me does also load prorperly on my server, which is a Windows test server.

https://yadi.sk/d/kkOApqAo07lX5Q

I tried again on the server to delete the config. After that, the plugin earned. But why when i deleted only the characters, the plugin did not want to work?

cartman-2000 commented 5 years ago

it's possible that you may have an improper formatting of the xml file, if you edited it in a text editor. (just thinking, but if the editor didn't handle the unicode characters properly, than there could be binary characters in the file, which would break the config.

I usually use notepad++ for for modifying config files on my server's.

Russ1anAlpha commented 5 years ago

I too usually only use notepad ++ for modifying config files on my server's.

Russ1anAlpha commented 5 years ago

it's possible that you may have an improper formatting of the xml file, if you edited it in a text editor. (just thinking, but if the editor didn't handle the unicode characters properly, than there could be binary characters in the file, which would break the config.

I usually use notepad++ for for modifying config files on my server's.

Try to put points on the Windows server and then restart it. I lost points, but remained in the config. The point went under the water.

cartman-2000 commented 5 years ago

I have this in another plugin that strips binary characters out of a config, which usually messes it up.

    // Sanitize strings with binary control characters 0x00-0x1f.
    public static string Sanitze(this string value)
    {
        if (value == null)
            return null;
        return Regex.Replace(value, @"([\u0000-\u001F])+", " ");
    }
Russ1anAlpha commented 5 years ago

I have this in another plugin that strips binary characters out of a config, which usually messes it up.

    // Sanitize strings with binary control characters 0x00-0x1f.
    public static string Sanitze(this string value)
    {
        if (value == null)
            return null;
        return Regex.Replace(value, @"([\u0000-\u001F])+", " ");
    }

Try to put points on the Windows server and then restart it. I lost points, but remained in the config. The point went under the water. Bro?