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

Lightbulb memory explosion #32

Closed
mirh opened this issue Jun 12, 2017 · 30 comments
Closed

Lightbulb memory explosion #32

mirh opened this issue Jun 12, 2017 · 30 comments

Comments

@mirh
Copy link

mirh commented Jun 12, 2017

So.. While I was checking the other computer for #29, I right clicked on LB icon... And nothing happened.
I tried again, again, again and nothing.
So I opened task manager and I noticed that LB was like 300MB of memory.... Whatever I thought?
Then I clicked again and.. boy, it skyrocketed to 1.2GB
Then it suddenly went down to 100, last but not least like 200 and it crashed.
All without never ever showing the settings menu.

Application: LightBulb.exe
Frramework version: v4.0.30319
Description: the process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
   in System.Windows.Media.Composition.DUCE+Channel.SyncFlush()
   in System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean, System.Nullable`1<ChannelSet>)
   in System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr)
   in System.Windows.Interop.HwndTarget.HandleMessage(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr)
   in System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   in MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   in MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   in System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   in System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   in System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   in MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   in MS.Win32.UnsafeNativeMethods.SetWindowPos(System.Runtime.InteropServices.HandleRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32, Int32, Int32)
   in System.Windows.Interop.HwndSource.Resize(System.Windows.Size)
   in System.Windows.Interop.HwndSource.OnLayoutUpdated(System.Object, System.EventArgs)
   in System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   in System.Windows.ContextLayoutManager.UpdateLayout()
   in System.Windows.UIElement.UpdateLayout()
   in System.Windows.Interop.HwndSource.SetLayoutSize()
   in System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
   in System.Windows.Interop.HwndSource.set_RootVisual(System.Windows.Media.Visual)
   in System.Windows.Controls.Primitives.Popup.SetRootVisualToPopupRoot()
   in System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean)
   in System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   in System.Windows.DependencyObject.InvalidateProperty(System.Windows.DependencyProperty, Boolean)
   in System.Windows.Data.BindingExpressionBase.Invalidate(Boolean)
   in System.Windows.Data.BindingExpression.TransferValue(System.Object, Boolean)
   in System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean)
   in MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean, Boolean, Boolean)
   in MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32, System.ComponentModel.ICollectionView, System.Object, Boolean)
   in MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyProperty, Boolean)
   in MS.Internal.Data.ClrBindingWorker.OnSourceInvalidation(System.Windows.DependencyObject, System.Windows.DependencyProperty, Boolean)
   in System.Windows.Data.BindingExpression.HandlePropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.Data.BindingExpression.OnPropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.DependentList.InvalidateDependents(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
   in System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
   in System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
   in System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, System.Object)
   in Hardcodet.Wpf.TaskbarNotification.TaskbarIcon.OnToolTipChange(Boolean)
   in Hardcodet.Wpf.TaskbarNotification.Interop.WindowMessageSink.ProcessWindowMessage(UInt32, IntPtr, IntPtr)
   in Hardcodet.Wpf.TaskbarNotification.Interop.WindowMessageSink.OnWindowMessageReceived(IntPtr, UInt32, IntPtr, IntPtr)
   in MS.Win32.UnsafeNativeMethods.IntGetMessageW(System.Windows.Interop.MSG ByRef, System.Runtime.InteropServices.HandleRef, Int32, Int32)
   in MS.Win32.UnsafeNativeMethods.GetMessageW(System.Windows.Interop.MSG ByRef, System.Runtime.InteropServices.HandleRef, Int32, Int32)
   in System.Windows.Threading.Dispatcher.GetMessage(System.Windows.Interop.MSG ByRef, IntPtr, Int32, Int32)
   in System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   in System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   in System.Windows.Application.RunDispatcher(System.Object)
   in System.Windows.Application.RunInternal(System.Windows.Window)
   in System.Windows.Application.Run(System.Windows.Window)
   in LightBulb.App.Main()

Dump

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jun 12, 2017

what the fuck

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jun 12, 2017

are you using the version compiled from master branch, the last release or the installer i sent you?

@mirh
Copy link
Author

mirh commented Jun 12, 2017

1.6.3.3 downloaded from release on that computer

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jun 12, 2017

Can you consistently replicate this?

@mirh
Copy link
Author

mirh commented Jun 12, 2017

I guess I'll have to wait another week of uptime before calling or not calling it a day.
Also.. I'd have swore I had set night temperature to 6000K last month, but today when starting LB again it fell back to 3900 or something (default)

@mirh
Copy link
Author

mirh commented Jul 1, 2017

So, I spotted the issue again on the PC.
But this time, instead of clicking and clicking until it crashed, once I noticed the problem I stopped and the process is still running.
Anything I could do to profile/report better it?

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jul 5, 2017

Sorry I don't know what exactly is going wrong. On the machines I tested, I'm running LightBulb for full 5 days (I know it's not a week, but close) and the allocated memory is still at around 13mb.

@mirh
Copy link
Author

mirh commented Jul 5, 2017

Well, I know, even on the famously stucking computer I'm getting low results (albeit I'm between 40 and 70MB to be honest)

On the other computer though.. Boom.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Aug 29, 2017

Still relevant? :p

@mirh
Copy link
Author

mirh commented Aug 29, 2017

Yes.
(and I'm not sure how else it could be, given nothing changed in these months)

@Tyrrrz
Copy link
Owner

Tyrrrz commented Aug 29, 2017

@Tyrrrz Tyrrrz added the bug label Aug 29, 2017
@ghost
Copy link

ghost commented Dec 10, 2017

It just happened with me. Lightbulb was consuming over 200MB of RAM.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Dec 10, 2017

Did it also crash? How did it happen? Was there anything else? Any reproduction steps?

@ghost
Copy link

ghost commented Dec 10, 2017

It didn't crash, happened during an Overwatch match. Maybe letting it open during a full day can reproduce the leak?

@Tyrrrz
Copy link
Owner

Tyrrrz commented Dec 13, 2017

I usually have it on for multiple consecutive weeks (I don't turn off my work PC) and it doesn't show symptoms of that issue. Can you check the newest release, just in case?

@mirh
Copy link
Author

mirh commented Dec 13, 2017

My issue had nothing to do with "random memory leaks" summing up over time.
It seems more <something that only becomes magic after some time> triggering all at once and.. exploding.

Anyway, yes will do.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jan 13, 2018

Still happening with last release?

@mirh
Copy link
Author

mirh commented Jan 14, 2018

Duh, I hadn't noticed about 1.6.3.6 - will report

@mirh
Copy link
Author

mirh commented Jan 22, 2018

Yep, still a thing.

@polyvertex
Copy link

+1 here: over 300MB usage. LightBulb seemed to work feature-wise, but it was unresponsive to GUI interaction (i.e. left or right-clicking the tray icon produced not result).

I noticed I got this behavior only on my laptop so in my case, this seems to occur only when I use OS' "Hibernate" feature (haven't tried with "Sleep" mode)

@mirh
Copy link
Author

mirh commented Aug 7, 2018

Fucking nailed it.
On the W7 pc this time (after a mere 21 hours uptime), where I seemingly have enough ram that the explosion don't hit paging and can subsequently turn back to the "usual" 300MB.

With procexp I saw wpfgfx_v0400.dll!WgxConnection_ShouldForceSoftwareForGraphicsStreamClient+0x7f spikes in cpu usage when I try to open the right click menu.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Aug 9, 2018

Nice, that's at least some info.
Do you have an integrated GPU? Are your GPU drivers installed and working correctly?

@mirh
Copy link
Author

mirh commented Aug 9, 2018

I have a radeon here, with kinda-last-drivers, and a geforce in the other one.
There's no problem to report.

@Tyrrrz Tyrrrz mentioned this issue Oct 5, 2019
@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 8, 2019

@mirh hello darkness my old friend.
Have you checked if our most favorite issue is reproducible on latest master builds?

@mirh
Copy link
Author

mirh commented Nov 9, 2019

I would have said the other one was the most favorite (:
Anyway, thing is unless this is made to work on 4.7, my very reproducible Vista cannot even start it.
While on 7 pc it always take weeks to be able to say anything..

@mirh mirh closed this as completed Nov 9, 2019
@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 9, 2019

You should be able to install .NET Core 3 on Vista, I believe.

@mirh
Copy link
Author

mirh commented Nov 9, 2019

Nope, 4.7.2 is the most that will work (and even then it takes some slight hack)

@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 9, 2019

You're right, I can see it works on Windows 7 and up.

https://github.com/dotnet/core/blob/master/release-notes/3.0/3.0-supported-os.md

@mokrates
Copy link

mokrates commented Sep 5, 2021

Still have the issue on win10. dotnet.exe goes up to 9GB on my machine, triggering "System Rousource Exhaustion" and creating unstable system bahaviour (firefox and teams crashes, etc)

@mirh mirh reopened this Sep 9, 2021
@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 7, 2023

LightBulb no longer runs via the .NET CLi (dotnet.exe) so it should be easier to see if the resource usage is caused by LightBulb or something else that also runs on .NET. Going to close it as stale again, reply with a comment if you can still reproduce it.

@Tyrrrz Tyrrrz closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants