<ul dir="auto">
<li>Electron version: ^1.1.1</li>
<li>Operating system: El Capitan 10.11.5</li>
</ul>
<p dir="auto">Here the gist:<br>
<a href="https://gist.github.com/oxcarga/289dadcd829458b50823c6b57bf8e218/edit">https://gist.github.com/oxcarga/289dadcd829458b50823c6b57bf8e218/edit</a></p>
<p dir="auto">In renderer process we have a simple button calling <code class="notranslate">remote.dialog.showOpenDialog()</code><br>
with a callback fn which just prints in console the filenames for the selected images.</p>
<p dir="auto">At some point callback fn ( callback for dialog.showOpenDialog() ) stops being called. Lets say we repeat this process some times:</p>
<p dir="auto">(with console opened)</p>
<ol dir="auto">
<li>click btn (dialog opens)</li>
</ol>
<ul dir="auto">
<li>"clicked!" is console-logged
<ol dir="auto">
<li>select 1,5 or N number of images from X folder</li>
<li>hit open</li>
</ol>
</li>
<li>array length &amp; array itself are console-logged
<ol dir="auto">
<li>repeat <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="14015029" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/1" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/1/hovercard" href="https://github.com/electron/electron/issues/1">#1</a></li>
</ol>
</li>
</ul>
<p dir="auto">Do this for several times, then stop for a while, then try again.<br>
Not sure how or why but this reproduces the issue for me. At some point we just get the "clicked!" console log and we stops receiving callback's console logs.</p>
<p dir="auto">P.D.: gist above is ready to run<br>
<code class="notranslate">npm install &amp;&amp; npm start</code></p>
<ul dir="auto">
<li>Electron version: 1.2.1+ possibly 1.0+</li>
<li>Operating system:Windows 10 - others?</li>
</ul>
<p dir="auto">nativeImage now has possible bug. When using "electron-canvas-to-buffer" it was working 100% reliable in Electron 0.37.2.<br>
It is broken now in Electron 1.2.1 +, possibly in Electron 1.0 +</p>
<p dir="auto"><a href="https://github.com/mattdesl/electron-canvas-to-buffer">https://github.com/mattdesl/electron-canvas-to-buffer</a></p>
<p dir="auto">This module is fairly simple but very convenient and makes use of Electrons built in nativeImage.</p>
<p dir="auto">Details:</p>
<ol dir="auto">
<li>After a few series of changing Canvas elements and saving the canvas the file is no longer saved. When the file is not written,  However the file dialog is presented, and it appears that the file is saved, But it doesn't really save the file.</li>
<li>Happens saving either .jpg or .png.</li>
<li>May save OK a few times, eventually it will fail.</li>
<li>Once it fails it will not ever save canvas again until app is restarted again.</li>
<li>Tested many many canvas edits and files saves, never fails in Electron 0.37.2 Rock Solid.</li>
<li>I am using fabric.js for canvas manipulation.</li>
</ol>
<p dir="auto">7.The initial canvas save to file always works.</p>
<p dir="auto">8.When the file save fails there is no error generated. The app does not generate an error when the write fails, But it does not generate a "Write of',filePath,'was successful' in the console during the failure. So lack of "success" is the actual error indication. See the saveCallback function in "canvastest.js" in the zip files or as below. "throw err" doesn't present itself when the file doesn't write.</p>
<p dir="auto">function saveTheFile(){<br>
dialog.showSaveDialog({title:'Testing a save dialog',defaultPath:'image.png'},saveCallback);<br>
}</p>
<p dir="auto">function saveCallback(filePath){<br>
// as a buffer<br>
var buffer = canvasBuffer(canvas, 'image/png')<br>
// write canvas to file<br>
fs.writeFile(filePath, buffer, function (err) {<br>
//throw err<br>
if(err)throw err;else console.log('Write of',filePath,'was successful');<br>
})</p>
<p dir="auto">9.Using Windows 10 x64, Windows 32 bit version of Electron</p>
<p dir="auto">You can test good (made on Electron 0.37.2) vs. bad (made on Electron 1.2.1) app. Zip files are too big to attach here. I have it on my website. Just load a photo on the canvas and save. Both apps are the same code, just made minor changes to allow the new version 1.2.1 Electron to work, for example removing "dashes" in require statements, as you had to do in electron-canvas-to-buffer V 2.0.</p>
<p dir="auto">Apps can be launched just click "Electron.exe" in root of the zip file.</p>
<p dir="auto">Using Electron V 0.37.2<br>
<a href="http://www.mgparrish.com/FabricSaveCanvasGood.zip" rel="nofollow">http://www.mgparrish.com/FabricSaveCanvasGood.zip</a></p>
<p dir="auto">Using Electron V 1.21<br>
<a href="http://www.mgparrish.com/FabricSaveCanvasBug.zip" rel="nofollow">http://www.mgparrish.com/FabricSaveCanvasBug.zip</a></p>