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

    ofstream memory problems

    SDK Help
    0
    3
    224
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/08/2004 at 14:28, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.207 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hey
      I'm developing a plugin which logs the information and values generated during an animation in a separate plain text file using the fsteam.h C++ Header File. It writes to the output file properly during the animation, but when Cinema 4D is closed, it comes up with the Application Error:
      The instruction at "0x007f5199" referenced memory at "0xfdfdfe09". The memory could not be "read". Click on OK to terminate the program.
      The only methods of the ofstream class I used were the constructor, open(), IsRunning(), the << operator, and close(). This error also occurs even if the plugin wasn't executed. Any ideas on what's wrong? Thanks a lot!
      Daniel

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 18/08/2004 at 01:12, xxxxxxxx wrote:

        My guess is that the ofstream library has some static variables. These can conflict with the C4D memory management, unless you define __WINCRTINIT flag in the settings for the API project. Please search forum for more information.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 18/08/2004 at 07:37, xxxxxxxx wrote:

          I found that the error occured when the destructor was called, so the problem can be fixed if the ofstream is declared as a pointer

              
              
                
              ofstream *ofile = new ofstream();  
              
          

          This doesn't seems to have any problems
          Thanks for your help!

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