We just started seeing these messages appearing in the debug area (console) of Xcode when we navigate to the view controller where the GMSMapView gets created. Everything seems to be working fine, we just don't like messages like this in the logs. We don't see them every run, just enough to take notice. Is this something to worry about?
objc[15874]: Class _NSZombie_GMSx_PBString is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_PBString is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_PBString is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_PBString is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_PBString is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_GMMResourceResponseProto_Response is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_GMMResourceResponseProto is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_GMMResourceResponseProto is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
objc[15874]: Class _NSZombie_GMSx_GMMResourceResponseProto is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
Any help would be appreciated!
NSZombies is turned on. Go to product -> scheme -> edit scheme (CMD+SHIFT+.) and under run -> diagnostics uncheck "Enable Zombies".
Related
Chisel throws an exception with an elaboration error message. The following is a result of my code as an example.
chisel3.core.Binding$ExpectedHardwareException: data to be connected 'chisel3.core.Bool#81' must be hardware, not a bare Chisel type. Perhaps you forgot to wrap it in Wire(_) or IO(_)?
This exception message is interesting because 81 behind chisel3.core.Bool# looks like ID, not hashcode.
Indeed, Data type extends HasId trait which has _id field, and
_id field seems to generate a unique ID for each components.
I've thought Data type overrides toString to make string that has type#ID, but it does not override. That is why $node in below code should not be able to use ID.
throw Binding.ExpectedHardwareException(s"$prefix'$node' must be hardware, " +
"not a bare Chisel type. Perhaps you forgot to wrap it in Wire(_) or IO(_)?")
Instead of toString, toNamed method exists in Data. However, this method seems to be called to generate a firrtl code, not to convert component into string.
Why can Data type show its ID?
If it is not ID, but exactly hashcode, this question is from my misunderstanding.
I think you should take a look at Chisel PR #985. It changes the way that Data's toString method is implemented. I'm not sure if it answers your question directly but it's possible this will make the meaning and location of the error clearer. If not you should comment on it.
Scala classes come with a default toString method that is of the form className#hashCode.
As you noted, the chisel3.core.Bool#81 sure looks like it's using the _id rather than the hashCode. That's because in the most recently published version of Chisel (3.1.6), the hashcode was the id! You can see this if you inspect the source files at the tag for that version: https://github.com/freechipsproject/chisel3/blob/dc4200f8b622e637ec170dc0728c7887a7dbc566/chiselFrontend/src/main/scala/chisel3/internal/Builder.scala#L81
This is no longer the case on master which probably the source of any confusion! As Chick noted, we have just changed the .toString method to be more informative than the default; expect more informative representations in 3.2.0!
Chrome debug console snapshot
I basically am unsure as to what is causing this error ^^.
I've done a little digginng, and it seemse the previousProperties is passed in as previous.properties by updateDom(). previous, in turn, is passed in by update where it is labeled as just vnode. This VNOde is a valid VNode, but just lacks the properties.
I'm pretty sure I've made everything distinguishable (by setting unique key properties) that would need to be distinguishable, so I don't think that's the problem, although I could be mistaken.
So I had this question, wrote it, did more looking and found my answer before even posting it. I'm still posting this question, and answering it myself in hopes that it might help save someone else some heartache in the future.
In this case, this error is being caused by a projector rendering and receiving an invalid value in return from the renderMaquette function. In my component based framework, I've been using ternary operators to work like if-else statements inside renderMaquetteFunction return blocks. I.E.
function renderMaquette(){
return h('div',
showTitle ?
h('h1', 'My Title')
: []
)
}
Leaving an empty array is perfectly acceptable parameter inside of a hyperscript function, as it will return nothing. However, returning an empty array is not. I.E.
function renderMaquette(){
return showTitle ?
h('h1', 'My Title')
: []
}
This generates an error.
The problem is, I cannot find listeners having been added to the table.
It seems the method getListeners doesn't work properly. It returns an empty collection.
My code:
table.addValueChangeListener(new MyListener());
System.out.println("ListenerCount="+table.getListeners(ValueChangeListener.class).size());
Console output:
ListenerCount=0
What is wrong? I expected it would return 1.
AbstractComponent.getListeners takes the event type class as an argument.
Pass it a Property.ValueChangeEvent or one of it's implementations, a Field.ValueChangeEvent or Label.ValueChangeEvent, depending on your use case.
If you read the API very carefully you'll see that you need to provide the event type of your listener:
java.util.Collection<?> getListeners(java.lang.Class<?> eventType)
Returns all listeners that are registered for the given event type
or one of its subclasses.
In your case:
table.getListeners(ValueChangeEvent.class);
This page says that Database.SetInitializer() "Gets or sets the database initialization strategy":
http://msdn.microsoft.com/en-us/library/system.data.entity.database%28v=vs.103%29.aspx
I am interested in GETTING the current initializtion strategy, but the method returns void, there is no parameter-less overload, and there is no overload with a ref or out parameter. So I'm at a loss as to how to use this. Am I missing something obvious or is this a typo?
... If it's a typo, any suggestions on how to work around this?
That is a typo. There is no public method or property to get current initialization strategy.
Let's say I have a method, Foo(). There are only certain times when Foo() is appropriate, as determined by the method ShouldFooNow(). However, there are many times when the program must consider if Foo() is appropriate at this time. So instead of writing:
if ShouldFooNow():
Foo()
everywhere, I just make that into one function:
def __name():
if ShouldFooNow():
Foo()
What would be a good name for this method? I'm having a hard time coming up with a good convention. IfNecessaryFoo() is awkward, particularly if Foo() has a longer name. DoFooIfShould()? Even more awkward.
What would be a better name style?
I think you're pretty close. Put the action/intent at the head of the method name, for easier alphabetic searching. If I were writing something like that, I'd consider
FooIfNecessary()
FooIfRequired()
Say, for instance,
ElevatePermissionsIfNecessary()
You could use EnsureFoo().
For example, the method EnsurePermissions() will take the appropriate action if needed. If the permissions are already correct, the method won't do anything.
I've recently started using the convention:
FooIf(args, bool);
Where args are any arguments that the method takes and bool is either expecting a boolean value or a Func of some kind that resolves to a boolean. Then, within that method, I check the bool and run the logic. Keeps such assertions down to one line and looks clean to me.
Example in my C# code for logging:
public void WarnIf<T>(T value, string message, Func<T, bool> isTrue)
{
if (isTrue(value)) _log.Warn(message);
}
Then I would call it with something like:
WarnIf(someObject, "This is a warning message to be logged.", s => s.SomeCondition == true);
(That caller may not be correct, but you get the idea... I don't have the code in front of me right now.)
Michael Petrotta's answer (IfNecessary or IfRequired suffix) is good, but I prefer a shorter alternative: IfNeeded.
ElevatePermissionsIfNeeded()
And if you want something even shorter I would consider a prefix like May or Might:
MayElevatePermissions()
MightElevatePermissions()
I don't see what's wrong with the original code:
if shouldFoo():
Foo();
is perfectly clear IMHO.
Not just that, but it clearly separates concerns of deciding about doing the action, vs the action itself.
Another option for a similar question with a slightly different approach to avoiding the postfix:
https://softwareengineering.stackexchange.com/a/161754/262009