Jump to content
The latest updated version of RAGE Plugin Hook, required to play LSPDFR, can be found inside the LSPDFR download. It is not currently available on the RAGE Plugin Hook website.

Better logs for debugging


Airikir

Recommended Posts

In some cases the exceptions aren´t including any useful information like for example the XML file name that was parsed when the crash happened.

This makes it extremely difficult to troubleshoot and wastes a lot of personal time and community effort to support.

Is it possible to improve the logging to give more usefuil information?

Rage?  lspdfr?

 

For example exceptions like "duplicate key" when a zone is defined twice in a section where it is only allowed once.

The name of the zone must already be known by the code to be be able to throw that excpetion, so why not print it?

Link to comment
Share on other sites

Ok, I found an old ragrepluginhook log but it is not about duplicate zones but if I remember correctly the reason for this error was an empty string value for one of the the xml element attributes, but I could not find any information in the log about which file or which xml attribute it was when looking in the log so I had to go through the entire file until I found the "".

Spoiler

9/6/2020 3:42:01 AM.127] Unhandled exception occurred in console command "ForceDuty"
[9/6/2020 3:42:01 AM.127] Exception type: System.FormatException
[9/6/2020 3:42:01 AM.127] Exception message: Input string was not in a correct format.
[9/6/2020 3:42:01 AM.127] Stack trace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
[9/6/2020 3:42:01 AM.127]    at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
[9/6/2020 3:42:01 AM.127]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‫‌‬‌‫‏‎‬‌‬‮‫‭‪‮‌‌‏‮(XmlNode )
[9/6/2020 3:42:01 AM.127]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‭‪‮‫‮‎‫‌‪‬‭‮‮‬‎‮‬‮‪‏‪‏‮(String )
[9/6/2020 3:42:01 AM.127]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‌‍‭‌‏‌‌‬‍‭‏‭‍‬‪‏‎‎‪‌‭‬‮‏‮()
[9/6/2020 3:42:01 AM.127]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‭‮‫‪‪‫‏‮‪‍‎‎‌‏‍‏‭‍‮‌‍‮‏‬‬‎‪‪‮()
[9/6/2020 3:42:01 AM.127]    at ‎‮‮‌‪‌‍‫‬‭‎‪‎‭‭‪‌‏‪‏‮.‍‮‍‌‍‍‌‌‌‌‬‍‫‬‬‮‬‬‌‪‫‪‪‬‍‌‮(Boolean )
[9/6/2020 3:42:01 AM.127]    at LSPD_First_Response.Mod.API.Functions.OnDutyStateChangedEventHandler.Invoke(Boolean onDuty)
[9/6/2020 3:42:01 AM.127]    at DusrDHkmAvhJIDbNaBBmRhirjdXQA.WJNzmlaPncYhywmIhDIhhvdvdqvf(Boolean ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\PlayerDutyController.cs:line 69
[9/6/2020 3:42:01 AM.127]    at DusrDHkmAvhJIDbNaBBmRhirjdXQA.HRvIxRTvCMijnvrXDQTwWPwcECNf(Boolean , Boolean ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\PlayerDutyController.cs:line 371
[9/6/2020 3:42:01 AM.127]    at LSPD_First_Response.Mod.Utils.ConsoleCommands.Command_ForceDuty(Boolean keepCurrentOutfit, Boolean keepLoadout) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Utils\ConsoleCommands.cs:line 282

 

Here is actually an example of a really helpful log that tells you even the line number:

Spoiler

[9/4/2020 11:17:06 PM.054] Unhandled exception occurred in console command "ForceDuty"
[9/4/2020 11:17:06 PM.054] Exception type: System.Xml.XmlException
[9/4/2020 11:17:06 PM.054] Exception message: The 'VehicleSet' start tag on line 307 position 5 does not match the end tag of 'BlaineCounty'. Line 394, position 5.
[9/4/2020 11:17:06 PM.054] Stack trace: at System.Xml.XmlTextReaderImpl.Throw(Exception e)
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlTextReaderImpl.ParseEndElement()
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlTextReaderImpl.ParseElementContent()
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlDocument.Load(XmlReader reader)
[9/4/2020 11:17:06 PM.054]    at System.Xml.XmlDocument.Load(String filename)
[9/4/2020 11:17:06 PM.054]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‬‮‌‍‏‌‪‪‎‍‏‪‬‪‎‭‎‏‮‫‬‮‬‬‫‮(XmlDocument , String )
[9/4/2020 11:17:06 PM.054]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‭‪‮‫‮‎‫‌‪‬‭‮‮‬‎‮‬‮‪‏‪‏‮(String )
[9/4/2020 11:17:06 PM.054]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‌‍‭‌‏‌‌‬‍‭‏‭‍‬‪‏‎‎‪‌‭‬‮‏‮()
[9/4/2020 11:17:06 PM.054]    at ‍‭‭‏‫‫‍‏‬‫‌‮‎‭‏‌‮‫‌‬‮‮.‭‮‫‪‪‫‏‮‪‍‎‎‌‏‍‏‭‍‮‌‍‮‏‬‬‎‪‪‮()
[9/4/2020 11:17:06 PM.054]    at ‎‮‮‌‪‌‍‫‬‭‎‪‎‭‭‪‌‏‪‏‮.‍‮‍‌‍‍‌‌‌‌‬‍‫‬‬‮‬‬‌‪‫‪‪‬‍‌‮(Boolean )
[9/4/2020 11:17:06 PM.054]    at LSPD_First_Response.Mod.API.Functions.OnDutyStateChangedEventHandler.Invoke(Boolean onDuty)
[9/4/2020 11:17:06 PM.054]    at DusrDHkmAvhJIDbNaBBmRhirjdXQA.WJNzmlaPncYhywmIhDIhhvdvdqvf(Boolean ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\PlayerDutyController.cs:line 69
[9/4/2020 11:17:06 PM.054]    at DusrDHkmAvhJIDbNaBBmRhirjdXQA.HRvIxRTvCMijnvrXDQTwWPwcECNf(Boolean , Boolean ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\PlayerDutyController.cs:line 371
[9/4/2020 11:17:06 PM.054]    at LSPD_First_Response.Mod.Utils.ConsoleCommands.Command_ForceDuty(Boolean keepCurrentOutfit, Boolean keepLoadout) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Utils\ConsoleCommands.cs:line 282

 

Link to comment
Share on other sites

You should only reply here to ask for more information from Airikir or to answer the person's issue.

Reply to this thread only to offer help or assistance to Airikir.
If you want support, create your own thread in the appropriate forum. Non-relevant replies, derailing posts, "me too", disinformation and other support requests will be removed without warning.

Guest
You can no longer reply to this support topic as it was started over a year ago. Please make a new thread.


×
×
  • Create New...