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

RuntimeError when trying to process a '.jpg' file (node version) #59

Closed
stevenjmarsh opened this issue Oct 6, 2020 · 12 comments
Closed

Comments

@stevenjmarsh
Copy link

stevenjmarsh commented Oct 6, 2020

Hello, and thank you for providing this very useful tool!

I have been able to successfully use the web version of NFT-Marker-Creator to process both '.png' and '.jpg' files.
I can also successfully generate descriptor files from '.png' files with the node version. (NOTE: I have not been able successfully recognize the image for any .png file I've created descriptor files for)

However, I am unable to process '.jpg' files with the node version. I get a RuntimeError.
Here is the image: https://avo-content-dev.s3.amazonaws.com/image-tracking-proto.jpg
(I did try a different .jpg file, which fails as well)

Note this image succeeds when using the web version, but fails with the node version.

I followed the 'How to use it' steps in the README, to install and run the node version.

Here is the error...

Output

[13:29:07] smarsh:NFT-Marker-Creator git:(test-run*) $ node app.js -i greenlight.jpg -noConf -noDemo
Check output path: /Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/output/

TypeError: Cannot read property '0' of undefined

I stepped through the application in the debugger, and at line 221 in app.js, the call to inkjet.decode() returns an error.

I noticed there is a new version of the inkjet package available. I tried that version of the package, and still get a failure. The output is different however.

Output when using npm package inkjet v3.0.0

[13:17:24] smarsh:NFT-Marker-Creator git:(test-run*) $ node app.js -i greenlight.jpg -noConf -noDemo
Check output path: /Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/output/
TypeError: Cannot read property 'value' of undefined
TypeError: Cannot read property 'value' of undefined
/Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/libs/NftMarkerCreator_wasm.js:1
var Module=typeof Module!=="undefined"?Module:{};var scope;if(typeof window!=="undefined"){scope=window}else if...


RuntimeError: abort(TypeError: Cannot read property 'value' of undefined) at Error
    at jsStackTrace (/Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/libs/NftMarkerCreator_wasm.js:1:23770)
    at stackTrace (/Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/libs/NftMarkerCreator_wasm.js:1:23941)
    at process.abort (/Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/libs/NftMarkerCreator_wasm.js:1:20844)
    at process.emit (events.js:314:20)
    at processPromiseRejections (internal/process/promises.js:245:33)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)
    at process.abort (/Users/smarsh/dev_projects/source/reference-projects/NFT-Marker-Creator/libs/NftMarkerCreator_wasm.js:1:20875)
    at process.emit (events.js:314:20)
    at processPromiseRejections (internal/process/promises.js:245:33)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)

Any suggestions for fixes, or settings for me to try, are greatly appreciated! Thanks.

@kalwalt
Copy link
Contributor

kalwalt commented Oct 6, 2020

Hi @stevenjmarsh very weird error! At the moment i have no idea, maybe you can try to remove the exif data (in the image) and try to save again the image. I know that someone had this similar issue with the NFT-creator-WS made by @ThorstenBux. Maybe he can help in someway.

@stevenjmarsh
Copy link
Author

Thanks, I will give that a try.

@ThorstenBux
Copy link

If you just need a single trackable aka marker you can use this http://nftcreator.tripod-digital.co.nz/

@ThorstenBux
Copy link

Otherwise I can also support if you find issues on the Webserver version

@stevenjmarsh
Copy link
Author

Thanks @ThorstenBux . I am trying to automate generating the NFT descriptor files, so the node version seems like the best fit at this point. If I do see a need to use the Webserver version in this case and need help, will let you know. Thanks!!

@ThorstenBux
Copy link

ThorstenBux commented Oct 6, 2020 via email

@stevenjmarsh
Copy link
Author

stevenjmarsh commented Oct 9, 2020

@ThorstenBux , @kalwalt When using the node version, I was able to successfully generate descriptor files from a .png image. However, the image is not recognized.

I've tried the 'npm run demo'. I've also tried an Image recognition app I wrote using JSARToolKitNFT. Neither recognize the image. My JSARToolKitNFT based app does work when using descriptor files generated from the Web version.

So, ultimately, I'm not able to successfully use the node version with jpg or png files. jpg files crash the node process. png files generate descriptor files, but the image is not recognized.

Do you know if the latest node version works? I want to determine if I am doing something incorrectly, or am using poor images. Thanks.

@kalwalt
Copy link
Contributor

kalwalt commented Oct 9, 2020

So, ultimately, I'm not able to successfully use the node version with jpg or png files. jpg files crash the node process. png files generate descriptor files, but the image is not recognized.

I will try to create the descriptors from the image you provided in the first comment. Can't say so much at the moment,

Do you know if the latest node version works? I want to determine if I am doing something incorrectly, or am using poor images.

I think yes, it should work but maybe @Carnaux can say something more. I don't think you are using a poor image.

@juliangoacher
Copy link

I had this problem after editing a jpeg using Preview on MacOS, was able to get around it by opening and saving the image from a different image editor (e.g. Gimp).

@stevenjmarsh
Copy link
Author

Thanks @juliangoacher , I'll give that a try.

@jsdude0220
Copy link

I have got the error such as the following image when generate from jpg file to NTF using node generate.
Capture
please let me know why this error happen.
png file generate to NTF is perfect, but jpg file generate has some issue, i think.

@ragavendranbala
Copy link

ragavendranbala commented Dec 16, 2020

Fixed in PR #64

@Carnaux Carnaux closed this as completed Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants