{"action":"created","issue":{"url":"https://api.github.com/repos/addaleax/lzma-native/issues/53","repository_url":"https://api.github.com/repos/addaleax/lzma-native","labels_url":"https://api.github.com/repos/addaleax/lzma-native/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/addaleax/lzma-native/issues/53/comments","events_url":"https://api.github.com/repos/addaleax/lzma-native/issues/53/events","html_url":"https://github.com/addaleax/lzma-native/issues/53","id":298927847,"number":53,"title":"Error on decoding damaged archives","user":{"login":"dubsky","id":5889531,"avatar_url":"https://avatars3.githubusercontent.com/u/5889531?v=4","gravatar_id":"","url":"https://api.github.com/users/dubsky","html_url":"https://github.com/dubsky","followers_url":"https://api.github.com/users/dubsky/followers","following_url":"https://api.github.com/users/dubsky/following{/other_user}","gists_url":"https://api.github.com/users/dubsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dubsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dubsky/subscriptions","organizations_url":"https://api.github.com/users/dubsky/orgs","repos_url":"https://api.github.com/users/dubsky/repos","events_url":"https://api.github.com/users/dubsky/events{/privacy}","received_events_url":"https://api.github.com/users/dubsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-21T11:07:56Z","updated_at":"2018-02-21T13:00:24Z","closed_at":null,"author_association":"NONE","body":"When I try to decompress an archive which I intentionally damaged, I get an uncaught exception. My code is something like this:\r\n\r\nlzma.decompress(lzmaData, (result) => {\r\n                if(result===null) {\r\n                    console.log('bad data');\r\n                    callback(null,null);\r\n                    return;\r\n                }\r\n....\r\n            });\r\n\r\nThe callback gets never called.\r\n\r\nUncaught Exception Cannot read property 'code' of null\r\nW20180221-12:05:26.186(1)? (STDERR) TypeError: Cannot read property 'code' of null\r\nW20180221-12:05:26.187(1)? (STDERR)     at JSLzmaStream._transform (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/index.js:175:25)\r\nW20180221-12:05:26.187(1)? (STDERR)     at JSLzmaStream._flush (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/index.js:196:10)\r\nW20180221-12:05:26.187(1)? (STDERR)     at JSLzmaStream.<anonymous> (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_transform.js:138:49)\r\nW20180221-12:05:26.187(1)? (STDERR)     at Object.onceWrapper (events.js:313:30)\r\nW20180221-12:05:26.187(1)? (STDERR)     at emitNone (events.js:106:13)\r\nW20180221-12:05:26.187(1)? (STDERR)     at JSLzmaStream.emit (events.js:208:7)\r\nW20180221-12:05:26.187(1)? (STDERR)     at prefinish (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_writable.js:596:14)\r\nW20180221-12:05:26.187(1)? (STDERR)     at finishMaybe (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_writable.js:604:5)\r\nW20180221-12:05:26.187(1)? (STDERR)     at afterWrite (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_writable.js:470:3)\r\nW20180221-12:05:26.187(1)? (STDERR)     at onwrite (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_writable.js:461:7)\r\nW20180221-12:05:26.188(1)? (STDERR)     at WritableState.onwrite (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_writable.js:169:5)\r\nW20180221-12:05:26.188(1)? (STDERR)     at afterTransform (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_transform.js:104:3)\r\nW20180221-12:05:26.188(1)? (STDERR)     at JSLzmaStream.TransformState.afterTransform (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/node_modules/readable-stream/lib/_stream_transform.js:79:12)\r\nW20180221-12:05:26.188(1)? (STDERR)     at Immediate.setImmediate (/home/vlada/Projects/trip-market-ng/tmn-client-web/node_modules/lzma-native/index.js:87:36)\r\nW20180221-12:05:26.188(1)? (STDERR)     at runCallback (timers.js:789:20)\r\nW20180221-12:05:26.188(1)? (STDERR)     at tryOnImmediate (timers.js:751:5)\r\nW20180221-12:05:26.188(1)? (STDERR)     at processImmediate [as _immediateCallback] (timers.js:722:5)\r\n=> Exited with code: 1"},"comment":{"url":"https://api.github.com/repos/addaleax/lzma-native/issues/comments/367318106","html_url":"https://github.com/addaleax/lzma-native/issues/53#issuecomment-367318106","issue_url":"https://api.github.com/repos/addaleax/lzma-native/issues/53","id":367318106,"user":{"login":"dubsky","id":5889531,"avatar_url":"https://avatars3.githubusercontent.com/u/5889531?v=4","gravatar_id":"","url":"https://api.github.com/users/dubsky","html_url":"https://github.com/dubsky","followers_url":"https://api.github.com/users/dubsky/followers","following_url":"https://api.github.com/users/dubsky/following{/other_user}","gists_url":"https://api.github.com/users/dubsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dubsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dubsky/subscriptions","organizations_url":"https://api.github.com/users/dubsky/orgs","repos_url":"https://api.github.com/users/dubsky/repos","events_url":"https://api.github.com/users/dubsky/events{/privacy}","received_events_url":"https://api.github.com/users/dubsky/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T13:00:24Z","updated_at":"2018-02-21T13:00:24Z","author_association":"NONE","body":"I am using 3.0.4. I tried to find out what the problem is and it seems that\r\n\r\n1) error is detected\r\n2) based on that the cleanup event is raised\r\n3) one part of the cleanup is to nullify JSLzmaStream.nativeStream.\r\n4) the error I got has been raised from JSLzmaStream._transform as if the stream continues to be decoded even when error has been detected previously\r\n5) operations on previously nullfied JSLzmaStream.nativeStream fail...\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"dubsky"}}