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.

Inclusion of colon in a documentation block or string crashes provideCodeActions

See original GitHub issue

MacOS Mojave 10.14.6 (but was happening in prior version) VSCode latest 1.38.1 DMD latest 2.088.0 (installed systemwide)

I deleted ~/.vscode/extensions/webfreak.code-d-0.20.2/ and ~/.code-d , reinstalling everything and verified the problem still occurs.

I CAN reproduce this with a simple hello world project (note: I set up helloworld correctly in its own workspace and verified that code-d/serve-d are running, providing context suggestions etc.)

Failure (crash loop, which is terminated after 20? restarts) is triggered by placing cursor at certain places inside a documentation block. Clicking out before the failsave # of failures restores normal functionality; waiting too long causes the serve-d not to be restarted and the workspace must be closed and reopened.

The failing function is provideCodeActions. Only clicking certain places within the documentation block trigger the failure. For example, in this block:

/** A frustrating problem

    For XXX portion, mirror approach as in https://github.com/user/repo

    ok
*/

Considering the middle line (“For XXX portion…”) Placing the cursor anywhere on that line seems to work fine (calling provideCodeActions yielding no output) until you get to the URL at which point the function crashes.

However over the URL without clicking calls provideHover which works correctly.

Interestingly, positioning the cursor at (left of) h, t, t, p, or s does not cause problems, but placing it at the : induces the failure. Positioning it on the ok in the last line also induces the problem.

Complete program hello.d:


/** A frustrating problem

    For XXX portion, mirror approach as in httpsX//github.com/user/repo

    ok
*/

import std.stdio;

/// A fine function
int main()
{
    writeln("Hello world");
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dayllengercommented, Sep 15, 2019
version (Posix):

import core.stdc.stdio : printf;

class A : B

S s = { a: }

struct A(T) if (is(T : U))

The same thing in these examples. Seems that semicolon and curly brackets stop the error from flooding the whole file.

0reactions
passenger94commented, Sep 21, 2019

after the latest betastream update the initial problem disapears ! Thanks

But i can confirm the crash with

class A
{
private:
    alias F = float;
}

Same behavior as initial issue, lots of crash (living a bunch of dcd-server ghosts running in background) and then one must restart vscode after killing manually the dcd-server ghosts. (ubuntu 18.04, latest official dmd/ldc release)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Examining the fields in a crash report - Apple Developer
The AppVariant field contains three values separated by colons, ... Each thread of the crashed proces is captured as a backtrace, documenting the...
Read more >
API documentation and comment standards | PHP - Drupal
The API module parses documentation that is in special documentation blocks (known as "docblocks" in the rest of this document). Syntax example:
Read more >
September 2020 (version 1.50) - Visual Studio Code
Linux ARM builds - VS Code is now available for both Linux ARMv7 and ARM64. Improved debugging experience - Improved hover and filtering...
Read more >
Colons | Google developer documentation style guide
Introductory phrase preceding colon. When a colon introduces a list, the text that precedes the colon must be able to stand alone as...
Read more >
Special Commands - Doxygen Manual
Indicates that a comment block contains documentation for a class with name <name>. Optionally a header file and a header name can be...
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