question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when counting commits in multiple repos

See original GitHub issue

Node Version: v7.2.1 tiny-core-terminal version: 1.0.8 Shell: bash Terminal Program: iTerm2 Operating System: macOS

I have quite a few repos in ~/dev. The dashboard starts up, starts counting commits for a second and then crashes. Using TTC_REPOS=/single/repo works fine for the ones I tried. Didn’t try very hard to debug into the blessed library since I don’t know what the code is doing. What I can tell you that at that given code location in blessed (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:2543), we have part == "cpp" and val == "cpp".

Unsetting env vars other than TTC_REPOS doesn’t make a difference.

$ set | grep TTC
TTC_APIKEYS=false
TTC_BOTS=tinycarebot,selfcare_bot
TTC_REPOS='~/dev'
TTC_WEATHER=Munich
$ tiny-care-terminal
TypeError: Cannot read property 'slice' of null
    at /usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:2543:35
    at Array.forEach (native)
    at Program._attr (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:2542:11)
    at Box.Element._parseTags (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:498:26)
    at Box.Element.parseContent (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:393:22)
    at Box.Element.render (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:1839:8)
    at /usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:738:8
    at Array.forEach (native)
    at Screen.render (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:735:17)
    at Socket.week.stdout.on.data (/usr/local/lib/node_modules/tiny-care-terminal/care.js:120:12)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cfinucanecommented, Sep 5, 2017

I had the same problem, and traced it to curly braces in the commit messages wreaking havoc with the “tag parser” implemented in the blessed library. The simplest fix is to set tags: false in makeBox(), but I’m not sure if there is an unrelated reason it needs to be set to true. The alternative is to do something like content = content.replace(/[{}]/g, m => m === '{' ? '{open}' : '{close}'); inside getCommits(). Happy to submit a tiny-PR if you let me know which solution you think would be more appropriate 😃

0reactions
mojoaxelcommented, Jun 14, 2018

I won’t find the time in the near future to work on this issue. Maybe somebody can create a pull-request? It shouldn’t be that hard. 🤞

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recover git from a crash - Stack Overflow
"Dangling" commits are normal even in a healthy repository: they are the tip of a set of unreachable commits, and generally arise from ......
Read more >
Mainnet Geth crashes in panic `Refund counter below zero ...
Yes, I am hitting with too many requests on geth. And this I have been doing for past two years, and have never...
Read more >
git-bisect Documentation - Git
This command uses a binary search algorithm to find which commit in your project's history introduced a bug. You use it by first...
Read more >
git ready » count your commits
The -s option squashes all of the commit messages into the number of commits, and the -n option sorts the list by number...
Read more >
How To Get Total Git Commit Count + Total Git ... - YouTube
How To Get Total Git Commit Count + Total Git Commits Per Author BEST HOST + FREE DOMAIN +...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found