We are creating a voice chat with RTMFP using a Cumulus server. The users connect to each other by joining the same NetGroup.
The voice chat and calling functions on subscribed NetStreams work well.
However, sometimes, when a user closes the browser window, the Flash plugin of all users in the same NetGroup crashes.
Since no error is reported, and the crash does not seem to happen when starting the Flash application from my IDE (FlashDevelop), I have no clue what's going on. All I know is that it happens sometimes when a user exits the Flash application (closing the brower window/app).
This is how the connection to the NetGroup is established and the audio publishing stream is published (after the connection to the Cumulus server is established):
_gspecMain = new GroupSpecifier("MainGroup");
_gspecMain.multicastEnabled = true;
_gspecMain.postingEnabled = true;
_gspecMain.serverChannelEnabled = true;
_gspecMain.objectReplicationEnabled = false;
_group = new NetGroup(_netConnection, _gspecMain.groupspecWithAuthorizations());
_group.addEventListener(NetStatusEvent.NET_STATUS, handleNetGroupStatus);
// Audio
_sendStream = new NetStream(_netConnection, NetStream.DIRECT_CONNECTIONS);
_sendStream.addEventListener(NetStatusEvent.NET_STATUS, handleNetStreamStatus);
_sendStream.client = this;
_sendStream.attachAudio(_mic);
_sendStream.publish("media");
This is how a receiving NetStream listening to the publishing one is created (whenever a Neighbor connects):
var netStream :NetStream = new NetStream(_netConnection, p_netStatusEvent.info.peerID);
netStream.addEventListener(NetStatusEvent.NET_STATUS, handleNetStreamStatus);
netStream.client = this;
netStream.play("media");
What could cause this? Should I probably do something special when notified that a Neighbor disconnected? Please note that I don't even know if the crash happens before or after any kind of notification...
You may find more information by debugging the crashing plugin. Attach Visual Studio to process plugin-container.exe
and maybe you can post some more info here (use pastebin).
Second thing - try Flash Player plugin Release version if currently you are using Debugger version I presume, but debugger version is more likely to crash in Firefox. However you can avoid it by setting dom.ipc.plugins.enabled.npswf32.dll to false.
Regarding the special treatment for disconnected netgroup peers in Firefox plugin - I don't think you need to do anything more... if the app works in ActiveX plugin and Flash Player Standalone projector, but crashes only in debugger version of plugin for Firefox... In short: Concern yourself only with crashes of release versions of Flash Player.
Other thing I would definitely try - use the original Adobe Cirrus or Flash Media Server Enterprise 4.5, not the open source equivalent, until you find the error. Even slight change in the protocol could crash the connection, thus crashing the plugin.