Skip to content
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

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

Open
GoogleCodeExporter opened this issue Apr 22, 2015 · 0 comments
Open

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

GoogleCodeExporter opened this issue Apr 22, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 11 Oct 2014 at 2:24

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant