Facepunch / sbox-issues

173 stars 11 forks source link

Editor Crashes when opening and previewing .png files #5992

Open lu2000luk opened 1 month ago

lu2000luk commented 1 month ago

Describe the bug

The editor crashes when you double click on a .png file or when you set the view mode to small/medium/large icons.

To Reproduce

  1. Import a png

  2. Double click

  3. Crash (:

  4. Import a png

  5. Click view mode

  6. Set it to one of the icon preview mode

  7. Crash (:

Expected behavior

It should open an image editor/OS's preferred image viewer

Generate the thumbnail normally

Media/Files

In my case the .pngs where generated from importing a model

Additional context

Windows 11 Pro Insider x64 32 GB of ram Ryzen 7 5700G CPU's integrated GPU

Build ID: 15181917

bub-bl commented 1 month ago

PNG file doesnt have any editor widget binded for file type. So, that maybe the issue

DoctorGurke commented 1 month ago

Doesn't happen for me, using a png works fine and trying to open it will just tell you that there's no tool for it. WARNING: No tool (internal or external) found for asset 'my/image.jpg' ("jpg" being the internal asset type for any image file)

CarsonKompon commented 1 month ago

For me double clicking a png/jpg has always opened it as if it were a normal file (opens Paint.NET in my case since thats my default image editor). Odd that it would exhibit different behaviour for the 3 of us

lu2000luk commented 1 month ago

I can provide a video of the issue or any other info regarding my configuration

lu2000luk commented 1 month ago

Now the editor dosent crash but just plays the winodws error sound

linkpy commented 4 weeks ago

After mentioning an issue i had with 4k .png files on discord (just clicking on them in the asset browser crashes the editor), Carson told me to upload them here.

Sadly they are a bit big due to being 4k. Here's where i got them : https://ambientcg.com/view?id=Rocks025 (4k-PNG is the one i used).

Hopefully this help with this issue.

CarsonKompon commented 3 weeks ago

@linkpy I was unable to replicate the issue on my end. I assume the reason this is happening is simply because you do not have enough VRAM to load the image due to it's size.

According to the OP, the following will also make you crash, enforcing that it's erroring when trying to view it at all: image

linkpy commented 3 weeks ago

I doubt it @CarsonKompon : image The red line is when the crash happens. There is plenty of vram to spare here.

The crash also happens when enabling icons in the asset browser.

lu2000luk commented 3 weeks ago

I doubt it @CarsonKompon : image The red line is when the crash happens. There is plenty of vram to spare here.

The crash also happens when enabling icons in the asset browser.

ye the same happened to me. it somehow got fixed duh