buchizo / ClaudiaIDE

This extension can change easily the background image of editor window in Visual Studio.
https://marketplace.visualstudio.com/items?itemName=kbuchi.ClaudiaIDE
624 stars 110 forks source link

提示内存溢出 #143

Open deakintsang opened 1 year ago

deakintsang commented 1 year ago

图片27张,共25M。 开了两个VS,(Microsoft Visual Studio Community 2019 版本 16.11.21); 第二天出现下图报错; image 1672102277934

buchizo commented 1 year ago

@deakintsang

buchizo commented 1 year ago

I guess this exception from .NET Framework (WriteableBitmap) issue. https://stackoverflow.com/questions/8352787/how-to-free-the-memory-after-the-bitmapimage-is-no-longer-needed

Workaround

deakintsang commented 1 year ago

@deakintsang

  • Do you always get an error?
  • Does it occur when the image file size is large? Doesn't it happen if it's small?
  • If you are setting SoftEdge, can you set it to 0?

出现了多次了; 最大的图片,2M;可能是图片太大的问题,播放到此图片就会报错。

image

deakintsang commented 1 year ago

I guess this exception from .NET Framework (WriteableBitmap) issue. https://stackoverflow.com/questions/8352787/how-to-free-the-memory-after-the-bitmapimage-is-no-longer-needed

Workaround

  • Set SoftEdgeX and SoftEdgeY proerties to 0.

But I want to SoftEdge

buchizo commented 1 year ago

But I want to SoftEdge

Yes, I'll fix it, but not yet.

buchizo commented 1 year ago

Maybe this issue fixed by ver 3.1.11. (optimize load image process and remove leak of WriteableBitmap)

deakintsang commented 1 year ago

Maybe this issue fixed by ver 3.1.11. (optimize load image process and remove leak of WriteableBitmap) 3.1.11还是有问题 1672880558356

buchizo commented 1 year ago

@deakintsang I doesn't occurred in my environment using 32MB png image (6k x 4k) file on Visual Studio 2019. Can you share your image to me?

deakintsang commented 1 year ago

@deakintsang I doesn't occurred in my environment using 32MB png image (6k x 4k) file on Visual Studio 2019. Can you share your image to me?

打开两个项目,第二天,其中一个出错,另一个正常 image

图片是 jpg,2K 图片请见链接: https://github.com/deakintsang/vs_background

buchizo commented 1 year ago

I try test long running Visual Studio using slideshow with your images.

image image

In my environment, I could not find memory leak and doesn't occurred this exception.

buchizo commented 1 year ago

Next day

image image

deakintsang commented 1 year ago

这几天正常,没有内存溢出报错。 但是有无响应 image

buchizo commented 1 year ago

但是有无响应

What's mean?

deakintsang commented 1 year ago

image 刚刚,VS上下滚动时出现此情况

deakintsang commented 1 year ago

但是有无响应

What's mean?

Visual Studio no response

buchizo commented 1 year ago

刚刚,VS上下滚动时出现此情况

Is the "User hardware graphics acceleration if available" option enabled?

image

Visual Studio no response

When it occurred? every time? Could you tell me your environment? (os ver/arch/memory, e.t.c.)

deakintsang commented 1 year ago

image 刚刚出错了

deakintsang commented 1 year ago

刚刚,VS上下滚动时出现此情况

Is the "User hardware graphics acceleration if available" option enabled?

image

Visual Studio no response

When it occurred? every time? Could you tell me your environment? (os ver/arch/memory, e.t.c.)

image

image

buchizo commented 1 year ago

Could you disable this option (automatically adust visual experiance ___)? image

deakintsang commented 1 year ago

禁用,还是出错

image

image

buchizo commented 1 year ago
deakintsang commented 1 year ago

I'm guessing that the BitmapSource doesn't take responsibility for freeing this object.

mavnp commented 1 year ago

image 刚刚,VS上下滚动时出现此情况

我也出现了该问题,我猜测是代码编辑上方的下拉列表的问题,在禁用扩展后问题不再复现。在上下滚动时下拉列表会不断抽搐