[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-29 Thread Dianne Hackborn
Yes you definitely can not inflate views from the thread they won't run in.
 The reason is that views may create a handler, and when the handler is
created it is bound to the thread that is creating it.  So if you try to
attach that view hierarchy to a window being run in another thread, all hell
breaks loose as work is dispatched on two different threads.

On Thu, Oct 29, 2009 at 12:46 AM, Jayesh  wrote:

>
>
>
> On Oct 21, 10:24 pm, Streets Of Boston 
> wrote:
> > That's why i put 'official' in quotes :-)
> >
> > One should not manipulate windows/views in any other thread than the
> > main UI-thread (e.g. textView.setText(...) or imageView.setImageBitmap
> > (...), hiding/showing views, etc.). If you do this in a background
> > thread, then you may get exceptions or other weird behavior.
> >
> > If 'inflating a view' falls under the 'manipulating windows/views'
> > category then one should not inflate views inside any other thread by
> > the main UI-thread.
> >
>
> You are right. I finally got a report yesterday from one of the users
> that a modified apk that does view inflating in GUI thread, doesn't
> give this problem. I have released the fix accordingly and got one
> more user confirming that it's working for him now.
>
> So thanks for the advice. Inflating view in a thread other than GUI
> thread, indeed seems to be unsupported, even if it doesn't throw any
> explicit exception deterministically.
>
> > I'm just saying: try to do the inflate in the main UI-thread and check
> > if this solves the problem for HTC Heros. If so, your particular
> > problem is fixed.
> >
> > On Oct 21, 11:34 am, Jayesh Salvi  wrote:
> >
> > > --
> > > Jayesh...
> >
> > > read more »
> >
> > > On Wed, Oct 21, 2009 at 7:39 PM, Streets Of Boston
> > > wrote:
> >
> > > > I still would try to inflate your view inside your main gui-thread
> and
> > > > not in a seperate background thread.
> >
> > > > The fact that it works on other phones does not guarantee it works on
> > > > all phones, if inflating views on non-gui threads is 'officially' not
> > > > supported.
> >
> > > Could you elaborate on how it is 'officially' not supported?
> >
> > > I know that a particular exception is thrown if the framework finds
> that a
> > > different thread is trying to manipulate widgets in view hierarchy.(I
> hit it
> > > yesterday elsewhere in the code, and it is not the same as this error).
> I
> > > haven't found any documentation in this matter, that mentions what is
> > > supported/forbidden practice in this matter. Did I miss something?
> >
> > > > Who knows, it may fix it (if you already haven't tried it). :-)
> > > > But i may be wrong...
> >
> > > > On Oct 20, 11:57 pm, Jayesh Salvi  wrote:
> > > > > Thanks Shane and Amir for confirming the doubts.
> > > > > It's frustrating that all I can say to users is to wait until
> Sprint/HTC
> > > > > issues firmware update, then hopefully the problem will be fixed.
> The
> > > > users
> > > > > are willing to test if I have any fix, but I can't find root cause
> even
> > > > > after looking inside the android code, let alone a fix/workaround.
> >
> > > > > Does anyone know if Sprint or HTC have any channels to report
> complaints?
> > > > > Are there any means to know when they will issue next firmware
> update?
> >
> > > > > IIUC Sprint HTC Hero is "with Google" branded phone. I would have
> assumed
> > > > it
> > > > > would be the one with most conformance to Android platform; one
> that has
> > > > > passed all test suites required to qualify for the "with Google"
> logo.
> > > > Yet
> > > > > we see these anomalies. :(
> >
> > > > > --
> > > > > Jayesh
> >
> > > > > On Mon, Oct 19, 2009 at 1:15 PM, Amir Alagic 
> wrote:
> >
> > > > > > I saw somwhere else that one developer also has problems only
> with HTC
> > > > > > Hero (Sprint) ...
> >
> > > > > > On Oct 18, 9:48 am, Shane  wrote:
> > > > > > > We are having problems only with HTC Hero phones as well.  Our
> issue
> > > > > > > is different that yours but it is very disappointing to see not
> all
> > > > > > > phones handle the SDK the same.
> >
> > > >
> http://groups.google.com/group/android-developers/browse_thread/threa...
> >
> > > > > > > I suspect this is just going to get worse as more branded
> android
> > > > > > > experiences get released by manufacturers.  G
> >
> > > > > > > On Oct 12, 9:46 pm, Jayesh Salvi 
> wrote:
> >
> > > > > > > > I tried to look into the android framework code
> > > > > > > > (link<
> > > > > >
> http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#uX1GffpyOZk/.
> > > > ..
> > > > > > > > android.view.InflateException Error inflating class
> > > > > > > > java.lang.reflect.Constructor&l=458>). The topmost frame
> refers to
> > > > a
> > > > > > 'throw'
> > > > > > > > statement(line 512) that is inside a catch of a lower level
> > > > exception.
> > > > > > I
> > > > > > > > can't tell what part of the createView() function throws that
> lower
> > > > > > level
> > > > > > > > excep

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-29 Thread Jayesh



On Oct 21, 10:24 pm, Streets Of Boston 
wrote:
> That's why i put 'official' in quotes :-)
>
> One should not manipulate windows/views in any other thread than the
> main UI-thread (e.g. textView.setText(...) or imageView.setImageBitmap
> (...), hiding/showing views, etc.). If you do this in a background
> thread, then you may get exceptions or other weird behavior.
>
> If 'inflating a view' falls under the 'manipulating windows/views'
> category then one should not inflate views inside any other thread by
> the main UI-thread.
>

You are right. I finally got a report yesterday from one of the users
that a modified apk that does view inflating in GUI thread, doesn't
give this problem. I have released the fix accordingly and got one
more user confirming that it's working for him now.

So thanks for the advice. Inflating view in a thread other than GUI
thread, indeed seems to be unsupported, even if it doesn't throw any
explicit exception deterministically.

> I'm just saying: try to do the inflate in the main UI-thread and check
> if this solves the problem for HTC Heros. If so, your particular
> problem is fixed.
>
> On Oct 21, 11:34 am, Jayesh Salvi  wrote:
>
> > --
> > Jayesh...
>
> > read more »
>
> > On Wed, Oct 21, 2009 at 7:39 PM, Streets Of Boston
> > wrote:
>
> > > I still would try to inflate your view inside your main gui-thread and
> > > not in a seperate background thread.
>
> > > The fact that it works on other phones does not guarantee it works on
> > > all phones, if inflating views on non-gui threads is 'officially' not
> > > supported.
>
> > Could you elaborate on how it is 'officially' not supported?
>
> > I know that a particular exception is thrown if the framework finds that a
> > different thread is trying to manipulate widgets in view hierarchy.(I hit it
> > yesterday elsewhere in the code, and it is not the same as this error). I
> > haven't found any documentation in this matter, that mentions what is
> > supported/forbidden practice in this matter. Did I miss something?
>
> > > Who knows, it may fix it (if you already haven't tried it). :-)
> > > But i may be wrong...
>
> > > On Oct 20, 11:57 pm, Jayesh Salvi  wrote:
> > > > Thanks Shane and Amir for confirming the doubts.
> > > > It's frustrating that all I can say to users is to wait until Sprint/HTC
> > > > issues firmware update, then hopefully the problem will be fixed. The
> > > users
> > > > are willing to test if I have any fix, but I can't find root cause even
> > > > after looking inside the android code, let alone a fix/workaround.
>
> > > > Does anyone know if Sprint or HTC have any channels to report 
> > > > complaints?
> > > > Are there any means to know when they will issue next firmware update?
>
> > > > IIUC Sprint HTC Hero is "with Google" branded phone. I would have 
> > > > assumed
> > > it
> > > > would be the one with most conformance to Android platform; one that has
> > > > passed all test suites required to qualify for the "with Google" logo.
> > > Yet
> > > > we see these anomalies. :(
>
> > > > --
> > > > Jayesh
>
> > > > On Mon, Oct 19, 2009 at 1:15 PM, Amir Alagic  wrote:
>
> > > > > I saw somwhere else that one developer also has problems only with HTC
> > > > > Hero (Sprint) ...
>
> > > > > On Oct 18, 9:48 am, Shane  wrote:
> > > > > > We are having problems only with HTC Hero phones as well.  Our issue
> > > > > > is different that yours but it is very disappointing to see not all
> > > > > > phones handle the SDK the same.
>
> > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > > > > I suspect this is just going to get worse as more branded android
> > > > > > experiences get released by manufacturers.  G
>
> > > > > > On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
>
> > > > > > > I tried to look into the android framework code
> > > > > > > (link<
> > > > >http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#uX1GffpyOZk/.
> > > ..
> > > > > > > android.view.InflateException Error inflating class
> > > > > > > java.lang.reflect.Constructor&l=458>). The topmost frame refers to
> > > a
> > > > > 'throw'
> > > > > > > statement(line 512) that is inside a catch of a lower level
> > > exception.
> > > > > I
> > > > > > > can't tell what part of the createView() function throws that 
> > > > > > > lower
> > > > > level
> > > > > > > exception.
> > > > > > > I also tried to search around for the error string "Error 
> > > > > > > inflating
> > > > > class
> > > > > > > java.lang.reflect.Constructor", but couldn't found one with a
> > > similar
> > > > > stack
> > > > > > > trace. (There are known crashes with this error message caused
> > > inside
> > > > > > > android.preference.* package, but mine is a simple widget layout
> > > and
> > > > > not
> > > > > > > preferences, as you might have seen in the XML file I attached
> > > > > earlier.)
>
> > > > > > > I now have 9 reports of this crash and all of them are confirmed 
> > > > > > > to
> > > be
> > > > > usin

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-21 Thread Streets Of Boston

That's why i put 'official' in quotes :-)

One should not manipulate windows/views in any other thread than the
main UI-thread (e.g. textView.setText(...) or imageView.setImageBitmap
(...), hiding/showing views, etc.). If you do this in a background
thread, then you may get exceptions or other weird behavior.

If 'inflating a view' falls under the 'manipulating windows/views'
category then one should not inflate views inside any other thread by
the main UI-thread.

I'm just saying: try to do the inflate in the main UI-thread and check
if this solves the problem for HTC Heros. If so, your particular
problem is fixed.


On Oct 21, 11:34 am, Jayesh Salvi  wrote:
> --
> Jayesh...
>
> read more »
>
> On Wed, Oct 21, 2009 at 7:39 PM, Streets Of Boston
> wrote:
>
>
>
> > I still would try to inflate your view inside your main gui-thread and
> > not in a seperate background thread.
>
> > The fact that it works on other phones does not guarantee it works on
> > all phones, if inflating views on non-gui threads is 'officially' not
> > supported.
>
> Could you elaborate on how it is 'officially' not supported?
>
> I know that a particular exception is thrown if the framework finds that a
> different thread is trying to manipulate widgets in view hierarchy.(I hit it
> yesterday elsewhere in the code, and it is not the same as this error). I
> haven't found any documentation in this matter, that mentions what is
> supported/forbidden practice in this matter. Did I miss something?
>
>
>
>
>
> > Who knows, it may fix it (if you already haven't tried it). :-)
> > But i may be wrong...
>
> > On Oct 20, 11:57 pm, Jayesh Salvi  wrote:
> > > Thanks Shane and Amir for confirming the doubts.
> > > It's frustrating that all I can say to users is to wait until Sprint/HTC
> > > issues firmware update, then hopefully the problem will be fixed. The
> > users
> > > are willing to test if I have any fix, but I can't find root cause even
> > > after looking inside the android code, let alone a fix/workaround.
>
> > > Does anyone know if Sprint or HTC have any channels to report complaints?
> > > Are there any means to know when they will issue next firmware update?
>
> > > IIUC Sprint HTC Hero is "with Google" branded phone. I would have assumed
> > it
> > > would be the one with most conformance to Android platform; one that has
> > > passed all test suites required to qualify for the "with Google" logo.
> > Yet
> > > we see these anomalies. :(
>
> > > --
> > > Jayesh
>
> > > On Mon, Oct 19, 2009 at 1:15 PM, Amir Alagic  wrote:
>
> > > > I saw somwhere else that one developer also has problems only with HTC
> > > > Hero (Sprint) ...
>
> > > > On Oct 18, 9:48 am, Shane  wrote:
> > > > > We are having problems only with HTC Hero phones as well.  Our issue
> > > > > is different that yours but it is very disappointing to see not all
> > > > > phones handle the SDK the same.
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > > > I suspect this is just going to get worse as more branded android
> > > > > experiences get released by manufacturers.  G
>
> > > > > On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
>
> > > > > > I tried to look into the android framework code
> > > > > > (link<
> > > >http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#uX1GffpyOZk/.
> > ..
> > > > > > android.view.InflateException Error inflating class
> > > > > > java.lang.reflect.Constructor&l=458>). The topmost frame refers to
> > a
> > > > 'throw'
> > > > > > statement(line 512) that is inside a catch of a lower level
> > exception.
> > > > I
> > > > > > can't tell what part of the createView() function throws that lower
> > > > level
> > > > > > exception.
> > > > > > I also tried to search around for the error string "Error inflating
> > > > class
> > > > > > java.lang.reflect.Constructor", but couldn't found one with a
> > similar
> > > > stack
> > > > > > trace. (There are known crashes with this error message caused
> > inside
> > > > > > android.preference.* package, but mine is a simple widget layout
> > and
> > > > not
> > > > > > preferences, as you might have seen in the XML file I attached
> > > > earlier.)
>
> > > > > > I now have 9 reports of this crash and all of them are confirmed to
> > be
> > > > using
> > > > > > Sprint HTC Hero devices. This problem hasn't been reported on any
> > other
> > > > > > phone. Is it fair to assume that it's a problem in that particular
> > ROM?
> > > > If
> > > > > > that's so, then what options do I have to resolve this issue -
> > should I
> > > > wait
> > > > > > helplessly for HTC/Sprint's next update?
>
> > > > > > Any suggestions are appreciated.
>
> > > > > > Thanks.
> > > > > > --
> > > > > > Jayesh
>
> > > > > > On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi <
> > jayeshsa...@gmail.com>
> > > > wrote:
>
> > > > > > > --
> > > > > > > Jayesh
>
> > > > > > > On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> > > > > > > flyingdutc...@gmail.com> wrote:
>
> > > >

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-21 Thread Jayesh Salvi
--
Jayesh


On Wed, Oct 21, 2009 at 7:39 PM, Streets Of Boston
wrote:

>
> I still would try to inflate your view inside your main gui-thread and
> not in a seperate background thread.
>
> The fact that it works on other phones does not guarantee it works on
> all phones, if inflating views on non-gui threads is 'officially' not
> supported.
>

Could you elaborate on how it is 'officially' not supported?

I know that a particular exception is thrown if the framework finds that a
different thread is trying to manipulate widgets in view hierarchy.(I hit it
yesterday elsewhere in the code, and it is not the same as this error). I
haven't found any documentation in this matter, that mentions what is
supported/forbidden practice in this matter. Did I miss something?


>
> Who knows, it may fix it (if you already haven't tried it). :-)
> But i may be wrong...
>
> On Oct 20, 11:57 pm, Jayesh Salvi  wrote:
> > Thanks Shane and Amir for confirming the doubts.
> > It's frustrating that all I can say to users is to wait until Sprint/HTC
> > issues firmware update, then hopefully the problem will be fixed. The
> users
> > are willing to test if I have any fix, but I can't find root cause even
> > after looking inside the android code, let alone a fix/workaround.
> >
> > Does anyone know if Sprint or HTC have any channels to report complaints?
> > Are there any means to know when they will issue next firmware update?
> >
> > IIUC Sprint HTC Hero is "with Google" branded phone. I would have assumed
> it
> > would be the one with most conformance to Android platform; one that has
> > passed all test suites required to qualify for the "with Google" logo.
> Yet
> > we see these anomalies. :(
> >
> > --
> > Jayesh
> >
> >
> >
> > On Mon, Oct 19, 2009 at 1:15 PM, Amir Alagic  wrote:
> >
> > > I saw somwhere else that one developer also has problems only with HTC
> > > Hero (Sprint) ...
> >
> > > On Oct 18, 9:48 am, Shane  wrote:
> > > > We are having problems only with HTC Hero phones as well.  Our issue
> > > > is different that yours but it is very disappointing to see not all
> > > > phones handle the SDK the same.
> >
> > > >
> http://groups.google.com/group/android-developers/browse_thread/threa...
> >
> > > > I suspect this is just going to get worse as more branded android
> > > > experiences get released by manufacturers.  G
> >
> > > > On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
> >
> > > > > I tried to look into the android framework code
> > > > > (link<
> > >http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#uX1GffpyOZk/.
> ..
> > > > > android.view.InflateException Error inflating class
> > > > > java.lang.reflect.Constructor&l=458>). The topmost frame refers to
> a
> > > 'throw'
> > > > > statement(line 512) that is inside a catch of a lower level
> exception.
> > > I
> > > > > can't tell what part of the createView() function throws that lower
> > > level
> > > > > exception.
> > > > > I also tried to search around for the error string "Error inflating
> > > class
> > > > > java.lang.reflect.Constructor", but couldn't found one with a
> similar
> > > stack
> > > > > trace. (There are known crashes with this error message caused
> inside
> > > > > android.preference.* package, but mine is a simple widget layout
> and
> > > not
> > > > > preferences, as you might have seen in the XML file I attached
> > > earlier.)
> >
> > > > > I now have 9 reports of this crash and all of them are confirmed to
> be
> > > using
> > > > > Sprint HTC Hero devices. This problem hasn't been reported on any
> other
> > > > > phone. Is it fair to assume that it's a problem in that particular
> ROM?
> > > If
> > > > > that's so, then what options do I have to resolve this issue -
> should I
> > > wait
> > > > > helplessly for HTC/Sprint's next update?
> >
> > > > > Any suggestions are appreciated.
> >
> > > > > Thanks.
> > > > > --
> > > > > Jayesh
> >
> > > > > On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi <
> jayeshsa...@gmail.com>
> > > wrote:
> >
> > > > > > --
> > > > > > Jayesh
> >
> > > > > > On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> > > > > > flyingdutc...@gmail.com> wrote:
> >
> > > > > >> I might be mistaken,
> > > > > >> But this part of the stack-trace worries me a bit:
> >
> > > > > >>android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > > > > >>
>  com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
> > > > > >> 145)
> >
> > >  com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
> > > > > >> 566)
> > > > > >>com.altcanvas.readerscope.ReaderTask.doInBackground
> > > > > >> (ReaderTask.java:1027)
> >
> > > > > >> Are you inflating a view in a background-thread and not in the
> main
> > > > > >> gui-thread?
> > > > > >> But then again, your code works on other Android phones
> >
> > > > > > Yes that's true. The layout is inflated in background thread, but
> is
> > > made
> > > > > > part of the root hierarchy (setContentView) only in the GUI
> thread.
> >
>

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-21 Thread Streets Of Boston

I still would try to inflate your view inside your main gui-thread and
not in a seperate background thread.

The fact that it works on other phones does not guarantee it works on
all phones, if inflating views on non-gui threads is 'officially' not
supported.

Who knows, it may fix it (if you already haven't tried it). :-)
But i may be wrong...

On Oct 20, 11:57 pm, Jayesh Salvi  wrote:
> Thanks Shane and Amir for confirming the doubts.
> It's frustrating that all I can say to users is to wait until Sprint/HTC
> issues firmware update, then hopefully the problem will be fixed. The users
> are willing to test if I have any fix, but I can't find root cause even
> after looking inside the android code, let alone a fix/workaround.
>
> Does anyone know if Sprint or HTC have any channels to report complaints?
> Are there any means to know when they will issue next firmware update?
>
> IIUC Sprint HTC Hero is "with Google" branded phone. I would have assumed it
> would be the one with most conformance to Android platform; one that has
> passed all test suites required to qualify for the "with Google" logo. Yet
> we see these anomalies. :(
>
> --
> Jayesh
>
>
>
> On Mon, Oct 19, 2009 at 1:15 PM, Amir Alagic  wrote:
>
> > I saw somwhere else that one developer also has problems only with HTC
> > Hero (Sprint) ...
>
> > On Oct 18, 9:48 am, Shane  wrote:
> > > We are having problems only with HTC Hero phones as well.  Our issue
> > > is different that yours but it is very disappointing to see not all
> > > phones handle the SDK the same.
>
> > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > I suspect this is just going to get worse as more branded android
> > > experiences get released by manufacturers.  G
>
> > > On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
>
> > > > I tried to look into the android framework code
> > > > (link<
> >http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#uX1GffpyOZk/...
> > > > android.view.InflateException Error inflating class
> > > > java.lang.reflect.Constructor&l=458>). The topmost frame refers to a
> > 'throw'
> > > > statement(line 512) that is inside a catch of a lower level exception.
> > I
> > > > can't tell what part of the createView() function throws that lower
> > level
> > > > exception.
> > > > I also tried to search around for the error string "Error inflating
> > class
> > > > java.lang.reflect.Constructor", but couldn't found one with a similar
> > stack
> > > > trace. (There are known crashes with this error message caused inside
> > > > android.preference.* package, but mine is a simple widget layout and
> > not
> > > > preferences, as you might have seen in the XML file I attached
> > earlier.)
>
> > > > I now have 9 reports of this crash and all of them are confirmed to be
> > using
> > > > Sprint HTC Hero devices. This problem hasn't been reported on any other
> > > > phone. Is it fair to assume that it's a problem in that particular ROM?
> > If
> > > > that's so, then what options do I have to resolve this issue - should I
> > wait
> > > > helplessly for HTC/Sprint's next update?
>
> > > > Any suggestions are appreciated.
>
> > > > Thanks.
> > > > --
> > > > Jayesh
>
> > > > On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi 
> > wrote:
>
> > > > > --
> > > > > Jayesh
>
> > > > > On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> > > > > flyingdutc...@gmail.com> wrote:
>
> > > > >> I might be mistaken,
> > > > >> But this part of the stack-trace worries me a bit:
>
> > > > >>    android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > > > >>    com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
> > > > >> 145)
>
> >  com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
> > > > >> 566)
> > > > >>    com.altcanvas.readerscope.ReaderTask.doInBackground
> > > > >> (ReaderTask.java:1027)
>
> > > > >> Are you inflating a view in a background-thread and not in the main
> > > > >> gui-thread?
> > > > >> But then again, your code works on other Android phones
>
> > > > > Yes that's true. The layout is inflated in background thread, but is
> > made
> > > > > part of the root hierarchy (setContentView) only in the GUI thread.
>
> > > > > This doesn't give any problem on emulator or any other phones.
>
> > > > >> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
> > > > >> > --
> > > > >> > Jayesh
>
> > > > >> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy 
> > > > >> wrote:
>
> > > > >> > > Hi,
>
> > > > >> > > The stack trace you showed is not useful. This is the top of the
> > > > >> > > exception chain, which means this exception was caused by
> > something
> > > > >> > > else. Please show the "application specific stack frames" you
> > removed.
>
> > > > >> > The complete stack trace is:
>
> > > > >> > - Cause -
>
> > > > >> > android.view.InflateException: Binary XML file line #27: Error
> > inflating
> > > > >> > class java.lang.reflect.Constructor
>
> > android.view.LayoutInflater.crea

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-20 Thread Jayesh Salvi
Thanks Shane and Amir for confirming the doubts.
It's frustrating that all I can say to users is to wait until Sprint/HTC
issues firmware update, then hopefully the problem will be fixed. The users
are willing to test if I have any fix, but I can't find root cause even
after looking inside the android code, let alone a fix/workaround.

Does anyone know if Sprint or HTC have any channels to report complaints?
Are there any means to know when they will issue next firmware update?

IIUC Sprint HTC Hero is "with Google" branded phone. I would have assumed it
would be the one with most conformance to Android platform; one that has
passed all test suites required to qualify for the "with Google" logo. Yet
we see these anomalies. :(

--
Jayesh


On Mon, Oct 19, 2009 at 1:15 PM, Amir Alagic  wrote:

>
> I saw somwhere else that one developer also has problems only with HTC
> Hero (Sprint) ...
>
>
>
> On Oct 18, 9:48 am, Shane  wrote:
> > We are having problems only with HTC Hero phones as well.  Our issue
> > is different that yours but it is very disappointing to see not all
> > phones handle the SDK the same.
> >
> > http://groups.google.com/group/android-developers/browse_thread/threa...
> >
> > I suspect this is just going to get worse as more branded android
> > experiences get released by manufacturers.  G
> >
> > On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
> >
> >
> >
> > > I tried to look into the android framework code
> > > (link<
> http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#uX1GffpyOZk/...
> > > android.view.InflateException Error inflating class
> > > java.lang.reflect.Constructor&l=458>). The topmost frame refers to a
> 'throw'
> > > statement(line 512) that is inside a catch of a lower level exception.
> I
> > > can't tell what part of the createView() function throws that lower
> level
> > > exception.
> > > I also tried to search around for the error string "Error inflating
> class
> > > java.lang.reflect.Constructor", but couldn't found one with a similar
> stack
> > > trace. (There are known crashes with this error message caused inside
> > > android.preference.* package, but mine is a simple widget layout and
> not
> > > preferences, as you might have seen in the XML file I attached
> earlier.)
> >
> > > I now have 9 reports of this crash and all of them are confirmed to be
> using
> > > Sprint HTC Hero devices. This problem hasn't been reported on any other
> > > phone. Is it fair to assume that it's a problem in that particular ROM?
> If
> > > that's so, then what options do I have to resolve this issue - should I
> wait
> > > helplessly for HTC/Sprint's next update?
> >
> > > Any suggestions are appreciated.
> >
> > > Thanks.
> > > --
> > > Jayesh
> >
> > > On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi 
> wrote:
> >
> > > > --
> > > > Jayesh
> >
> > > > On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> > > > flyingdutc...@gmail.com> wrote:
> >
> > > >> I might be mistaken,
> > > >> But this part of the stack-trace worries me a bit:
> >
> > > >>android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > > >>com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
> > > >> 145)
> > > >>
>  com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
> > > >> 566)
> > > >>com.altcanvas.readerscope.ReaderTask.doInBackground
> > > >> (ReaderTask.java:1027)
> >
> > > >> Are you inflating a view in a background-thread and not in the main
> > > >> gui-thread?
> > > >> But then again, your code works on other Android phones
> >
> > > > Yes that's true. The layout is inflated in background thread, but is
> made
> > > > part of the root hierarchy (setContentView) only in the GUI thread.
> >
> > > > This doesn't give any problem on emulator or any other phones.
> >
> > > >> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
> > > >> > --
> > > >> > Jayesh
> >
> > > >> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy  >
> > > >> wrote:
> >
> > > >> > > Hi,
> >
> > > >> > > The stack trace you showed is not useful. This is the top of the
> > > >> > > exception chain, which means this exception was caused by
> something
> > > >> > > else. Please show the "application specific stack frames" you
> removed.
> >
> > > >> > The complete stack trace is:
> >
> > > >> > - Cause -
> >
> > > >> > android.view.InflateException: Binary XML file line #27: Error
> inflating
> > > >> > class java.lang.reflect.Constructor
> >
> > > >> >
> android.view.LayoutInflater.createView(LayoutInflater.java:512)
> >
> > > >>
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­­utInflater.java:56)
> >
> > > >>
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > > >> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > > >> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > > >> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > > >> > android.view.LayoutInflater.inf

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-19 Thread Amir Alagic

I saw somwhere else that one developer also has problems only with HTC
Hero (Sprint) ...



On Oct 18, 9:48 am, Shane  wrote:
> We are having problems only with HTC Hero phones as well.  Our issue
> is different that yours but it is very disappointing to see not all
> phones handle the SDK the same.
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> I suspect this is just going to get worse as more branded android
> experiences get released by manufacturers.  G
>
> On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
>
>
>
> > I tried to look into the android framework code
> > (link > android.view.InflateException Error inflating class
> > java.lang.reflect.Constructor&l=458>). The topmost frame refers to a 'throw'
> > statement(line 512) that is inside a catch of a lower level exception. I
> > can't tell what part of the createView() function throws that lower level
> > exception.
> > I also tried to search around for the error string "Error inflating class
> > java.lang.reflect.Constructor", but couldn't found one with a similar stack
> > trace. (There are known crashes with this error message caused inside
> > android.preference.* package, but mine is a simple widget layout and not
> > preferences, as you might have seen in the XML file I attached earlier.)
>
> > I now have 9 reports of this crash and all of them are confirmed to be using
> > Sprint HTC Hero devices. This problem hasn't been reported on any other
> > phone. Is it fair to assume that it's a problem in that particular ROM? If
> > that's so, then what options do I have to resolve this issue - should I wait
> > helplessly for HTC/Sprint's next update?
>
> > Any suggestions are appreciated.
>
> > Thanks.
> > --
> > Jayesh
>
> > On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi  wrote:
>
> > > --
> > > Jayesh
>
> > > On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> > > flyingdutc...@gmail.com> wrote:
>
> > >> I might be mistaken,
> > >> But this part of the stack-trace worries me a bit:
>
> > >>    android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > >>    com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
> > >> 145)
> > >>    com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
> > >> 566)
> > >>    com.altcanvas.readerscope.ReaderTask.doInBackground
> > >> (ReaderTask.java:1027)
>
> > >> Are you inflating a view in a background-thread and not in the main
> > >> gui-thread?
> > >> But then again, your code works on other Android phones
>
> > > Yes that's true. The layout is inflated in background thread, but is made
> > > part of the root hierarchy (setContentView) only in the GUI thread.
>
> > > This doesn't give any problem on emulator or any other phones.
>
> > >> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
> > >> > --
> > >> > Jayesh
>
> > >> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy 
> > >> wrote:
>
> > >> > > Hi,
>
> > >> > > The stack trace you showed is not useful. This is the top of the
> > >> > > exception chain, which means this exception was caused by something
> > >> > > else. Please show the "application specific stack frames" you 
> > >> > > removed.
>
> > >> > The complete stack trace is:
>
> > >> > - Cause -
>
> > >> > android.view.InflateException: Binary XML file line #27: Error 
> > >> > inflating
> > >> > class java.lang.reflect.Constructor
>
> > >> >     android.view.LayoutInflater.createView(LayoutInflater.java:512)
>
> > >> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­­utInflater.java:56)
>
> > >> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > >> >     android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > >> >     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > >> >     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > >> >     android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> > >> >     android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > >> >     android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > >> >     com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
>
> > >> com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)
>
> > >> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
>
> > >> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
> > >> >     com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
> > >> >     java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
> > >> >     java.util.concurrent.FutureTask.run(FutureTask.java:122)
>
> > >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j­­ava:648)
>
> > >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:­­673)
> > >> >     java.lang.Thread.run(Thread.java:1058)
> > >> > ---
>
> > >> > The cod

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-18 Thread Shane

