Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

DLS failing to start with RangeError #20

Open
LaurentTreguier opened this issue Dec 31, 2018 · 4 comments
Open

DLS failing to start with RangeError #20

LaurentTreguier opened this issue Dec 31, 2018 · 4 comments
Labels

Comments

@LaurentTreguier
Copy link
Member

From #7 (comment):

core.exception.RangeError@/Users/travis/dlang/ldc-1.13.0/bin/../import/std/utf.d(448): Range violation
----------------
??:? pure nothrow @nogc @safe int core.internal.string.numDigits!(10u).numDigits(ulong) [0x10de204f9]
??:? pure nothrow @nogc @safe uint rt.cover.max!(uint).max(uint, uint) [0x10de3b96a]
??:? pure nothrow @nogc @safe uint rt.cover.max!(uint).max(uint, uint) [0x10de3c65e]
??:? bool core.demangle.mangle!(int function(scope int delegate(immutable(object.ModuleInfo*)))).mangle(const(char)[], char[]).DotSplitter.__xopEquals(ref const(core.demangle.mangle!(int function(scope int delegate(immutable(object.ModuleInfo*)))).mangle(const(char)[], char[]).DotSplitter), ref const(core.demangle.mangle!(int function(scope int delegate(immutable(object.ModuleInfo*)))).mangle(const(char)[], char[]).DotSplitter)) [0x10de1b671]
??:? pure nothrow @nogc core.exception.InvalidMemoryOperationError core.exception.staticError!(core.exception.InvalidMemoryOperationError).staticError() [0x10de1bf27]
??:? pure @safe ulong std.utf.toUCSindex!(wchar).toUCSindex(const(wchar)[], ulong) [0x10d9afd65]
??:? pure @nogc @safe ulong std.algorithm.iteration.reduce!(dls.util.document.Document.byteAtPosition(const(dls.protocol.definitions.Position)).__lambda2).reduce!(ulong, std.range.iota!(const(ulong), const(ulong)).iota(const(ulong), const(ulong)).Result).reduce(ulong, std.range.iota!(const(ulong), const(ulong)).iota(const(ulong), const(ulong)).Result) [0x10d9a72ed]
??:? void inifiled.readINIFile!(dscanner.analysis.config.StaticAnalysisConfig).readINIFile(ref dscanner.analysis.config.StaticAnalysisConfig, immutable(char)[]) [0x10d89fab0]
??:? std.typecons.Flag!("each").Flag std.algorithm.iteration.each!(dls.tools.analysis_tool.AnalysisTool.scanAllWorkspaces().__lambda1).each!(dls.util.uri.Uri[]).each(dls.util.uri.Uri[]) [0x10d89ef32]
??:? void dls.protocol.handlers.pushHandler!(void function(std.json.JSONValue)*).pushHandler(const(immutable(char)[]), void function(std.json.JSONValue)*) [0x10d8b7039]
??:? void dls.protocol.handlers.pushHandler!(void function(std.json.JSONValue)*).pushHandler(const(immutable(char)[]), void function(std.json.JSONValue)*).__lambda3(std.typecons.Nullable!(std.json.JSONValue).Nullable) [0x10d913f60]
??:? pure nothrow @safe void std.container.dlist.DList!(dls.util.disposable_fiber.DisposableFiber).DList.removeFront() [0x10d8bc65c]
??:? pure @safe ulong std.conv.to!(ulong).to!(immutable(char)[]).to(immutable(char)[]) [0x10d8bbd1f]
??:? nothrow void core.thread.thread_scanAll(scope void delegate(void*, void*) nothrow).__lambda2!(core.thread.ScanType, void*, void*).__lambda2(core.thread.ScanType, void*, void*) [0x10de24913]
[Info  - 1:17:43 PM] Connection to server got closed. Server will restart.
@LaurentTreguier
Copy link
Member Author

@patrickkh7788 I have added a d.init.safeMode option that you can enable in VSCode. It disables processing multiple requests at the same time.
I will add debugging info in DLS to see file names and lines in errors.

@LaurentTreguier
Copy link
Member Author

Actually, I have an idea: some programs crash in release mode when using dmd -inline. Maybe disabling inlining could solve the problem.

@LaurentTreguier
Copy link
Member Author

Starting from v0.21.2, DLS is compiled without inlining and without executable compression. Maybe one of those can solve the problem.

@LaurentTreguier
Copy link
Member Author

This looks like #25, and could perhaps be fixed by 656926b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant