Closed tomato4 closed 2 years ago
Please post the output of fastfetch --show-errors --multithreading false
Does fastfetch --structure Title:Separator:OS:Host:Kernel:Uptime:Packages:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors
have the same issue?
yes it does
Well it is fine when I erase "resolution" item. So it's caused because of this module I think
Thanks, that makes debugging easier.
Of course, not a problem.
Let me sum it up so i can be sure:
If all of that is true, tbh i have no idea what even could be the problem.
Does the following command have the issue?
fastfetch --multithreading false --structure Title:Separator:OS:Host:Kernel:Uptime:Packages:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Cursor:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors
Yes, all of that is true. Also it does that on my second device (stable PC) with same OS setup.
Does the following command have the issue?
Yes it does
Maybe I could some day try some debugging myself. I know C a little. But not sure what I can do.
The best thing you can try is to go to src/common/detectTerminalShell.c
. In line 190 you find static void getShellVersionGeneric(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
. See if it gets executed. This is the only method that could potentially add a newline to an output. If it does, something is wrong with static void getShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
.
Ok I will look at that later. I will comment here once I try figure out something
I just fixed a bug in shell code, i don't believe this fixes your problem, but who knows.
Nope. Still same.
But found out another interesting fact. If I run fastfetch via run.sh it works properly, but if I run directly fastfetch it does not.
PS: I'm still planning to look at that code (especialy the func you recomended to me), but I haven't much time lately...
This is kinda expected, since calling a shell script spawns a new instance of sh, so running fastfetch through run.sh is always as if fastfetch is the first command to be entert in a terminal.
If you have latest version, can you please post the output of fastfetch --load-config devinfo-verbose
?
Output of fastfetch --shell-format "Before {7} After"
?
I have problem to debug the program. With CLion nor with gdb I'm unable to reproduce the bug in debugging enviroment. As you said earlier:
This is kinda expected, since calling a shell script spawns a new instance of sh, so running fastfetch through run.sh is always as if fastfetch is the first command to be entert in a terminal.
debugger also creates new env, where the program runs perfectly. If you have any advice, please tell me, but currently I don't know how to debug the program.
Also I have found solution. Kind of... By accident I discovered, that clear; sleep 0.1; fastfetch
works perfectly fine. I don't now how's that possible, but it is what it is. It is not clean solution, so if you have any ideas?...
This sounds more like a problem with clear in your terminal emulator than with fastfetch. Is it possible that bug happens with other programs too that output very fast, like clear; cat /proc/cpuinfo
?
well no, because it does it even without clear. Cmd fastfetch
will produce bug but sleep 0.1; fastfetch
won't. Even without the clear
cmd
Closing this for now, maybe it gets fixed in future by luck.
Actually it was already fixed by luck, but I forget to report it there. Thanks for the effort.
When I open new terminal, everything works fine.![image](https://user-images.githubusercontent.com/26723812/138564196-35154100-9837-49d9-bbb6-b39bd3d63b73.png)
But I have abbreviation for cl = clear; fastfetch. And there it creates one line emtpy and in the end it also creates 1 empty prompt.![image](https://user-images.githubusercontent.com/26723812/138564253-07ac2373-6a55-4023-9bec-4ee80a7c0e87.png)
(and it's not problem of clear - when I run only fastfetch it does the same thing)![image](https://user-images.githubusercontent.com/26723812/138564280-df442940-a404-4e68-8eea-c96b965461cb.png)
It's not a big deal. I'm just perfectionist, so it bothers me a little :D Additional informations about my setup is in the pictures... Or feel free to ask.
Also I tried it on Termite, XTerm, urxvt and it does it in all of these terminals Also tried Bash instead of Fish and no change. Still does it