CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.71k stars 307 forks source link

Crash when flag bypassPipeline is used #71

Closed alculquicondor closed 7 years ago

alculquicondor commented 7 years ago

I'm getting this output when using bypassPipeline.

node ~/lib/obj2gltf/bin/obj2gltf.js -i box.obj -o sample.glb -b --bypassPipeline

~/node_modules/cesium/Source/ThirdParty/crunch.js:43
    var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);if(!ret&&filename!=nodePath["resolve"]
Error
    at new DeveloperError (~/node_modules/cesium/Source/Core/DeveloperError.js:44:19)
    at obj2gltf (~/lib/obj2gltf/lib/obj2gltf.js:88:15)
    at Object.<anonymous> (~/lib/obj2gltf/bin/obj2gltf.js:141:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

I tried both with 1.1.1 and master branch as of today. cesium version is 1.32.1

lilleyse commented 7 years ago

I'll fix the error reporting...

But the problem is --bypassPipeline does not allow converting to binary glTF.