mirror of
https://github.com/NickeManarin/ScreenToGif.git
synced 2026-04-26 07:35:54 +03:00
[GH-ISSUE #1434] [Crash] System.NullReferenceException at RemoveRoutedEventHandlers when exporting with Gifski #1051
Labels
No labels
copy cats
duplicated
future feature
pull-request
⬜ Accepted
⬜ Completed
⬜ Help Wanted 💪
⬜ In Progress
⬜ Missing Details
⬜ Pending
⬜ Waiting For Answer ⏳
🆕 feature preview
🔷 Bug 🐛
🔷 Out Of Scope
🔷 Out Of Scope
🔷 Question
🔷Enhancement
🔷Enhancement
🔷Invalid / External
🔷Knowledge Base
🔷Won't Fix
🕑 High
🕑 High
🕑 High
🕕 Medium
🕙 Low
🕛 Critical
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ScreenToGif#1051
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Poppypy on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1434
Originally assigned to: @NickeManarin on GitHub.
Describe the bug
I am experiencing a consistent crash when exporting a GIF using the Gifski encoder. The crash occurs during the export process.
To Reproduce
Error Log / Stack Trace
Title: Removing event handlers
Version: 2.42.1
Date: 02/10/2026
Message: Object reference not set to an instance of an object.
Type: System.NullReferenceException
Source: ScreenToGif
TargetSite: Void RemoveRoutedEventHandlers(System.Windows.UIElement, System.Windows.RoutedEvent)
StackTrace:
at ScreenToGif.Util.Other.RemoveRoutedEventHandlers(UIElement element, RoutedEvent routedEvent) in R:\Source\ScreenToGif\ScreenToGif\Util\Other.cs:line 350
Environment
Additional context
It seems to happen multiple times as shown in the repeated logs. I have tried replacing the gifski.dll but the issue persists.
26_02_10.txt
@pawlos commented on GitHub (Feb 23, 2026):
@Poppypy Tried to repro this today but no luck. I've looked at this part of the code and there's a try-catch so if any exception happening there should not caused the crash. The log might be there as it is being logged but the crash I think does not originate from there. Any extra steps during the process that might be causing this issue?
@Poppypy commented on GitHub (Feb 24, 2026):
Hi @pawlos , thanks for looking into this.
To help you investigate further, I have uploaded a .zip archive containing a video recording of the crash process and the complete logs. The video demonstrates the exact steps I took before the crash occurred. Please let me know if this helps pinpoint the issue or if you need any further information.
Logs.zip
@pawlos commented on GitHub (Feb 25, 2026):
@Poppypy thanks for the files. I'll check the logs to see if there's anything interesting. But checking the video I don't see any crash. Is that the correct one?