Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Version 2.5.2 MiniCube Sample MainPage.Xaml problem #274

Closed
JerryLive opened this issue Feb 10, 2014 · 14 comments
Closed

Version 2.5.2 MiniCube Sample MainPage.Xaml problem #274

JerryLive opened this issue Feb 10, 2014 · 14 comments

Comments

@JerryLive
Copy link

In the Win81Demos sample in version 2.5.1
Attempting to display MainPage.xaml causes this exception.:

An Unhandled exception has occurred.
Click here to reload the Designer.
Details:
System,Runtine.Remoting.RemotingException
[4264] Designer process terminated unexpectedly.

Reloading just repeats the exception.
I removed this code from App.xaml.cs

In my case, I have Xaml controls on the MainPage, so this is unusable.

@JerryLive
Copy link
Author

I removed this code from App.xaml.cs
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
which had no effect.

@JerryLive JerryLive reopened this Feb 10, 2014
@TheWhiteAmbit
Copy link
Contributor

I will have a look at at again. I think it is a Driver-Bug and happens only rarely on my system, so it is hard to track. Does your Display-Driver also crash (you get a notification bubble)?

@JerryLive
Copy link
Author

My Display-Driver does Not crash.
Everything works perfectly except for the exception.
The MiniCube runs, closes and certifies perfectly.

@ArtiomCiumac
Copy link
Contributor

The designer works fine on my machine (Win 8.1 x64, NVidia GPU, Intel CPU).
Unfortunately, SharpDX samples aren't good at demonstrating a correct way of building WinRT controls, as their main aim is to demonstrate usage of the SharpDX API.

Try to modify the constructor of the Direct3DUserControl control to check the design mode, so that it looks something like this:

public Direct3DUserControl()
{
    this.InitializeComponent();

    if(Windows.ApplicationModel.DesignMode.DesignModeEnabled)
        return;

If you can confirm that this fix works for you - I will commit it to the main repository.

@JerryLive
Copy link
Author

The fix works perfectly.
My machine is also (Win 8.1 x64, NVidia GPU, Intel CPU)
Thanks very much.
It is a great pleasure to deal with someone who really, truly knows what they are doing !
Have some extra fun today...

@TheWhiteAmbit
Copy link
Contributor

Glad to hear it works, because this also was my idea to fix it for now. I will send you a Pull request once soon, when the changes are made and clean. But I think even better solutions are possible, since I once had even 3D-Objects show up even in Designer.

@ArtiomCiumac
Copy link
Contributor

@TheWhiteAmbit, such contribution would be very nice. Meanwhile, I have commited a fix that just disables D3D initialization in designer mode.

@TheWhiteAmbit
Copy link
Contributor

Ok, just did the same - think I was late because I had to switch to master-integration.
@JerryLive could you please have a test for me by disabling
//target.OnRender += cubeRenderer.Render;
with a comment and removing the fix - then have a look if the exception is still there. I just need to know where to find the bug, which does not occur here. I strongly assume it comes from this Sample. I would like to find a real fix, because this is not a fix, it is just a workaround/hack.

@JerryLive
Copy link
Author

Yes, disabling target.OnRender += cubeRenderer.Render; and removing the fix also works.

From: TheWhiteAmbit
Sent: Monday, February 10, 2014 11:14 AM
To: sharpdx/SharpDX
Cc: JerryLive
Subject: Re: [SharpDX] Version 2.5.2 MiniCube Sample MainPage.Xaml problem (#274)

Ok, just did the same - think I was late because I had to switch to master-integration.
@JerryLive could you please have a test for me by disabling
//target.OnRender += cubeRenderer.Render;
with a comment and removing the fix - then have a look if the exception is still there. I just need to know where to find the bug, which does not occur here. I strongly assume it comes from this Sample.


Reply to this email directly or view it on GitHub.

@TheWhiteAmbit
Copy link
Contributor

Thank you Jerry. Have been a little bit p.o.'d because I contributed the Win81-Sample and Artiom does not give me a minute before pushing a workaround instead of a clean fix. This is where my motivation to find a real fix suddenly disappeared for now... it just cripples the sample to stop 3D in Design-Mode were the failure is in some other part... this is not clean. You could have just used this workaround until I find a real solution.

@ArtiomCiumac
Copy link
Contributor

I don't mind if my code is being rewritten - I will always accept a better solution, as this is open-source. Some parts of the project are more important and some are less. If something is not related directly to library's functionality (check my first comment) - there isn't any issue having a not-so-clean solution and I would be grateful if anyone else can improve it.

@JerryLive
Copy link
Author

Well...
Just a little peace and calm.
Everybody has their own view of what is best at the time.
I just want it to work now so I can continue with my program.
Perfect takes a little extra time...
But that’s the final goal.

Thanks for all the effort !

Jerry...

From: Artiom Ciumac
Sent: Monday, February 10, 2014 12:58 PM
To: sharpdx/SharpDX
Cc: JerryLive
Subject: Re: [SharpDX] Version 2.5.2 MiniCube Sample MainPage.Xaml problem (#274)

I don't mind if my code is being rewritten - I will always accept a better solution, as this is open-source. Some parts of the project are more important and some are less. If something is not related directly to library's functionality (check my first comment) - there isn't any issue having a not-so-clean solution and I would be grateful if anyone else can improve it.


Reply to this email directly or view it on GitHub.

@TheWhiteAmbit
Copy link
Contributor

Sorry Artiom, not really your fault. Had a bad day. But I was just going half way for a clean solution, and a fix just disabling D3D completely killed my motivation to work further on it, knowing there will be merge action etc. later. Maybe it will be back later, but a little bit more coordination on it would have been nice.

@TheWhiteAmbit
Copy link
Contributor

I just sent you a Pull request with DesignModeD3DRendering exposed as DependencyProperty of the Direct3DUserControl, what might be a good compromise, because when there is no bad D3D as in CubeRenderer.cs it still makes perfect sense to allow it. Default is off.

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

No branches or pull requests

3 participants