memoryjs icon indicating copy to clipboard operation
memoryjs copied to clipboard

electron crashed after readBuffer

Open symnetry opened this issue 6 years ago • 4 comments
trafficstars

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……”

symnetry avatar Mar 08 '19 08:03 symnetry

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.

Rob-- avatar Mar 10 '19 18:03 Rob--

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

symnetry avatar Mar 20 '19 03:03 symnetry

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.

dw1284 avatar Jun 09 '20 09:06 dw1284

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

Rob-- avatar Jan 26 '22 20:01 Rob--

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.

Rob-- avatar Oct 16 '22 15:10 Rob--