Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application not rendering in Release mode, plus System.ObjectDisposedException #73

Closed
TGNThump opened this issue Feb 17, 2018 · 11 comments

Comments

@TGNThump
Copy link

When running in Release mode (after running npm run build), Neutronium displays an empty window, and then produces the following error on closing the window:

System.ObjectDisposedException occurred
  HResult=0x80131622
  Message=Cannot access a disposed object.
Object name: 'CfrApp'.
  Source=ChromiumFX
  StackTrace:
   at Chromium.Remote.CfrObject.get_RemotePtr()
   at Chromium.Remote.CfrApp..ctor()
   at Chromium.WebBrowser.RenderProcess..ctor()
   at Chromium.WebBrowser.RenderProcess.RenderProcessMain()
   at Chromium.Remote.ExecuteProcessRemoteCall.ExecuteInTargetProcess(RemoteConnection connection)
   at Chromium.Remote.RemoteCall.ExecutionThreadEntry(RemoteConnection connection)
   at Chromium.Remote.RemoteCall.<>c__DisplayClass12_0.<ReadRequest>b__1()
   at Chromium.Remote.WorkerPool.Pool()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Running npm build integrated and then running the project in Debug mode with -dev works fine.

@David-Desmaisons
Copy link
Member

Hello @TGNThump , Thanks for reporting the issue.
Which version of Neutronium are you using?
Is it installed using the VS template?
Is it linked to a specific view or always happening?
When you mention release mode, is it a release build or debug build runt in ApplicationMode.Production?

Thanks

@TGNThump
Copy link
Author

Neutronium.Core 1.3.0
Neutronium.WPF 1.3.0
Chromium 56.0.2924.76
Platform x64
Vue.js 2.5.13
Browser ChromiumFX
Binding VueInjectorV2

Neutronium 1.3 installed via the VS template. I only have one view, so I can't say if its linked or always. The issue arises with a release build (application mode set to production)

@delasource
Copy link

Make sure you disable „prefer 32 bit“ as mentioned here: https://github.com/NeutroniumCore/Neutronium/blob/master/Documentation/Content/Migrate_from_1_1_to_version_1_2.md

@David-Desmaisons
Copy link
Member

@TGNThump , please check as @genyx suggests you buiding configuration. Make sure that the project build setttings is consistent with the solution build settings and that the prefer 32 bit is unchecked.

The symptoms you are descibing are similar to waht happened when build settings is not consistent (for example solution is x64 and project is x86, prefer 32 is checked..)

@TGNThump
Copy link
Author

TGNThump commented Feb 19, 2018

Disabling the prefer 32 bit checkbox for the release configuration fixed the error message on close, but the chromium container still displays a blank white window while not running npm run integrated and using -dev on either build config.

The content of the View/Main folder (excluding node_modules) is included in the project and the View/Main/dist folder items are all set as Content / Copy always.

@TGNThump
Copy link
Author

Getting the following console errors in dev tools (Inspecting the blank neutronium window):
image

@David-Desmaisons
Copy link
Member

From the first warning, it seems that some alterations have been done in the View\main\dist\index.HTML so that the main div can not be found. Make sure it is unaltered:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>main</title>
  <link rel="stylesheet" type="text/css" href="./styles.css">
</head>

<body>
  <div id="main" style="height: 100%;overflow: hidden;">
  </div>
  <script src="./build.js"></script>
</body>

</html>

@TGNThump
Copy link
Author

Yup, matches exactly.

@David-Desmaisons
Copy link
Member

View/Main/dist folder items should be Resource/ Dot not Copy.

@TGNThump
Copy link
Author

Thanks, both Release and Debug builds are now working. I still cant publish though, after building for pubish, the installer / .application file throws the following error:

+ Reference in the manifest does not match the identity of the downloaded assembly ChromiumFXRenderProcess.exe.

@David-Desmaisons
Copy link
Member

Please open a dedicated issue, inked to click-once deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants