[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] <AWT Dev> PING: RFR: 8249215: JFrame::setVisible crashed with -Dfile.encoding=U
From:       Yasumasa Suenaga <suenaga () oss ! nttdata ! com>
Date:       2020-08-03 6:24:59
Message-ID: 41916307-de6e-8cf9-fd85-612259ac8d23 () oss ! nttdata ! com
[Download RAW message or body]

Thanks Sergey!

Yasumasa


On 2020/08/03 15:06, Sergey Bylokhov wrote:
> +1
> 
> On 02.08.2020 23:00, Yasumasa Suenaga wrote:
> > Hi Sergey,
> > 
> > Do you have any comments on this webrev?
> > 
> > http://cr.openjdk.java.net/~ysuenaga/JDK-8249215/webrev.03/
> > 
> > If not, I will push it to jdk/client.
> > 
> > 
> > Thanks,
> > 
> > Yasumasa
> > 
> > 
> > On 2020/07/30 13:32, Yasumasa Suenaga wrote:
> > > On 2020/07/30 12:20, Sergey Bylokhov wrote:
> > > > On 29.07.2020 19:37, Yasumasa Suenaga wrote:
> > > > > On 2020/07/30 11:03, Sergey Bylokhov wrote:
> > > > > > On 28.07.2020 18:52, Yasumasa Suenaga wrote:
> > > > > > > Hi Phil, Sergey,
> > > > > > > 
> > > > > > > Sorry, I missed. null is WComponentPeer::pData, not defaultFont.
> > > > > > 
> > > > > > Could you please clarify in what exact place access to the null pData in \
> > > > > > WComponentPeer caused a crash?
> > > > > 
> > > > > src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
> > > > > 
> > > > > 6032         AwtFont *awtFont = (AwtFont *)env->GetLongField(font, \
> > > > > AwtFont::pDataID); 6033         if (awtFont == NULL) {
> > > > > 6034             /*arguments of AwtFont::Create are changed for multifont \
> > > > > component */ 6035             awtFont = AwtFont::Create(env, font);
> > > > > 6036         }
> > > > > 6037         env->SetLongField(font, AwtFont::pDataID, (jlong)awtFont);
> > > > > 6038
> > > > > 6039         c->SetFont(awtFont); // <--
> > > > > 
> > > > > awtFont in above is NULL.
> > > > 
> > > > So the reason is that AwtFont::Create returns NULL, and if you take a look to \
> > > > that method there are a few cases when we could return NULL or return 0. \
> > > > Should not all that "returns" be removed? or all results of its usage wrapped \
> > > > by the "if(awtFont!=null)". Or it is fine as-is?
> > > 
> > > I think it is fine as-is with my proposal (webrev.03).
> > > 
> > > AwtFont::Create() would call GetComponentForName(), then it returns component \
> > > font name from WFontConfiguration::getTextComponentForName. It is the method \
> > > what I fixed in this change! 
> > > 
> > > Thanks,
> > > 
> > > Yasumasa
> 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic