Unhelpful ambiguous component error
Reported by Christopher Stawarz | January 27th, 2011 @ 04:55 PM
The attached experiment has a variable and a timer that are both named "ignore_timer". When you try to load the experiment, the parser correctly raises an "ambiguously referenced component" error. However, the error message gives no indication as to which components are ambiguous:
ERROR: An attempt was made to access an ambiguously referenced component. Please ensure that all object tag names are unique: ()
In order to help the user fix the problem, the error message should indicate which components are at fault. (I believe the core is already trying to do this, but for some reason it's not working.)
Comments and changes to this ticket
-
David Cox February 2nd, 2011 @ 12:31 PM
- Assigned user set to David Cox
Obviously, that exception normally does print out some indication of what component was at fault (and that's what that empty "()" appears to be).
In this case, the tag field in the component isn't getting set by either offending party (a variable and a timer).
The fix is a bandaid deep in the ugly bowels of the whole VariablesProperties mess. We should refactor this entirely, as well as make better use of the AmbiguousReference exception's ability to register all offending components, but for now, this quick fix will allow users to at least have a fighting chance of figuring out where the problem is.
I'll open new tickets for the more extensive fixes; this will likely interact with larger parser / plugin / component refactoring.
-
David Cox February 2nd, 2011 @ 12:32 PM
- State changed from new to resolved
Immediate problem resolved in commit:0260b1e8
-
David Cox February 2nd, 2011 @ 03:58 PM
(from [0260b1e86cd037e841b57c679613a51dce5c654d]) Make sure variables use the Component::setTag method to identify themselves [#66 state:resolved] https://github.com/mworks-project/mw_core/commit/0260b1e86cd037e841...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The core framework and supporting libraries for the MWorks Suite
People watching this ticket
Attachments
Referenced by
- 66 Unhelpful ambiguous component error (from [0260b1e86cd037e841b57c679613a51dce5c654d]) Make su...