Expression Editor doesn't compile sometimes.



  • On 02/01/2013 at 07:38, xxxxxxxx wrote:

    I'm on C4D Studio 14.034 (RC68643)).

    While working in the Expression Editor lately sometimes suddenly the code doesn't compile any more.

    I write a few lines of code, I click Compile. "No Errors!". I play the TimeLine, everything works as expected. I add a few more lines, an extra function here, a few variables there, blahblah. I click Compile, I fix a few errors, I click Compile again. "No Errors!". I play the TimeLine, everything works as expected. (I repeat this process a few dozen times.) ....

    Then, at a random point in time and for no reason I can understand, although I click Compile, suddenly the code in the Tag or Effector doesn't compile any more.

    So there's nothing wrong with my code, everything runs smoothly, I do whatever edit ( a common task is enough, like commenting out a print command or something ) and then when I click Compile nothing changes. Any other functionality in Cinema  continues to work as normal, it's just that the code no longer compiles.

    So I try to fix it :
    I click the Compile button a few more times, I Enable /Disable the Tag or Effector a few times, I redraw the Screen a few times, I go back to frame 0 in the Timeline a few times,... hoping to trigger a response, but alas...

    (side remark :  If I save the file at this point and then reopen it (Save Incremental and Revert to Saved) the edits to my code are no longer there; so cinema wasn't aware of the fact that there even was new code to be saved, even if it hadn't compiled yet.)

    Only fix I found :
    whenever my code doesn't seem to compile, I Copy it, add a new Tag or Effector to the Scene to paste my code into, and delete the "old" Tag or Effector. That works fine until, sooner or later, the issue comes up again. It's a dull and frustrating workaround, especially when there's User Data to be added time and time again.

    I can't produce an example, as it just seems to happen randomly, so I can't reproduce the issue.
    I've only been doing Python Tags and Effectors recently, but this possibly also happens with Generators, Coffee, ...

    Was just wondering, does this sound familiar to anybody ?
    Has this happened to you before ? What did you do ?
    If this is a bug, I can't imagine nobody else is pulling their hair out.
    What do I do ?

    Just getting some input before I contact Support.

    cheers,
    douwe



  • On 02/01/2013 at 08:00, xxxxxxxx wrote:

    i use the expression editor quite often to test little code chunks and i cannot
    reproduce this behaviour. however you can mess up the the expression editor 
    pretty badly when you do 'illegal' stuff, or in other words if you use threads.

    most stuff like drawing guis and so on works, even if they aren't supported,
    but under certain circumstances it might blow up. i also tried in r13ish times to
    get hold of and use the active BaseDraw from a script, which blew up pretty
    badly (the whole editor stopped working as you described).



  • On 02/01/2013 at 08:05, xxxxxxxx wrote:

    It's very rare. But that kind of thing has happened to me in all the various types of code input objects that C4D has. It also happens occasionally with plugins when using the reload option.

    It comes from the type of coding mistakes I make in the code.
    There's some coding mistakes that send C4D into a permanently stunned state. And only closing it down and re-opening it will fix it.

    -ScottA



  • On 02/01/2013 at 08:41, xxxxxxxx wrote:

    Ok, so it's me, not cinema, who's doing something different lately.
    That's what I was hoping to hear.
    Means it's something I can fix.

    I have been playing with a few things that are just a bit beyond my comprehension lately,
    so although sometimes the code works and sometimes not, I must be doing something wrong.

    That's great news.
    I usually bump into this kind of confusion when I'm close to a major insight.

    cheers,
    d



  • On 02/01/2013 at 09:21, xxxxxxxx wrote:

    You are not alone, the editor occasionally loses sync with
    the AM. When you get this issue you can see that changes
    made in the Editor is not updated in AM.
    If you haven't done to much editing you can sometimes
    re establish sync by closing the Editor and to changes in
    the AM.
    There are some other strange sync issues as well being were of:
    I.e. reloading py plugins on an unsaved scene, the scene is no
    longer "edited" and closing it does not save edits being made
    in the scene,

    Cheers
    Lennart



  • On 02/01/2013 at 11:38, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    You are not alone, the editor occasionally loses sync with
    the AM. When you get this issue you can see that changes
    made in the Editor is not updated in AM.

    Confirmed

    Originally posted by xxxxxxxx

    If you haven't done to much editing you can sometimes
    re establish sync by closing the Editor and to changes in
    the AM.

    Confirmed.
    Helps a lot in avoiding the need to set up all User Data again on a new Tag / Effector.

    Thanks a lot, Lennart.
    From the way you describe it, it appears to be a sync issue indeed.
    Possibly, as ferdinand and Scott noted, provoked by sketchy code.

    Glad I posted this here.
    cheers,
    d


Log in to reply