Strange crashes in R20 & R21



  • Hello,

    what could be the reason if I suddenly experience reproducible crashes in both, R20 AND R21 with any plugin I build (even cinema4dsdk)? The crashlog is:

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   surfacespread.xlib            	0x000000012b3a7e5d maxon::EntityBase::EntityBase(maxon::EntityBase::TYPE, maxon::LiteralId&&, maxon::TranslationUnit*, maxon::EntityBase::FLAGS) + 333
    1   surfacespread.xlib            	0x000000012b3a8003 maxon::EntityBase::EntityBase(maxon::EntityBase::TYPE, maxon::LiteralId&&, maxon::TranslationUnit*, maxon::EntityBase::FLAGS) + 51
    2   surfacespread.xlib            	0x000000012b3a85bd maxon::EntityReference::EntityReference(maxon::EntityBase::TYPE, maxon::LiteralId&&, maxon::TranslationUnit*, maxon::EntityBase::FLAGS) + 77
    3   surfacespread.xlib            	0x000000012b3a8653 maxon::EntityReference::EntityReference(maxon::EntityBase::TYPE, maxon::LiteralId&&, maxon::TranslationUnit*, maxon::EntityBase::FLAGS) + 51
    4   surfacespread.xlib            	0x000000012b261869 maxon::Declaration<maxon::DataType const*, maxon::DT_VALUEKINDPrivateHelper>::Declaration(maxon::LiteralId&&, maxon::TranslationUnit*) + 73 (module.h:537)
    5   surfacespread.xlib            	0x000000012b24c335 maxon::Declaration<maxon::DataType const*, maxon::DT_VALUEKINDPrivateHelper>::Declaration(maxon::LiteralId&&, maxon::TranslationUnit*) + 37 (module.h:539)
    6   surfacespread.xlib            	0x000000012b3c500f __cxx_global_var_init.89 + 47
    7   surfacespread.xlib            	0x000000012b3d07da _GLOBAL__sub_I_register.cpp + 234
    8   dyld                          	0x0000000115230ac6 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 420
    9   dyld                          	0x0000000115230cf6 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
    10  dyld                          	0x000000011522c218 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 330
    11  dyld                          	0x000000011522b34e ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 134
    12  dyld                          	0x000000011522b3e2 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 74
    13  dyld                          	0x000000011521f3e5 dyld::runInitializers(ImageLoader*) + 82
    14  dyld                          	0x00000001152280a8 dlopen + 527
    15  libdyld.dylib                 	0x00007fff6cf40d86 dlopen + 86
    16  net.maxon.cinema4d            	0x000000010bd90f0d 0x10bc32000 + 1437453
    17  net.maxon.cinema4d            	0x000000010bd919c4 0x10bc32000 + 1440196
    18  net.maxon.cinema4d            	0x000000010bdb8035 0x10bc32000 + 1597493
    19  net.maxon.cinema4d            	0x000000010bdb7e6c 0x10bc32000 + 1597036
    20  net.maxon.cinema4d            	0x000000010bdba115 0x10bc32000 + 1605909
    21  net.maxon.cinema4d            	0x000000010bc384f3 0x10bc32000 + 25843
    22  net.maxon.cinema4d            	0x000000010bc3847c 0x10bc32000 + 25724
    23  libdyld.dylib                 	0x00007fff6cf3f015 start + 1
    

    Any ideas? I'm stumped. It also crashes in the debugger, exactly where the crash report says, but none of the plugin code is in the call stack.

    Thanks & greetings,
    Frank



  • Hi Ricardo,

    thanks for your reply!

    About the information you requested:

    • It happens on C4D startup, even before the splash screen shows up.
    • There were no updates in the tool chain. Xcode 8.3.3 for R20, Xcode 10.1 for R21. Both version are in use since quite some time and never caused problems. OS version is macOS High Sierra 10.13.6.
    • I regularly clean the project, it did not help.

    Now the surprise: Today I rebuilt for R20, and the crash is gone. With no change made whatsoever. After regenerating the R21 project file with the Maxon Project Tool, that one works again, too. I tried to diff the old and the new project file, but they look very different, so I couldn't figure out what the significant change is.

    Long story short: I'm a bit concerned, as the crashes occurred without any apparent reason, and now they're gone without any apparent reason. My fear is that they'll come back. It seems a bit random.

    I have had those crashes before some weeks ago, but didn't care to post about them at that time. They were gone a day after. I'm stumped, but for the moment relieved.

    Cheers,
    Frank



  • Follow-up:

    • Remember, plugins for R20 and R21 are built using different versions of Xcode. Yet, both suddenly provoke the same crash.
    • Deleting and freshly cloning the repository (to eliminate all chances of unwanted changes) does not solve the problem.
    • Reboot does not help


  • Hi Frank, thanks for reaching out us.

    In order to be of some help I need to know a bit more:

    • you refer about a generic crash even involving the cinema4dsdk: can you be more precise on when it crash? At Cinema start-up? At plugin registration? At Cinema shutdown?
    • looks like you have provided a portion of the crash log: can you also provide the Cinema crash log as well?
    • are you aware of any unexpected update of your tool chain? What are the Xcode versions your're currently using? What is the os version you're using to build your plugins?
    • you mentioned about Deleting and freshly cloning the repository (to eliminate all chances of unwanted changes): did you tried to Clean the project, before building again?

    Finally, waiting for your feedback, I recommend to delete the Derived Data that Xcode generates in the folder specified in the "File -> Project Settings".

    Best, Riccardo



  • Hi Ricardo,

    thanks for your reply!

    About the information you requested:

    • It happens on C4D startup, even before the splash screen shows up.
    • There were no updates in the tool chain. Xcode 8.3.3 for R20, Xcode 10.1 for R21. Both version are in use since quite some time and never caused problems. OS version is macOS High Sierra 10.13.6.
    • I regularly clean the project, it did not help.

    Now the surprise: Today I rebuilt for R20, and the crash is gone. With no change made whatsoever. After regenerating the R21 project file with the Maxon Project Tool, that one works again, too. I tried to diff the old and the new project file, but they look very different, so I couldn't figure out what the significant change is.

    Long story short: I'm a bit concerned, as the crashes occurred without any apparent reason, and now they're gone without any apparent reason. My fear is that they'll come back. It seems a bit random.

    I have had those crashes before some weeks ago, but didn't care to post about them at that time. They were gone a day after. I'm stumped, but for the moment relieved.

    Cheers,
    Frank



  • Thanks for the update Frank.
    Looking at your "resolutions" I think that the actions you took were responsible, in the first case, to clean the existing derived data for the R20 project, whilst in the second, to refresh the DerivedData subfolder where the newly re-created R21 project was supposed to store intermediate files.

    Please keep us updated and for the mean time I'm going to set this thread as solved.

    Cheers