dconf2nix icon indicating copy to clipboard operation
dconf2nix copied to clipboard

Special unicode character causes timeout

Open tennox opened this issue 2 years ago • 2 comments

Type of bug

Timeout

Version

0.0.12

Did you test against master?

  • [ ] Certainly

Error message (if not timeout)

cat test.conf | dconf2nix --verbose
dconf: "[org/gnome/Characters]\nrecent-characters=['\10149']\n"
dconf2nix: 💥 The process timed out.

DConf input

[org/gnome/Characters]
recent-characters=['➥']

Additional context

I developed this method to identify the problematic part of the dconf output - maybe this can be helpful for troubleshooting

1. Split dconf in parts on each newline - http://stackoverflow.com/questions/33294986/ddg#33297878

dconf dump / | awk -v RS= '{print > ("dconf-" NR ".conf")}'

2. Try dconf2nix on all parts to identify & print the problematic part

for f in dconf-*.conf; do
    echo -n $f
    if dconf2nix -e < $f > /dev/null 2>&1; then
        echo " -> SUCCESS"
    else
        echo " -> ERROR:"
        cat $f
        echo #newline
    fi
done

tennox avatar May 20 '23 11:05 tennox

I see you fixed a similar issue in https://github.com/gvolpe/dconf2nix/pull/68/files - but I think adding all possible characters is not viable, is there a better way? Maybe a exclude pattern instead of include?

tennox avatar May 20 '23 11:05 tennox

@tennox, your process helped me solve a major freeze on my system that would drive dconf2nix to consume my entire 64 GB of ram only to die. I found my problem process almost immediately. :partying_face:

bashfulrobot avatar May 25 '23 04:05 bashfulrobot

The timeouts were fixed by https://github.com/gvolpe/dconf2nix/pull/80.

jtojnar avatar Apr 14 '24 16:04 jtojnar