- changed status to invalid
Unable to build a simple app widh Dub
Issue #39
invalid
Hello,
I'm quite new both to D and Dgui but very enthousiastic about them both, so please bear with me.
I'm trying to build a simple "hello world"-like app with dub build
but am getting the following:
C:\vs\hello> dub build
core.exception.RangeError@source\dub\internal\vibecompat\data\json.d(797): Range
violation
----------------
0x004FE264 in _d_arraybounds
0x00493AB6 in pure nothrow @safe immutable(char)[] dub.internal.vibecompat.data.
json.parseJson!(immutable(char)[]).parseJson(ref immutable(char)[], immutable(ch
ar)[], int*).__dgliteral12() at C:\Users\build\AppData\Roaming\dub-ci-workspace\
current\dub\source\dub\internal\vibecompat\data\json.d(797)
0x00493F6B in D3dub8internal10vibecompat4data4json115__T11enforceJsonVAyaa42_736
f757263655c6475625c696e746572E094F39A295AE22EE87AB9096E66132C at C:\Users\build\
AppData\Roaming\dub-ci-workspace\current\dub\source\dub\internal\vibecompat\data
\json.d(1299)
0x004937C5 in dub.internal.vibecompat.data.json.Json dub.internal.vibecompat.dat
a.json.parseJson!(immutable(char)[]).parseJson(ref immutable(char)[], immutable(
char)[], int*) at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\so
urce\dub\internal\vibecompat\data\json.d(798)
0x0048E9F9 in dub.internal.vibecompat.data.json.Json dub.internal.vibecompat.dat
a.json.parseJsonString(immutable(char)[], immutable(char)[]) at C:\Users\build\A
ppData\Roaming\dub-ci-workspace\current\dub\source\dub\internal\vibecompat\data\
json.d(822)
0x00439FB8 in dub.package_.Package.RawPackage dub.package_.Package.rawPackageFro
mFile(dub.package_.PathAndFormat, bool) at C:\Users\build\AppData\Roaming\dub-ci
-workspace\current\dub\source\dub\package_.d(500)
0x00436DA5 in dub.package_.Package dub.package_.Package.__ctor(dub.internal.vibe
compat.inet.path.Path, dub.package_.PathAndFormat, dub.package_.Package, immutab
le(char)[]) at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\sourc
e\dub\package_.d(487)
0x0041C377 in dub.package_.Package dub.packagemanager.PackageManager.getOrLoadPa
ckage(dub.internal.vibecompat.inet.path.Path, dub.package_.PathAndFormat) at C:\
Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\packagemanag
er.d(161)
0x00405D4D in int dub.commandline.runDubCommandLine(immutable(char)[][])
0x0040355A in _Dmain at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\
dub\source\app.d(16)
0x004FE102 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x004FE0D7 in void rt.dmain2._d_run_main(int, char**, extern (C) int function(ch
ar[][])*).runAll()
0x004FDFEF in _d_run_main
0x00404E5C in main
0x0054FCE5 in mainCRTStartup
0x75ECEE6C in BaseThreadInitThunk
0x77193A03 in RtlInitializeExceptionChain
0x771939D6 in RtlInitializeExceptionChain
C:\vs\hello>
My source\app.d
:
import dgui.all;
class MainForm: Form {
private Button okBtn;
public this() {
this.text = "Тест интерфейса";
this.size = Size(800, 600);
this.startPosition = FormStartPosition.centerScreen;
this.okBtn = new Button();
this.okBtn.text = "Щёлкни!";
this.okBtn.parent = this;
this.okBtn.click.attach(&this.onClickOkBtn);
}
private void onClickOkBtn(Control sender, EventArgs e) {
MsgBox.show("Это тест", "Привет");
}
}
int main(string[] args) {
return Application.run(new MainForm());
}
and my dub.json
:
{
"name": "hello",
"description": "A minimal DGui application.",
"copyright": "Copyright © 2015, Menelion",
"authors": ["Menelion"],
"dependencies": {
"dgui": "~>1.0.1",
}
Thanks!
Comments (2)
-
-
reporter Oops... mea culpa. Извините(
- Log in to comment
First, this is a DUB internal error and it's not connected with DGui, you should report it to their bugtracker. Second, your
dub.json
file is invalid: no closing}
after"dependencies"
, this causes Range violation error is DUB.