Closed
Bug 621430
Opened 15 years ago
Closed 15 years ago
Freeze (OOM) when playing Agent 008 Ball (NS_ERROR_OUT_OF_MEMORY) [nsIDOMHTMLAudioElement.play]
Categories
(Core :: Audio/Video, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: LpSolit, Assigned: roc)
References
()
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
|
2.77 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
This problem is new to Fx4.0b8, AFAIK. I don't remember having seen this problem with beta6 or beta7.
When playing the game at http://agent8ball.com/, it suddenly freezes after a few minutes with the following error in the Error Console:
Error : uncaught exception: [Exception... "Component returned failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY) [nsIDOMHTMLAudioElement.play]" nsresult: "0x8007000e (NS_ERROR_OUT_OF_MEMORY)" location: "JS frame :: http://assets2.agent8ball.com/javascripts/compiled.js?1292308929 :: <TOP_LEVEL> :: line 127" data: no]
I have several addons installed, so I wonder if one of them is interacting with the game or not. Maybe the error above is enough for you to debug it. :) Let me know if more information is needed.
| Reporter | ||
Comment 1•15 years ago
|
||
If I reload the page after the game freezes, I get:
Error : out of memory
Source File : jar:file:///usr/local/firefox/omni.jar!/components/nsSessionStore.js
Line : 3611
| Reporter | ||
Comment 2•15 years ago
|
||
After pasting the previous comment, I got:
Error : [Exception... "Component returned failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY) [nsIScriptableUnicodeConverter.convertToInputStream]" nsresult: "0x8007000e (NS_ERROR_OUT_OF_MEMORY)" location: "JS frame :: jar:file:///usr/local/firefox/omni.jar!/components/nsSessionStore.js :: sss_writeFile :: line 3805" data: no]
Source File : jar:file:///usr/local/firefox/omni.jar!/components/nsSessionStore.js
Line : 3805
| Reporter | ||
Comment 3•15 years ago
|
||
(In reply to comment #0)
> I have several addons installed, so I wonder if one of them is interacting with
> the game or not.
This problem also occurs with a new clean profile, so extensions are not the culprit. Also, I can see the following error in the console:
mmap() failed: Ne peut allouer de la mémoire
(means: mmap() failed: cannot allocate memory)
blocking2.0: --- → ?
Comment 4•15 years ago
|
||
I suspect this is related to bug 613915.
| Reporter | ||
Updated•15 years ago
|
Summary: Freeze (OOM) when playing Agent 008 Ball → Freeze (OOM) when playing Agent 008 Ball (NS_ERROR_OUT_OF_MEMORY) [nsIDOMHTMLAudioElement.play]
Comment 5•15 years ago
|
||
I see the same with http://www.pirateslovedaisies.com/
Error: uncaught exception: [Exception... "Component returned failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY) [nsIDOMHTMLAudioElement.play]" nsresult: "0x8007000e (NS_ERROR_OUT_OF_MEMORY)" location: "JS frame ::
http://www.pirateslovedaisies.com/scripts/compiled-scripts.js :: <TOP_LEVEL> :: line 507" data: no]
The results is that Firefox (latest-trunk) hangs completly / crashes, the only way out is to kill the process. I am using Win Vista.
(In reply to comment #4)
> I suspect this is related to bug 613915.
Note that both websites are only using HTML5 features and no plugins.
| Assignee | ||
Comment 6•15 years ago
|
||
Tentatively making this block since it's a demo that plays very well otherwise ... at least until we figure out what the problem is. It may be too hard to fix for FF4 if it's, say, zillions of media elements lying around.
Assignee: nobody → chris.double
blocking2.0: ? → final+
| Assignee | ||
Comment 7•15 years ago
|
||
I get messages like [WAVE API] No memory error returned while executing opening audio device for playback
which suggests we may actually be leaking something
| Assignee | ||
Comment 8•15 years ago
|
||
Actually I don't think this should really block since it's probably not a regression. However, I would very much like to have a fix!
blocking2.0: final+ → -
| Assignee | ||
Updated•15 years ago
|
| Assignee | ||
Comment 9•15 years ago
|
||
Unsurprisingly, we have an obscene number of threads.
Comment 10•15 years ago
|
||
(In reply to comment #8)
> Actually I don't think this should really block since it's probably not a
> regression.
Maybe someone can confirm this:
works:
win32 2010-11-30-03-mozilla-central 837d7b346a64
broken:
win32 2010-12-01-03-mozilla-central d48a0e23feec
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=837d7b346a64&tochange=d48a0e23feec
| Assignee | ||
Comment 12•15 years ago
|
||
Regression from bug 612798.
Assignee: chris.double → roc
Blocks: 612798
Comment 13•15 years ago
|
||
Assignee: roc → doug.turner
Attachment #500937 -
Flags: review?(roc)
| Assignee | ||
Comment 14•15 years ago
|
||
I think this one is simpler: we can just create the thread lazily. Also, I doubt it's safe to shut down the thread inside the stream destructor --- that spins the current thread's event loop.
Attachment #500948 -
Flags: review?(doug.turner)
Comment 15•15 years ago
|
||
Comment on attachment 500948 [details] [diff] [review]
my fix
In this file, we already have a nsRunnable with the name AudioShutdownEvent. Please consider renaming your runnable to AsyncThreadShutdownEvent or something similar to avoid any confusion.
nsAudioStreamLocal and nsAudioStreamRemote derive from nsAudioStream and nsAudioStream does have that nsCOMPtr to the playback thread. Although, we aren't down casting anywhere, you might as well make ~nsAudioStream virtual to avoid future issues.
With those changes, r+
Attachment #500948 -
Flags: review?(doug.turner) → review+
| Assignee | ||
Comment 16•15 years ago
|
||
Done.
| Assignee | ||
Updated•15 years ago
|
Assignee: doug.turner → roc
Whiteboard: [needs landing]
| Assignee | ||
Updated•15 years ago
|
Attachment #500937 -
Attachment is obsolete: true
Attachment #500937 -
Flags: review?(roc)
| Assignee | ||
Updated•15 years ago
|
Keywords: regression
| Assignee | ||
Comment 17•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/29867a7bccf2
We need to figure out how to test this. I think we might want some kind of check at the end of mochitests, before we shut down, that not too many threads exist.
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [needs landing]
| Reporter | ||
Comment 18•15 years ago
|
||
Verified fixed using 4.0b9pre, build d2bd42931b03
The memory is released once the game is over, or when doing nothing (Virtual Memory: 800 Mb instead of 2.8 Gb!) Thanks! :)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•