title: Flutter Camera Package: A resource failed to call release
body: <p>I am currently working off of Flutter v 1.22.1(stable) and am running into an issue with the Camera package (v0.5.8+11). At first i thought it was an issue with the project itself and the HTTP requests that were being made.</p>
  <p>I just tested it out again using the example provided on the Camera package page at <a href="https://pub.dev/packages/camera/example" rel="nofollow noreferrer">https://pub.dev/packages/camera/example</a> (exact copy and paste), and am receiving the message below after recording and then stopping after around 15-20 seconds (the main thing to note, is &quot;A resource failed to call release&quot;):</p>
  <pre><code>An Observatory debugger and profiler on Android SDK built for x86 64 is available at: http://[IP-Address]/gMHBybPacbQ=/
  W/le.test_projec(15597): Accessing hidden method Landroid/media/AudioTrack;-&gt;getLatency()I (light greylist, reflection)
  I/ExoPlayerImpl(15597): Init a86fb73 [ExoPlayerLib/2.12.1] [generic_x86_64, Android SDK built for x86_64, Google, 28]
  W/VideoCapabilities(15597): Unrecognized profile 4 for video/hevc
  I/VideoCapabilities(15597): Unsupported profile 4 for video/mp4v-es
  I/OMXClient(15597): IOmx service obtained
  D/SurfaceUtils(15597): connecting to surface 0x73ead6b56010, reason connectToSurface
  I/MediaCodec(15597): [OMX.google.h264.decoder] setting surface generation to 15971329
  D/SurfaceUtils(15597): disconnecting from surface 0x73ead6b56010, reason connectToSurface(reconnect)
  D/SurfaceUtils(15597): connecting to surface 0x73ead6b56010, reason connectToSurface(reconnect)
  E/ACodec  (15597): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
  I/ACodec  (15597): codec does not support config priority (err -1010)
  W/System  (15597): A resource failed to call release. 
  I/chatty  (15597): uid=10087(com.example.test_project) FinalizerDaemon identical 1 line
  W/System  (15597): A resource failed to call release. 
  I/OMXClient(15597): IOmx service obtained
  I/ACodec  (15597): codec does not support config priority (err -2147483648)
  D/MediaCodec(15597): [OMX.google.h264.decoder] setting dataspace on output surface to #103
  W/le.test_projec(15597): Accessing hidden method Landroid/media/AudioTrack$Builder;-&gt;setOffloadedPlayback(Z)Landroid/media/AudioTrack$Builder; (dark greylist, linking)
  W/le.test_projec(15597): Accessing hidden method Landroid/media/AudioTrack$Builder;-&gt;setOffloadedPlayback(Z)Landroid/media/AudioTrack$Builder; (dark greylist, linking)
  W/MapperHal(15597): buffer descriptor with invalid usage bits 0x2000
  D/SoftwareRenderer(15597): setting dataspace on output surface to #103
  W/MapperHal(15597): buffer descriptor with invalid usage bits 0x2000
  W/MapperHal(15597): buffer descriptor with invalid usage bits 0x2000
  W/System  (15597): A resource failed to call release. 
  I/ExoPlayerImpl(15597): Init 9474624 [ExoPlayerLib/2.12.1] [generic_x86_64, Android SDK built for x86_64, Google, 28]
  I/OMXClient(15597): IOmx service obtained
  D/SurfaceUtils(15597): connecting to surface 0x73eadbff2010, reason connectToSurface
  I/MediaCodec(15597): [OMX.google.h264.decoder] setting surface generation to 15971330
  D/SurfaceUtils(15597): disconnecting from surface 0x73eadbff2010, reason connectToSurface(reconnect)
  D/SurfaceUtils(15597): connecting to surface 0x73eadbff2010, reason connectToSurface(reconnect)
  E/ACodec  (15597): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
  I/ACodec  (15597): codec does not support config priority (err -1010)
  I/OMXClient(15597): IOmx service obtained
  I/ACodec  (15597): codec does not support config priority (err -2147483648)
  D/MediaCodec(15597): [OMX.google.h264.decoder] setting dataspace on output surface to #103
  W/MapperHal(15597): buffer descriptor with invalid usage bits 0x2000
  D/SoftwareRenderer(15597): setting dataspace on output surface to #103
  I/ExoPlayerImpl(15597): Release a86fb73 [ExoPlayerLib/2.12.1] [generic_x86_64, Android SDK built for x86_64, Google, 28] [goog.exo.core]
  D/SurfaceUtils(15597): disconnecting from surface 0x73ead6b56010, reason disconnectFromSurface
  W/MapperHal(15597): buffer descriptor with invalid usage bits 0x2000
  I/flutter (15597): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
  I/flutter (15597): The following assertion was thrown building Container(bg: BoxDecoration(border:
  I/flutter (15597): Border.all(BorderSide(MaterialColor(primary value: Color(0xffe91e63)), 1.0, BorderStyle.solid)))):
  I/flutter (15597): A VideoPlayerController was used after being disposed.
  I/flutter (15597): Once you have called dispose() on a VideoPlayerController, it can no longer be used.
  I/flutter (15597): 
  I/flutter (15597): The relevant error-causing widget was:
  I/flutter (15597):   Container file:///Users/giovanniconcepcion/Projects/test/test_project/lib/main.dart:168:27
  I/flutter (15597): 
  I/flutter (15597): When the exception was thrown, this was the stack:
  I/flutter (15597): #0      ChangeNotifier._debugAssertNotDisposed.&lt;anonymous closure&gt; (package:flutter/src/foundation/change_notifier.dart:117:9)
  I/flutter (15597): #1      ChangeNotifier._debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:123:6)
  I/flutter (15597): #2      ChangeNotifier.removeListener (package:flutter/src/foundation/change_notifier.dart:178:12)
  I/flutter (15597): #3      _VideoPlayerState.didUpdateWidget (package:video_player/video_player.dart:612:26)
  I/flutter (15597): #4      StatefulElement.update (package:flutter/src/widgets/framework.dart:4815:58)
  I/flutter (15597): #5      Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #6      SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #8      SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #9      Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #10     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #11     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #12     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #13     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #14     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #15     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #16     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
  I/flutter (15597): #17     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #18     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #19     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #20     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5647:32)
  I/flutter (15597): #21     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6246:17)
  I/flutter (15597): #22     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #23     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #24     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #26     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #27     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
  I/flutter (15597): #28     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #29     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5647:32)
  I/flutter (15597): #30     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6246:17)
  I/flutter (15597): #31     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #32     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #33     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #34     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5647:32)
  I/flutter (15597): #35     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6246:17)
  I/flutter (15597): #36     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #38     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #39     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
  I/flutter (15597): #40     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #41     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #42     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #43     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
  I/flutter (15597): #44     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #45     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #46     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #47     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
  I/flutter (15597): #48     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #49     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5647:32)
  I/flutter (15597): #50     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6246:17)
  I/flutter (15597): #51     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #52     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #53     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  I/flutter (15597): #54     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #55     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
  I/flutter (15597): #56     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #58     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #59     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
  I/flutter (15597): #60     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #61     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #62     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  I/flutter (15597): #63     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #64     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
  I/flutter (15597): #65     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #66     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #67     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #68     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #69     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #70     StatelessElement.update (package:flutter/src/widgets/framework.dart:4708:5)
  I/flutter (15597): #71     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #72     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6125:14)
  I/flutter (15597): #73     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #74     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #75     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  I/flutter (15597): #76     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #77     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
  I/flutter (15597): #78     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #79     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #80     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  I/flutter (15597): #81     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #82     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
  I/flutter (15597): #83     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #84     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #85     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #86     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
  I/flutter (15597): #87     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #88     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #89     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #90     ProxyElement.update (package:flutter/src/widgets/framework.dart:4987:5)
  I/flutter (15597): #91     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #93     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  I/flutter (15597): #94     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #95     StatefulElement.update (package:flutter/src/widgets/framework.dart:4832:5)
  I/flutter (15597): #96     Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
  I/flutter (15597): #97     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  I/flutter (15597): #98     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  I/flutter (15597): #99     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  I/flutter (15597): #100    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2730:33)
  I/flutter (15597): #101    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:913:20)
  I/flutter (15597): #102    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5)
  I/flutter (15597): #103    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
  I/flutter (15597): #104    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9)
  I/flutter (15597): #105    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:971:5)
  I/flutter (15597): #109    _invoke (dart:ui/hooks.dart:251:10)
  I/flutter (15597): #110    _drawFrame (dart:ui/hooks.dart:209:3)
  I/flutter (15597): (elided 3 frames from dart:async)
  I/flutter (15597): 
  I/flutter (15597): ════════════════════════════════════════════════════════════════════════════════════════════════════
  W/System  (15597): A resource failed to call release. 
  W/System  (15597): A resource failed to call release. 
  </code></pre>
  <p>I saw on a Github thread, where I posted the issue, someone mentioning a similar event and others stating that this is to due with the current stable version of flutter causing this issue with the Camera Package: <a href="https://github.com/flutter/flutter/issues/60409?_pjax=%23js-repo-pjax-container" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/60409?_pjax=%23js-repo-pjax-container</a></p>
  <p>Any help or insight into this issue would be greatly appreciated!!!</p>