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

    MessageLoop deadlocking

    Scheduled Pinned Locked Moved Bugs
    3 Posts 0 Posters 557 Views
    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 Offline
      Helper
      last edited by

      On 12/03/2015 at 07:29, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R13.061 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hi to all,

      I'm creating a Win7 window via CreateWindowEx() in the C4D main thread and render into it with OpenGL.
      Everythig works fine, my window gets it's messages and renders correctly. I can move it around, close it, etc.

      But, after some time the C4D message loop begins to hang and the whole program does not respond to user input anymore, including my window. It's only possible to kill Cinema4D from the outside.

      I don't know if the problem is related to the message loop, but I tried everything on windows level, even subclassing the C4D's Mainwindow windowproc and all. I'm pretty sure that it must be related to some 'magic code' when getting the messages from Windows and before they are send to the windowProcs.

      Thanks for your help.

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

        On 13/03/2015 at 07:54, xxxxxxxx wrote:

        Hello,

        the Cinema 4D API does not provide any access to OS specific functionality. The API allows you to create plugins that run on both Windows and OSX with same same source code. So one is not supposed to use any OS specific code. Using functions of the Windows API directly is not supported and could lead to any problematic behavior.

        Best wishes,
        Sebastian

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

          On 13/03/2015 at 08:37, xxxxxxxx wrote:

          yup, and thats a problem if you need a HGLRC what you only can get from a HDC which you can get from a  hwnd.
          But I (probably) could work around it by massively reducing the messages sent from user-window interaction. Hopefully.

          Have a nice weekend.

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