Reply To: [Bug] Graph OnEnable() fires on Load, causes errors

NodeCanvas Forums Support [Bug] Graph OnEnable() fires on Load, causes errors Reply To: [Bug] Graph OnEnable() fires on Load, causes errors

#16145
whitedoggy
Participant

Hi.

Right now I have fixed all primary issues with porting NodeCanvas into XBOX.

I want to share what I tried from your last answer.

 

Background:

– I have edited Logger.cs but nothing have been different.

 

How I have solved the problem:

– According to the lines of the exception, error was occurred from ‘OnAfterDeserialization’ Method and it was in GraphOwner.cs.

– But I couldn’t know which line of it exactly occur the error, so I have applied try-catch block like below.

trycatch

– But it was not much effective so far because I couldn’t know which GameObject or Graph is causing error. So I added little trick like below.

Trick

 

– From this, I was able to know which graphs are causing error, and which Exposed Parameter is causing Error

– Surprisingly, the errors was from Double parameters.

Double was not in the default type, so It wasn’t in AOTClass.cs or link.xml.

Error
Double

– So I have added double or any other types that I think it as a essential.

– Generate AOTClasses and link.xml again, then it solved.

 

Conclusion:

– I think error logs when deserialization or when using reflection feature need to be more effective. Like how I did above.

 

I feel so happy this finally got nearly end. Thanks for the help. 🙂

 

Attachments:
  1. trycatch.png

  2. Trick.png

  3. Error.png

  4. Double.png