We are having problems only with HTC Hero phones as well.  Our issue
is different that yours but it is very disappointing to see not all
phones handle the SDK the same.

http://groups.google.com/group/android-developers/browse_thread/thread/8fc880b7540a4baf

I suspect this is just going to get worse as more branded android
experiences get released by manufacturers.  G



On Oct 12, 9:46 pm, Jayesh Salvi  wrote:
> I tried to look into the android framework code
> (link android.view.InflateException Error inflating class
> java.lang.reflect.Constructor&l=458>). The topmost frame refers to a 'throw'
> statement(line 512) that is inside a catch of a lower level exception. I
> can't tell what part of the createView() function throws that lower level
> exception.
> I also tried to search around for the error string "Error inflating class
> java.lang.reflect.Constructor", but couldn't found one with a similar stack
> trace. (There are known crashes with this error message caused inside
> android.preference.* package, but mine is a simple widget layout and not
> preferences, as you might have seen in the XML file I attached earlier.)
>
> I now have 9 reports of this crash and all of them are confirmed to be using
> Sprint HTC Hero devices. This problem hasn't been reported on any other
> phone. Is it fair to assume that it's a problem in that particular ROM? If
> that's so, then what options do I have to resolve this issue - should I wait
> helplessly for HTC/Sprint's next update?
>
> Any suggestions are appreciated.
>
> Thanks.
> --
> Jayesh
>
> On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi  wrote:
>
> > --
> > Jayesh
>
> > On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> > flyingdutc...@gmail.com> wrote:
>
> >> I might be mistaken,
> >> But this part of the stack-trace worries me a bit:
>
> >>    android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> >>    com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
> >> 145)
> >>    com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
> >> 566)
> >>    com.altcanvas.readerscope.ReaderTask.doInBackground
> >> (ReaderTask.java:1027)
>
> >> Are you inflating a view in a background-thread and not in the main
> >> gui-thread?
> >> But then again, your code works on other Android phones
>
> > Yes that's true. The layout is inflated in background thread, but is made
> > part of the root hierarchy (setContentView) only in the GUI thread.
>
> > This doesn't give any problem on emulator or any other phones.
>
> >> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
> >> > --
> >> > Jayesh
>
> >> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy 
> >> wrote:
>
> >> > > Hi,
>
> >> > > The stack trace you showed is not useful. This is the top of the
> >> > > exception chain, which means this exception was caused by something
> >> > > else. Please show the "application specific stack frames" you removed.
>
> >> > The complete stack trace is:
>
> >> > - Cause -
>
> >> > android.view.InflateException: Binary XML file line #27: Error inflating
> >> > class java.lang.reflect.Constructor
>
> >> >     android.view.LayoutInflater.createView(LayoutInflater.java:512)
>
> >> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
>
> >> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> >> >     android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> >> >     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> >> >     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> >> >     android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> >> >     android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> >> >     android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> >> >     com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
>
> >> com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)
>
> >> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
>
> >> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
> >> >     com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
> >> >     java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
> >> >     java.util.concurrent.FutureTask.run(FutureTask.java:122)
>
> >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j­ava:648)
>
> >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:­673)
> >> >     java.lang.Thread.run(Thread.java:1058)
> >> > ---
>
> >> > The code around line 145 in ItemDetails.java is:
>
> >> > 144.        widerContainer = new LinearLayout(app);
>
> >> > 145.        widerContainer.addView((LinearLayout) inflater
>
> >> > 146.                    .inflate(R.layout.delcs,null), layoutFW);
>
> >> > 147.        widerContainer.addView((LinearLayout) in

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-12 Thread Jayesh Salvi
I tried to look into the android framework code
(link). The topmost frame refers to a 'throw'
statement(line 512) that is inside a catch of a lower level exception. I
can't tell what part of the createView() function throws that lower level
exception.
I also tried to search around for the error string "Error inflating class
java.lang.reflect.Constructor", but couldn't found one with a similar stack
trace. (There are known crashes with this error message caused inside
android.preference.* package, but mine is a simple widget layout and not
preferences, as you might have seen in the XML file I attached earlier.)

I now have 9 reports of this crash and all of them are confirmed to be using
Sprint HTC Hero devices. This problem hasn't been reported on any other
phone. Is it fair to assume that it's a problem in that particular ROM? If
that's so, then what options do I have to resolve this issue - should I wait
helplessly for HTC/Sprint's next update?

Any suggestions are appreciated.

Thanks.
--
Jayesh


On Mon, Oct 12, 2009 at 8:34 PM, Jayesh Salvi  wrote:

>
> --
> Jayesh
>
>
> On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston <
> flyingdutc...@gmail.com> wrote:
>
>>
>> I might be mistaken,
>> But this part of the stack-trace worries me a bit:
>>
>>android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>>com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
>> 145)
>>com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
>> 566)
>>com.altcanvas.readerscope.ReaderTask.doInBackground
>> (ReaderTask.java:1027)
>>
>> Are you inflating a view in a background-thread and not in the main
>> gui-thread?
>> But then again, your code works on other Android phones
>>
>
> Yes that's true. The layout is inflated in background thread, but is made
> part of the root hierarchy (setContentView) only in the GUI thread.
>
> This doesn't give any problem on emulator or any other phones.
>
>
>>
>> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
>> > --
>> > Jayesh
>> >
>> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy 
>> wrote:
>> >
>> > > Hi,
>> >
>> > > The stack trace you showed is not useful. This is the top of the
>> > > exception chain, which means this exception was caused by something
>> > > else. Please show the "application specific stack frames" you removed.
>> >
>> > The complete stack trace is:
>> >
>> > - Cause -
>> >
>> > android.view.InflateException: Binary XML file line #27: Error inflating
>> > class java.lang.reflect.Constructor
>> >
>> > android.view.LayoutInflater.createView(LayoutInflater.java:512)
>> >
>> >
>> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
>> >
>> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
>> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
>> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>> > android.view.LayoutInflater.inflate(LayoutInflater.java:407)
>> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
>> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>> > com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
>> >
>> com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)
>> >
>> >
>> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
>> >
>> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
>> > com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
>> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
>> > java.util.concurrent.FutureTask.run(FutureTask.java:122)
>> >
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j­ava:648)
>> >
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:­673)
>> > java.lang.Thread.run(Thread.java:1058)
>> > ---
>> >
>> > The code around line 145 in ItemDetails.java is:
>> >
>> > 144.widerContainer = new LinearLayout(app);
>> >
>> > 145.widerContainer.addView((LinearLayout) inflater
>> >
>> > 146..inflate(R.layout.delcs,null), layoutFW);
>> >
>> > 147.widerContainer.addView((LinearLayout) inflater
>> >
>> > 148..inflate(R.layout.digg,null), layoutFW);
>> >
>> >
>> >
>> >
>> >
>> > > On Sun, Oct 11, 2009 at 12:34 PM, Jayesh Salvi > >
>> > > wrote:
>> > > > Hi,
>> > > > In past couple of days, users of my app have sent crash reports
>> > > indicating
>> > > > errors in layout inflation.
>> > > > "android.view.InflateException: Binary XML file line #27: Error
>> inflating
>> > > > class java.lang.reflect.Co

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-12 Thread Jayesh Salvi
--
Jayesh


