Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityEngine.SendMouseEvents.DoSendMouseEvents Error

Discussion in 'Windows' started by coldfox, Jul 9, 2014.

  1. coldfox

    coldfox

    Joined:
    Jul 9, 2014
    Posts:
    3
    I'm using Unity4.5.1f3 and getting the following exception when I run the game on the WP8 Emulator,


    “System.NullReferenceException”type exception in UnityEngine.DLL

    other info: Object reference not set to an instance of an object.

    the stack just a line is:


    > UnityEngine.DLL!UnityEngine.SendMouseEvents.DoSendMouseEvents(int mouseUsed, int skipRTCameras) line 103 unknown

    VS show that exception is in MouseEvents.cs..

    unity run well before I update My editor from 4.3.4 to 4.5.1f3...Anybody else had the same problem or known how to solve it?

    Thanks!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    Can you post the full stack trace, rather than just the top function?
     
  3. coldfox

    coldfox

    Joined:
    Jul 9, 2014
    Posts:
    3
    the log in vs output window is:

    Exception: Object reference not set to an instance of an object.
    Type: System.NullReferenceException
    Module: UnityEngine
    InnerException: <No Data>
    AdditionalInfo:<No Data>
    at UnityEngine.SendMouseEvents.DoSendMouseEvents(Int32 mouseUsed, Int32 skipRTCameras)
    at UnityEngine.SendMouseEvents.$Invoke0(Int64 instance, Int64* args)
    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)

    (Filename: C:/BuildAgent/work/d63dfc6385190b60/Runtime/Scripting/WinRTUtility.cpp Line: 88)


    NullReferenceException: Object reference not set to an instance of an object.
    at UnityEngine.SendMouseEvents.DoSendMouseEvents(Int32 mouseUsed, Int32 skipRTCameras)
    at UnityEngine.SendMouseEvents.$Invoke0(Int64 instance, Int64* args)
    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    (Filename: TODO Line: 0)
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    That definitely looks like a bug on our part. Can you report it?
     
  5. coldfox

    coldfox

    Joined:
    Jul 9, 2014
    Posts:
    3
    I have report it..Thanks..
     
  6. jerydarkside

    jerydarkside

    Joined:
    Jul 23, 2014
    Posts:
    5
    Hi! Did you managed to solve your bug?

    I have exactly the same problem (I made a video about it at
    )

    Do you use PlayMaker? In my case, this bug appears with a Playmaker based project with WP8 addon.

    Exactly like you, the same project builds and runs well if using Unity 4.3.2, but have a runtime error with unity 4.5.

    Thank you if you have any clue ;)

    See ya
     
  7. Temujiing

    Temujiing

    Joined:
    Jul 14, 2014
    Posts:
    19
    Hello, I have the same problem using the emulator. My code runs fine on a device. It looks like the emulator is "always" sending a two finger touch with 0,0 position.
     
  8. jerydarkside

    jerydarkside

    Joined:
    Jul 23, 2014
    Posts:
    5
    @Temujiing Do you have this problem with playmaker, or does it occurs for every project you have?
     
  9. Temujiing

    Temujiing

    Joined:
    Jul 14, 2014
    Posts:
    19
    I do not use playmaker, but I have a crash like this each time I install a new xap on a device on the first launch. I'll get the callstack soon. I use Daikon Forge for handling the GUI stuff.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    Hi,

    this was fixed in 4.5.2p1 patch release.
     
  11. jerydarkside

    jerydarkside

    Joined:
    Jul 23, 2014
    Posts:
    5
    Yes, thank you.

    I downloaded the 4.5.2p2 released last week and it is now ok ;)

    Sincerely,

    jery
     
  12. Graque

    Graque

    Joined:
    Apr 6, 2018
    Posts:
    1
    Unity 2017.1.1, the same error
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    ^ Please report a bug.