paragp / achartengine

AChartEngine is a charting library for Android applications. It currently supports the following chart types: line chart area chart scatter chart time chart bar chart pie chart bubble chart doughnut chart range (high-low) bar chart dial chart / gauge combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart cubic line chart All the above supported chart types can contain multiple series, can be displayed with the X axis horizontally (default) or vertically and support many other custom features. The charts can be built as a view that can be added to a view group or as an intent, such as it can be used to start an activity. The model and the graphing code is well optimized such as it can handle and display huge number of values. AChartEngine is currently at the 1.0.0 release. New chart types will be added in the following releases. Please keep sending your feedback such as we can continually improve this library. Find us on Facebook, too: http://www.facebook.com/achartengine Read a short introduction to AChartEngine here: http://www.javaadvent.com/2012/12/achartengine-charting-library-for.html Another good tutorial can be read here: http://jaxenter.com/effort-free-graphs-on-android-with-achartengine-46199.html
0 stars 1 forks source link

Crashes when minimizing the app and miximizing it again. #443

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Note: I didn't render the GraphicalView from the GraphicalActivity (i.e  not 
using setcontentView(View)) but i'm using fragment to render the GraphicalView 
for my activity.
What steps will reproduce the problem?
1. Initialized the Bar chart.
2. get the intent from the chartFactory.
3. started my own Activity (named ActivityX) with this intent (not 
GraphicalActivity).
4. In ActivityX, I instantiate the fragment to render the GraphicalView.
5. Now run the App, see the BarChart View is rendered properly.
6. Now minimize the app and maximize it again. you will see the crash.

Please see the attached files to see the crash logs.
I'm able to see these lines from crash logs :

1. Caused by: java.io.NotSerializableException: 
org.achartengine.chart.ClickableArea 

2. java.lang.RuntimeException: Parcelable encountered IOException writing 
serializable object (name = org.achartengine.chart.BarChart)

Note : I know i didn't use the GraphicalActivity to show the chart. But please 
hep me with this one. I really need fragment to show the chart.

What is the expected output? What do you see instead?
It should not crash and render the graph properly.

Please provide a source code snippet that we can use to replicate the
issue.
From My Custom Activity :
========================
    BarGraph bar = new BarGraph();
    Intent intent = bar.getIntent(this);
    // fragment instantiated in oncreate()  of this activity.
    fragment.setArguments(intent.getExtras());
    getFragmentManager().beginTransaction().replace(R.id.frame_container, fragment).commit();
==========================================
From My Custom Fragment :
============================
In My Fragment, I only written this. all other life cycle methods are left with 
default implementation.

     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        Bundle extras = getArguments();
        mChart = (AbstractChart) extras.getSerializable(ChartFactory.CHART);
        mView = new GraphicalView(getActivity(), mChart);
        title = extras.getString(ChartFactory.TITLE);
        return mView;
     }
========================
What version of the product binary library are you using?
1.2.0

Please provide any additional information below.

Original issue reported on code.google.com by pavankum...@gmail.com on 11 Oct 2014 at 2:24

Attachments: