Photon potentially corrupting heap in Windows 8 store app?

Options
mcodes
edited March 2013 in DotNet
Hi,

My app seems to randomly crash with the following error:

Sig[7].Name=Exception Code
Sig[7].Value=c0000374
Sig[8].Name=Exception Offset
Sig[8].Value=PCH_92_FROM_ntdll+0x000DA94F

The debugger does not break into it when it occurs; it seems to be uncatchable. The above information was gathered from the windows application event log.

According to msdn documentation, exception code c0000374 is a heap corruption. Since my c#/xaml code in my Windows Store app does not do anything that could potentially corrupt the heap, I was wondering if this could be the photon library? The photon library seems like it does type casting and a lot of low level stuff. How can I debug this?

Thanks

Comments

  • Tobias
    Options
    I don't see how the client library could corrupt memory, either but it would be interesting to find the cause for this.
    The library is based on the "regular" dotnet library and that is used in many clients. You are the first to bring up such an exception.

    You should be able to debug your app like any other c# program. Attach your debugger to the running app, if you can't start it from VS.
    We don't provide source access but the debug files are in the SDK.

    Please let us know more details: Which version are you running? Can you somehow reproduce the issue?
  • Thanks for your reply.

    I run the app directly from the debugger but when it does crash the debugger does not break into anything. It just straight crashes the app and the debugger ends it session.

    I am using the following version of the photon library for win8:
    Version 3.0.1.14 (16.11.2012 - rev1891)

    Unfortunately, I can't get any solid repro of the problem... and it appears to be worse on some machines than others. It might be caused by the windows 8 framework iteself, I just don't know. Any tips on how I could possibly figure this out?
  • Tobias
    Options
    I will try to reproduce this as soon as possible. Hopefully I get some results this week. We're going to update the library in that time, too.
    How urgent is this for you? I will take some time anyways but can put it on higher prio if absolutely needed.
  • It definitely is having a negative impact on our app usage... I just don't know if the photon library is at fault or not :/ Thank you for your efforts to look into this! I will make sure to pick up the new version of the client library when it comes out. Let me know your findings :)
  • Tobias
    Options
    FYI: Today I updated the Win8 lib to the latest stuff we have in (regular) DotNet. I didn't notice anything wrong and no crashes but the old version will throw an exception when you send floats or double in an object array. This is fixed in the newer lib.

    No big changes otherwise, especially not in socket usage (where I see the faint chance of memory corruption).
    I will build an update soon (a few weeks maximum).
  • Is your update for normal DotNet or for Win8RT? I tried out your drop you sent me and it hasn't crashed... but then again I can' ever get a solid repro either.
  • Tobias
    Options
    I created new builds for both. The one I sent was for Win8RT.
    Then I'll assume this is solved and you let us know when you can reproduce it.
  • Thank you for your help! It seems the Win8RT client library link on the downloads page is still to an older version. Will you be updating the client library download there? I'd like to take an official drop of the library to ship out with my next release of my app.
  • Tobias
    Options
    Yep, I will work on the SDKs this week.
    Maybe early next.
  • Great! The sooner the better for us - I'd like to get an app update pushed out this week if possible :)
  • Hey Tobias,

    You requested that I send you the link to my app but you have private messages disabled so I can never respond to your private messages :/

    Our app is: http://apps.microsoft.com/windows/en-us/app/word-town/67e0e46b-fcce-455b-9150-98ec5d28c7f2

    Let me know if it works for you! (Maybe you can get it to crash? haha)
  • We are now in the top 100 games on the Windows Store out of almost a total of 5,000 games. Any help to promote us is greatly appreciated!
  • Tobias
    Options
    Top 100 is not bad at all!
    You could post some advertising in our Chat forum: viewforum.php?f=16
    Don't forget to post some screenshots along, to make it more interesting and click-able :)

    Are you now using the latest Photon SDK? If you don't, update to v3.2.0.1 when you can.
    Any news in those crashes?
  • Thanks! I posted in the forum you linked me: viewtopic.php?f=16&t=2496&p=11621#p11621 . Let me know what you think! I haven't upgraded my server to the latest version yet but I hope to soon.
  • Tobias
    Options
    Cool stuff! Good post, too!