aChartEngine NullPointerExeption on XYSeries.add(x,y) method

view story

http://stackoverflow.com – Hi i'm trying to implement aChartEngine library, when i add values in code (like in this tutorial by JavaCodeGeeks ) it works perfectly but if I use a function the application crash and gives NullPointerExepction on mCurrentSeries.add(x, y). When i debug to see whats the problem mCurrentSeries.add(x,y) is repeated twice (in the same cycle) and then crash. This is the class package com.example.achartengine; import org.achartengine.ChartFactory; import org.achartengine.GraphicalView; import org.achartengine.model.XYMultipleSeriesDataset; import org.achartengine.model.XYSeries; import org.acha (HowTos)