rockowitz / ddcui

Graphical user interface for ddcutil - control monitor settings
http://www.ddcutil.com
GNU General Public License v2.0
147 stars 2 forks source link

Seg fault immediately after launch with 0.2.2 #41

Closed cradcore closed 2 years ago

cradcore commented 2 years ago

Built using the latest version from github from the 0.2.2-dev branch on Arch Linux x64. Running with no parameters. Normal output isn't much help, but when run with DDCUTIL_DEBUG_PARSE=1 valgrind ./ddcui


==71828== Memcheck, a memory error detector
==71828== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==71828== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==71828== Command: ./ddcui
==71828== 
(ddc_start_watch_displays      ) Starting  watch_displays_enabled=true
==71828== Invalid read of size 1
==71828==    at 0x484BD06: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==71828==    by 0x6088097: __vfprintf_internal (vfprintf-internal.c:1517)
==71828==    by 0x609834C: __vasprintf_internal (vasprintf.c:57)
==71828==    by 0x4FEAF42: UnknownInlinedFun (stdio2.h:218)
==71828==    by 0x4FEAF42: g_vasprintf (gprintf.c:338)
==71828==    by 0x4FBB521: g_strdup_vprintf (gstrfuncs.c:551)
==71828==    by 0x50CB12B: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x50CB877: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x50B85BD: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x50AC473: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x4005F3D: call_init (dl-init.c:70)
==71828==    by 0x4005F3D: call_init (dl-init.c:26)
==71828==    by 0x400602B: _dl_init (dl-init.c:117)
==71828==    by 0x401DDA9: ??? (in /usr/lib/ld-linux-x86-64.so.2)
==71828==  Address 0x1 is not stack'd, malloc'd or (recently) free'd
==71828== 
==71828== 
==71828== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==71828==  Access not within mapped region at address 0x1
==71828==    at 0x484BD06: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==71828==    by 0x6088097: __vfprintf_internal (vfprintf-internal.c:1517)
==71828==    by 0x609834C: __vasprintf_internal (vasprintf.c:57)
==71828==    by 0x4FEAF42: UnknownInlinedFun (stdio2.h:218)
==71828==    by 0x4FEAF42: g_vasprintf (gprintf.c:338)
==71828==    by 0x4FBB521: g_strdup_vprintf (gstrfuncs.c:551)
==71828==    by 0x50CB12B: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x50CB877: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x50B85BD: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x50AC473: ??? (in /usr/lib/libddcutil.so.4.2.0)
==71828==    by 0x4005F3D: call_init (dl-init.c:70)
==71828==    by 0x4005F3D: call_init (dl-init.c:26)
==71828==    by 0x400602B: _dl_init (dl-init.c:117)
==71828==    by 0x401DDA9: ??? (in /usr/lib/ld-linux-x86-64.so.2)
==71828==  If you believe this happened as a result of a stack
==71828==  overflow in your program's main thread (unlikely but
==71828==  possible), you can try to increase the size of the
==71828==  main thread stack using the --main-stacksize= flag.
==71828==  The main thread stack size used in this run was 8388608.
==71828== 
==71828== HEAP SUMMARY:
==71828==     in use at exit: 132,355 bytes in 447 blocks
==71828==   total heap usage: 591 allocs, 144 frees, 211,293 bytes allocated
==71828== 
==71828== LEAK SUMMARY:
==71828==    definitely lost: 0 bytes in 0 blocks
==71828==    indirectly lost: 0 bytes in 0 blocks
==71828==      possibly lost: 528 bytes in 3 blocks
==71828==    still reachable: 131,827 bytes in 444 blocks
==71828==         suppressed: 0 bytes in 0 blocks
==71828== Rerun with --leak-check=full to see details of leaked memory
==71828== 
==71828== For lists of detected and suppressed errors, rerun with: -s
==71828== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
rockowitz commented 2 years ago

Thank you for the report.

The bug has been fixed in the current ddcutil 1.2.3-dev branch. Please build from that branch and install the new libddcutil so that it's used by ddcui.

cradcore commented 2 years ago

That did the trick, thank you!