On Mon, Oct 12, 2009 at 7:49 PM, Streets Of Boston
wrote:

>
> I might be mistaken,
> But this part of the stack-trace worries me a bit:
>
>android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
> 145)
>com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
> 566)
>com.altcanvas.readerscope.ReaderTask.doInBackground
> (ReaderTask.java:1027)
>
> Are you inflating a view in a background-thread and not in the main
> gui-thread?
> But then again, your code works on other Android phones
>

Yes that's true. The layout is inflated in background thread, but is made
part of the root hierarchy (setContentView) only in the GUI thread.

This doesn't give any problem on emulator or any other phones.


>
> On Oct 12, 12:02 am, Jayesh Salvi  wrote:
> > --
> > Jayesh
> >
> > On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy 
> wrote:
> >
> > > Hi,
> >
> > > The stack trace you showed is not useful. This is the top of the
> > > exception chain, which means this exception was caused by something
> > > else. Please show the "application specific stack frames" you removed.
> >
> > The complete stack trace is:
> >
> > - Cause -
> >
> > android.view.InflateException: Binary XML file line #27: Error inflating
> > class java.lang.reflect.Constructor
> >
> > android.view.LayoutInflater.createView(LayoutInflater.java:512)
> >
> >
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
> >
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> > com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
> >
> com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)
> >
> > com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
> >
> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
> > com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
> > java.util.concurrent.FutureTask.run(FutureTask.java:122)
> >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j­ava:648)
> >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:­673)
> > java.lang.Thread.run(Thread.java:1058)
> > ---
> >
> > The code around line 145 in ItemDetails.java is:
> >
> > 144.widerContainer = new LinearLayout(app);
> >
> > 145.widerContainer.addView((LinearLayout) inflater
> >
> > 146..inflate(R.layout.delcs,null), layoutFW);
> >
> > 147.widerContainer.addView((LinearLayout) inflater
> >
> > 148..inflate(R.layout.digg,null), layoutFW);
> >
> >
> >
> >
> >
> > > On Sun, Oct 11, 2009 at 12:34 PM, Jayesh Salvi 
> > > wrote:
> > > > Hi,
> > > > In past couple of days, users of my app have sent crash reports
> > > indicating
> > > > errors in layout inflation.
> > > > "android.view.InflateException: Binary XML file line #27: Error
> inflating
> > > > class java.lang.reflect.Constructor"
> > > > After some investigation I found out that all four of them were using
> the
> > > > new Sprint HTC Hero devices. This error hasn't been reported on any
> other
> > > > device/ROM nor could I repro it in the emulator.
> > > > From searching around, I figured this is the kind of error that one
> gets
> > > if
> > > > layout is too big or too wide. Although my layout is very well within
> the
> > > > limits that Android framework puts, I split it further and asked the
> > > users
> > > > to test. However, even with this fix the users are seeing similar
> crash
> > > > while inflating the layout.
> > > > Has anyone else had same experience with the new Hero devices?
> > > > Any suggestions on how I can proceed to fix/workaround the issue -
> given
> > > > that I don't have access to any such device?
> > > > Following is the detailed stack trace of the crash:
> >
> > > > android.view.InflateException: Binary XML file line #27: Error
> inflating
> > > > class java.lang.reflect.Constructor
> >
> > > > android.view.LayoutInflater.createView(LayoutInflater.java:512)
> >
> > >
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
> >
> > > android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > > > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > > > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-12 Thread Streets Of Boston

