AtticArcade / hotween

Automatically exported from code.google.com/p/hotween
0 stars 0 forks source link

VerificationException in Web Player (NGUI related) #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Tween a GameObject with HOTween.To().

What is the expected output?
A tweened object.

What do you see instead?
The error:

VerificationException: Error verifying Member:Get (object): Cannot call a 
non-final virtual method from an objet diferent thant the this pointer at 0x0006
FastDynamicMemberAccessor.MemberAccessor.Get (System.Object target)
Holoville.HOTween.Plugins.Core.ABSTweenPlugin.GetValue ()
Holoville.HOTween.Plugins.Core.ABSTweenPlugin.Startup (Boolean 
p_onlyCalcSpeedBasedDur)
Holoville.HOTween.Plugins.Core.ABSTweenPlugin.Startup ()
Holoville.HOTween.Tweener.Startup (Boolean p_force)
Holoville.HOTween.Tweener.Startup ()
Holoville.HOTween.Tweener.Update (Single p_shortElapsed, Boolean p_forceUpdate, 
Boolean p_isStartupIteration, Boolean p_ignoreCallbacks, Boolean p_ignoreDelay)
Holoville.HOTween.Tweener.Update (Single p_shortElapsed, Boolean p_forceUpdate, 
Boolean p_isStartupIteration, Boolean p_ignoreCallbacks)
Holoville.HOTween.Core.ABSTweenComponent.Update (Single p_elapsed)
Holoville.HOTween.HOTween.DoUpdate (UpdateType p_updateType, Single p_elapsed)
Holoville.HOTween.HOTween.Update ()

What version of the product are you using? On what operating system?
Unity 4.0.0f7

Original issue reported on code.google.com by bjor...@kixeye.com on 8 Jan 2013 at 6:55

GoogleCodeExporter commented 8 years ago
Hi bjordan.

That's weird: I just finished developing a game with Unity 4 and a lot of 
HOTween inside, and the webplayer works perfectly. Could you write me an 
example line of code that generates this error? And also on what platform 
you're running the player from?

Original comment by daniele....@gmail.com on 8 Jan 2013 at 7:00

GoogleCodeExporter commented 8 years ago
Yes, I'll try to reproduce it in a sample project.

Original comment by bjor...@kixeye.com on 8 Jan 2013 at 7:07

GoogleCodeExporter commented 8 years ago
Unfortunately for me, HOTween works fine in my sample project. This must be 
specific to our code, not yours.

Sorry for the bug!

Original comment by bjor...@kixeye.com on 8 Jan 2013 at 7:16

GoogleCodeExporter commented 8 years ago
Good luck with your bug then ;)

Original comment by daniele....@gmail.com on 8 Jan 2013 at 7:30

GoogleCodeExporter commented 8 years ago

Original comment by daniele....@gmail.com on 8 Jan 2013 at 7:31

GoogleCodeExporter commented 8 years ago
I have the same issue for my webplayer. It seems that an HOTween that access to 
basics properties from Unity (transform.position for example) is working, but 
every time I'm trying to access to properties from my scripts, it causes this 
error.

Original comment by cayou.an...@gmail.com on 6 Feb 2014 at 6:47

GoogleCodeExporter commented 8 years ago
Can you create a sample project that replicates this issue, so I can play with 
it and see what's happening?

Original comment by daniele....@gmail.com on 8 Feb 2014 at 12:19

GoogleCodeExporter commented 8 years ago
Sure.

Original comment by cayou.an...@gmail.com on 8 Feb 2014 at 12:20

GoogleCodeExporter commented 8 years ago
I'm getting this too. Only in the web player, and only when I try to tween the 
properties of an NGUI sprite, eg "alpha". Works fine on iOS and Android 
platforms (all with Unity 4.3.1f1).

Here's a snippet that fails:

UISprite popupScreen = GameObjects.Find("PopupScreen").GetComponent<UISprite>();
popupScreen.gameObject.SetActive(true);
popupScreen.alpha = 0;
HOTween.To(popupScreen, 0.25f, new TweenParms()
           .Prop("alpha", 0.5f)
           .Delay(0.1f)
           .Ease(EaseType.EaseInOutCubic)
           );

Looking through NGUI's code (which is licensed, so I don't think I can post it 
up here), UISprite inherits it's alpha property from UIWidget:
public override float alpha { /* standard looking getter/setter here */ }

That definition overrides this alpha property from UIRect:
public abstract float alpha { get; set; }

Original comment by cmu.deep...@gmail.com on 26 Feb 2014 at 4:14

