Skip to content

[Bug] Crash when calculating factorial of a decimal number #1411

Open
@marginal23326

Description

@marginal23326

Describe the bug
The ueli application encounters an uncaught exception and crashes when attempting to calculate the factorial (!) of a non-integer (decimal) number. Factorial calculations for integers work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Open ueli.
  2. Go to Settings > Extensions.
  3. Ensure the Calculator extension is enabled. If not, enable it.
  4. Return to the main ueli input field.
  5. Type a decimal number (e.g., 2.5, 3.14, 10.2).
  6. Type the factorial symbol (!) immediately after the number (e.g., 2.5!).
  7. Observe the application crash and display an error message window (see screenshot below).

Expected behavior
The application should not crash. Ideally, it should either:

  • Display a user-friendly error message within the ueli interface indicating that the factorial function is only defined for non-negative integers.
  • Or, simply ignore/skip the factorial calculation for non-integer inputs.

Screenshots
Here is the error message window that appears:

Image

Environment

  • OS: Windows 11 Pro
  • OS Version: 23H2 (OS Build 22631.5189)
  • Ueli Version: 9.21.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions