random crash when end of ball bonus ends

25 views
Skip to first unread message

Ryan McQuaid

unread,
Feb 17, 2020, 11:53:43 PM2/17/20
to MPF Users
I implemented the built in end of ball bonus today and it works great. However there is about a 10% chance it will crash at the end of the bonus mode with no error messages in the logs. even with verbose loggging on it seems like everything is going find and then it just ends. There does not seem to be any gameplay factors contributing to this crash. If I start a new game and just let the ball drain while doing nothing else it will intermittently crash 10% of the time. here is my code. I can provide logs if needed but I doubt they will be helpful.

#config_version=5

mode_settings
:
   display_delay_ms
: 1200
   hurry_up_delay_ms
: 200
   hurry_up_event
: flipper_cancel
   
#end_bonus_event: timer_bonus_end_delay_complete
   bonus_entries
:
   
- event: bonus_emeralds
      score
: 40000
      player_score_entry
: zones_completed
      reset_player_score_entry
: False
      skip_if_zero
: False
   
- event: bonus_banked_rings
      score
: 1000
      player_score_entry
: banked_rings
      reset_player_score_entry
: False
      skip_if_zero
: False
   
- event: bonus_loops
      score
: 10000
      player_score_entry
: loops_this_ball
      reset_player_score_entry
: True
      skip_if_zero
: False
   
- event: bonus_laps
      score
: 3000
      player_score_entry
: laps_this_ball
      reset_player_score_entry
: True
      skip_if_zero
: False
   
- event: bonus_spins
      score
: 250
      player_score_entry
: spins_this_ball
      reset_player_score_entry
: True
      skip_if_zero
: False
 
#   - event: bonus_multiplier
 
#     score: 0
 
#     player_score_entry: bonus_multiplier
 
#     reset_player_score_entry: True
 
#     skip_if_zero: False

variable_player
:
  mode_bonus_started
:
    bonus_emeralds_display
:
      action
: set
     
int: 40000 * current_player.zones_completed
    bonus_banked_rings_display
:
      action
: set
     
int: 1000 * current_player.banked_rings
    bonus_loops_display
:
      action
: set
     
int: 10000 * current_player.loops_this_ball
    bonus_laps_display
:
      action
: set
     
int: 3000 * current_player.laps_this_ball    
    bonus_spins_display
:
      action
: set
     
int: 250 * current_player.spins_this_ball
  bonus_emeralds
:
    bonus_total_display
:
      action
: set
     
int: (current_player.bonus_emeralds_display + current_player.bonus_banked_rings_display + current_player.bonus_loops_display + current_player.bonus_laps_display + current_player.bonus_spins_display) * current_player.bonus_multiplier


slide_player
:
   mode_bonus_started
: end_of_ball_bonus_slide

widget_player
:
  bonus_emeralds
:
    bonus_emeralds_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_emeralds_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
     
  bonus_banked_rings
:
    bonus_banked_rings_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_banked_rings_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
     
  bonus_loops
:
    bonus_loops_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_loops_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
     
  bonus_laps
:
    bonus_laps_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_laps_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
     
  bonus_spins
:
    bonus_spins_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_spins_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
     
  bonus_multiplier
:
    bonus_multiplier_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_multiplier_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
     
  bonus_total
:
    bonus_total_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide
    bonus_total_score_widget
:
      action
: add
      slide
: end_of_ball_bonus_slide



slides
:
  end_of_ball_bonus_slide
:
    widgets
:
       
- type: video
          video
: end_of_ball_bonus
          volume
: 0
          z
: 1
       
- type: image
          image
: bonus
          y
: 82%
          z
: 3
       
- type: image
          image
: bonus_shadow
          z
: 2
widgets
:
  bonus_emeralds_widget
:
     
- type: text
        text
: "chaos emeralds:  (player|zones_completed)"
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        color
: E0E000
        anchor_x
: left
        x
: 30%
        y
: 70%
        z
: 3
  bonus_emeralds_score_widget
:
     
- type: text
        text
: (player|bonus_emeralds_display)
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 70%
        z
: 3
       
  bonus_banked_rings_widget
:
     
- type: text
        text
: "rings banked:  (player|banked_rings)"
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        color
: E0E000
        anchor_x
: left
        x
: 30%
        y
: 63%
        z
: 3
  bonus_banked_rings_score_widget
:
     
- type: text
        text
: (player|bonus_banked_rings_display)
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 63%
        z
: 3
       
  bonus_loops_widget
:
     
- type: text
        text
