Rob-- / memoryjs

Read and write process memory in Node.js (Windows API functions exposed via Node bindings)
MIT License
636 stars 88 forks source link

electron crashed after readBuffer #39

Closed symnetry closed 2 years ago

symnetry commented 5 years ago

when i call "readBuffer" maybe call once or 5-8times electron turn to whtie page and devtools only left “DevTools was disconnected from the page……”

Rob-- commented 5 years ago

Going to need more information including errors, possibly screenshots etc. With this much information I can't even be sure that readBuffer is causing the problems.

symnetry commented 5 years ago

1553053778(1)

memoryjs.openProcess(processName, (error, processObject) => { // console.log(error,processObject) if(error){ return message.error("read error") } let handle = processObject.handle let address = parseInt('1008ab4a',16) let size = this.state.length try{ memoryjs.readBuffer(handle, address, size,(error,buffer)=>{ console.log('==\n',${error} 1=1\n,buffer) memoryjs.closeProcess(handle) }); }catch(err){ //never go this err console.log(err) fs.appendFile('d:/test.txt', err, function () { console.log('append success'); }); } })

crash happen in readBuffer() but have no error message
never go catch(error) step those code bind in button click event in electron dev mode ,it will call 5-8times then crash after i packaged for windows this code can read buffer current but crashed more frequent

dw1284 commented 4 years ago

I am also having this problem. There is no sign of any error messaging anywhere. Its being completely swallowed. I can get away with 1, maybe 2 readbuffer calls, but any more than that and it crashes pretty quickly.

Rob-- commented 2 years ago

It's possible this problem was related to the readBuffer memory leak which was fixed in b6b328a.

Rob-- commented 2 years ago

Closing the issue as it's probable the problems here with reading buffers were caused by a memory leak that has now been fixed. Please re-open or create a new issue if you are still having problems reading buffers.