dlang / dub-registry

Online registry for dub packages
Boost Software License 1.0
82 stars 64 forks source link

src/core/exception.d(702): Invalid memory operation #295

Open timotheecour opened 6 years ago

timotheecour commented 6 years ago

/cc @s-ludwig @MartinNowak @wilzbach

this was working 2 days ago IIRC

./dub-registry --mirror=https://code.dlang.org
[main(----) INF] Listening for requests on http://127.0.0.1:8005/
[main(----) INF] Added virtual host http://code.dlang.org:8005/ (127.0.0.1)
[main(CpGm) INF] Polling 'https://code.dlang.org/' for updates...
core.exception.InvalidMemoryOperationError@src/core/exception.d(702): Invalid memory operation
----------------
[1]    43474 abort      ./dub-registry --mirror=https://code.dlang.org

diff from 469d7dd287b7163d980ff203ea01e30a2976a64c: (cf https://github.com/dlang/dub-registry/issues/285#issuecomment-369091516)

diff --git a/source/dubregistry/dbcontroller.d b/source/dubregistry/dbcontroller.d
index 5c55647..da6eaa6 100644
--- a/source/dubregistry/dbcontroller.d
+++ b/source/dubregistry/dbcontroller.d
@@ -437,7 +437,7 @@ struct DbPackageStats {
        SysTime updatedAt;
        DbDownloadStats downloads;
        DbRepoStats repo;
-       float score = 0; // 0 - invalid, 1-5 - higher means more relevant
+       @optional float score = 0; // 0 - invalid, 1-5 - higher means more relevant
        enum minScore = 0;
        enum maxScore = 5;
s-ludwig commented 6 years ago

Hard to tell without a stack trace, but if vibe-core is used, this may be related: https://github.com/vibe-d/vibe-core/issues/69