User Tag List

Results 1 to 6 of 6

Thread: Crashes related to non-existent Arrays

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Crashes related to non-existent Arrays

    I sometimes run into this issue where trying to access an array that doesn't exist will crash edrt.exe.

    It occurs when I Clear & Destroy and then Re-Create Array objects. This is in order to empty them completely, as just using Clear will keep the old dimensions. Trying to destroy an Array if it doesn't exist will cause this crash. I tried to create two lines of code to avoid this:

    Code:
    Is Array #Objects > 0?:
    - Clear Array
    - Destroy Array
    
    Is Array #Objects = 0?:
    - Create Array
    But of course, these events also seem to access the object in a way and thus also cause a crash. This isn't really a major issue as it's easy to keep track of when the arrays need to be destroyed & re-created. I'm just curious as to whether it's a known problem.

  2. #2
    Clicker Fusion 2.5iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    904
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    This may be related to how Fusion destroys objects - at the very end of the event loop (http://bugbox.clickteam.com/issues/2016). Does it help if you put those events on separate ticks?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As in separate "frames"?

  4. #4
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    659
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Separate ticks, a tick is where the code gets read then looped back (My definition), so if you do
    [Timer is equal to: 1 sec] clear array> destroy array>
    [Timer is equal to: 1.2 sec] create array>
    Those two events will occur in two different ticks (First one will occur at 60 ticks, second one at 72 ticks if you have set FPS to 60) and will most likely not interfere.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  5. #5
    Clicker Fusion 2.5iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    904
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Thanks for clarifying Snail, it could be related to this.

    I meant frames, yeah. I used "ticks" to avoid confusion with Fusion's "frames". You could also do:

    tick = 0
    -> clear/destroy Array
    tick = 1
    -> create Array

    always
    -> add 1 to tick
    tick > 1
    -> set tick to 0

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wasn't aware that the array wasn't deleted completely until the end of the cycle and that might indeed be what caused the crash. Thanks for the info and your suggestions!

Similar Threads

  1. Event lines with non existent objects?
    By Outcast in forum Fusion 2.5
    Replies: 8
    Last Post: 21st March 2014, 11:57 PM
  2. Random EXC_BAD_ACCESS crashes possibly related to scale adjustments
    By MJK in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 6th March 2013, 07:52 PM
  3. Joystick 2/Joypad Objects detecting non-existent gamepad
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 17th January 2013, 02:56 PM
  4. Objets presents dans la liste alors que n'existent pas dans cette scene !
    By mig3 in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 20th December 2012, 08:33 AM

Posting Permissions

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