Professional Web Applications Themes

Memory Leak with cloneModelFromCastMember()? - Macromedia Director 3D

Hello Experts! I have been experiencing an apparent memory leak within Director 11 when using cloneModelFromCastMember(). I was making the assumption that calling resetWorld() on a w3D member onBeginSprite() would garbage collect any models previously cloned into that when I previously ran the movie. However, if I repeatedly start and stop the movie Director Gobbles roughly 10Mb more memory each time. The memory usage does not reduce upon calling resetWorld() A good way to te this is to use cloneModelFromCastMember() on a largeish model in a repeat with i = 1 to 50 loop on the on beginSprite handler. Start ...

  1. #1

    Default Memory Leak with cloneModelFromCastMember()?

    Hello Experts!

    I have been experiencing an apparent memory leak within Director 11 when
    using cloneModelFromCastMember().

    I was making the assumption that calling resetWorld() on a w3D member
    onBeginSprite() would garbage collect any models previously cloned into that
    when I previously ran the movie.

    However, if I repeatedly start and stop the movie Director Gobbles roughly
    10Mb more memory each time. The memory usage does not reduce upon calling
    resetWorld()

    A good way to te this is to use cloneModelFromCastMember() on a
    largeish model in a repeat with i = 1 to 50 loop on the on beginSprite
    handler.

    Start and stop the movie over and over to see Director's memory usage hike
    up.

    Anybody have any advice why this is happening? Do I need to explicitly
    delete all models cloned into a member on stopMovie????

    Cheers

    Richard Smith


    Richard Guest

  2. #2

    Default Re: Memory Leak with cloneModelFromCastMember()?

    It appears that the problem doesn't happen on Director 8.5 (although I'm
    still looking into it).

    Can anyone confirm? I'm wondering if this is a new Version 11 memory leak?

    Cheers

    Richard


    Richard Guest

  3. #3

    Default Re: Memory Leak with cloneModelFromCastMember()?

    [q]Originally posted by: Richard
    It appears that the problem doesn't happen on Director 8.5[/q]
    Are you sure of that?
    :grin;

    [q]Originally posted by: Richard
    Can anyone confirm? I'm wondering if this is a new Version 11 memory leak?[/q]

    Yes.



    Nanomedia Guest

  4. #4

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Hi Nano,

    Can you get the memory leak to happen on Director 8.5 then?

    "Nanomedia" <com> wrote in message
    news:gd403g$rrl$macromedia.com... 

    Oh oh.... Bad news... Thanks for confirming. Is Adobe aware of this one?

    Anyone else have any info / thoughts?

    Cheers

    Richard


    Richard Guest

  5. #5

    Default Re: Memory Leak with cloneModelFromCastMember()?

    I have just submitted an Adobe bug report. Will let you know if I get a
    response at all...

    Cheers

    Richard


    Richard Guest

  6. #6

    Default Re: Memory Leak with cloneModelFromCastMember()?

    I Had this problem with director 10.x. I seems that garbage collector dont work or it isnt completely efficient. I believed that this issue was solved in director 11, but it seems not.



    ensamblador Guest

  7. #7

    Default Re: Memory Leak with cloneModelFromCastMember()?

    as a rule of thumb:
    whenever possible avoid cloneModelFromCastMember in the first place.
    It is highly unrecommended and the intel engineers always recommended to use
    loadFile() with an external w3d file, which is much better than having the w3d
    file in the castlib and using cmfcm.
    each cmfm rebuilds the whole scene and takes a lot of time the bigger the
    scene is.
    apart from glitches like leaks, which you found right now and other things.

    I work very much with sw3d and I barely have more than one shockwave3d member
    in any of my movies. in very rare cases I use 2 sw3d members. Other than that I
    use one member where I build and load everything into from external w3d files
    with loadFile(), which is much more appropriate. the only downside is that I
    can't change the model name, but there are ways to deal with it.

    zzzorro Guest

  8. #8

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Hi Zzzorro,

    Thanks for the advice!

    Why does cloning from external w3D members help? Does it avoid the memory
    leak? It never used to happen on Director 8.5 so it has to be a new Version
    10 / 11 bug right?

    I need to import several weightmapped boned characters into a 3D member, and
    due to export issues each character has to have it's own w3D file.

    So I have to perform cloning at runtime to build the world. I also need to
    clone these characters based on the level, so I can't use just one single 3D
    member for both these reasons.

    Thanks for any further ideas.

    Richard Smith



    "zzzorro" <com> wrote in message
    news:gd4sn2$2l8$macromedia.com... 


    Richard Guest

  9. #9

    Default Re: Memory Leak with cloneModelFromCastMember()?

    [q]Originally posted by: Richard
    It appears that the problem doesn't happen on Director 8.5 (although I'm
    still looking into it).
    Can anyone confirm? I'm wondering if this is a new Version 11 memory leak?[/q]

    Hi Richard,
    cloneModelFromCastMember() and cloneMotionFromCastMember() are
    very old Intel/Macromedia "unfinished business".
    http://forum.necromanthus.com/necroforum.php?forum=1&topic=94
    I don't remember the v8.5 "status", but I'm sure in v9 and MX2004 they were
    present.
    Talking about Adobe bug report, the upcoming hotfix has nothing to do with the
    Shockwave3D Asset, so ...

    cheers



    necromanthus Guest

  10. #10

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Thanks for the info!

    Richard

    "necromanthus" <com> wrote in message
    news:gd4vh8$5qh$macromedia.com... 


    Richard Guest

  11. #11

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Hi, an Adobe engineer has replied, and I've sent them a .dir file to
    te the leak clearly. They have acknowledged the problem, and will get
    back to me as soon as they have completed their investigation...

    Just to update you. Thanks.

    Richard Smith

    "Richard" <com> wrote in message
    news:gd33up$qal$macromedia.com... 


    Richard Guest

  12. #12

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Latest reply...

    ---------------------------------------------------------------

    was asked to pass on ther following info from a higher level:

    "This has been logged as a bug in Director 11 and the product engineers are
    aware of the issue.
    Unfortunately, we do not have a workaround for this issue at this time, nor
    can we say if/when a patch may be available"

    -------------------------------------------------------------

    I guess that's all folks... I'm going to have to recode my whole level
    building system to try and side step this. I didn't notice the problem till
    now as I was running Dir8.5 previously.

    Unity for my next project then...

    Richard Smith


    Richard Guest

  13. #13

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Thanks for the info Richard.

    How unfortunate. I've used cmfcm extensively. I've noticed that my system
    often gets sluggish after a while, that must be the reason. I wasn't aware of
    the loadFile() method, I'll start using it in place of
    cloneModelFromCastmember() from now on. Thanks zzzorro.

    I've been using cloneMotionFromCastmember() quite a bit in a recent project,
    can anyone point me towards an alternate method for that or am I stuck with it?

    Ex Guest

  14. #14

    Default Re: Memory Leak with cloneModelFromCastMember()?

    Interesting news update!

    Thanks to Sujai, Adobe appear to have fixed the issue on a forthcoming
    HotFix3. (not sure when this will filter out to the plugin based public).

    This came as a great surprise to be honest :)

    A refreshing change!

    Richard Smith


    "Richard" <com> wrote in message
    news:gd33up$qal$macromedia.com... 


    Richard Guest

Similar Threads

  1. Possible Memory Leak in CF8
    By miller2213 in forum Coldfusion Server Administration
    Replies: 2
    Last Post: November 16th, 08:51 PM
  2. #39438 [NEW]: Memory leak PHP Fatal error: Out of memory
    By nikolas dot hagelstein at gmail dot com in forum PHP Bugs
    Replies: 11
    Last Post: December 1st, 08:08 PM
  3. SQL Memory Leak
    By in forum Coldfusion Server Administration
    Replies: 0
    Last Post: September 6th, 06:15 PM
  4. memory problem/memory leak
    By Tron Juan Del Marco webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: January 20th, 06:02 PM
  5. Memory consumption of Ruby/mod_ruby combo on Apache [memory leak]
    By David Heinemeier Hansson in forum Ruby
    Replies: 4
    Last Post: September 10th, 01:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139