[jitsi-dev] [PATCH] Bad GUI Behavior and JavaNullPointerException in NewAccountDialog


#1

Hi everyone,
There's a strange behavior with the newAccountDialog window, when an error must be loaded. The window grow bigger and a nullPointerException is thrown ( an not caught ). We've identified the source of the bug and how to correct it. We've also made a patch for it. Should we first create an issue report and attach the patch ? Or is it not important enough to be reported ?
Thanks,
Adrien and Damien
(just in case here is the patch)

patch-newAccountDialog.txt (1.85 KB)


#2

Hey Adrien, Damien,

Thanks for the patch and the explanations in your previous mail!

Unfortunately when applying the patch on my MacOSX version when I get an error message the "Remember password" box got cut off.

There was a workaround there for this issue before the patch, do you think you could prepare a patch that fixes both issues (resize on Linux and this cut off on Mac) ?

Cheers,
Yana

···

On Oct 25, 2012, at 7:07 PM, ghosn adrien <ghosn.adrien@gmail.com> wrote:

Hi everyone,
There's a strange behavior with the newAccountDialog window, when an error must be loaded. The window grow bigger and a nullPointerException is thrown ( an not caught ). We've identified the source of the bug and how to correct it. We've also made a patch for it. Should we first create an issue report and attach the patch ? Or is it not important enough to be reported ?
Thanks,
Adrien and Damien
(just in case here is the patch)
<patch-newAccountDialog.txt>


#3

Hi,
We found the error and we may have a solution for it but before to submit it we wanted to clarify a point :

What's the reason why we use a different thread to make protocol operation (ProtocolSignInThread) ?

We don't really understand the utility.
If we call the run method in ActionPerfomed instead of creating a new thread ( .start()), there's no more problem and the code can be simplified ( all the invokeLater calls become useless).

Thanks in advance for the answers,
Adrien and Damien

···

Le 26 oct. 2012 à 04:58, Yana Stamcheva a écrit :

Hey Adrien, Damien,

Thanks for the patch and the explanations in your previous mail!

Unfortunately when applying the patch on my MacOSX version when I get an error message the "Remember password" box got cut off.

There was a workaround there for this issue before the patch, do you think you could prepare a patch that fixes both issues (resize on Linux and this cut off on Mac) ?

Cheers,
Yana

On Oct 25, 2012, at 7:07 PM, ghosn adrien <ghosn.adrien@gmail.com> wrote:

Hi everyone,
There's a strange behavior with the newAccountDialog window, when an error must be loaded. The window grow bigger and a nullPointerException is thrown ( an not caught ). We've identified the source of the bug and how to correct it. We've also made a patch for it. Should we first create an issue report and attach the patch ? Or is it not important enough to be reported ?
Thanks,
Adrien and Damien
(just in case here is the patch)
<patch-newAccountDialog.txt>

<newAccountDialogCut.png>


#4

Hey Adrien,

Hi,
We found the error and we may have a solution for it but before to submit

it we wanted to clarify a point :

What's the reason why we use a different thread to make protocol

operation (ProtocolSignInThread) ?

The idea is to perform protocol related sign in operation, which is a
network operation, without blocking the UI thread. The user should still be
able to use the user interface during the sign in.

Hope this helps,
Yana

We don't really understand the utility.
If we call the run method in ActionPerfomed instead of creating a new

thread ( .start()), there's no more problem and the code can be simplified
( all the invokeLater calls become useless).

Thanks in advance for the answers,
Adrien and Damien

Hey Adrien, Damien,

Thanks for the patch and the explanations in your previous mail!

Unfortunately when applying the patch on my MacOSX version when I get an

error message the "Remember password" box got cut off.

There was a workaround there for this issue before the patch, do you

think you could prepare a patch that fixes both issues (resize on Linux and
this cut off on Mac) ?

Cheers,
Yana

Hi everyone,
There's a strange behavior with the newAccountDialog window, when an

error must be loaded. The window grow bigger and a nullPointerException is
thrown ( an not caught ). We've identified the source of the bug and how to
correct it. We've also made a patch for it. Should we first create an issue
report and attach the patch ? Or is it not important enough to be reported
?

···

On Oct 26, 2012 9:11 PM, "Adrien Ghosn" <ghosn.adrien@gmail.com> wrote:

Le 26 oct. 2012 à 04:58, Yana Stamcheva a écrit :

On Oct 25, 2012, at 7:07 PM, ghosn adrien <ghosn.adrien@gmail.com> wrote:

Thanks,
Adrien and Damien
(just in case here is the patch)
<patch-newAccountDialog.txt>

<newAccountDialogCut.png>


#5

