Skip to content

Divide by zero exception at start #6568

@metayan

Description

@metayan

Environment

  • OS: macOS Catalina
  • Scrcpy version: dev - v3.3.3-13-g5b51396a
  • Installation method: manual build
  • Device model: Sony Xperia
  • Android version: 9

Describe the bug

Divide by zero exception at start leading to crash.
It has only happened this once during all the years that I've been using scrcpy, but might be good to catch.

(I have a local addition that handles the swedish a-ring key, but it has nothing to do with the crash.)

scrcpy-sdl2 -S --tcpip=10.1.5.21
scrcpy 3.3.3 <https://github.com/Genymobile/scrcpy>
INFO: Connecting to 10.1.5.21:5555...
INFO: Connected to 10.1.5.21:5555
[...]/scrcpy-sdl2/scrcpy-server: 1 file pushed, 0 skipped. 40.9 MB/s (90716 bytes in 0.002s)
[server] INFO: Device: [Sony] Sony G8441 (Android 9)
[server] WARN: Audio disabled: it is not supported before Android 11
INFO: Renderer: metal
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Texture: 720x1280
[server] INFO: Device display turned off
Floating point exception: 8

From macOS crash report:

Crashed Thread:        0

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       EXC_I386_DIV (divide by zero)
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Floating point exception: 8
Termination Reason:    Namespace SIGNAL, Code 0x8
Terminating Process:   exc handler [55148]

Thread 0 Crashed:
0   scrcpy-sdl2                         0x000000010757a64c sc_screen_convert_window_to_frame_coords + 156
1   scrcpy-sdl2                         0x0000000107576791 scrcpy + 12065
2   scrcpy-sdl2                         0x0000000107567aab main + 3419
3   ???                                 0x00007fff70104cc9 0 + 140735073504457

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions