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

Stack Overflow Exception #28

Closed
waliarubal opened this issue Oct 24, 2019 · 11 comments
Closed

Stack Overflow Exception #28

waliarubal opened this issue Oct 24, 2019 · 11 comments

Comments

@waliarubal
Copy link

I just upgraded my project to latest preview of 0.9 and now its completely broken.
Avalonia.Xaml.Behaviors has started giving stack overflow exceptions. It was working very well with Avalonia 0.8.3 stable.

To reproduce follow below mentioned steps.

  1. Clone my project's master branch from repo URL https://github.com/waliarubal/Jaya.
  2. Run it and on left hand side of navigation tree under 'File System' node, expand it to show your PC's node.
  3. In PC node, further expand it to show drives attached to your PC.
  4. Then on any drive node, just click it and see stack overflow coming.
@wieslawsoltes
Copy link
Contributor

@waliarubal Can you post from where the stack overflow is coming, I am currently unable to do repro on my machine.

@wieslawsoltes
Copy link
Contributor

@waliarubal When I run your app I get this:
Jaya

@waliarubal
Copy link
Author

waliarubal commented Oct 27, 2019

Check that the project file for FileSystem plugin looks like below. It has setting to emit output DLL to main project's output directory on build. Try taking latest from my master branch as I may have added some MEF changes that might effect.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Library</OutputType>
    <TargetFramework>netcoreapp2.2</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Compile Update="**\*.xaml.cs">
      <DependentUpon>%(Filename)</DependentUpon>
    </Compile>
    <AvaloniaResource Include="**\*.xaml">
      <SubType>Designer</SubType>
    </AvaloniaResource>
    <AvaloniaResource Include="Assets\**" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Avalonia" Version="0.9.0-preview4" />
    <PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview4" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Jaya.Shared\Jaya.Shared.csproj" />
  </ItemGroup>
  <PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
    <OutputPath>..\Jaya.Ui\bin\$(Configuration)\</OutputPath>
  </PropertyGroup>
</Project>

You shall see something like below.
image

@waliarubal
Copy link
Author

Did you manage to reproduce it? Is the issue fixed now?

@wieslawsoltes
Copy link
Contributor

@waliarubal Sorry did not have much time lately. I hope I can investigate over the weekend.

@waliarubal
Copy link
Author

waliarubal commented Oct 29, 2019

Okay @wieslawsoltes , will be waiting eagerly for your fix. Just to re-mention, the below line in project file of plugins forces the plugins to be built in main program's output directory.

<PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
    <OutputPath>..\Jaya.Ui\bin\$(Configuration)\</OutputPath>
</PropertyGroup>

@wieslawsoltes
Copy link
Contributor

@waliarubal I get this:
1
Why do you thinks its caused by Avalonia Behaviors. When Avalonia was updated from 0.8.X to 0.9.X the Rx library was also updated.

@wieslawsoltes
Copy link
Contributor

@waliarubal I have commented out this code:
https://github.com/waliarubal/Jaya/blob/c5dcf8fb9fc55ea8e78e723754c00c82085c38ce/Jaya.Ui/Views/ExplorerView.xaml#L96-L100
and SO exceptions still happens. Did not see any other usage of behaviors in your app.

@waliarubal
Copy link
Author

Interesting, I never checked after commenting the behaviour usage in my app but yes it occured when i did double click action on nodes. Anyways, is this a problem with Avalonia itself then or is their something I should do to prevent this?

@waliarubal
Copy link
Author

@waliarubal I have commented out this code:
https://github.com/waliarubal/Jaya/blob/c5dcf8fb9fc55ea8e78e723754c00c82085c38ce/Jaya.Ui/Views/ExplorerView.xaml#L96-L100
and SO exceptions still happens. Did not see any other usage of behaviors in your app.

Yes, for now I just have this usage.

@waliarubal
Copy link
Author

Also let me know how were you able to step into external code since debugger never halted at that point in my machine? In future it will help me in being more verbose in diagnosing root cause of the issues. Thanks for your help and support.

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

2 participants