mono / CocosSharp

CocosSharp is a C# implementation of the Cocos2D and Cocos3D APIs that runs on any platform where MonoGame runs.
493 stars 160 forks source link

1.7.0 forms+CC - going to CC game from Second page on PCL , via Navigation - getting "Access Violation" #327

Open zahik opened 8 years ago

zahik commented 8 years ago

I post it also on the forums: https://forums.xamarin.com/discussion/comment/167356/#Comment_167356

It's an old problem for WinPhone 8.1 XAML Thought it was solved. but not. Even from the PCL support for CC, when i try to insert normal page BEFORE the game, like opening the app from FirstPage.cs and from there by pushing a button to navigate to the CC game page, I get "Access Violation" Error. The full project is on the forums. If you have quick fix it would be great. thanks.

kjpou1 commented 8 years ago

@zahik

Can you try doing the exact same thing but instead of using a CCGameView use a SwapChainPanel?

   <Grid>
        <SwapChainPanel x:Name="GameView" Margin="0"/>
    </Grid>

Of course the ViewCreated will not exist so just comment out that code. This is just to see what happens.

zahik commented 8 years ago

Hi Kenneth. If you mean on MainPage.xaml, for Forms project there isn't:

 <forms:WindowsPhonePage
x:Class="CocosSharpNetTestTemp1.WP81.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CocosSharpNetTestTemp1.WP81"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:forms="using:Xamarin.Forms.Platform.WinRT"
mc:Ignorable="d">
</forms:WindowsPhonePage>    
zahik commented 8 years ago

GOOD NEWS KENNETH!!!! I downgraded XF to version 1.5.1.6471 : https://www.nuget.org/packages/Xamarin.Forms/1.5.1.6471 And IT'S WORKING. finally , after 3 days....

The problem is with XF ver 2.0.0.6484 . check it out please. meantime i can finally continue working! great!

so, for my problem , the best practice to work now is CC 1.7.0 pre1 with XF 1.5.1.6471 (stable) I'll open a new thread for it on the forums. Zahi Kramer