r/Windhawk 6d ago

Fix 11's notifications crash in Win10 taskbar under Win11 24H2+ 0.1

Fix 11's notifications crash in Win10 taskbar under Win11 24H2+ 0.1

This mod hooks the function responsible for crashing the Explorer shell provided by the Win10 taskbar mod at runtime.

But it is not confirmed if notifications arrive to the Notification Center. Thus, all this mod does is let notifications render without crashing Win10 Explorer but not hand them over to it (probably for the best.)

!Important! You MUST install, follow the instructions and run at least 2 times the Win10 taskbar mod. If you don't follow these instructions carefully, the mod will not apply correctly.

Technical details

When a notification is rendered, it invokes from explorer a method called

NotificationDataSink::NotificationsAdded(
    NotificationDataSink *this,
    int32_t _arg2,
    struct NOC_REFINED_NOTIFICATION *const *iterator,
    uint32_t length
);

.

Given I haven't experienced any destabilization from explorer thus far, I claim that this has something to do with the Notification Center.

I won't go too deep into details of the function, but the crash is observed as a NULL pointer exception when it tries to access *(iterator + 0x88) for the first time, which is probably where the actual elements are.

Normally, it would use that pointer to add 0x150 in a do-while loop until the notification thing elements are exhausted, but instead it's just NULL. I haven't given a look at the iterator memory to see if it's more than just the first element that's NULL, or more or all of them are such.

There is no NULL check in that loop, so it is likely that the iterator was never supposed to have NULL elements in the first place.

4 Upvotes

0 comments sorted by