Coin Control, Send crash on MacOS X

Coin Control, Send crash on MacOS X
[not found] ` <CA+s+GJA-rXF7spPwLDJv-hGRk-obohdJDHQ9D6bDTdh1UGZVEQ@mail.gmail.com>
  
From: Warren Togami Jr. @ 2013-12-01 11:05 UTC ( / )
  To: Bitcoin Dev



https://github.com/litecoin-project/bitcoinomg/commits/0.8.5-OMG6
http://download1.rpmfusion.org/~warren/bitcoin-0.8.5-OMG6/
I've been backporting patches from master and Litecoin to make a Bitcoin
0.8 client with more features.  It works quite well on Linux and Win32.

http://pastebin.com/g8QqheGc
Today we discovered a rare crash that can happen on MacOS X. toffoo and
coblee reproduced it on MacOS X 10.9 and I reproduced it on 10.6.8. It
seems to be some kind of race condition involving SendCoinsEntry::clear().


   1. 11  QtGui                               0x00e28141
   QWidget::setFocus(Qt::FocusReason) + 289
   2. 12  org.bitcoinfoundation.Bitcoin-Qt    0x002ca665
   SendCoinsEntry::clear() + 101


This build was made with Xcode 3.2.6 on MacOS X with MacPorts qt4-mac
qt-4.8.4, roughly meant to approximate Gavin's build environment for the
0.8.x releases.

With this unfamiliar build environment I have been unsuccessful at building
master so I am unable to confirm if this crash exists there.  I am trying
qt-4.8.5 next ... but even if I manage to build it, it is exceedingly
difficult to reproduce...

Warren
[not found] ` <CA+s+GJA-rXF7spPwLDJv-hGRk-obohdJDHQ9D6bDTdh1UGZVEQ@mail.gmail.com>

  2013-12-04  7:02     ` Wladimir
  
From: Warren Togami Jr. @ 2013-12-04  1:57 UTC (permalink / raw)
  To: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

On Sun, Dec 1, 2013 at 1:19 AM, Wladimir <laanwj@gmail•com> wrote:

> On Sun, Dec 1, 2013 at 12:05 PM, Warren Togami Jr. <wtogami@gmail•com>wrote:
>
>> https://github.com/litecoin-project/bitcoinomg/commits/0.8.5-OMG6
>> http://download1.rpmfusion.org/~warren/bitcoin-0.8.5-OMG6/
>> I've been backporting patches from master and Litecoin to make a Bitcoin
>> 0.8 client with more features.  It works quite well on Linux and Win32.
>>
>> http://pastebin.com/g8QqheGc
>> Today we discovered a rare crash that can happen on MacOS X. toffoo and
>> coblee reproduced it on MacOS X 10.9 and I reproduced it on 10.6.8. It
>> seems to be some kind of race condition involving SendCoinsEntry::clear().
>>
>>
>>    1. 11  QtGui                               0x00e28141
>>    QWidget::setFocus(Qt::FocusReason) + 289
>>    2. 12  org.bitcoinfoundation.Bitcoin-Qt    0x002ca665
>>    SendCoinsEntry::clear() + 101
>>
>>
> I don't think the setFocus should be in clear() in the first place. It
> conflates clearing the widgets and changing the focus.
>
> If the automatic focus change is desirable at all it could be moved to a
> seperate function "focusPayTo".
>
> In any case it's just a nicety and should just be removed if it causes
> problems.
>
> Wladimir
>
>
Did as you suggested, removed both setFocus() calls that happen after Send
is clicked

http://pastebin.com/j4adDpsM
Now it crashes in something else within qt.

I'm trying other things...

Warren

[-- Attachment #2: Type: text/html, Size: 3641 bytes --]

 permalink raw reply	[|nested]
2013-12-04  1:57   ` Warren Togami Jr.

  
From: Wladimir @ 2013-12-04  7:02 UTC (permalink / raw)
  To: Warren Togami Jr.;  Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

>
> Did as you suggested, removed both setFocus() calls that happen after Send
>> is clicked
>>
>
> http://pastebin.com/j4adDpsM
> Now it crashes in something else within qt.
>
> I'm trying other things...
>

As I've said to you on IRC before, I think the problem is with this loop:

https://github.com/bitcoin/bitcoin/blob/master/src/qt/sendcoinsdialog.cpp#L261

This deletes widgets, but Qt may still be referring to them internally, and
"Deleting a QObject while pending events are waiting to be delivered can
cause a crash."

Can you try replacing with ->deleteLater()?

Wladimir

[-- Attachment #2: Type: text/html, Size: 1662 bytes --]

 permalink raw reply	[|nested]