Opened 8 months ago

Closed 7 months ago

#13567 closed defect (fixed)

COMMON: Crash when clicking "Hide" while downloading icons

Reported by: Thunderforge Owned by: lotharsm
Priority: blocker Component: Common
Version: Keywords: has-pull-request
Cc: Game:

Description

When downloading icons, if you click the "Hide" button, ScummVM crashes.

Reproduction Steps

  1. In the Launcher, click "Global Options..."
  2. Click the "Paths" tab
  3. Confirm that "Icons Path" is set to an empty folder
  4. Click the "Misc" tab
  5. Click "Update Icons"
    • The dialog will say that two downloads are available
  6. Click "Download"
  7. Before the download completes, click "Hide"

ScummVM will crash.

Log files

Crashed Thread:        12  SDLTimer

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000003
Exception Codes:       0x0000000000000001, 0x0000000000000003
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [78539]

VM Region Info: 0x3 is not in any region.  Bytes before following region: 140737486635005
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      VM_ALLOCATE              7fffffe5c000-7fffffe5d000 [    4K] r-x/r-x SM=ALI  

Thread 12 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000003  rbx: 0x00007fe841830c00  rcx: 0x00007fe84233c9f0  rdx: 0x0000000000000000
  rdi: 0x00007ff7b1d324f0  rsi: 0x00000000444c5052  rbp: 0x000070000dccbe50  rsp: 0x000070000dccbd08
   r8: 0x00007ff847cba308   r9: 0x0000000000000000  r10: 0x00000000ffffff00  r11: 0x00007ff847cba300
  r12: 0x00000000000044c6  r13: 0x000060000308ce88  r14: 0x0000000000003ff7  r15: 0x00007fe8465e8000
  rip: 0x0000000000000003  rfl: 0x0000000000010202  cr2: 0x0000000000000003
  
Logical CPU:     0
Error Code:      0x00000014 (no mapping for user instruction read)
Trap Number:     14

Versions Tested

  • ScummVM 2.7.0 daily 2022-06-10
  • macOS 12.4

Change History (7)

comment:1 by eriktorbjorn, 8 months ago

If I understand correctly, the problem is that the "Hide" button closes the dialog, but all the callbacks for handling the downloads are in the dialog.

comment:2 by lotharsm, 8 months ago

Reproducible in Win32 as well. Should we raise this to "blocker"?

comment:3 by eriktorbjorn, 8 months ago

I think it needs to be fixed before release. Even if that fix turns out to simply be to not have a "Hide" button.

comment:4 by lotharsm, 7 months ago

Priority: highblocker

comment:5 by criezy, 7 months ago

Keywords: has-pull-request added

I created a pull request: https://github.com/scummvm/scummvm/pull/4066

eriktorbjorn was spot on with the root cause of the crash. But there were also a couple of other issues lurking in the shadow.

comment:6 by lotharsm, 7 months ago

Confirming that this was indeed fixed in https://github.com/scummvm/scummvm/pull/4066.

Thank you!

comment:7 by lotharsm, 7 months ago

Owner: set to lotharsm
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.