Reach Your Goal

by Vonni

Downloads: 8,105 (39) • Reviews: 16

Version:

1.0.040222

Updated:

Mar 7, 2015

FIXED 1.0.020119: Crash when no logbook loaded

FIXED 1.0.020119: Crash when no logbook loaded

Postby PissedOffCil » Wed Jan 19, 2011 9:52 am

Getting the following error when opening the plugin without a logbook open.

Object reference not set to an instance of an object.

at ReachYourGoalPlugin.data.ReachYourGoalCustomData..ctor()
at ReachYourGoalPlugin.view.ReachYourGoalGoalsControl..ctor()
at ReachYourGoalPlugin.view.ReachYourGoalView.CreatePageControl()
at ZoneFiveSoftware.SportTracks.UI.ViewNavigationManager.ShowCurrentView()
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Re: Crash when no logbook loaded

Postby Stumpjumper68 » Wed Jan 19, 2011 2:33 pm

First step to stay at the top of the top rated plugins POC?
Image
Stumpjumper68
Donated!
Donated!
 
Posts: 1076
Joined: Thu Oct 11, 2007 3:39 pm
Location: Bad Vilbel, Germany

Re: Crash when no logbook loaded

Postby PissedOffCil » Wed Jan 19, 2011 2:48 pm

Hihihiihih yes yes yes precious!!!

:evil:

:lol:

No seriously I just opened the plugni from work to play with it and didn't have a logbook open. Most plugins don'T handle this well since it's not a scenario that occurs often.
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Re: Crash when no logbook loaded

Postby Stumpjumper68 » Wed Jan 19, 2011 3:14 pm

So you know the tricks to force errors. tsetsetse

Vonni kick him from the seat. :lol: :lol: :lol:
Image
Stumpjumper68
Donated!
Donated!
 
Posts: 1076
Joined: Thu Oct 11, 2007 3:39 pm
Location: Bad Vilbel, Germany

Re: Crash when no logbook loaded

Postby Vonni » Wed Jan 19, 2011 4:32 pm

Oooops? I have no idea how I could close a logbook?? :?:
I haven't known, that this is possible... Hmmm...

I have to take a look.
Viele Grüße / Best regards
Vonni
Vonni
Donated!
Donated!
 
Posts: 137
Joined: Mon Aug 09, 2010 11:09 am
Location: Stuttgart, Germany

Re: Crash when no logbook loaded

Postby Vonni » Wed Jan 19, 2011 4:49 pm

Hmm....
I can't fix this issue really good yet, because I use the logbook everywhere in the plguin. :roll:

With this update I bring up an error message and avoid a crash. Not really nice, but I acceptable workaround:
http://www.lyrikecke.de/ryg/ReachYourGo ... .st3plugin


@POC
Could you check it please again?
Viele Grüße / Best regards
Vonni
Vonni
Donated!
Donated!
 
Posts: 137
Joined: Mon Aug 09, 2010 11:09 am
Location: Stuttgart, Germany

Re: FIXED 1.0.020119: Crash when no logbook loaded

Postby PissedOffCil » Wed Jan 19, 2011 9:34 pm

You will need to rename/move/delete your logbook to be able to have ST without one. It cannot be closed

I'll give it a try.
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Re: FIXED 1.0.020119: Crash when no logbook loaded

Postby PissedOffCil » Thu Jan 20, 2011 8:32 pm

I see the error message but still get this error.

CreatePageControl() returned a null control.
at ZoneFiveSoftware.SportTracks.UI.ViewNavigationManager.ShowCurrentView()

You know that you can trap logbook changes right?

Something like this in your IPlugin implementation:

Code: Select all
        public IApplication Application
        {
            set
            {
                m_App = value;

                if (m_App != null)
                {
                    m_App.PropertyChanged += new PropertyChangedEventHandler(AppPropertyChanged);
                }
            }
        }

...

        private void AppPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e != null && e.PropertyName == "Logbook")
            {
...
            }
      }
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Re: FIXED 1.0.020119: Crash when no logbook loaded

Postby Vonni » Fri Jan 21, 2011 7:03 am

Hi,
yes sure. I know, that the bug is not fixed very good. It was thought just as a quick hotfix and I know that there will be still an error, but (I hope) no serios crash.

I think, the best idea will be to disable the plugin menu item, if no logbook is loaded. It makes no sense to open the plugin without a logbook.
Viele Grüße / Best regards
Vonni
Vonni
Donated!
Donated!
 
Posts: 137
Joined: Mon Aug 09, 2010 11:09 am
Location: Stuttgart, Germany

Re: FIXED 1.0.020119: Crash when no logbook loaded

Postby PissedOffCil » Fri Jan 21, 2011 8:11 am

Yes, the problem with the current fix is that you will need to restart ST to get the plugin's view back. But it's a minor problem I'll never encounter again...
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Re: FIXED 1.0.020119: Crash when no logbook loaded

Postby Vonni » Fri Jan 21, 2011 1:39 pm

Arrghhh...
It seems, that there is no "visible" property to disable the plugin in the menu.

Ok, than I do this later correctly and live with the interim fix. ;)
Viele Grüße / Best regards
Vonni
Vonni
Donated!
Donated!
 
Posts: 137
Joined: Mon Aug 09, 2010 11:09 am
Location: Stuttgart, Germany


Return to Reach Your Goal

Who is online

Users browsing this forum: No registered users and 1 guest