I might be mistaken,
But this part of the stack-trace worries me a bit:

android.view.LayoutInflater.inflate(LayoutInflater.java:276)
com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:
145)
com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:
566)
com.altcanvas.readerscope.ReaderTask.doInBackground
(ReaderTask.java:1027)

Are you inflating a view in a background-thread and not in the main
gui-thread?
But then again, your code works on other Android phones


On Oct 12, 12:02 am, Jayesh Salvi  wrote:
> --
> Jayesh
>
> On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy  wrote:
>
> > Hi,
>
> > The stack trace you showed is not useful. This is the top of the
> > exception chain, which means this exception was caused by something
> > else. Please show the "application specific stack frames" you removed.
>
> The complete stack trace is:
>
> - Cause -
>
> android.view.InflateException: Binary XML file line #27: Error inflating
> class java.lang.reflect.Constructor
>
>     android.view.LayoutInflater.createView(LayoutInflater.java:512)
>
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
>     android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
>     android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
>     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>     android.view.LayoutInflater.inflate(LayoutInflater.java:407)
>     android.view.LayoutInflater.inflate(LayoutInflater.java:320)
>     android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>     com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
>     com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)
>
> com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
>     com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
>     com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
>     java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
>     java.util.concurrent.FutureTask.run(FutureTask.java:122)
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j­ava:648)
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:­673)
>     java.lang.Thread.run(Thread.java:1058)
> ---
>
> The code around line 145 in ItemDetails.java is:
>
> 144.        widerContainer = new LinearLayout(app);
>
> 145.        widerContainer.addView((LinearLayout) inflater
>
> 146.                    .inflate(R.layout.delcs,null), layoutFW);
>
> 147.        widerContainer.addView((LinearLayout) inflater
>
> 148.                    .inflate(R.layout.digg,null), layoutFW);
>
>
>
>
>
> > On Sun, Oct 11, 2009 at 12:34 PM, Jayesh Salvi 
> > wrote:
> > > Hi,
> > > In past couple of days, users of my app have sent crash reports
> > indicating
> > > errors in layout inflation.
> > > "android.view.InflateException: Binary XML file line #27: Error inflating
> > > class java.lang.reflect.Constructor"
> > > After some investigation I found out that all four of them were using the
> > > new Sprint HTC Hero devices. This error hasn't been reported on any other
> > > device/ROM nor could I repro it in the emulator.
> > > From searching around, I figured this is the kind of error that one gets
> > if
> > > layout is too big or too wide. Although my layout is very well within the
> > > limits that Android framework puts, I split it further and asked the
> > users
> > > to test. However, even with this fix the users are seeing similar crash
> > > while inflating the layout.
> > > Has anyone else had same experience with the new Hero devices?
> > > Any suggestions on how I can proceed to fix/workaround the issue - given
> > > that I don't have access to any such device?
> > > Following is the detailed stack trace of the crash:
>
> > > android.view.InflateException: Binary XML file line #27: Error inflating
> > > class java.lang.reflect.Constructor
>
> > >     android.view.LayoutInflater.createView(LayoutInflater.java:512)
>
> > com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayo­utInflater.java:56)
>
> > android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > >     android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > >     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > >     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > >     android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> > >     android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > >     android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>
> > > 
>
> > > <-- application specific stack frames -->
>
> > > Thanks,
> > > --
> > > Jayesh
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private quest

