Adam's Lair Forum

game development and casual madness
It is currently 2019/09/17, 15:18

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2013/10/08, 17:23 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
As the subject says, there is an exception that is thrown only in the Scene Editor and only when I am hovering on one of my components with the mouse.

Unfortunately both the log view inside the editor and the editor's logfile only give me this information:
Code:
[Core] ERROR:       There was an error while Camera in "CamView Camera 0" was collecting drawcalls: NullReferenceException at String SceneEditorCamViewState.SelGameObj.UpdateActionText(CamViewState.ObjectAction, Boolean): Object reference not set to an instance of an object.
[Core]              CallStack:
[Core]                 at EditorBase.CamViewStates.SceneEditorCamViewState.SelGameObj.UpdateActionText(ObjectAction action, Boolean performing)
[Core]                 at EditorBase.CamViewStates.CamViewState.OnCollectStateOverlayDrawcalls(Canvas canvas)
[Core]                 at EditorBase.CamViewStates.SceneEditorCamViewState.OnCollectStateOverlayDrawcalls(Canvas canvas)
[Core]                 at EditorBase.CamViewStates.CamViewState.camPassEdScreen_CollectDrawcalls(Object sender, CollectDrawcallEventArgs e)
[Core]                 at Duality.Components.Camera.Pass.NotifyCollectDrawcalls(IDrawDevice device)
[Core]                 at Duality.Components.Camera.RenderSinglePass(Pass p)


I'd like to fix it before uploading my plugin.. any idea on where I could look?

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2013/10/08, 17:45 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Duality doesn't actively crop the stack trace. It prints out all it can get using the .Net API. Unfortunately I've never experienced a similar behavior myself yet and wasn't able to reproduce something like this in my test setup. Things you can try to pin this down:

  • Attach the Visual Studio instance containing your plugin to the running editor application and activate breaking on thrown Exceptions, not just unhandled ones.
  • Check out the Duality source code, compile DualityEditor yourself (debug mode), add your plugin and do some debugging.

Since this might be a Duality bug, I'd be glad if you could share what you found out. :)

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2013/10/09, 08:41 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Ok, I found out the issue without the need for debugging.. (I had the idea on what was different in this Component compared to the others while on the toilet :mrgreen: as most of my best ideas)

The problem is that this Component is a ICmpRenderer but it has no Transform of its own, being based on other Components' Transforms to work. Nonetheless in the editor I draw a placeholder to show where it would appear and whenever I hover it in the Scene Editor, since the tooltip doesn't have a Transform to display, I get the error message.

I wouldn't want to have to add a Transform to the Component because it would possibly be misleading, as it would be ignored by the Component. On the other hand I understand that the tooltip would be empty without it. Maybe it would be possible to add the GameObject's Name on top of the tooltip and, if present, the Transform's coordinates? Also, this could be the determinant for allowing to move the GameObject or not

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2013/10/09, 12:00 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
This is definitely something Duality needs to address. Thanks for your detailed report :) I'll look into it when I get around to it.

Edit: Fixed.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group