Git Product home page Git Product logo

Comments (13)

LinusDierheimer avatar LinusDierheimer commented on June 7, 2024

I tried to reproduce, but exo-open fails to find TerminalEmulator when installing only it. As i don't want to pull in the whole XFCE ecosystem, i leave this one for you. Most probably something in /src/common/detectTerminalShell.c or src/common/packages.c. Run with --multithreading false to see if it is the shell or the package code that crashes.

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

Turning off multithreading just makes it crash later in the process
exobug2
It makes it past the package module just fine.

It seems to be Thunar related (not exo-open), as setting the command line to just be "alacritty" will produce the same crash.

edit: Also happens with tilix and xfce4-terminal. Neofetch works fine.

from fastfetch.

LinusDierheimer avatar LinusDierheimer commented on June 7, 2024

Seems like an error in src/common/detectWMDE.c. Can you check that? Probably an error in XFCE specific code.

from fastfetch.

LinusDierheimer avatar LinusDierheimer commented on June 7, 2024

Possible that sessionDesktop is somehow NULL? applyPrettyNameIfWM doesn't check for that even that case is possible, see this line (365):

//If sessionDesktop is a known WM, set it.
applyPrettyNameIfWM(result, result->sessionDesktop, &protocolHint);

the check must be added anyway at top of the function, similar to applyPrettyNameIfDE:

if(name == NULL || *name == '\0')
    return;

If you open a PR, and this is not the error, you can include that fix too.

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

So there's definitely something weird going on with with terminal detection when launched from Thunar.
Plasma/KWin:
exobug3
LXQt/Openbox:
exobug4
The only one that actually segfaults is regular Openbox.

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

I added

if(processName == NULL || *processName == '\0')
        return;

to the start of applyPrettyNameIfWM.

That's what you meant, right?

Edit: The segfault is gone - the garbage output is still there as with the others though.
exobug5

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

Here's the process that's launched:
exobug6

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

The terminal font module seems to know the terminal name at least:
exobug7

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

Turning off multithreading removes the random garbage on each run and leaves the line blank. I'm not sure where to go from here.

Is it safe to call getTerminalShell() recursively?

from fastfetch.

LinusDierheimer avatar LinusDierheimer commented on June 7, 2024

Should be. However im still unable to reproduce, even in a VM with similar setup. This makes it hard to find the cause. Maybe use gdb too see where things go wrong?

from fastfetch.

DarNCelsius avatar DarNCelsius commented on June 7, 2024

In terminal.c,

if(instance->config.terminalFormat.length == 0)
    {
        ffPrintLogoAndKey(instance, FF_TERMINAL_MODULE_NAME, 0, &instance->config.terminalKey);
      //  puts(result->terminalExeName);
      printf("\nresult->terminalProcessName: %s\nresult->terminalExe: %s\nresult->terminalExeName: %s\n", result->terminalProcessName.chars, result->terminalExe.chars, result->terminalExeName);
    }

thunarTermExe
So result->terminalExeName is not valid for some reason.

Here's the terminal launched normally:
thunarTermExe2

from fastfetch.

LinusDierheimer avatar LinusDierheimer commented on June 7, 2024

Is it possible that your terminalExe ends with a slash at any point? This would fail then:

uint32_t lastSlashIndex = ffStrbufLastIndexC(exe, '/');
if(lastSlashIndex < exe->length)
    *exeName = exe->chars + lastSlashIndex + 1;

from fastfetch.

LinusDierheimer avatar LinusDierheimer commented on June 7, 2024

Inactive.

from fastfetch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.