Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcmjs.js compiled by myself seems doesn't work on client side. #26

Closed
ierye opened this issue Dec 22, 2018 · 10 comments
Closed

dcmjs.js compiled by myself seems doesn't work on client side. #26

ierye opened this issue Dec 22, 2018 · 10 comments

Comments

@ierye
Copy link

ierye commented Dec 22, 2018

I download dcmjs project and run the below command then get the dcmjs.js file.
dockcross-browser-asmjs cmake -Bdcmjs-build -H. -GNinja
dockcross-browser-asmjs ninja -Cdcmjs-build

I run command node ./dcmjs.js dcmdump /working/test.dcm, it works very well.
But when I replace the same file with the dcmjs.js file in dcmjs.org website project. It seems doesn't work on client side.
Is there any wrong what I do or is it a bug?
I tried it on macOS High Sierra 10.13.6 and Ubuntu 16.04 and Ubuntu 18.04, It has the same problem.
When I test dump dicom, Chrome DevTools Terminal console warning and error information on the below:
Assertion failed: undefined
exception thrown: abort("Assertion failed: undefined") at Error
abort @ dcmjs.js:23
assert @ dcmjs.js:1
mount @ dcmjs.js:1
mount @ dcmjs.js:1
(anonymous) @ dcmjs.js:1
_emscripten_asm_const_i @ dcmjs.js:1
Yc @ dcmjs.js:8
(anonymous) @ dcmjs.js:23
callMain @ dcmjs.js:23
dcmjs.utils.execute @ utils.js:97
dcmdump @ dump.js:24
(anonymous) @ utils.js:110
load (async)
dcmjs.utils.readFile @ utils.js:109
readSelectedFiles @ dump.js:38
handleFileDrop @ dump.js:67

@ierye ierye changed the title dcmjs.js doesn't work on client side compiled by myself with the default config. dcmjs.js compiled by myself seems doesn't work on client side. Dec 22, 2018
@jcfr
Copy link
Member

jcfr commented Dec 22, 2018 via email

@ierye
Copy link
Author

ierye commented Dec 22, 2018

We haven't updated the file on dcmjs.org. I suggest you use the one you generated locally.

On Sat, Dec 22, 2018, 4:13 PM ierye @.*** wrote: I download dcmjs project and run the below command then get the dcmjs.js file. dockcross-browser-asmjs cmake -Bdcmjs-build -H. -GNinja dockcross-browser-asmjs ninja -Cdcmjs-build https://github.com/commontk/dcmjs#building I run command node ./dcmjs.js dcmdump /working/test.dcm, it works very well. But when I replace the same file with the dcmjs.js file in dcmjs.org website project. It seems doesn't work on client side. Is there any wrong what I do or is it a bug? I tried it on macOS High Sierra 10.13.6 and Ubuntu 16.04 and Ubuntu 18.04, It has the same problem. When I test dump dicom, Chrome DevTools Terminal console warning and error information on the below: Assertion failed: undefined exception thrown: abort("Assertion failed: undefined") at Error abort @ dcmjs.js:23 assert @ dcmjs.js:1 mount @ dcmjs.js:1 mount @ dcmjs.js:1 (anonymous) @ dcmjs.js:1 _emscripten_asm_const_i @ dcmjs.js:1 Yc @ dcmjs.js:8 (anonymous) @ dcmjs.js:23 callMain @ dcmjs.js:23 dcmjs.utils.execute @ utils.js:97 dcmdump @ dump.js:24 (anonymous) @ utils.js:110 load (async) dcmjs.utils.readFile @ utils.js:109 readSelectedFiles @ dump.js:38 handleFileDrop @ dump.js:67 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#26>, or mute the thread https://github.com/notifications/unsubscribe-auth/AANXo8519GrvLMvGPB-TV5CxwDBBSK1Nks5u7kwYgaJpZM4ZfgX5 .

Thank you very much for your reply. I mean that the dcmjs.js file I generated doesn't work on client side when I import it into HTML file, but on the teminal it works very well with the node commands. Is it a bug or I'm wrong?

@ierye
Copy link
Author

ierye commented Dec 22, 2018

Error Msg

@ierye
Copy link
Author

ierye commented Dec 24, 2018

@jcfr I'm sure the latest version dcmjs.js doesn't work on client side, Could you please check it? I try to git reset --hard b06a4b7d3a3237b7ccee69ee64fa348a52d4bb7a, and then build it, the build dcmjs.js work well on client side.

@cewee
Copy link

cewee commented Feb 4, 2019

can confirm that the self compiled version does not work and produces error mentioned above.
using the version from https://github.com/commontk/dcmjs.org/tree/gh-pages/javascripts/libs works though.

@empeywong
Copy link

I have the same problem. Has anyone solved it?

@ierye
Copy link
Author

ierye commented May 16, 2019

I have the same problem. Has anyone solved it?

try to git reset --hard b06a4b7, and then build it successfully.

@jcfr
Copy link
Member

jcfr commented May 16, 2019

To summarize:

  • building dcmjs.js from current master (67f8ab2) works as expected
  • running dcmdump from command line using node works as expected
  • updating https://github.com/commontk/dcmjs.org using this new version fails with the error reported above
  • reverting update to dcmjs.cpp.in introduced in aca8139 allows to fix the issue

jcfr added a commit that referenced this issue May 16, 2019
This commit fixes a regression introduced in aca8139 (ENH: Add support
for reading/writing files using node)

See #26
@jcfr
Copy link
Member

jcfr commented May 16, 2019

Closing. Fixed in 9fa8a9d

@jcfr jcfr closed this as completed May 16, 2019
@jcfr
Copy link
Member

jcfr commented May 16, 2019

Version deployed on http://dcmjs.org has been updated as well. See commontk/dcmjs.org@e490706

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

No branches or pull requests

4 participants