[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-11 Thread Jayesh Salvi
--
Jayesh


On Mon, Oct 12, 2009 at 1:11 AM, Romain Guy  wrote:

>
> Hi,
>
> The stack trace you showed is not useful. This is the top of the
> exception chain, which means this exception was caused by something
> else. Please show the "application specific stack frames" you removed.
>

The complete stack trace is:

- Cause -

android.view.InflateException: Binary XML file line #27: Error inflating
class java.lang.reflect.Constructor

android.view.LayoutInflater.createView(LayoutInflater.java:512)

com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
android.view.LayoutInflater.inflate(LayoutInflater.java:407)
android.view.LayoutInflater.inflate(LayoutInflater.java:320)
android.view.LayoutInflater.inflate(LayoutInflater.java:276)
com.altcanvas.readerscope.ItemDetails.(ItemDetails.java:145)
com.altcanvas.readerscope.ItemDetails.getInstance(ItemDetails.java:566)

com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:1027)
com.altcanvas.readerscope.ReaderTask.doInBackground(ReaderTask.java:21)
com.altcanvas.readerscope.UserTask$2.call(UserTask.java:187)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
java.util.concurrent.FutureTask.run(FutureTask.java:122)

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:648)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673)
java.lang.Thread.run(Thread.java:1058)
---

