Jump to content

Debug script log


kitcat81

Recommended Posts

I got stuck with an error which I don`t really understand and not even sure if it has to do something with my script. Checked everything 100 times, everything works in game and can`t find any possible reasons.

I`m mostly asking to help me understand how to read the log .When I see an error or a warning it`s not always clear whether it goes to the next listed script name, or to the previous, or something else.

I was checking the log after testing my new game objects and found a record that pioints at one of my objects. I highlighted it with blue. The record has no error or warning next to it, but there is some error just a line after it. I don`t understand if that error points at my script or at the akasingerquestscript or at something else. Help me please.

 

This is a part of the log with this records :

 

\WorkshopParentScript.psc" Line 1456
[WorkshopParent (0002058E)].workshopparentscript.AssignActorToObjectPUBLIC() - "g:\_F4\Art\Raw\ScriptsMilestone\WorkshopParentScript.psc" Line 1326
[ (FF117E97)].SMTWorkshopObject.ActivatedByWorkshopActor() - "C:\Users\Admin\AppData\Local\Temp\PapyrusTemp\SMTWorkshopObject.psc" Line 45
[ (FF058F1B)].workshopnpcscript.assigned.OnCommandModeGiveCommand() - "g:\_F4\Art\Raw\ScriptsMilestone\WorkshopNPCScript.psc" Line ?
[01/24/2017 - 09:46:48PM] error: Cannot call GetActorRefOwner() on a None object, aborting function call
stack:
[None].akasingerquestscript.::remote_WorkshopParentScript_WorkshopActorAssignedToWork() - "C:\Users\Akarnan\AppData\Local\Temp\PapyrusTemp\AkaSingerQuestScript.psc" Line 234
[01/24/2017 - 09:46:48PM] error: Cannot call assignedActor() on a None object, aborting function call
stack:
[None].akasingerquestscript.::remote_WorkshopParentScript_WorkshopActorAssignedToWork() - "C:\Users\Akarnan\AppData\Local\Temp\PapyrusTemp\AkaSingerQuestScript.psc" Line 234
[01/24/2017 - 09:46:48PM] error: Cannot call assignedActor() on a None object, aborting function call
stack:

Edited by kitcat81
Link to comment
Share on other sites

Thank you for your input.

I looked at workshopnpcscript and it does not have any records like "GetActorRefOwner"... I don`t understand where this log takes "GetActorRefOwner"...But in game actors get assigned and the ownership changes correctly...So the the game finds everything and changes the ownership of my object either to assigned actor or to none when no one is assigned....

 

WorkshopNPCscript also gives anothert warning and points at some variable temp 700 which I have no idea where to find :

 

(FF02744E)].workshopnpcscript.assigned.OnCommandModeGiveCommand() - "g:\_F4\Art\Raw\ScriptsMilestone\WorkshopNPCScript.psc" Line ?
[01/24/2017 - 10:46:41PM] warning: Assigning None to a non-object variable named "::temp700"
stack:

Link to comment
Share on other sites

i won't be much of a help anymore since im gonna take a wild guess,

 

since it's looking for "GetActorRefOwner" it tried to find if the actor exists is the world and if not, it aborts the call (like tries calling a line inside the other script and if the other script is not active, it just does nothing).

Link to comment
Share on other sites

i won't be much of a help anymore since im gonna take a wild guess,

 

since it's looking for "GetActorRefOwner" it tried to find if the actor exists is the world and if not, it aborts the call (like tries calling a line inside the other script and if the other script is not active, it just does nothing).

Thanks a lot for trying to help again :) Maybe you are right... though I can`t think how can I check this... I don`t understand what script calls this function.

The log is such a mess. I get this warning/error in the moment I assign actors only. No errors after it.

I decided to try and assign settlers to some vanilla and DLC objects...And getting some similar warnings :

 

(0002058E)].workshopparentscript.TryToAssignResourceObjectsPUBLIC() - "g:\_F4\Art\Raw\ScriptsMilestone\WorkshopParentScript.psc" Line 1133

[ (0001D0E2)].workshopscript.OnTimer() - "g:\_F4\Art\Raw\ScriptsMilestone\WorkshopScript.psc" Line 439

[01/24/2017 - 11:23:45PM] warning: Assigning None to a non-object variable named "::temp886"

stack:

[WorkshopParent (0002058E)].workshopparentscript.TryToAssignResourceType() - "g:\_F4\Art\Raw\ScriptsMilestone\WorkshopParentScript.psc" Line 2571

[WorkshopParent

 

Just no ownership error... Maybe this is because vanilla objects are set to player ownership by default (so they can be damaged by enemies)..And I set in WorkshopObjectScript properties to set "none" ownership on creation to prevent damage. I`ll try to change this and to see if it will remove the "GetActorRefowner" error.

Wondering how bad is this error..Maybe I could just leave it this way.

Link to comment
Share on other sites

I have tried changing the property settings and it makes no difference. Seems like some other script is trying to obtain the owner of some unexisting object after assigning setllers to my custom objects.

 

I have also found some skyrim examples of reading papyrus and it shows that the log writes the error first, and then points at the stack that contains the error. It is really hard to guess , the notepad makes it all look like an endless mass of text with no sctructure. So this error is most likely to point at the next stack (at least if that info is correct) :

 

[01/24/2017 - 09:46:48PM] error: Cannot call GetActorRefOwner() on a None object, aborting function call
stack:
[None].akasingerquestscript.::remote_WorkshopParentScript_WorkshopActorAssignedToWork() - "C:\Users\Akarnan\AppData\Local\Temp\PapyrusTemp\AkaSingerQuestScript.psc" Line 234

 

Checked the singer script.... and it is registered to recieve assingning events and tries to do something which leads to numerous errors with both vanilla and custom work objects :/

Singer mod is one of my favorite mods...I think I can live with all this errors. Don`t want to uninstall it .

If someone can provide any additional info on reading these, I`ll be very thankful.

 

 

I did some more testing..... and found out that all the same errors and warnings appear when assigning to vanilla guarposts. Well my object is also a guardpost. ...Hahaha..can`t believe I spent the whole evening trying to copypaste more and more script parts into my extension to see if it can fix this error while all vanilla posts get the same errors..Now I need another evening to delete all this stuff. :D

Edited by kitcat81
Link to comment
Share on other sites

  • 10 months later...

Generally, the way to figure out what is (or, rather, what should be) the problem with this type of bug is to do a check like:

if (None == yourVariableOrProperty)
    Debug.TraceStack("OMG it was null") ; because it's frequently helpful to know the execution path that resulted in this error
else
    yourVariableOrProperty.yourFunction()
endif

Defensive coding where no action is taken if there's nothing in the variable pointing to the object you're trying to act on (with the associated debug output) is generally the best way to go. I say that as someone who has made plenty of mistakes in his Papyrus libraries and finally just gave up and forced myself to do detailed debug logging and defensive programming from the word "go" in my modding work. It saves a whole lot of time trying to sort out what didn't work.

Good luck.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...