Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unexplained assert on line 180 in vibe.core.stream #208

@schveiguy

Description

@schveiguy

This is version 1.8.1 of vibe-core.

I got a stray assert in otherwise working code. Very difficult to tell what the problem is, since it appears as a final function in the OutputStream interface. Running again the problem does not reoccur. It seems to be an assert possibly triggered by an environmental issue. It also might really be an error in vibe.d. I'm not sure exactly what the stream is that is not fulfilling this contract requirement, as things seem nested and hidden behind derivatives.

Here is the line of code: https://github.com/vibe-d/vibe-core/blob/v1.8.1/source/vibe/core/stream.d#L180

Not sure if this is helpful, but this is the stack trace.

core.exception.AssertError@/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/core/stream.d(180): Assertion failure
----------------
??:? _d_assertp [0x55b9a9560261]
/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/core/stream.d:180 @safe void vibe.core.stream.OutputStream.write(const(ubyte[])) [0x55b9a94c49ad]
/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/internal/interfaceproxy.d-mixin-302:302 @safe void vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy.ProxyImpl!(vibe.internal.freelistref.FreeListRef!(vibe.stream.counting.CountingOutputStream, true).FreeListRef).ProxyImpl.__mixin8.__mixin2.write(void[], const(ubyte[])) [0x55b9a93e579c]
/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/internal/interfaceproxy.d-mixin-191:191 @safe void vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy.__mixin22.__mixin2.write(const(ubyte[])) [0x55b9a933ae41]
../../git/vibe.d/stream/vibe/stream/wrapper.d:338 @safe void vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 256uL).StreamOutputRange.put(const(ubyte)[]) [0x55b9a916534d]
../../git/vibe.d/http/vibe/http/common.d:610 @safe void vibe.http.common.ChunkedOutputStream.writeChunk(const(ubyte[])) [0x55b9a938c79a]
../../git/vibe.d/http/vibe/http/common.d:579 @safe void vibe.http.common.ChunkedOutputStream.flush() [0x55b9a938c4f7]
../../git/vibe.d/http/vibe/http/common.d:567 @safe ulong vibe.http.common.ChunkedOutputStream.write(const(ubyte[]), eventcore.driver.IOMode) [0x55b9a938c368]
/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/core/stream.d:180 @safe void vibe.core.stream.OutputStream.write(const(ubyte[])) [0x55b9a94c4992]
/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/internal/interfaceproxy.d-mixin-302:302 @safe void vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy.ProxyImpl!(vibe.internal.freelistref.FreeListRef!(vibe.http.common.ChunkedOutputStream, true).FreeListRef).ProxyImpl.__mixin8.__mixin2.write(void[], const(ubyte[])) [0x55b9a93b6150]
/home/steves/.dub/packages/vibe-core-1.8.1/vibe-core/source/vibe/internal/interfaceproxy.d-mixin-191:191 @safe void vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy.__mixin22.__mixin2.write(const(ubyte[])) [0x55b9a933ae41]
../../git/vibe.d/stream/vibe/stream/wrapper.d:318 @safe void vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange.flush() [0x55b9a8ff55e1]
../../git/vibe.d/stream/vibe/stream/wrapper.d:347 @safe void vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange.put(const(ubyte)[]) [0x55b9a8ff5827]
../../git/vibe.d/stream/vibe/stream/wrapper.d:352 @safe void vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange.put(const(char)[]) [0x55b9a8ff5887]
/home/steves/.dvm/compilers/dmd-2.091.1/linux/bin/../../src/phobos/std/range/primitives.d:277 @safe void std.range.primitives.doPut!(vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange, immutable(char)[]).doPut(ref vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange, ref immutable(char)[]) [0x55b9a90727a2]
/home/steves/.dvm/compilers/dmd-2.091.1/linux/bin/../../src/phobos/std/range/primitives.d:380 @safe void std.range.primitives.put!(vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange, immutable(char)[]).put(ref vibe.stream.wrapper.StreamOutputRange!(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream).InterfaceProxy, 1024uL).StreamOutputRange, immutable(char)[]) [0x55b9a9072774]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions