You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am consistently getting a segfault (in src/stb_image.h) when trying to run on images with a 16 bit image depth. Below is the simple test script that I use to show the behavior with an example image.
from waifu2x_vulkan import waifu2x_vulkan as waifu2x
sts = waifu2x.init()
sts = waifu2x.initSet(0)
fileIn = "/home/gin/Pictures/test2.png"
f = open(fileIn, "rb")
data = f.read()
f.close()
waifu2x.add(data, waifu2x.MODEL_ANIME_STYLE_ART_RGB_NOISE3, 1, 2)
Since the code segfaults in the cpython library, I ran with gdb to get a backtrace:
Thread 4 "python3" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe76bc6c0 (LWP 21377)]
stbi__convert_16_to_8 (channels=4, h=<optimized out>, w=<optimized out>, orig=0x0) at src/stb_image.h:1140
1140 src/stb_image.h: No such file or directory.
(gdb) bt
#0 stbi__convert_16_to_8 (channels=4, h=<optimized out>, w=<optimized out>, orig=0x0) at src/stb_image.h:1140
#1 stbi_xload (v=...) at src/other_image.h:174
#2 0x00007ffff631863b in to_load (v=...) at src/other_image.h:232
#3 0x00007ffff6318c36 in waifu2x_decode (args=<optimized out>) at src/waifu2x_main.cpp:70
#4 0x00007ffff789ebb5 in ?? () from /usr/lib/libc.so.6
#5 0x00007ffff7920d90 in ?? () from /usr/lib/libc.so.6
The issue appears to be localized to the stbi__convert_16_to_8 function. If I convert the image to 8-bit first (using PIL) then waifu2x does not segfault, leading me to think it's isolated to 16-bit images.
The text was updated successfully, but these errors were encountered:
I updated to v1.1.6 and tried the test case image again. The issue seems resolved. Thanks for your hard work!
I use waifu2x in a python program that upreses images before they are applied as a wallpaper on my desktop (new wallpaper every 15 seconds). My program kept segfaulting on these 16-bit images. I will close the issue for now, but if something pops up as it runs over more images I will re-open with new debug info.
I am consistently getting a segfault (in src/stb_image.h) when trying to run on images with a 16 bit image depth. Below is the simple test script that I use to show the behavior with an example image.
Since the code segfaults in the cpython library, I ran with gdb to get a backtrace:
The issue appears to be localized to the stbi__convert_16_to_8 function. If I convert the image to 8-bit first (using PIL) then waifu2x does not segfault, leading me to think it's isolated to 16-bit images.
The text was updated successfully, but these errors were encountered: