-
Notifications
You must be signed in to change notification settings - Fork 36
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
Exception on Start() #31
Comments
Just to update... I pulled the source instead of using the Nuget package (I figured I'd try to investigate myself instead of being entirely useless). My application is trying to restore state from two files:
The first file looked well formed. The second file was entirely NUL characters when I opened it in notepad++.. When I manually blew away the contents of the second file, things are back to working. I can continue to play around now, but I'd still like to keep this open until there's a resolution for how this might be handled in a real client environment. Unfortunately, I don't know what caused it in the first place. Let me know if you need any more information from me. |
That is weird. In a non-debug scenario it generally just ignores the badly read file and [)amien On Fri, Mar 13, 2015 at 9:59 PM, Nick Cosentino [email protected]
|
(First time having my eyes on the code, so forgive me if I'm being obvious or oblivious haha) This signature in the base class:
Looks like it's always left as the default false. I'm using the WinForms implementation, so:
So it seems like once I get into a corrupt state (still haven't repro'd) I'm kind of stuck like that. Even aside from being stuck like that, I imagine the first time it happens would still result in an app crash, require an app restart, and then things might be okay? |
Thanks for that. I haven't use the WinForms/WPF implementations myself Thanks for the heads up! [)amien On Fri, Mar 13, 2015 at 10:17 PM, Nick Cosentino [email protected]
|
Cool! Thanks for being so responsive. That's greatly appreciated! |
Figured I'd mention this in the same spot since you said you'd be looking at the WinForm/WPF implementations... It looks like between application restarts as long as I have one of those session files, I can't seem to get metrics sent off. As soon as I delete those two files, things go back to normal. I tried poking around in the WinForms code, and got back to the AppDataContractSerializer. Within here, the line that actually performs the return is never hit (and the exception handlers around this code don't seem to get hit either).
It's as if the files will just hang on being loaded if they exist, unless I'm misunderstanding how the async behaviour is working. Again, not sure if it's related at all, but I didn't want to tack on another issue if you think this type of thing is related. |
Hi, I had the same problem, not sure why, maybe because I've been debugging... My file (CSharpAnalytics-MeasurementQueue ) look like the following:
Just put the following in a Try Catch :
inside BaseAutoMeasurement.cs And the file gets recreated. Next time up, metrics are recorded again. Hope this helps ! PS. @damieng Thank you for sharing your awsome solution. |
I managed to reproduce this issue and the cause is that the |
…re running multiple instances cause various exceptions to be thrown.
Just wanted to give this library a whirl. Seems pretty easy to use, which was a big bonus for me. I had things working with these lines for my setup:
And then on a screen I'd call
Now on startup (specifically, only if I include the .Start() line, I get the following exception:
I feel like it's trying to restore some state or something, but I've blown away my bin directory and I've checked source control to ensure I have no other changes. It just stopped working out of (seemingly) nowhere and now I can't really do all that much.
Definite props for putting something together that's so easy to use though.
The text was updated successfully, but these errors were encountered: