obsproject / obsproject/obs-studio

image_source: failed to load texture

Open
#10,060 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the image_source_tick and image_source_modified functions, then reproduce the issue by updating a PNG two or three times per second on Windows 10. Use the linked OBS log for context. Done means a failed reload keeps the previous image visible, while a successful reload updates it and a deleted resource is cleared.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.