A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: 3dfa version 4.7+ unstable?

  1. #1
    Member
    Join Date
    Dec 2003
    Posts
    30

    3dfa version 4.7+ unstable?

    Hi guys

    Am I doing something wrong or are the new versions of 3dfa unstable? It crashes extremely often when I try to run animations with scripts inside 3dfa.

    Wynand

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    Does that happen with new movies or pre 4.7 age movies?

    I have not noticed,.. I have had few random crashes but nothing I could replicate..
    But then I have no experience versions below 4.7, so I dunno if it was more "crash proof".

  3. #3
    Member
    Join Date
    Dec 2003
    Posts
    30
    I used version 4.5 until recently (Did not realise there was an update) and it almost never crashed. When I updated to 4.7 and three weeks later to 4.8 I started to get regular crashes when I try to run movies in 3dfa. Old movies as well as new movies cause it. The movies export without prolems.

    ??????

  4. #4
    Senior Member sadako232's Avatar
    Join Date
    Mar 2006
    Posts
    153
    Could it be your computer? I never really payed attetion to the specs on 3dfa.

  5. #5
    Member
    Join Date
    Dec 2003
    Posts
    30
    It's not my computer: It happens on both my laptop and my desktop running XP SP2
    i did some elimination and found the line of code that crashes the program: It happens (In this instance, at least) when I try to create a multidimentional array:

    1 speldata=new Array
    2 for(n=0;n<128;n++)
    3 {
    4 speldata[n]=new Array
    5 for(m=0;m<72;m++)
    6 {
    7 //some stuff here
    8 //
    9 }
    10 }

    When I comment line 4 out 3dfa does not crash when I run the script. When I leave it in, the program crashes, either while running the script or when I press the stop button.

    I have been witing a few games recently that rely on multidimentional arrays. I think that may be why it always crashes on me. i have resorted to debug my programs exclusively by exporting them, and using editboxes insteat of the normal trace() function to debug.

    If I am doing something wrong, then why do the programs work perfectly when exported as SWF?

  6. #6
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    I'm not sure if you forgot something from your example but you have not allocated you arrays in that example. And ";" is good for you also in end of line

    line 1 should be: speldata=new Array(128);
    line 4 should be: speldata[n]=new Array(72);

    Your example crashed in my machine but fixed one did not.

  7. #7
    Member
    Join Date
    Dec 2003
    Posts
    30
    Thanx Finjogi.

    According to the 3dfa docs it is not necessary to define array lengths and I have definitely not done so before with version4.5. I noticed the helpfile has hardly been touched since the upgrade, maybe it has become essential since the mx support?

    My problem is that many arrays are of unspecified length, and grow and shrink as characters are spawned and killed. Maybe I should start with an array of zero length then? x=new Array(0); ??

    As far as the ";" is concerned, mea culpa, I'm verry sloppy. 3dfa tolerated me before. Perhaps I should conform now...

    MAybe Kusco can comment on the neccesity of defining array lengths?

  8. #8
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    the ; optional in AS1 and in 3dfa but you should get in the habit for future use it is required in most languages including AS2 and AS3

    As to defining an array the length is not needed and I think it's best to just not specify the size at all, but I do think you need "new Array()" to define it.

    When I first looked at this I assumed the problem was that this code was called repeatably and that will cause you trouble as you keep defining the array over and over again. You didn't mention where this script resides or if it is called more than once.

  9. #9
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    Yes, as1 docs seem to say you can access array like:

    my_array = new Array; ( or Array(); )
    my_array[127] = 123;
    my_array[10] = 321;

    What is array length after that? 2 or 127 or what? If you POP last value out of it how long is it then, 1 or 10 or 126?

    I'm got used to more strict style to handle arrays in java and other languages. This "free" style is beyond my imagination

    3fda uses sort of javascript and after exporting it is actionscript, so there might be difference how each handles memory allocation etc.

    By looking action script tutorials your code should work out just right, so in that sense this might be bug in 3dfa?!

  10. #10
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Finjogi if you're used to Java then you'll like AS3....

    The length is 2 of the array in question. It can be checked with looked at my_array.length

    As to POPing the value affecting the length it depends on how you access it. You can
    my_array.pop does remove it and therefore shortens the array
    my_array.shift removes the first element and shortens the array
    but getting the value of the array element does not
    something =my_array[n] where n is the element index

  11. #11
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    Yep, I know most functions, I was just thinking how messy looping such arrays can become.. like if you make general function to search particular item from arrays and then it gets THAT kind of array (and using "javascript" what 3dfa offers )

    Code:
    my_array = new Array();
    my_array[127] = 123;
    my_array[10] = 321;
    
    search(my_array);
    
    //--------------------
    function search(ar){
      for(i=0; i<ar.length; i++){
        if(ar[i]=="treasure"){
          trace("work done!!")
        }
      }
    }
    I'm not sure how that could handle array that has two element but they live in unknown indexes..

    anyway, it could get confusing

  12. #12
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    Quote Originally Posted by blanius
    The length is 2 of the array in question. It can be checked with looked at my_array.length
    Just checked, length was 128 not-occupied indexes were null, and those two were what they were. And even 3dfa worked ok with that, except crashed at the when stopping the movie So bug it seems to be..

  13. #13
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    If 3dfa ever crashes for any reason then you should send a simple example of a crashing .movie file to the 3dfa contact address. If you send the crashing movie, then 3dfa can be fixed quickly. If you don't send the movie, then the next release of 3dfa might crash for you again. This forum is not the place for these kinds of bug reports, and a .movie file is much better than a description.

    In any case, the problem described here only affects undimensioned arrays running in the preview, and it has now been fixed and a version 4.9 beta release should be ready within the next 7 days. The next release contains a lot of improvements, and all the forum members will be invited to test the beta version.
    Cheers,
    kusco
    (3DFA Support Team)

  14. #14
    Member
    Join Date
    Dec 2003
    Posts
    30
    kusco, you're my absolute hero...

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center