Hi,
Thanks for the answer ! We think that we have a solution that works (mostly the same thing as before).We kept the original hack in the code and just added a setResizable(false). Also we found out that there was another problem : the error message was displayed only once ( if you change the protocol choice and make a new error this one wasn't displayed).This has been handled by setting the errorPanel to null at the begining of loadWizard.

Thanks,
Damien and Adrien

Le 28. 10. 12 06:06, Yana Stamcheva a �crit :

patch-newAccountDialog.txt (3.6 KB)

···

Hey Adrien,

On Oct 26, 2012 9:11 PM, "Adrien Ghosn" <ghosn.adrien@gmail.com > <mailto:ghosn.adrien@gmail.com>> wrote:
>
> Hi,
> We found the error and we may have a solution for it but before to submit it we wanted to clarify a point :
>
> What's the reason why we use a different thread to make protocol operation (ProtocolSignInThread) ?
>

The idea is to perform protocol related sign in operation, which is a network operation, without blocking the UI thread. The user should still be able to use the user interface during the sign in.

Hope this helps,
Yana

> We don't really understand the utility.
> If we call the run method in ActionPerfomed instead of creating a new thread ( .start()), there's no more problem and the code can be simplified ( all the invokeLater calls become useless).
>
> Thanks in advance for the answers,
> Adrien and Damien
>
> Le 26 oct. 2012 � 04:58, Yana Stamcheva a �crit :
>
>> Hey Adrien, Damien,
>>
>> Thanks for the patch and the explanations in your previous mail!
>>
>> Unfortunately when applying the patch on my MacOSX version when I get an error message the "Remember password" box got cut off.
>>
>> There was a workaround there for this issue before the patch, do you think you could prepare a patch that fixes both issues (resize on Linux and this cut off on Mac) ?
>>
>> Cheers,
>> Yana
>>
>> On Oct 25, 2012, at 7:07 PM, ghosn adrien <ghosn.adrien@gmail.com > <mailto:ghosn.adrien@gmail.com>> wrote:
>>
>>> Hi everyone,
>>> There's a strange behavior with the newAccountDialog window, when an error must be loaded. The window grow bigger and a nullPointerException is thrown ( an not caught ). We've identified the source of the bug and how to correct it. We've also made a patch for it. Should we first create an issue report and attach the patch ? Or is it not important enough to be reported ?
>>> Thanks,
>>> Adrien and Damien
>>> (just in case here is the patch)
>>> <patch-newAccountDialog.txt>
>>
>> <newAccountDialogCut.png>
>


#6

Hi Damien, Adrien,

Thanks! I'll have a look this week and will keep you informed.

Yana

···

On Oct 29, 2012, at 3:25 AM, ghosn adrien <ghosn.adrien@gmail.com> wrote:

Hi,
Thanks for the answer ! We think that we have a solution that works (mostly the same thing as before). We kept the original hack in the code and just added a setResizable(false). Also we found out that there was another problem : the error message was displayed only once ( if you change the protocol choice and make a new error this one wasn't displayed). This has been handled by setting the errorPanel to null at the begining of loadWizard.

Thanks,
Damien and Adrien

Le 28. 10. 12 06:06, Yana Stamcheva a écrit :

Hey Adrien,

On Oct 26, 2012 9:11 PM, "Adrien Ghosn" <ghosn.adrien@gmail.com> wrote:
>
> Hi,
> We found the error and we may have a solution for it but before to submit it we wanted to clarify a point :
>
> What's the reason why we use a different thread to make protocol operation (ProtocolSignInThread) ?
>

The idea is to perform protocol related sign in operation, which is a network operation, without blocking the UI thread. The user should still be able to use the user interface during the sign in.

Hope this helps,
Yana

> We don't really understand the utility.
> If we call the run method in ActionPerfomed instead of creating a new thread ( .start()), there's no more problem and the code can be simplified ( all the invokeLater calls become useless).
>
> Thanks in advance for the answers,
> Adrien and Damien
>
> Le 26 oct. 2012 à 04:58, Yana Stamcheva a écrit :
>
>> Hey Adrien, Damien,
>>
>> Thanks for the patch and the explanations in your previous mail!
>>
>> Unfortunately when applying the patch on my MacOSX version when I get an error message the "Remember password" box got cut off.
>>
>> There was a workaround there for this issue before the patch, do you think you could prepare a patch that fixes both issues (resize on Linux and this cut off on Mac) ?
>>
>> Cheers,
>> Yana
>>
>> On Oct 25, 2012, at 7:07 PM, ghosn adrien <ghosn.adrien@gmail.com> wrote:
>>
>>> Hi everyone,
>>> There's a strange behavior with the newAccountDialog window, when an error must be loaded. The window grow bigger and a nullPointerException is thrown ( an not caught ). We've identified the source of the bug and how to correct it. We've also made a patch for it. Should we first create an issue report and attach the patch ? Or is it not important enough to be reported ?
>>> Thanks,
>>> Adrien and Damien
>>> (just in case here is the patch)
>>> <patch-newAccountDialog.txt>
>>
>> <newAccountDialogCut.png>
>
>

<patch-newAccountDialog.txt>