The code around line 145 in ItemDetails.java is:

144.widerContainer = new LinearLayout(app);

145.widerContainer.addView((LinearLayout) inflater

146..inflate(R.layout.delcs,null), layoutFW);

147.widerContainer.addView((LinearLayout) inflater

148..inflate(R.layout.digg,null), layoutFW);


>
> On Sun, Oct 11, 2009 at 12:34 PM, Jayesh Salvi 
> wrote:
> > Hi,
> > In past couple of days, users of my app have sent crash reports
> indicating
> > errors in layout inflation.
> > "android.view.InflateException: Binary XML file line #27: Error inflating
> > class java.lang.reflect.Constructor"
> > After some investigation I found out that all four of them were using the
> > new Sprint HTC Hero devices. This error hasn't been reported on any other
> > device/ROM nor could I repro it in the emulator.
> > From searching around, I figured this is the kind of error that one gets
> if
> > layout is too big or too wide. Although my layout is very well within the
> > limits that Android framework puts, I split it further and asked the
> users
> > to test. However, even with this fix the users are seeing similar crash
> > while inflating the layout.
> > Has anyone else had same experience with the new Hero devices?
> > Any suggestions on how I can proceed to fix/workaround the issue - given
> > that I don't have access to any such device?
> > Following is the detailed stack trace of the crash:
> >
> > android.view.InflateException: Binary XML file line #27: Error inflating
> > class java.lang.reflect.Constructor
> >
> > android.view.LayoutInflater.createView(LayoutInflater.java:512)
> >
> >
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
> >
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> >
> > 
> >
> > <-- application specific stack frames -->
> >
> > Thanks,
> > --
> > Jayesh
> >
> > >
> >
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-11 Thread Jayesh Salvi
--
Jayesh


