title: JxBrowser - Render channel already closed - ipc log: OnRenderViewGoneMessage
body: <p>I have a Java application written with Swing that uses a JxBrowser (jxbrowser-6.18).</p>
  
  <p>We are loading a local url (<a href="http://localhost:8000/someLink.html" rel="nofollow noreferrer">http://localhost:8000/someLink.html</a>) and then running some custom js on the browser.
  At some point the following exceptions are thrown in the java code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>CERROR 2019-01-25 07:38:29,801 - Exception in thread "AWT-EventQueue-0" 
  CERROR 2019-01-25 07:38:29,801 - java.lang.IllegalStateException: Channel stream was closed before response has been received.
  CERROR 2019-01-25 07:38:29,804 -  at com.teamdev.jxbrowser.chromium.internal.ipc.SocketChannel.post(SourceFile:216)
  CERROR 2019-01-25 07:38:29,804 -  at com.teamdev.jxbrowser.chromium.internal.RenderChannelAccessor.post(SourceFile:67)
  CERROR 2019-01-25 07:38:29,805 -  at com.teamdev.jxbrowser.chromium.Browser.executeJavaScriptAndReturnValue(SourceFile:2134)
  CERROR 2019-01-25 07:38:29,805 -  at com.teamdev.jxbrowser.chromium.Browser.executeJavaScriptAndReturnValue(SourceFile:2077)
  
  ERROR 2019-01-25 07:38:29,842 - Render channel is already closed.
  java.lang.IllegalStateException: Render channel is already closed.
   at com.teamdev.jxbrowser.chromium.internal.RenderChannelAccessor.a(SourceFile:72)
   at com.teamdev.jxbrowser.chromium.internal.RenderChannelAccessor.post(SourceFile:66)
   at com.teamdev.jxbrowser.chromium.Browser.executeJavaScriptAndReturnValue(SourceFile:2134)
   at com.teamdev.jxbrowser.chromium.Browser.executeJavaScriptAndReturnValue(SourceFile:2077)</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've checked then the ipc log looking for events that occurred near 07:38:29</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>#creating browser 
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.Server start
  INFO: Shared Memory Name: TDB2-24864
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.SharedMemory &lt;init&gt;
  INFO: IPC connection has been established. Connection ID: 13818240
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnHelloMessage{type=OnHello, uid=4, message='cid:0,bid:0,type:Browser', null
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.Server a
  INFO: Channel has been accepted: SocketChannel{cid=0, bid=0, type=Browser}
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.IPC$b onChannelConnected
  INFO: Channel is connected: SocketChannel{cid=0, bid=0, type=Browser}
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelWriter run
  FINE: WRITE: LoadURLMessage{type=LoadURL, uid=9, url='about:blank', frameId=-1, extraHeaders='null', postData='null', SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnRenderViewCreatedMessage{type=OnRenderViewCreated, uid=5, renderProcessId=3, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnFrameCreatedMessage{type=OnFrameCreated, uid=6, parentFrameId=-1, frameId=2, isMainFrame=true, frameName='', SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.Server start
  INFO: Shared Memory Name: TDB3-24864
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.SharedMemory &lt;init&gt;
  INFO: IPC connection has been established. Connection ID: 13816000
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnHelloMessage{type=OnHello, uid=7, message='cid:0,bid:0,type:Render', null
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.Server a
  INFO: Channel has been accepted: SocketChannel{cid=0, bid=0, type=Render}
  Jan 25, 2019 7:36:50 AM com.teamdev.jxbrowser.chromium.internal.ipc.IPC$b onChannelConnected
  INFO: Channel is connected: SocketChannel{cid=0, bid=0, type=Render}
  
  
  #loading custom url, executing some javascript, ping messages...
  #last messages with cid=0, bid=0 before 07:38:29
  
  Jan 25, 2019 7:37:48 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelWriter run
  FINE: WRITE: PingMessage{type=Ping, uid=420, alive=false, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:37:48 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  PingMessage{type=Ping, uid=420, alive=true, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:37:48 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelWriter run
  FINE: WRITE: GetFrameIdMessage{type=GetFrameId, uid=422, frameId=-1, result=0, SocketInfo{cid=0, bid=0, channelType=Render}
  
  [...]
  
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnRenderViewGoneMessage{type=OnRenderViewGone, uid=388, terminationStatus=6, errorCode=-536870904, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnFrameDeletedMessage{type=OnFrameDeleted, uid=389, parentFrameId=2, frameId=4, isMainFrame=false, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnFrameDeletedMessage{type=OnFrameDeleted, uid=390, parentFrameId=2, frameId=5, isMainFrame=false, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnFrameDeletedMessage{type=OnFrameDeleted, uid=391, parentFrameId=2, frameId=6, isMainFrame=false, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.MemoryChannelReader a
  FINE: READ:  OnFrameDeletedMessage{type=OnFrameDeleted, uid=392, parentFrameId=-1, frameId=2, isMainFrame=true, SocketInfo{cid=0, bid=0, channelType=Browser}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.Server b
  INFO: Channel has been disconnected: SocketChannel{cid=0, bid=0, type=Render}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.IPC$b onChannelDisconnected
  INFO: Channel is disconnected: SocketChannel{cid=0, bid=0, type=Render}
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.SharedMemory close
  INFO: IPC connection has been closed. Connection ID: 13816000
  Jan 25, 2019 7:38:29 AM com.teamdev.jxbrowser.chromium.internal.ipc.SharedMemory close
  INFO: Pending IPC connections: 4</code></pre>
  </div>
  </div>
  </p>
  
  <p>As we can see from the logs, the Render channel is closing at some point. </p>
  
  <p>OnRenderViewGone - terminationStatus=6, errorCode=-536870904</p>
  
  <p>If you have any ideas in which direction I should look or what does the error code or termination status mean - please tell. I searched for it on the internet but I couldn't find any useful info.</p>
  
  <p>Note that I didn't manage to reproduce the issue, so if you have any ideas on how I could reproduce it, please do tell.</p>
  
  <p>Update1: Here you can find the crash dump file: <a href="https://www.dropbox.com/s/yx86cfhj5rl2eye/chromium-renderer-2019-Jan-25-07-38-17.dmp" rel="nofollow noreferrer">https://www.dropbox.com/s/yx86cfhj5rl2eye/chromium-renderer-2019-Jan-25-07-38-17.dmp</a></p>