obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

image_source: failed to load texture

Open DiegoDerganz opened this issue 2 years ago • 6 comments

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

30.0.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/5sZ0XMq0qwdzsgF6

OBS Studio Crash Log URL

No response

Expected Behavior

OBS recognize that the resource has ben modified. If the resource is delated clear it. Try to load the new image. Can be fail if it is currently writed. If ok update the resource, if it fails leave the previous image.

Current Behavior

OBS recognize that the resource has ben modified. Clear the image. Try to load the new image. If it fails, you don't show the image.

Steps to Reproduce

  1. Add Image Source (like a png file)
  2. Fast update the image (like 2-3 times per second)
  3. You will notice that sometime the resource disappear (because it fail to load it)
  4. You have to refresh the image so OBS can notice it and try to reload else it stay cleared

Anything else we should know?

I have fix it on my computer, but I'm not familiar with GitHub and I prefer someone revised it. I have reduce the check time from 1 sec to 0.5 sec (image_source_tick). I have created a function only for update modified content image_source_modified. Load the resource in memory and if it loaded ok copy in the current resource else destroy it.

DiegoDerganz avatar Jan 02 '24 11:01 DiegoDerganz

Fast update the image

Are you overwriting the file, or do you delete it and create a new one quickly after?

gxalpha avatar Jan 18 '24 20:01 gxalpha

Fast update the image

Are you overwriting the file, or do you delete it and create a new one quickly after?

Overwriting the previous file.

In my case it's a C# application with a Bitmap in RAM saved as png file (10-30 KB) on the same file.

DiegoDerganz avatar Jan 19 '24 06:01 DiegoDerganz

Can you describe the actual use case here? I feel like this is not an intended or supported use of the image source, and this could be accomplished in a better fashion by using tools designed to share data between applications (such as spout2).

Fenrirthviti avatar Jan 19 '24 18:01 Fenrirthviti

I use a program to generate an image for a scorebug for live streaming sport. It normally changes the image in the order of a few seconds. Yes, I think it's possible to do the same thing with a much more complex system like spout2.

I have noted the same problem with a "splash screen" (over the video source) updated with Dropbox.

I use this program with three different computer two with Windows 11 22H2 and one with Windows 10 Pro for Workstation, all with SSD drive. The problem is only for windows computer that use IWICBitmapDecoder but I don't have understand why sometime if fail to load the resource.

DiegoDerganz avatar Jan 19 '24 19:01 DiegoDerganz

This may be related to the bug I encountered and opened a PR for: https://github.com/obsproject/obs-studio/pull/8783

adampoit avatar Oct 14 '24 22:10 adampoit