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

Sometimes System.AccessViolationException on Windows 10 #1

Open
wearhere opened this issue Jan 19, 2016 · 7 comments
Open

Sometimes System.AccessViolationException on Windows 10 #1

wearhere opened this issue Jan 19, 2016 · 7 comments

Comments

@wearhere
Copy link
Contributor

Observed for multiple users under Windows 10:

Application: mixmax.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
  at Squirrel.ITrayNotify.SetPreference(Squirrel.NOTIFYITEM_Writable ByRef)
  at Squirrel.TrayStateChanger.PromoteTrayItems(System.String)
  at Startup+<Invoke>d__0.MoveNext()
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Startup+<Invoke>d__0, tgfmyvbn, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]](<Invoke>d__0 ByRef)
  at Startup.Invoke(System.String)

Exception Info: System.Reflection.TargetInvocationException
  at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
  at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
  at EdgeCompiler+<>c__DisplayClass1.<CompileFunc>b__0(System.Object)
  at ClrFunc.Call(v8.Local<v8::Value>, v8.Local<v8::Value>, v8.Local<v8::Value>)
  at <Module>.clrFuncProxy(Nan.FunctionCallbackInfo<v8::Value>)
  at <Module>.Nan.imp.?A0x09be68f5.FunctionCallbackWrapper(v8.FunctionCallbackInfo<v8::Value>*)
@wearhere
Copy link
Contributor Author

@paulcbetts have you seen this before? I don't know enough about Windows / Windows development to say why this might be failing for particular users or how to remedy.

Ideally we would fix the issue of course.

Failing that, we'd get the user to change his configuration—presumably it is something particular to him, since I can't repro and we haven't heard this from other users.

If the code could figure out when the error would occur, just having this module silently fail would be fine too. Unfortunately this exception doesn't seem to be able to be caught—the app just crashes on launch for this user, without them seeing a regular Electron uncaught-exception error dialog—or else I'd just wrap the main logic in a try-catch and call it a day.

@wearhere wearhere changed the title Sometimes System.AccessViolationException System.AccessViolationException on Windows 10 Jan 19, 2016
@wearhere
Copy link
Contributor Author

Ah shoot, I just tried on a Windows 10 PC as opposed to my Parallels VM and reproduced it there, so perhaps it does happen for all Windows 10 users. x_x

EDIT: Nope, analytics reveals that some Windows 10 users are just fine.

@wearhere wearhere changed the title System.AccessViolationException on Windows 10 Sometimes System.AccessViolationException on Windows 10 Jan 20, 2016
@anaisbetts
Copy link

If you can build a repro app it'd be easy to debug with WinDbg

@expandrive
Copy link

Was curious if anyone figured out what the root issue was on this? Any luck?

@jeffbargmann
Copy link

jeffbargmann commented Apr 29, 2016

Just a guess, 32bit code running on 64bit system? I wouldn't expect an issue, but Microsoft may not have predicted WOW64 apps calling this private API. Possible something's getting dropped in the mix? Noticing it's a struct with IntPtrs being passed to SetPreference.

@anaisbetts
Copy link

@JBLatenight Nope, IntPtr is explicitly the only type that correctly resizes based on architecture

@expandrive
Copy link

I've got a replicable case on Windows 10 x64 using .net v4.5.1 - . If I call promote function at load it always crashes at setpreference, but if I call it at any other time in the lifecycle of the app SetPreference just never returns [but everything else seems to work]. I can build a full reproducible app if necessary, but can any verify this interface actually works on Windows 10 x64?

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