title: Android error signal 11 when a movie draws into a canvas
body: <p>I'm developing an Android application in which I'm trying to display a GIF image.
  For that I am using the Movie class and created a class GIFView that extends View. I getting a Movie instance from Movie.decodeFile method. </p>
  
  <p>I am getting an error when Movie.draw(canvas) is called.</p>
  
  <pre><code>04-28 13:44:18.001: A/libc(24883): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 24883 (mple.channel002) 
  </code></pre>
  
  <p>There is the concerned code :</p>
  
  <pre><code>    public void setGif(File gif)
      {
          movie = Movie.decodeFile(gif.getAbsolutePath());
      }
  
      @Override
      public void draw(Canvas canvas) {
          // TODO Auto-generated method stub
          super.draw(canvas);
          canvas.drawColor(0xFFCC3C6C);            
  
          if(movie != null)
          {
              if(movieStart == 0)
                  movieStart = android.os.SystemClock.uptimeMillis();
              int duration = Math.max(movie.duration(), 1000);
              movie.setTime((int)(duration - ((android.os.SystemClock.uptimeMillis() - movieStart)%duration)));
  
              movie.draw(canvas, 10, 10);//TODO CRASH
  
              invalidate();
          }
      }
  </code></pre>
  
  <p>I  create a GIFView in the main, call setGIF method above to give it the path and add it to the layout with FillParent parameter.
  It works when I print this image in an ImageView.
  Drawing a drawable in the canvas instead of the GIF works too. 
  So the problem seems to deals with the Movie instance.</p>
  
  <p>I used these links to make the GIFView 
  <a href="http://weavora.com/blog/2012/02/07/android-and-how-to-use-animated-gifs/" rel="nofollow noreferrer">http://weavora.com/blog/2012/02/07/android-and-how-to-use-animated-gifs/</a></p>
  
  <p>I also tried it this way but same error on movie.draw
  <a href="https://stackoverflow.com/questions/7373718/info-about-the-movie-class-for-android">Info about the Movie class for Android</a></p>
  
  <p>EDIT1:
  I do my tests on an Oppo Find 7a on Android 4.4.2 / snapdragon 801 / 2GB
  Changing movie.draw(canvas, 10, 10) to movie.draw(canvas, 10f, 10f) doesn't change anything.</p>
  
  <p><strong>EDIT2: 
  I just tested on an old ZTE device with Android 2.3.5 and it worked..
  So something is wrong when launching on Find7a device but I can't figure out what :(</strong></p>