GoogleCodeExporter commented 8 years ago
Found a simple enough workaround, although I don't know if it's really a fix or 
not as the workaround isn't needed on iOS/Android: If I mark the property in 
question as "sealed" then it runs and tweens without raising an exception:

public sealed override float alpha { /* Getter/setter removed */ }

Original comment by cmu.deep...@gmail.com on 26 Feb 2014 at 4:22

GoogleCodeExporter commented 8 years ago
Thanks for bumping up this thread, I tried to recreate the issue, but I wasn't 
able to reproduce it with an empty project, even if in my real project I don't 
have any big code using HOTween.
I'm gonna try "sealed", after reading some documentation about this keyword.

Oh btw, it was a bug with NGUI too (tweening alpha property).
The only problem I see here is that I need to change the NGUI code, which is 
not a good idea in general.

Anyway, thanks again !

Original comment by cayou.an...@gmail.com on 26 Feb 2014 at 4:27

GoogleCodeExporter commented 8 years ago
Thanks for the additional information deeperbeige. I'll try to create a similar 
property structure as the NGUI one (since I don't have NGUI) and see if I can 
replicate and possibly solve this error on HOTween's side.

Original comment by daniele....@gmail.com on 26 Feb 2014 at 4:55

GoogleCodeExporter commented 8 years ago
That's really appreciated Daniele ! 

Original comment by cayou.an...@gmail.com on 26 Feb 2014 at 6:10

GoogleCodeExporter commented 8 years ago
Hey, I can't seem to replicate this issue. Could you try to build a small 
sample project that replicates it, using the free/trial edition of NGUI?

Original comment by daniele....@gmail.com on 6 Mar 2014 at 1:03

GoogleCodeExporter commented 8 years ago

Original comment by daniele....@gmail.com on 6 Mar 2014 at 1:03

GoogleCodeExporter commented 8 years ago
Sure, I'll see what I can do... I know how hard it is to investigate a problem 
you can't see for yourself.

Original comment by cmu.deep...@gmail.com on 6 Mar 2014 at 3:07

GoogleCodeExporter commented 8 years ago
The problem is that we need to share with you at least some NGUI code parts. I 
don't know about licences...
Maybe we should contact the guy behind NGUI.

Original comment by cayou.an...@gmail.com on 6 Mar 2014 at 3:12

GoogleCodeExporter commented 8 years ago
I'm doing a bit of investigative trimming to see if I can narrow down what it 
is about that specific property that causes the trouble. Let's see where this 
leads...

Original comment by cmu.deep...@gmail.com on 6 Mar 2014 at 3:38

GoogleCodeExporter commented 8 years ago
I've just sent an example project over. Let me know if it doesn't arrive for 
any reason.

Original comment by cmu.deep...@gmail.com on 6 Mar 2014 at 4:12

GoogleCodeExporter commented 8 years ago
Got it thanks. Will check it out later

Original comment by daniele....@gmail.com on 6 Mar 2014 at 4:38

GoogleCodeExporter commented 8 years ago
Solved by using HOTweenMicro

Original comment by daniele....@gmail.com on 7 Mar 2014 at 2:16

GoogleCodeExporter commented 8 years ago
What's HOTweenMicro?

Original comment by cayou.an...@gmail.com on 7 Mar 2014 at 2:34

GoogleCodeExporter commented 8 years ago
Check it out on HOTween's website (comes with an explanation text): 
http://www.holoville.com/hotween/download.html

Original comment by daniele....@gmail.com on 7 Mar 2014 at 2:39

GoogleCodeExporter commented 8 years ago
Ok I see it, thanks !

Original comment by cayou.an...@gmail.com on 7 Mar 2014 at 2:44

GoogleCodeExporter commented 8 years ago
Worked perfectly for me. Thank you, fantastic support!

Original comment by cmu.deep...@gmail.com on 7 Mar 2014 at 4:15

GoogleCodeExporter commented 8 years ago
Hello,
I got this exactly same bug on the PSM version (= Vita version) :
- Exception when tweening the alpha property of a NGUI object (sprite)
- Fixed if I mark the property as "sealed"

Unfortunatly, I have tried the HOTweenMicro and it does not fix anything.

Do you think there could be any other way to fix this without changing the NGUI 
code ?

Original comment by treyg...@gmail.com on 20 Aug 2014 at 12:42

GoogleCodeExporter commented 8 years ago
Supersorry for the superlate reply: August was hell and I totally lost this 
post. I might have an idea on how to fix this without touching NGUI, but I 
don't have NGUI so I can't replicate it. Can you manage to replicate it with 
the free version of NGUI so you can send it to me? Or is it a specific PSM 
issue which doesn't happen in the editor?

Original comment by daniele....@gmail.com on 5 Sep 2014 at 11:41