: "loops: (player|loops_this_ball)"
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        color
: E0E000
        anchor_x
: left
        x
: 30%
        y
: 56%
        z
: 3
  bonus_loops_score_widget
:
     
- type: text
        text
: (player|bonus_loops_display)
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 56%
        z
: 3
       
  bonus_laps_widget
:
     
- type: text
        text
: "laps:  (player|laps_this_ball)"
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        color
: E0E000
        anchor_x
: left
        x
: 30%
        y
: 49%
        z
: 3
  bonus_laps_score_widget
:
     
- type: text
        text
: (player|bonus_laps_display)
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 49%
        z
: 3
       
  bonus_spins_widget
:
     
- type: text
        text
: "spins:  (player|spins_this_ball)"
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        color
: E0E000
        anchor_x
: left
        x
: 30%
        y
: 42%
        z
: 3
  bonus_spins_score_widget
:
     
- type: text
        text
: (player|bonus_spins_display)
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 42%
        z
: 3
  bonus_multiplier_widget
:
     
- type: text
        text
: "bonus multiplier:"
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        color
: E0E000
        anchor_x
: left
        x
: 30%
        y
: 30%
        z
: 3
  bonus_multiplier_score_widget
:
     
- type: text
        text
: (player|bonus_multiplier)x
        font_size
: 60
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 30%
        z
: 3
       
  bonus_total_widget
:
     
- type: image
        image
: total
        anchor_x
: left
        x
: 30%
        y
: 19%
        z
: 3
  bonus_total_score_widget
:
     
- type: text
        text
: (player|bonus_total_display)
        font_size
: 80
        font_name
: sonic-hud-font
        number_grouping
: true
        anchor_x
: right
        x
: 70%
        y
: 19%
        z
: 3

       
sound_player
:
  mode_bonus_started
:
   
Competition_Menu:
      action
: play
      mode_end_action
: stop
  bonus_emeralds
:
   
Bonus_item:
      action
: play
      loops
: 0
  bonus_banked_rings
:
   
Bonus_item:
      action
: play
      loops
: 0
  bonus_loops
:
   
Bonus_item:
      action
: play
      loops
: 0
  bonus_laps
:
   
Bonus_item:
      action
: play
      loops
: 0
  bonus_spins
:
   
Bonus_item:
      action
: play
      loops
: 0
  bonus_multiplier
:
   
Bonus_item:
      action
: play
      loops
: 0
  bonus_total
:
   
Bonus_finish:
      action
: play
      loops
: 0
 
#timers:
#  bonus_end_delay:
#    start_value: 3
#    end_value: 0
#    direction: down
#    tick_interval: 1s
#    start_running: false
#    restart_on_complete: false
#    control_events:
#      - action: start
#        event: bonus_total
 

Ryan McQuaid

unread,
Feb 18, 2020, 12:08:57 AM2/18/20
to MPF Users
Further research shows that the crash occurs on the 4th time end of ball bonus mode concludes. It does not matter if it is a single player game followed by another single player game (crashes at end of ball 1 of the second game) or a multiplayer game (crashes at end of player 2 ball 2, end of player 4 ball 1) 

mike wiz

unread,
Feb 18, 2020, 9:20:41 AM2/18/20
to MPF Users
Are you running Windows?  Are you on .53?  Are you testing this virtually?

Could be the same thing I posted here:


no fix but to downgrade for now.

Ryan McQuaid

unread,
Feb 18, 2020, 12:49:05 PM2/18/20
to MPF Users
I'm on my laptop, dev 53.77
I haven't tested on my main machine yet so we will see if that makes a difference. I'll check what I see in that thread

Ryan McQuaid

unread,
Feb 18, 2020, 2:28:29 PM2/18/20
to MPF Users
Fixed it.

Tested on my main dev rig and the problem persisted, so I swapped the video with an image to test, didnt crash. tried another video file, didnt crash. It seems my problem was with this specific video file for some reason. I realized I had forgotten to remove the audio when rendering it, so I pulled it back into my editor, nuked the audio, and rerendered it. I'm not sure if it was removing the audio track or the rerender but its not crashing anymore.

On Monday, February 17, 2020 at 11:53:43 PM UTC-5, Ryan McQuaid wrote:

jabdoa

unread,
Feb 19, 2020, 2:37:42 AM2/19/20
to MPF Users
That is bad. It should at least not crash without an error. Glad that you found the issue. We have to fix those kind of issues in the long run. Unfortunately that is not that easy in a platform agnostic way.

Jan

Reply all
Reply to author
Forward
0 new messages