-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stonesense On-Screen Display hidden by default in config. #119
base: master
Are you sure you want to change the base?
Stonesense On-Screen Display hidden by default in config. #119
Conversation
this might crash on linux, but i cant check and it's probably an allegro issue
resources/init.txt
Outdated
|
||
Shows all creatures, for debugging. Living, dead, kidnapped, caged, EVERY single one. | ||
[ALLCREATURES:NO] | ||
|
||
Adds more logging information to what is written to stonesense.log. May be useful | ||
if trying having issues with sprite configuration tweaking. | ||
[VERBOSE_LOGGING:NO] | ||
[VERBOSE_LOGGING:YES] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this an intentional change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort of, i can remove it but i feel verbose logging should be on by default at least while we're messing with a lot of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im leaving it if there are no objections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how verbose is verbose? this will affect players who use the plugin, not just devs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly if you dont have verbose logging on it reports almost nothing. not to mention that the log file doesnt even exist unless you also turn on debug mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my question is more: is this useful for players to have enabled, or developers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough. this change needs to be reworked anyways bc the file moved
hey i just marked this ready for review but i also just remembered i wanted to ask if we should hide the names by default too. or should this be a seperate PR? |
this is the new config file for stonesense. it does NOT have the changes i made in DFHack/stonesense#119
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this insta-crashes on Linux:
[DFHack]# ssense
Stonesense launched
Using allegro version 5.0.10 r1
New image: stonesense/objects.png
New image: stonesense/creatures.png
[DFHack]#
Thread 12 "dwarfort" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe4bfc6c0 (LWP 7087)]
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
76 VPCMPEQ (%rdi), %ymm0, %ymm1
(gdb) bt
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
#1 0x00007ffff74f4b69 in __printf_buffer (buf=buf@entry=0x7fffe4bfb650, format=format@entry=0x7fffed519c79 "New image: %s\n", ap=ap@entry=0x7fffe4bfb758,
mode_flags=mode_flags@entry=2) at /usr/src/debug/sys-libs/glibc-2.39-r6/glibc-2.39/stdio-common/vfprintf-process-arg.c:435
#2 0x00007ffff74f5189 in __vfprintf_internal (s=0x7fffc0b32fa0, format=0x7fffed519c79 "New image: %s\n", ap=0x7fffe4bfb758, mode_flags=2) at vfprintf-internal.c:1559
#3 0x00007fffed50b3ca in LogVerbose(char const*, ...) () from /home/myk/.local/share/Steam/steamapps/common/Dwarf Fortress/hack/plugins/stonesense.plug.so
#4 0x00007fffed4e2c13 in loadImgFile(char const*) () from /home/myk/.local/share/Steam/steamapps/common/Dwarf Fortress/hack/plugins/stonesense.plug.so
#5 0x00007fffed4e3838 in load_from_path(ALLEGRO_PATH*, char const*, ALLEGRO_BITMAP*&) ()
from /home/myk/.local/share/Steam/steamapps/common/Dwarf Fortress/hack/plugins/stonesense.plug.so
#6 0x00007fffed4e38d6 in loadGraphicsFromDisk() () from /home/myk/.local/share/Steam/steamapps/common/Dwarf Fortress/hack/plugins/stonesense.plug.so
#7 0x00007fffed50bf38 in stonesense_thread(ALLEGRO_THREAD*, void*) ()
from /home/myk/.local/share/Steam/steamapps/common/Dwarf Fortress/hack/plugins/stonesense.plug.so
#8 0x00007fffed06292a in ?? () from hack/liballegro.so.5.0
#9 0x00007fffed09e26e in ?? () from hack/liballegro.so.5.0
#10 0x00007ffff7521419 in start_thread (arg=<optimized out>) at pthread_create.c:447
#11 0x00007ffff758d52c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
The setfault is in strlen
, which frankly sounds like an unterminated buffer that should be causing problems all the time. Let's put this PR on hold until we track that one down.
separating names from the other OSD elements would be useful, but totally in a separate PR. That will be a much larger scale and riskier change. |
oh no i meant just hiding them by default, which i think i did in #120 (tho it can still be turned back on with stoneinit.txt and keybind too |
no need to hide them by default -- they'll be hidden anyway since the osd is off |
Better stack trace with more debug symbols: [DFHack]# ssense
Stonesense launched
Using allegro version 5.0.10 r1
New image: stonesense/objects.png
New image: stonesense/creatures.png
[DFHack]#
Thread 12 "dwarfort" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff996706c0 (LWP 11316)]
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
76 VPCMPEQ (%rdi), %ymm0, %ymm1
(gdb) bt
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
#1 0x00007ffff74f4b69 in __printf_buffer (buf=buf@entry=0x7fff9966f700, format=format@entry=0x7fffeec15c78 "New image: %s\n", ap=ap@entry=0x7fff9966f808,
mode_flags=mode_flags@entry=2) at /usr/src/debug/sys-libs/glibc-2.39-r6/glibc-2.39/stdio-common/vfprintf-process-arg.c:435
#2 0x00007ffff74f5189 in __vfprintf_internal (s=0x7fffc8b32fa0, format=0x7fffeec15c78 "New image: %s\n", ap=0x7fff9966f808, mode_flags=2) at vfprintf-internal.c:1559
#3 0x00007fffeec0a75a in vfprintf (__ap=0x7fff9966f808, __fmt=0x7fffeec15c78 "New image: %s\n", __stream=0x7fffc8b32fa0) at /usr/include/bits/stdio2.h:109
#4 LogVerbose (msg=msg@entry=0x7fffeec15c78 "New image: %s\n") at /home/myk/src/dfhack/plugins/stonesense/main.cpp:130
#5 0x00007fffeebeb52d in loadImgFile (filename=0x7fffc8a46dd0 "stonesense/creatures.png") at /home/myk/src/dfhack/plugins/stonesense/GUI.cpp:1451
#6 0x00007fffeebec088 in load_from_path (p=p@entry=0x7fffc90c2800, filename=filename@entry=0x7fffeec15cac "creatures.png", imgd=@0x7fffeec2e3e8: 0x0)
at /home/myk/src/dfhack/plugins/stonesense/GUI.cpp:1231
#7 0x00007fffeebec126 in loadGraphicsFromDisk () at /home/myk/src/dfhack/plugins/stonesense/GUI.cpp:1245
#8 0x00007fffeec0b2a0 in stonesense_thread (main_thread=0x7fffd81f0830, parms=<optimized out>) at /home/myk/src/dfhack/plugins/stonesense/main.cpp:543
#9 0x00007fffed26292a in ?? () from hack/liballegro.so.5.0
#10 0x00007fffed29e26e in ?? () from hack/liballegro.so.5.0
#11 0x00007ffff7521419 in start_thread (arg=<optimized out>) at pthread_create.c:447
#12 0x00007ffff758d52c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 |
they wont, actually. those arent linked. also i was asked to hide them as a feature request and it lines up with everything hidden by default |
ah ok, then hiding them is good. I was mistaken about how it worked |
As per the discussion on Discord (https://discord.com/channels/793331351645323264/1321200750000341034/1322057323606310912), this change is unsafe to merge until issues with deferred bitmap drawing mode are solved |
this might crash on Linux, but i cant check and it's probably an allegro issue.