InvocationTargetException al inflar un xml - android

Tengo un código que funciona el 99% del tiempo desde que se implementa en muchos clientes, pero a veces obtengo lo siguiente:

java.lang.reflect.InvocationTargetException android.widget.LinearLayout. (LinearLayout.java:92) java.lang.reflect.Constructor.constructNative (Native Method) java.lang.reflect.Constructor.newInstance (Constructor.java:446) android .view.LayoutInflater.createView (LayoutInflater.java:499) com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView (PhoneLayoutInflater.java:56) android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:56.view: 56 .LayoutInflater.rInflate (LayoutInflater.java:617) android.view.LayoutInflater.inflate (LayoutInflater.java:407) android.view.LayoutInflater.inflate (LayoutInflater.java:320) com.mycode.mycode.MyClass.draw (xxxxxxx ) .....

y en mi código tengo:

LayoutInflater li = (LayoutInflater) this .getSystemService (Context.LAYOUT_INFLATER_SERVICE);
theview = li.inflate (R.layout.partofthescreen, somecontainer, false);

entonces la pregunta es por qué recibo InvocationTargetException.

Gracias

Respuestas a la pregunta(2)

Su respuesta a la pregunta