Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

null object reference in AudioPublisher after stop()

Avatar

Avatar
Validate 1
Level 2
adam_k
Level 2

Likes

7 likes

Total Posts

84 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
adam_k
Level 2

Likes

7 likes

Total Posts

84 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
adam_k
Level 2

10-04-2012

if i'm publishing audio with AudioPublisher and then call stop(), i get a null object reference, i've pasted the stack trace below.  the offending line of code is in AudioPublisher:976:

if ( _mic.codec.toLowerCase() == SoundCodec.NELLYMOSER.toLowerCase() )

_mic.codec is null.  i guess the codec gets set to null somehow after the publishing is stopped?

i really don't want to monkey patch AudioPublisher.  is there something i'm doing wrong? or some kind of workaround to avoid this?

TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at com.adobe.rtc.collaboration::AudioPublisher/onStreamDelete()[/src/com.adobe.lccs_v220/libs/player10.3/src/com/adobe/rtc/collaboration/AudioPublisher.as:976]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at com.adobe.rtc.sharedManagers::StreamManager/onItemRetract()[/src/com.adobe.lccs_v220/libs/player10.3/src/com/adobe/rtc/sharedManagers/StreamManager.as:2105]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at com.adobe.rtc.sharedModel::CollectionNode/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItemRetraction()[/src/com.adobe.lccs_v220/libs/player10.3/src/com/adobe/rtc/sharedModel/CollectionNode.as:790]

          at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItemRetraction()[/src/com.adobe.lccs_v220/libs/player10.3/src/com/adobe/rtc/messaging/manager/MessageManager.as:755]

          at com.adobe.rtc.session.managers::SessionManagerBase/receiveItemRetraction()[/src/com.adobe.lccs_v220/libs/player10.3/src/com/adobe/rtc/session/managers/SessionManagerBase.as:401]

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 2
DrAlexGor
Level 2

Likes

7 likes

Total Posts

103 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
DrAlexGor
Level 2

Likes

7 likes

Total Posts

103 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
DrAlexGor
Level 2

10-04-2012

You and several of us have seen this; read the discussion here -> http://forums.adobe.com/message/4043881#4043881

* a related issue to switching mics too many times that caused that error is also here -> http://forums.adobe.com/message/4122004#4122004

For my problem, I ended up switching from

Offending code:   Microphone.getMicrophone( micIndex ); // mixIndex is most likely irrelevant here

Workaround:        MicrophoneManager.getInstance().selectedMic;

In your case you'd probably need to change when you stop the publishing in your code maybe....

Avatar

Avatar
Validate 1
Level 2
adam_k
Level 2

Likes

7 likes

Total Posts

84 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
adam_k
Level 2

Likes

7 likes

Total Posts

84 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
adam_k
Level 2

10-04-2012

ah yes. thank you kindly.