R15 SDK: GetInputState() Problem
-
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: StopThe 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 4DThe same plugin will run without any apparent problems when not debugging.
Any help would be appreciated.
-
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: StopThe 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 4DThe 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
-
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.