Thread String

by Bobbie » Fri, 06 Mar 2009 14:01:09 GMT


Sponsored Links
 I am trying to pass a string variable to a thread, but as soon as the
app gets to the thread that is requesting the variable, the
application crashes.  Any ideas?  Can you show me some examples of how
to pass a public string to a thread?  Please let me know.  Thanks!
--~--~---------~--~----~------------~-------~--~----~



Thread String

by Bobbie » Fri, 06 Mar 2009 20:56:49 GMT


 It's a really strange situation.  I can pass other strings to a
thread, but this string for some reason won't be passed.  The string
is:

static String sesid = "";

I have other static strings declared as well and they are working
perfectly fine.

Bobbie






--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Thread String

by Stoyan Damov » Fri, 06 Mar 2009 21:03:12 GMT


 What do you mean by "pass a string to a thread" - this doesn't make any sense.
Then, when your app crashes, what does the stack trace look like?





--~--~---------~--~----~------------~-------~--~----~



Thread String

by Bobbie » Fri, 06 Mar 2009 22:55:27 GMT


 Nevermind, I'm an idiot.  The thread was trying to call something that
didn't exist and I didn't see the line of code in there.  Sorry about
that!







--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. About the oneway keyword in AIDL

Hello,
I found in Android source code an interesting but undocumented keyword
for aidl: "oneway" (before void in a function).
As it sounds, the generated code uses the corresponding flag
http://developer.android.com/reference/android/os/IBinder.html#FLAG_ONEWAY
when performing the remote transaction.
To my understanding it can be used to fire remote listeners without
having to wait for each listener to return.
Since it's not documented, I wonder whether it should be considered as
a "private API stuff that can break in a future SDK release" or not.
Anyway, I can't alter the generated code so I'm planning to use it in
the aidl file, I hope this is just a documentation lack :)
--~--~---------~--~----~------------~-------~--~----~

2. VerifyError commons digester

Hey,

I am developping an API for my web application and get a problem when
i try to run my android application.

Log file:
07-17 18:01:07.114: ERROR/dalvikvm(6691): Could not find method
javax.xml.parsers.SAXParserFactory.setSchema, referenced from method
org.apache.commons.digester.Digester.getFactory
07-17 18:01:07.123: WARN/dalvikvm(6691): VFY: unable to resolve
virtual method 3297: Ljavax/xml/parsers/SAXParserFactory;.setSchema
(Ljavax/xml/validation/Schema;)V
07-17 18:01:07.123: WARN/dalvikvm(6691): VFY:  rejecting opcode 0x6e
at 0x0023
07-17 18:01:07.123: WARN/dalvikvm(6691): VFY:  rejected Lorg/apache/
commons/digester/Digester;.getFactory ()Ljavax/xml/parsers/
SAXParserFactory;
07-17 18:01:07.123: WARN/dalvikvm(6691): Verifier rejected class Lorg/
apache/commons/digester/Digester;
07-17 18:01:07.123: DEBUG/AndroidRuntime(6691): Shutting down VM
07-17 18:01:07.133: WARN/dalvikvm(6691): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
07-17 18:01:07.133: ERROR/AndroidRuntime(6691): Uncaught handler:
thread main exiting due to uncaught exception
07-17 18:01:07.143: ERROR/AndroidRuntime(6691): java.lang.VerifyError:
org.apache.commons.digester.Digester
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.ehb.mybuddy.utils.myBuddyUtils.fromXML(myBuddyUtils.java:41)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.ehb.mybuddy.resources.Person.fromXML(Person.java:129)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.ehb.mybuddy.api.xmlservices.MeXMLService.getMe(MeXMLService.java:
18)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.ehb.mybuddy.api.myBuddy.getMe(myBuddy.java:50)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.ehb.mybuddy.Home.onCreate(Home.java:238)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.os.Handler.dispatchMessage(Handler.java:99)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.os.Looper.loop(Looper.java:123)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
java.lang.reflect.Method.invokeNative(Native Method)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
java.lang.reflect.Method.invoke(Method.java:521)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-17 18:01:07.143: ERROR/AndroidRuntime(6691):     at
dalvik.system.NativeStart.main(Native Method)

How can i fix this?

Thank you,

Wouter
--~--~---------~--~----~------------~-------~--~----~

3. Heap Size in Eclipse

4. Problem in making a call from application

5. Timer & TimerTask latency

6. Disabling specific wireless radios in the airplane mode

7. using the getLine1Number() method