Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash while trying to bulk delete #542

Open
alejodelosrios opened this issue Jan 14, 2025 · 0 comments
Open

Crash while trying to bulk delete #542

alejodelosrios opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@alejodelosrios
Copy link

Describe the bug
When you select several files and press Ctrl + d for deleting them, app crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Press V
  2. Press Shift + Up or Shift + Down to select some files for deleting
  3. Press Ctrl + d
  4. See error

Expected behavior
App is going to crash

Log
Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x64
runtime/debug.PrintStack()
runtime/debug/stack.go:18 +0x1c
github.com/charmbracelet/bubbletea.(*Program).recoverFromPanic(0x140001a6000)
github.com/charmbracelet/[email protected]/tea.go:705 +0x84
panic({0x10378ab80?, 0x103d41630?})
runtime/panic.go:785 +0x124
github.com/yorukot/superfile/src/internal.returnFolderElement.func3(0x40?, 0x0)
github.com/yorukot/superfile/src/internal/function.go:108 +0x9c
sort.partition_func({0x140006ca410?, 0x1400011e540?}, 0x0, 0x54, 0x140006ca208?)
sort/zsortfunc.go:157 +0x1d0
sort.pdqsort_func({0x140006ca410?, 0x1400011e540?}, 0x14000430018?, 0x0?, 0x0?)
sort/zsortfunc.go:114 +0x1b0
sort.Slice({0x10374b920?, 0x14000430018?}, 0x140006ca410)
sort/slice.go:29 +0xb8
github.com/yorukot/superfile/src/internal.returnFolderElement({0x14000500960, 0x1f}, 0x0, {{0x14000330fc0, 0x3, 0x3}, 0x2, 0x0})
github.com/yorukot/superfile/src/internal/function.go:112 +0x214
github.com/yorukot/superfile/src/internal.(*model).getFilePanelItems(0x140006d8fb8)
github.com/yorukot/superfile/src/internal/model.go:413 +0x304
github.com/yorukot/superfile/src/internal.model.Update({{{0x14000232008, 0x1, 0x1}, 0xa9, 0x0, 0x8, {0x1, 0xa7}}, {{0x14000583a40, 0xc, ...}, ...}, ...}, ...)
github.com/yorukot/superfile/src/internal/model.go:76 +0x620
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0x140001a6000, {0x103833c78?, 0x14000234a88?}, 0x14000110310)
github.com/charmbracelet/[email protected]/tea.go:461 +0x6a8
github.com/charmbracelet/bubbletea.(*Program).Run(0x140001a6000)
github.com/charmbracelet/[email protected]/tea.go:595 +0x8cc
github.com/yorukot/superfile/src/cmd.Run.func2(0x140003c1a40)
github.com/yorukot/superfile/src/cmd/main.go:92 +0x1a4
github.com/urfave/cli/v2.(*Command).Run(0x140001da580, 0x140003c1a40, {0x14000142130, 0x1, 0x1})
github.com/urfave/cli/[email protected]/command.go:276 +0x600
github.com/urfave/cli/v2.(*App).RunContext(0x140001aa200, {0x1038347a0, 0x103e49860}, {0x14000142130, 0x1, 0x1})
github.com/urfave/cli/[email protected]/app.go:333 +0x51c
github.com/urfave/cli/v2.(*App).Run(...)
github.com/urfave/cli/[email protected]/app.go:307
github.com/yorukot/superfile/src/cmd.Run({0x103d6d9b8?})
github.com/yorukot/superfile/src/cmd/main.go:105 +0x3f4
main.main()
github.com/yorukot/superfile/main.go:15 +0x24

System information (please complete the following information):

  • OS: MacOS Sequoia
  • Version 15.1.1 (24B91)
  • superfile Version 1.1.7.1
@alejodelosrios alejodelosrios added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Bug
Development

No branches or pull requests

1 participant