[Android Software/Hacking General [Developers Only]] dejfson:
Dear all,

could someone point me to right direction?

Have simore.ch dual sim adapter for galaxy S. Have galaxy S running nightly CM7. When I try to switch from one sim card to another, the phone app crashes and the second sim card refuses to connect. Relevant part of the problem is imho here:

I/ActivityManager( 188): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.stk/.StkLauncherActiv

ity bnds=[245,586][355,704] } from pid 305

I/ActivityManager( 188): Starting: Intent { act=android.intent.action.VIEW flg=0x14000000 cmp=com.android.stk/.StkMenuActivity (has extras) } from pid 304

W/InputManagerService( 188): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4060ed68

I/ActivityManager( 188): Displayed com.android.stk/.StkMenuActivity: +352ms (total +575ms)

I/ActivityManager( 188): Starting: Intent { act=android.intent.action.VIEW flg=0x14000000 cmp=com.android.stk/.StkMenuActivity (has extras) } from pid 304

I/ActivityManager( 188): Starting: Intent { act=android.intent.action.VIEW flg=0x14000000 cmp=com.android.stk/.StkMenuActivity (has extras) } from pid 304

W/dalvikvm( 304): threadid=20: thread exiting with uncaught exception (group=0x40015560)

E/AndroidRuntime( 304): FATAL EXCEPTION: Stk App Service

E/AndroidRuntime( 304): java.lang.NullPointerException

E/AndroidRuntime( 304): at com.android.stk.StkAppService.launchIdleText(StkAppService.java:699)

E/AndroidRuntime( 304): at com.android.stk.StkAppService.handleCmd(StkAppService.java:422)

E/AndroidRuntime( 304): at com.android.stk.StkAppService.access$400(StkAppService.java:57)

E/AndroidRuntime( 304): at com.android.stk.StkAppService$ServiceHandler.handleMessage(StkAppService.java:272)

E/AndroidRuntime( 304): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 304): at android.os.Looper.loop(Looper.java:130)

E/AndroidRuntime( 304): at com.android.stk.StkAppService.run(StkAppService.java:212)

E/AndroidRuntime( 304): at java.lang.Thread.run(Thread.java:1019)

W/ActivityManager( 188): Force finishing activity com.android.stk/.StkMenuActivity

I/TelephonyRegistry( 188): notifyServiceState: 1 home null null 22802 GPRS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false

I/TelephonyRegistry( 188): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=null interfaceName=null networkType=1

I/TelephonyRegistry( 188): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=gprsDetached interfaceName=null networkType=1

I/TelephonyRegistry( 188): notifyServiceState: 3 home null null null Unknown CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false

I/TelephonyRegistry( 188): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=radioTurnedOff interfaceName=null networkType=0

D/vending ( 453): [23] 1.run(): Clearing cache in response to android.intent.action.SIM_STATE_CHANGED

I/TelephonyRegistry( 188): notifyServiceState: 1 home null null 22802 GPRS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false

D/dalvikvm( 304): GC_CONCURRENT freed 378K, 48% free 3245K/6215K, external 0K/0K, paused 2ms+11ms

D/vending ( 453): [24] 1.run(): Clearing cache in response to android.intent.action.SIM_STATE_CHANGED

D/dalvikvm( 188): GC_CONCURRENT freed 1231K, 37% free 6494K/10247K, external 1500K/2012K, paused 2ms+6ms

D/dalvikvm( 695): GC_CONCURRENT freed 447K, 52% free 2844K/5831K, external 0K/0K, paused 1ms+2ms

I/Process ( 304): Sending signal. PID: 304 SIG: 9

I/ActivityManager( 188): Process com.android.phone (pid 304) has died.

W/ActivityManager( 188): Scheduling restart of crashed service com.android.stk/.StkAppService in 5000ms

W/ActivityManager( 188): Scheduling restart of crashed service com.android.phone/.BluetoothHeadsetService in 15000ms

W/BluetoothHeadset( 188): Proxy not attached to service

W/BluetoothHeadset( 188): Proxy not attached to service

I/ServiceManager( 108): service 'sip' died

I/ServiceManager( 108): service 'phone' died

I/ServiceManager( 108): service 'isms' died

I/ServiceManager( 108): service 'simphonebook' died

I/ServiceManager( 108): service 'iphonesubinfo' died

I/ActivityManager( 188): Start proc com.android.phone for restart com.android.phone: pid=1330 uid=1001 gids={3002, 3001, 3003, 1015}

W/InputManagerService( 188): Got RemoteException sending setActive(false) notification to pid 304 uid 1001

D/szipinf ( 1330): Initializing inflate state

I/ActivityThread( 1330): Pub telephony: com.android.providers.telephony.TelephonyProvider

I/ActivityThread( 1330): Pub icc: com.android.phone.IccProvider

I/ActivityThread( 1330): Pub mms: com.android.providers.telephony.MmsProvider

I/ActivityThread( 1330): Pub sms: com.android.providers.telephony.SmsProvider

I/ActivityThread( 1330): Pub mms-sms: com.android.providers.telephony.MmsSmsProvider

D/CallManager( 1330): registerPhone(GSM Handler{40549e18})

D/dalvikvm( 1330): GC_CONCURRENT freed 177K, 47% free 2992K/5639K, external 0K/0K, paused 2ms+2ms

W/ActivityManager( 188): Unable to start service Intent { act=com.android.ussd.IExtendedNetworkService }: not found

I/TelephonyRegistry( 188): notifyServiceState: 3 home null null null Unknown CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false

I/TelephonyRegistry( 188): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=radioTurnedOff interfaceName=null networkType=0

I/TelephonyRegistry( 188): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=gprsDetached interfaceName=null networkType=0

D/vending ( 453): [25] 1.run(): Clearing cache in response to android.intent.action.SIM_STATE_CHANGED

D/BT HSHFP( 1330): Starting BluetoothHeadsetService

V/SipBroadcastReceiver( 1330): start auto registration

D/vending ( 453): [26] 1.run(): Clearing cache in response to android.intent.action.SIM_STATE_CHANGED

I/TelephonyRegistry( 188): notifyServiceState: 1 home null null 22802 Unknown CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false

I/TelephonyRegistry( 188): notifyServiceState: 0 home sunrise sunrise 22802 GPRS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false

I/TelephonyRegistry( 188): notifyDataConnection: state=0 isDataConnectivityPossible=false reason=null interfaceName=null networkType=1

I/TelephonyRegistry( 188): notifyServiceState: 1 home null null 22802 GPRS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: true

Apparently StkAppService dies, but when I look at the place where the error occurs, nothing miraculous is there and the code seems to be treated well:

private void launchIdleText() {

TextMessage msg = mCurrentCmd.geTextMessage();

if (msg.text == null) { ~~~~~~~~~~~~~~~~~~~~~~<<<<<<<<< THIS IS where error appearsrever

mNotificationManager.cancel(STK_NOTIFICATION_ID);

} else {

Notification notification = new Notification();

RemoteViews contentView = new RemoteViews(

PACKAGE_NAME,

It seems to me, that the only exception in this case can occur if the msg object (from various reasons) does not exist and hence msg itself is null.

Any ideas what could be wrong/how to make it running?

thans

d.