MessageLoop deadlocking



  • 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.



  • 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



  • 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.


Log in to reply