HouQiming / qpad

QPad Text Editor
114 stars 4 forks source link

Error: insufficient number of parameters #3

Closed wanyancan closed 5 years ago

wanyancan commented 5 years ago

After building win32 debug and running of qpad gives the following error: $ ./bin/win32/qpad.exe Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:8637) at [anon] (res/lib/code_editor:8731) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...] Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:8637) at [anon] (res/lib/code_editor:8731) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...]

Built using jacy/bin/win32/main --arch=win32 qpad.jc

HouQiming commented 5 years ago

There could be some desync between my github pushes, can you pull the newest versions of jc and qpad and retry?

Thanks.

Qiming

On Sun, Nov 18, 2018 at 12:57 AM wanyancan notifications@github.com wrote:

After building win32 debug and running of qpad gives the following error: $ ./bin/win32/qpad.exe Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:8637) at [anon] (res/lib/code_editor:8731) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...] Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:8637) at [anon] (res/lib/code_editor:8731) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...]

Built using jacy/bin/win32/main --arch=win32 qpad.jc

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HouQiming/qpad/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AHrIF5JaFNPxrW7xyidw_3KmjHm1b1Anks5uwEATgaJpZM4Yniig .

wanyancan commented 5 years ago

Unfortunately, there's still the same error. but the lines reported at code_editor.js is different.

$ bin/win32/qpad.exe Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:9545) at [anon] (res/lib/code_editor:9639) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...] Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:9545) at [anon] (res/lib/code_editor:9639) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...]

$ git logtree

HouQiming commented 5 years ago

Thanks for the follow-up!

The bug is caused by a missing res/misc/commit.txt, which stores the current git commit id and can't be put in the git repo... I pushed a quick fix to allow builds without the file. Alternatively, you can run:

git log --pretty=format:%%H -n 1 > res/misc/commit.txt

to generate that file yourself.

Qiming

On Tue, Nov 20, 2018 at 12:08 PM wanyancan notifications@github.com wrote:

Unfortunately, there's still the same error. but the lines reported at code_editor.js is different.

$ bin/win32/qpad.exe Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:9545) at [anon] (res/lib/code_editor:9639) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...] Error: insufficient number of parameters at [anon] (gui2d/ui:2283) preventsyield at replace () native strict preventsyield at [anon] (gui2d/ui:2286) at [anon] (res/lib/code_editor:9545) at [anon] (res/lib/code_editor:9639) preventsyield at call () native strict preventsyield at [anon] (res/lib/subwin:1107) at [anon] (res/lib/subwin:934) at [anon] (res/lib/subwin:1198) at [anon] (res/lib/subwin:1347) [...]

$ git logtree

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HouQiming/qpad/issues/3#issuecomment-440131138, or mute the thread https://github.com/notifications/unsubscribe-auth/AHrIF-Xh-KK9Bl43roMlKEuVvF1T62Tnks5uw4BHgaJpZM4Yniig .

wanyancan commented 5 years ago

I see. The current commit id won't appear in the current commit. Awesome! That's the root cause of the problem. Maybe use a separate pre-build script to get the id?

P.S. in bash, no need to use double %

git log --pretty=format:%H -n 1 > res/misc/commit.txt

It now builds and runs without this issue. Thank you!