luobin82Robin / dotween

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

Crash when reentering scene where DOTween was used #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use DOTweens in a scene
2. Go to a different scene
3. Switch back to original scene
4. Crash upon entering scene

What is the expected output? What do you see instead?
- It crashes (very often)

What version of the product are you using? On what operating system?
- DOTween_1_0_080 (I think it's this version, please add version to readme.txt) 
- Unity 4.5.5f1
- Run on Android

Please provide any additional information below.
> Safemode is turned on
> Stacktrace:
java.lang.RuntimeException: NullReferenceException: 
UnityEngine.Transform.set_localPosition (Vector3 value)
DG.Tweening.ShortcutExtensions+<>c__DisplayClass6c.<DOLocalMove>b__6b (Vector3 
x) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/ShortcutEx
tensions.cs:348)
DG.Tweening.Plugins.Vector3Plugin.EvaluateAndApply (VectorOptions options, 
DG.Tweening.Tween t, Boolean isRelative, DG.Tweening.Core.DOGetter`1 getter, 
DG.Tweening.Core.DOSetter`1 setter, Single elapsed, Vector3 startValue, Vector3 
changeValue, Single duration, Boolean usingInversePosition) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Plugins/Ve
ctor3Plugin.cs:119)
DG.Tweening.Core.TweenerCore`3[UnityEngine.Vector3,UnityEngine.Vector3,DG.Tweeni
ng.Plugins.Options.VectorOptions].ApplyTween (Single prevPosition, Int32 
prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, 
UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
erCore.cs:168)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 
toCompletedLoops, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Tween.cs:2
27)
DG.Tweening.Core.TweenManager.Goto (DG.Tweening.Tween t, Single to, Boolean 
andPlay, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
Manager.cs:531)
DG.Tweening.Sequence.ApplyInternalCycle (DG.Tweening.Sequence s, Single 
fromPos, Single toPos, UpdateMode updateMode, Boolean useInverse, Boolean 
prevPosIsInverse, Boolean multiCycleStep) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Sequence.c
s:277)
DG.Tweening.Sequence.DoApplyTween (DG.Tweening.Sequence s, Single prevPosition, 
Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, 
UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Sequence.c
s:213)
DG.Tweening.Sequence.ApplyTween (Single prevPosition, Int32 prevCompletedLoops, 
Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Sequence.c
s:138)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 
toCompletedLoops, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Tween.cs:2
27)
DG.Tweening.Core.TweenManager.Update (UpdateType updateType, Single deltaTime, 
Single independentTime) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
Manager.cs:377)
DG.Tweening.Core.DOTweenComponent.Update () (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/DOTwe
enComponent.cs:49)

Original issue reported on code.google.com by stofde...@gmail.com on 16 Feb 2015 at 4:36

GoogleCodeExporter commented 9 years ago
Hello, and sorry for the late reply.

You can check DOTween's version simply by opening the "Tools > DOTween Utility 
Panel".

About your issue, that code is actually calling a line that shows safeMode is 
off, and thus the crash happens because your Transform was destroyed and 
there's no safe mode preventing null reference errors. Maybe you're 
accidentally disabling safe mode somewhere?

Original comment by daniele....@gmail.com on 23 Feb 2015 at 11:55