terry-u16 / materialchartplugin Goto Github PK
View Code? Open in Web Editor NEW資材のグラフを表示するKanColleViewer用プラグインです。
Home Page: http://terry-u16.hatenablog.com/entry/2015/09/24/224727
License: MIT License
資材のグラフを表示するKanColleViewer用プラグインです。
Home Page: http://terry-u16.hatenablog.com/entry/2015/09/24/224727
License: MIT License
OS: Windows 10 x64 TH2(2015 Autumn Update適用済)
発生経緯:
2015秋イベントE-3に出撃→帰投。
中破~大破艦にバケツ使用→残数0になる。
左のメニューから工廠に移動し、不要艦娘を解体した。解体のローディング中~直後に動作停止した。
一度落として再起動すると、ローディング画面(ぷかぷか丸)まではいくが、母港画面に移行する前に動作停止する。
OS再起動してもダメ。
差異点:
高速修復材が0になった。
バケツが0になったのは着任直後以来で、今回最も大きな差異点である。通常使用している間はバケツは0にならず、このような現象は起きていなかった。
解決方法:
別ブラウザ(Firefox)でアクセスし、高速修復材を5個購入した。
「提督業も忙しい!」を起動し、ログインすると母港画面まで進んだ。
問題があると推測される箇所:
error.txtの一番上にあるのが『MaterialChartPlugin.Models.Utilities.ChartUtilities.GetInterval(Int32 min, Int32 max)』であり、これが原因と推測した。
該当コードは以下の通り。
public static int GetInterval(int min, int max)
{
// グラフの数値軸目盛を自動算出するアルゴリズム: いげ太のブログ
// http://igeta.cocolog-nifty.com/blog/2007/11/graph_scale.html
// を参考に作成
if (max <= min)
throw new ArgumentException(); // ←これによりエラー落ち
int difference = max - min; // 最上位桁値
int shift = 1; // 桁上げ倍率
while (difference >= 10)
{
difference /= 10;
shift *= 10;
}
if (difference >= 5)
return shift * 2;
else if (difference >= 2)
return shift;
else
return shift * 4 / 10;
}
上記の呼び出しコードは、
this.mostRepairTool = RepairTool; // mostRepairToolは区間内の最大バケツ量
var interval = ChartUtilities.GetInterval(0, mostRepairTool);
→バケツが0、つまり this.mostRepairTool = 0 だったことにより、 max<=min の条件を満たし、ArgumentException()がthrowされたと推測される。
・mostRepairTool = 0の時は、グラフ軸の値を強制してしまう(強制的にmostRepairTool=5にするなど)。
・(可能なら)Exceptionをthrowすると全て動作停止してしまうので、本体の動作を止めずにログに残す方法を検討する。
ERROR, date = 2015/12/05 2:24:20 +09:00, sender = 名前:KanColleViewer.exe
コンテキスト ポリシーがありません。
,
System.ArgumentException: 値が有効な範囲にありません。
場所 MaterialChartPlugin.Models.Utilities.ChartUtilities.GetInterval(Int32 min, Int32 max)
場所 MaterialChartPlugin.ViewModels.ToolViewModel.SetRepairToolYAxis(Int32 mostRepairTool)
場所 MaterialChartPlugin.ViewModels.ToolViewModel.UpdateData(TimeMaterialsPair newData)
場所 System.Reactive.AnonymousSafeObserver1.OnNext(T value) 場所 System.Reactive.Linq.ObservableImpl.Throttle
1._.Propagate(IScheduler self, UInt64 currentid)
場所 System.Reactive.Concurrency.DefaultScheduler.<>c__DisplayClass4`1.b__3(Object _)
場所 System.Reactive.Concurrency.ConcurrencyAbstractionLayerImpl.Timer.Tick(Object state)
場所 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
場所 System.Threading.TimerQueueTimer.CallCallback()
場所 System.Threading.TimerQueueTimer.Fire()
場所 System.Threading.TimerQueue.FireNextTimers()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.