{"record":{"id":"1ce232399067db4d","repo":"bevyengine/bevy","slug":"invalid-parameter-values-release-threshold-pres","errorCode":null,"errorMessage":"invalid parameter values release_threshold {} press_threshold {}, expected release_threshold <= press_threshold","messagePattern":"invalid parameter values release_threshold (.+?) press_threshold (.+?), expected release_threshold <= press_threshold","errorType":"validation","errorClass":"ButtonSettingsError","httpStatus":null,"severity":"error","filePath":"crates/bevy_input/src/gamepad.rs","lineNumber":331,"sourceCode":"        /// The value of the `deadzone_upperbound` parameter.\n        deadzone_upperbound: f32,\n    },\n    /// The given parameter was not in range 0.0..=2.0.\n    #[error(\"invalid threshold {0}, expected 0.0 <= threshold <= 2.0\")]\n    Threshold(f32),\n}\n\n/// Errors that occur when setting button settings for gamepad input.\n#[derive(Error, Debug, PartialEq)]\npub enum ButtonSettingsError {\n    /// The given parameter was not in range 0.0..=1.0.\n    #[error(\"invalid release_threshold {0}, expected value [0.0..=1.0]\")]\n    ReleaseThresholdOutOfRange(f32),\n    /// The given parameter was not in range 0.0..=1.0.\n    #[error(\"invalid press_threshold {0}, expected [0.0..=1.0]\")]\n    PressThresholdOutOfRange(f32),\n    /// Parameter `release_threshold` was not less than or equal to `press_threshold`.\n    #[error(\"invalid parameter values release_threshold {} press_threshold {}, expected release_threshold <= press_threshold\", release_threshold, press_threshold)]\n    ReleaseThresholdGreaterThanPressThreshold {\n        /// The value of the `press_threshold` parameter.\n        press_threshold: f32,\n        /// The value of the `release_threshold` parameter.\n        release_threshold: f32,\n    },\n}\n\n/// Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].\n///\n/// An entity with this component is spawned automatically after [`GamepadConnectionEvent`]\n/// and updated by [`gamepad_event_processing_system`].\n///\n/// See also [`GamepadSettings`] for configuration.\n///\n/// # Examples\n///\n/// ```","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_input/src/gamepad.rs#L313-L349","documentation":"ButtonSettingsError::ReleaseThresholdGreaterThanPressThreshold: the thresholds are individually in range but inconsistent — release_threshold must be less than or equal to press_threshold so a button can be released before it is considered pressed again.","triggerScenarios":"Thrown at crates/bevy_input/src/gamepad.rs:331 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reorder the thresholds so release_threshold <= press_threshold","Clamp release_threshold to press_threshold before constructing settings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}