On Mon, Oct 12, 2009 at 1:10 AM, Mark Murphy wrote:

>
> Jayesh Salvi wrote:
> > Hi,
> >
> > In past couple of days, users of my app have sent crash reports
> > indicating errors in layout inflation.
> >
> > "android.view.InflateException: Binary XML file line #27: Error
> > inflating class java.lang.reflect.Constructor"
> >
> > After some investigation I found out that all four of them were using
> > the new Sprint HTC Hero devices. This error hasn't been reported on any
> > other device/ROM nor could I repro it in the emulator.
> >
> > From searching around, I figured this is the kind of error that one gets
> > if layout is too big or too wide. Although my layout is very well within
> > the limits that Android framework puts, I split it further and asked the
> > users to test. However, even with this fix the users are seeing similar
> > crash while inflating the layout.
> >
> > Has anyone else had same experience with the new Hero devices?
> >
> > Any suggestions on how I can proceed to fix/workaround the issue - given
> > that I don't have access to any such device?
> >
> > Following is the detailed stack trace of the crash:
> >
> > android.view.InflateException: Binary XML file line #27: Error inflating
> > class java.lang.reflect.Constructor
> >
> > android.view.LayoutInflater.createView(LayoutInflater.java:512)
> >
> >
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
> >
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> >
> > 
> >
> > <-- application specific stack frames -->
>
> Ummm...what's at line #27 of the layout?
>
>
If it helps, I am attaching the xml layout file. Line 27 is:
27.  



> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Need Android talent? Ask on HADO! http://wiki.andmob.org/hado
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---


http://schemas.android.com/apk/res/android";
android:id="@+id/delcsview"
android:orientation="vertical"
android:paddingLeft="52dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">


http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">









http://schemas.android.com/apk/res/android";
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">











[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-11 Thread Romain Guy

Hi,

The stack trace you showed is not useful. This is the top of the
exception chain, which means this exception was caused by something
else. Please show the "application specific stack frames" you removed.

On Sun, Oct 11, 2009 at 12:34 PM, Jayesh Salvi  wrote:
> Hi,
> In past couple of days, users of my app have sent crash reports indicating
> errors in layout inflation.
> "android.view.InflateException: Binary XML file line #27: Error inflating
> class java.lang.reflect.Constructor"
> After some investigation I found out that all four of them were using the
> new Sprint HTC Hero devices. This error hasn't been reported on any other
> device/ROM nor could I repro it in the emulator.
> From searching around, I figured this is the kind of error that one gets if
> layout is too big or too wide. Although my layout is very well within the
> limits that Android framework puts, I split it further and asked the users
> to test. However, even with this fix the users are seeing similar crash
> while inflating the layout.
> Has anyone else had same experience with the new Hero devices?
> Any suggestions on how I can proceed to fix/workaround the issue - given
> that I don't have access to any such device?
> Following is the detailed stack trace of the crash:
>
> android.view.InflateException: Binary XML file line #27: Error inflating
> class java.lang.reflect.Constructor
>
>     android.view.LayoutInflater.createView(LayoutInflater.java:512)
>
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
>     android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
>     android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
>     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>     android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
>     android.view.LayoutInflater.inflate(LayoutInflater.java:407)
>     android.view.LayoutInflater.inflate(LayoutInflater.java:320)
>     android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>
> 
>
> <-- application specific stack frames -->
>
> Thanks,
> --
> Jayesh
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: app gives layout errors only on Sprint HTC Hero devices

2009-10-11 Thread Mark Murphy

Jayesh Salvi wrote:
> Hi,
> 
> In past couple of days, users of my app have sent crash reports
> indicating errors in layout inflation.
> 
> "android.view.InflateException: Binary XML file line #27: Error
> inflating class java.lang.reflect.Constructor"
> 
> After some investigation I found out that all four of them were using
> the new Sprint HTC Hero devices. This error hasn't been reported on any
> other device/ROM nor could I repro it in the emulator.
> 
> From searching around, I figured this is the kind of error that one gets
> if layout is too big or too wide. Although my layout is very well within
> the limits that Android framework puts, I split it further and asked the
> users to test. However, even with this fix the users are seeing similar
> crash while inflating the layout.
> 
> Has anyone else had same experience with the new Hero devices?
> 
> Any suggestions on how I can proceed to fix/workaround the issue - given
> that I don't have access to any such device?
> 
> Following is the detailed stack trace of the crash:
> 
> android.view.InflateException: Binary XML file line #27: Error inflating
> class java.lang.reflect.Constructor
> 
> android.view.LayoutInflater.createView(LayoutInflater.java:512)
>
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> 
> 
> 
> <-- application specific stack frames -->

Ummm...what's at line #27 of the layout?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---