Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    R15 SDK: GetInputState() Problem

    SDK Help
    0
    3
    250
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 22/02/2014 at 06:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   15 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I've been testing the R15 SDK example ObjectData and EffectorData plugins with the following code:

      BaseContainer state;   
      GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT, state);
      

      I've also tested using the Input Events example code from the SDK.

      Tests have included: DropEffector::ModifyPoints(), Spherify::ModifyObject() and RoundedTube::GetDimension().

      When debugging in Xcode 5.0.2, invoking a plugin compiled with the code results in an exception breakpoint.

      The console message is:
      /perforce_buildsystem_osx/c4d_mx_buildsystem_osx/release/15.0/work/src/tilo/cgui/gui_x systemframe.cpp(2268) : CRITICAL: Stop

      The same message appears in the external OS X 10.7.5 console on a second machine.

      The stack trace function call corresponding with the breakpoint is:
      ___lldb_unnamed_function9451$$CINEMA 4D

      The same plugin will run without any apparent problems when not debugging.

      Any help would be appreciated.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 22/02/2014 at 07:33, xxxxxxxx wrote:

        Originally posted by xxxxxxxx

        <ADDRESS>
        User Information:
        Cinema 4D Version:   15 
        Platform:     
        Mac OSX  ; 
        Language(s) :    
        C++  ;

        ---------
        </ADDRESS>   I've been testing the R15 SDK example ObjectData and EffectorData plugins with the following code:

        BaseContainer state;   
        GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT, state);
        

        I've also tested using the Input Events example code from the SDK.

        Tests have included: DropEffector::ModifyPoints(), Spherify::ModifyObject() and RoundedTube::GetDimension().

        When debugging in Xcode 5.0.2, invoking a plugin compiled with the code results in an exception breakpoint.

        The console message is:
        /perforce_buildsystem_osx/c4d_mx_buildsystem_osx/release/15.0/work/src/tilo/cgui/gui_x systemframe.cpp(2268) : CRITICAL: Stop

        The same message appears in the external OS X 10.7.5 console on a second machine.

        The stack trace function call corresponding with the breakpoint is:
        ___lldb_unnamed_function9451$$CINEMA 4D

        The same plugin will run without any apparent problems when not debugging.

        I haven't had this issue with the R13 and R14 SDKs.

        Any help would be appreciated.

        Cinema 4D R15 contains several additional error message that are displayed in the debugger to allow us to track down things that otherwise won't get noticed. These messages aren't displayed when the app is running in the "usual" mode the customer is using.

        In this particular case the critical stop is issued, because someone (most likely you 🙂 is calling the keyboard or Mouse state ouside of the main thread. This ain't allowed (GUI interactions have to be done in the main thread only on all operating systems) and usually (when you don't run in the debugger) we silently drop your illegal call.

        Best regards,

        Wilfried Behne

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 23/02/2014 at 03:29, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          In this particular case the critical stop is issued, because someone (most likely you 🙂 is calling the keyboard or Mouse state ouside of the main thread.

          I must confess to being the culprit!

          It's good to know what's causing this and that messages are being added to improve plugin robustness. Now that I know what's happening I can focus on an alternative approach.

          Many thanks for your help.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post