Comments (18)
That's interesting. Is it the full stack trace? Seems the bottom may have been truncated.
Presumably this is a bug in the Java serialization implementation (on Android only?).
I don't think it's supposed to be possible to crash the serializer like that.
If some platforms have a buggy serialization engine, that's a strike against using
it for wallets.
Reported by [email protected]
on 2011-07-02 08:52:28
from bitcoinj.
Yes, it is truncated at the bottom. The above output is followed by these lines:
E/AndroidRuntime(24167): at java.io
W/ActivityManager( 103): Force finishing activity de.schildbach.wallet/.WalletActivity
I would very much like to send you the wallet, but unfortunately I still haven't had
the fix in place that put the wallet in a world readable location for testnet. (I have
fixed this now. I promise ;-)
Reported by andreas.schildbach
on 2011-07-02 09:08:40
from bitcoinj.
This issue was closed by revision r124.
Reported by [email protected]
on 2011-07-06 12:12:27
- Status changed:
Fixed
from bitcoinj.
Oops, typo closed wrong bug.
Reported by [email protected]
on 2011-07-06 12:14:15
- Status changed:
Accepted
from bitcoinj.
Ah, got it again. Attaching the wallet this time.
Reported by andreas.schildbach
on 2011-07-07 23:51:44
- _Attachment: [wallet-testnet](https://storage.googleapis.com/google-code-attachments/bitcoinj/issue-36/comment-5/wallet-testnet)_
from bitcoinj.
And here is a bit more of stack trace this time:
W/InputManagerService( 103): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@406515a0
(uid=10050 pid=4407)
D/dalvikvm( 174): GC_EXTERNAL_ALLOC freed 75K, 43% free 3640K/6343K, external 4957K/4964K,
paused 52ms
D/dalvikvm( 174): GC_EXTERNAL_ALLOC freed 91K, 44% free 3610K/6343K, external 5219K/5502K,
paused 50ms
I/System.out( 4407): about to send 22000000 (BTC 0.22) to mjcZDSDtroERr1jnnZdwjWhTjjVbhGW86H
W/System.err( 4407): 262418 [main] INFO com.google.bitcoin.core.Wallet - Creating send
tx to mjcZDSDtroERr1jnnZdwjWhTjjVbhGW86H for 0.22
W/System.err( 4407): 262420 [main] INFO com.google.bitcoin.core.Wallet - with 0.78
coins change
D/dalvikvm( 4407): GC_CONCURRENT freed 1104K, 50% free 3678K/7239K, external 2785K/3201K,
paused 2ms+8ms
W/System.err( 4407): 262791 [main] INFO com.google.bitcoin.core.Wallet - created
c43b589872623fb7c0edbfc026b7e7c9282b65de9cc488f2a62f5982b718fce2
I/System.out( 4407): discovering peers
W/System.err( 4407): 263350 [backgroundThread] WARN com.google.bitcoin.discovery.IrcDiscovery
- IRC nick does not parse as base58: u2f43AKh726St3P
I/System.out( 4407): 59 peers discovered, took 639 ms
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@40616c58
W/System.err( 4407): 263439 [main] INFO com.google.bitcoin.core.Wallet - confirmSend
of c43b589872623fb7c0edbfc026b7e7c9282b65de9cc488f2a62f5982b718fce2
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@4057b0f8
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@406302e0
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@40610540
I/dalvikvm( 4407): threadid=1: stack overflow on call to Ljava/util/IdentityHashMap;.findIndex:ILL
I/dalvikvm( 4407): method requires 32+20+12=64 bytes, fp is 0x4214a310 (16 left)
I/dalvikvm( 4407): expanding stack end (0x4214a300 to 0x4214a000)
I/dalvikvm( 4407): Shrank stack (to 0x4214a300, curFrame is 0x4214a4ac)
D/AndroidRuntime( 4407): Shutting down VM
W/dalvikvm( 4407): threadid=1: thread exiting with uncaught exception (group=0x40015560)
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@4061be78
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@40616c58
E/AndroidRuntime( 4407): FATAL EXCEPTION: main
E/AndroidRuntime( 4407): java.lang.StackOverflowError
E/AndroidRuntime( 4407): at java.util.IdentityHashMap.get(IdentityHashMap.java:371)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.dumpCycle(ObjectOutputStream.java:471)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1739)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:1143)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:413)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1241)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1205)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1575)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1847)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.util.ArrayList.writeObject(ArrayList.java:651)
E/AndroidRuntime( 4407): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4407): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1219)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1575)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1847)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:1143)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:413)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1241)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1575)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1847)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:1143)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:413)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1241)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1575)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1847)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:1143)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:413)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1241)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1205)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1575)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1847)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:1143)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:413)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1241)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1575)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1847)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1689)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1653)
E/AndroidRuntime( 4407): at java.util.HashSet.writeObject(HashSet.java:192)
E/AndroidRuntime( 4407): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4407): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1219)
E/AndroidRuntime( 4407): at java.io.ObjectOutputStream.write
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@4057b0f8
I/System.out( 4407): broadcasting to com.google.bitcoin.core.Peer@406302e0
D/dalvikvm( 4407): GC_CONCURRENT freed 1178K, 51% free 3672K/7367K, external 2817K/3201K,
paused 2ms+6ms
W/ActivityManager( 103): Force finishing activity de.schildbach.wallet/.SendCoinsActivity
Reported by andreas.schildbach
on 2011-07-07 23:52:54
from bitcoinj.
Another one of these StackOverflowErrors:
http://i.imgur.com/vA7lc.jpg
Reported by andreas.schildbach
on 2011-07-15 00:17:07
from bitcoinj.
This issue has got nothing to do with "sending the last coins".
Looks like this is a quite old problem with Java serialization:
http://bugs.sun.com/view_bug.do?bug_id=4152790
http://stackoverflow.com/questions/438875/stackoverflowerror-when-serializing-an-object-in-java
Let me quote the stack overflow page:
Java serialization keeps a record of every object written to a stream. If the same
object is encountered a second time, only a reference to it is written to the stream,
and not a second copy of the object; so circular references aren't the problem here.
But serialization is vulnerable to stack overflow for certain kinds of structures;
for example, a long linked list with no special writeObject() methods will be serialized
by recursively writing each link. If you've got a 100,000 links, you're going to try
to use 100,000 stack frames, and quite likely fail with a StackOverflowError.
It's possible to define a writeObject() method for such a list class that, when
the first link is serialized, simply walks the list and serializes each link iteratively;
this will prevent the default recursive mechanism from being used.
Reported by andreas.schildbach
on 2011-07-16 17:17:56
from bitcoinj.
Have you got a more recent example wallet? It seems the one that's attached no longer
deserializes.
Reported by [email protected]
on 2011-07-18 21:07:39
from bitcoinj.
If you can reproduce the issue, you could try just winding up the stack size for now.
It's obviously only a temporary fix but might let you deserialize wallets that got
too complicated for the stack size allowed. See the Thread constructor that lets you
control the size.
I played about with stuffing wallets full of transactions on the desktop JRE but couldn't
reproduce the problem.
Reported by [email protected]
on 2011-07-18 22:14:43
from bitcoinj.
I've upped stack to 64 kb (from 8 kb? - don't know) and this seeems to do the trick
with my problem-ridden testnet wallet.
Reported by andreas.schildbach
on 2011-07-18 23:24:28
from bitcoinj.
I just hit the stack size boundary again with my test wallet with these two addresses:
http://blockexplorer.com/testnet/address/mwhsLCBMmTXgzjMXhteKk63siFRsCboVEm
http://blockexplorer.com/testnet/address/mx6WWrWgYHhHevB3KJqduRU8qpaopdWBJF
About 50 sends and 50 receives is quite a lot for the average user, but some power
users might hit the limit soon.
I'll extend to 96 kb stack...
Reported by andreas.schildbach
on 2011-09-05 20:31:09
from bitcoinj.
Is increasing the stack size a viable medium-term workaround, or should the priority
on this be increased?
Reported by [email protected]
on 2011-10-14 20:35:35
- Status changed:
New
- Blocked on: #
from bitcoinj.
I have pretty much no idea of how high stack size can be set on Android without side
effects.
I'd rather increase priority; not having a stable and extendable wallet format is a
blocker for several other enhancements as well:
- storing creation timestamps with keys/addresses (for more effective retreival of
block chain)
- export/import/backup of wallet
Reported by andreas.schildbach
on 2011-10-14 20:51:23
from bitcoinj.
Issue #370 is already high priority. I was just wondering if there's something quick
we can do to improve the current serialization or if we should focus on #4.
Reported by [email protected]
on 2011-10-14 21:39:48
from bitcoinj.
Oh, it can be set to a megabyte and that should last a long time. Long chains of transactions
should be rare in normal usage.
Serialization sucks, I know. We'll get to it eventually.
Reported by [email protected]
on 2011-10-15 16:22:17
from bitcoinj.
One user just hit this error at 108 incoming and 108 outgoing transactions with 96 kb
of stack.
Reported by andreas.schildbach
on 2011-11-10 14:10:17
from bitcoinj.
Miron has implemented protobuf serialization for the wallet, which should resolve this
once users are upgraded.
Reported by [email protected]
on 2012-01-11 18:54:36
- Status changed:
Fixed
from bitcoinj.
Related Issues (20)
- NPE when trying to create a wallet with wallet-tool HOT 2
- Something in PBKDF2SHA512.java confuse me HOT 3
- Builds with recent versions of Gradle use wrong variant of Guava (`-jre` not `-android`) HOT 4
- Switch to `-jre` version of Guava? HOT 1
- BIP-39 iteration count HOT 3
- Bootstrappable build with modern Gradle HOT 4
- Remove `WalletAppKit` Guava dependency from `o.b.core` HOT 4
- Hello,Bitcoin address transfer problem starting with 3 HOT 3
- Update WalletTemplate to run on the Java Module path HOT 3
- WalletTemplate built with `:installDist` target fails with "JavaFX runtime components are missing" error HOT 1
- How to generate a P2TR type address HOT 2
- Bitcoin Taproot address issue HOT 1
- KeyChainGroup.Builder: fromKey() and fromSeed() (still) create a `fallBackChain` when creating `P2WPKH` HOT 1
- When will Bitcoinj support spending p2tr input? HOT 2
- InsufficientMoneyException Error
- The result of base58.decode is inconsistent with the JS version HOT 1
- Reduce usage of Bouncy Castle types in public API, replacing with `java.security` types where necessary. HOT 6
- Stop using shields.io for the Matrix room links on our README files HOT 2
- Can wallettemplate run like an wallet?
- Gradle 8.0 compability HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitcoinj.