You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ownedthx <se...@gmail.com> on 2009/08/07 17:39:51 UTC

Debugging Segmentation Fault whenever Inject PageRenderLinkSource

Hey there,

I am trying to use PageRenderLinkSource by Injecting it into a component,
and then using it in a property getter, like so:

@Inject
private PageRenderLinkSource linkSource;

public String getDetermineURL() {
        org.apache.tapestry5.Link link =
linkSource.createPageRenderLink("Start");
        return link.toString();
}

My tml:
<?xml version="1.0" encoding="UTF-8"?>
<div t:type="any" t:id="lug_browse"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">

    <t:loop empty="emptyMap" source="mapEntries" value="currentMapEntry">
        <ul>
            <li>
                 ${determineUrl} ${mapEntryName} 
            </li>
        </ul>
    </t:loop>

    <t:block t:id="emptyMap">
        blah
    </t:block>
</div>

Whil debugging, I can see the getMapEntries() property be called, and then,
boom:
/Users/seth/Library/Application
Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"

Only debugging info I have at this time is this:

1) If I change my getDetermineURL() method to just 'return ""', then no
error occurs. In other words, the LinkSource is still @Inject'ed into the
component, but it's used nowhere in the component, making me think this is
some sort of IoC related error. 

2) If I trace out RenderQueueImpl which command is running, this is what
leads up to the error:

EXECUTING COMMAND: RenderBody[lug_browse.loop]
EXECUTING COMMAND: BeforeRenderBody[test/Browse:lug_browse.loop]
 EXECUTING COMMAND: Block[Body of test/Browse:lug_browse.loop, at
classpath:com/lugiron/midway/web/components/Browse.tml, line 4]
EXECUTING COMMAND: CompositeRenderCommand[Start[ ul], Start[ li], Start[ a]]
EXECUTING COMMAND: AttributeNS[ href "${determineUrl}"]
/Users/seth/Library/Application
Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"

If anyone has any suggestions as to what I could try in terms of debugging,
I'd appreciate it!

Regards,
Seth
-- 
View this message in context: http://www.nabble.com/Debugging-Segmentation-Fault-whenever-Inject-PageRenderLinkSource-tp24867051p24867051.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Debugging Segmentation Fault whenever Inject PageRenderLinkSource

Posted by ownedthx <se...@gmail.com>.
Or a library that instruments the bytecode, like Javassist, not doing as well
in a debug scenario...  that's why I was curious if that line of code is
using Javassist classes. It's kinda hard for me to tell.
Seth  


Thiago H. de Paula Figueiredo wrote:
> 
> Em Mon, 24 Aug 2009 21:52:42 -0300, ownedthx <se...@gmail.com>
> escreveu:
> 
>> And again, an interesting tidbit: I only get this when I attach a  
>> debugger to my web container (Jetty).  I'm using the Intellij IDEA.
> 
> A segfault that only happens during a debug session looks like a JVM or  
> IDEA bug to me, not a Tapestry one.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Debugging-Segmentation-Fault-whenever-Inject-PageRenderLinkSource-tp3405067p3507273.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Debugging Segmentation Fault whenever Inject PageRenderLinkSource

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 24 Aug 2009 21:52:42 -0300, ownedthx <se...@gmail.com> escreveu:

> And again, an interesting tidbit: I only get this when I attach a  
> debugger to my web container (Jetty).  I'm using the Intellij IDEA.

A segfault that only happens during a debug session looks like a JVM or  
IDEA bug to me, not a Tapestry one.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Debugging Segmentation Fault whenever Inject PageRenderLinkSource

Posted by ownedthx <se...@gmail.com>.
And again, an interesting tidbit: I only get this when I attach a debugger to
my web container (Jetty).  I'm using the Intellij IDEA.  

It's still very vexing... making it obviously much harder to debug.  Just
wish I knew where to even look.  

ownedthx wrote:
> 
> I got hit with a segfault again; started debugging again.  This time,
> though, I know the exact line causing the segfault!
> 
> In PropBinding.java, line 58:
> 
> public Object get()
>     {
>         try
>         {
>             return conduit.get(root);  /** LINE 58 */
>         }
>         catch (Exception ex)
>         {
>             throw new TapestryException(ex.getMessage(), getLocation(),
> ex);
>         }
>     }
> 
> It's at that line that the segfault occurs.  In checking the values of
> everything in the debugger, everything seemed ok.  In other words, the
> conduit represented a string getter on my component.  The only thing odd
> (and it's not that odd, because I've done it before), is that the page and
> the component have the same name: 'browse'.   
> 
> Is there something else in the works here, such as Javaassist, that might
> be the cause for the seg fault?
> 
> Regards,
> Seth
> 
> 
> ownedthx wrote:
>> 
>> Hey there,
>> 
>> I am trying to use PageRenderLinkSource by Injecting it into a component,
>> and then using it in a property getter, like so:
>> 
>> @Inject
>> private PageRenderLinkSource linkSource;
>> 
>> public String getDetermineURL() {
>>         org.apache.tapestry5.Link link =
>> linkSource.createPageRenderLink("Start");
>>         return link.toString();
>> }
>> 
>> My tml:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <div t:type="any" t:id="lug_browse"
>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
>> 
>>     <t:loop empty="emptyMap" source="mapEntries" value="currentMapEntry">
>>         <ul>
>>             <li>
>>                  ${determineUrl} ${mapEntryName} 
>>             </li>
>>         </ul>
>>     </t:loop>
>> 
>>     <t:block t:id="emptyMap">
>>         blah
>>     </t:block>
>> </div>
>> 
>> Whil debugging, I can see the getMapEntries() property be called, and
>> then, boom:
>> /Users/seth/Library/Application
>> Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
>> Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"
>> 
>> Only debugging info I have at this time is this:
>> 
>> 1) If I change my getDetermineURL() method to just 'return ""', then no
>> error occurs. In other words, the LinkSource is still @Inject'ed into the
>> component, but it's used nowhere in the component, making me think this
>> is some sort of IoC related error. 
>> 
>> 2) If I trace out RenderQueueImpl which command is running, this is what
>> leads up to the error:
>> 
>> EXECUTING COMMAND: RenderBody[lug_browse.loop]
>> EXECUTING COMMAND: BeforeRenderBody[test/Browse:lug_browse.loop]
>>  EXECUTING COMMAND: Block[Body of test/Browse:lug_browse.loop, at
>> classpath:com/lugiron/midway/web/components/Browse.tml, line 4]
>> EXECUTING COMMAND: CompositeRenderCommand[Start[ ul], Start[ li], Start[
>> a]]
>> EXECUTING COMMAND: AttributeNS[ href "${determineUrl}"]
>> /Users/seth/Library/Application
>> Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
>> Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"
>> 
>> If anyone has any suggestions as to what I could try in terms of
>> debugging, I'd appreciate it!
>> 
>> Regards,
>> Seth
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Debugging-Segmentation-Fault-whenever-Inject-PageRenderLinkSource-tp24867051p25123900.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Debugging Segmentation Fault whenever Inject PageRenderLinkSource

Posted by ownedthx <se...@gmail.com>.
I got hit with a segfault again; started debugging again.  This time, though,
I know the exact line causing the segfault!

In PropBinding.java, line 58:

public Object get()
    {
        try
        {
            return conduit.get(root);  /** LINE 58 */
        }
        catch (Exception ex)
        {
            throw new TapestryException(ex.getMessage(), getLocation(), ex);
        }
    }

It's at that line that the segfault occurs.  In checking the values of
everything in the debugger, everything seemed ok.  In other words, the
conduit represented a string getter on my component.  The only thing odd
(and it's not that odd, because I've done it before), is that the page and
the component have the same name: 'browse'.   

Is there something else in the works here, such as Javaassist, that might be
the cause for the seg fault?

Regards,
Seth


ownedthx wrote:
> 
> Hey there,
> 
> I am trying to use PageRenderLinkSource by Injecting it into a component,
> and then using it in a property getter, like so:
> 
> @Inject
> private PageRenderLinkSource linkSource;
> 
> public String getDetermineURL() {
>         org.apache.tapestry5.Link link =
> linkSource.createPageRenderLink("Start");
>         return link.toString();
> }
> 
> My tml:
> <?xml version="1.0" encoding="UTF-8"?>
> <div t:type="any" t:id="lug_browse"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
> 
>     <t:loop empty="emptyMap" source="mapEntries" value="currentMapEntry">
>         <ul>
>             <li>
>                  ${determineUrl} ${mapEntryName} 
>             </li>
>         </ul>
>     </t:loop>
> 
>     <t:block t:id="emptyMap">
>         blah
>     </t:block>
> </div>
> 
> Whil debugging, I can see the getMapEntries() property be called, and
> then, boom:
> /Users/seth/Library/Application
> Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
> Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"
> 
> Only debugging info I have at this time is this:
> 
> 1) If I change my getDetermineURL() method to just 'return ""', then no
> error occurs. In other words, the LinkSource is still @Inject'ed into the
> component, but it's used nowhere in the component, making me think this is
> some sort of IoC related error. 
> 
> 2) If I trace out RenderQueueImpl which command is running, this is what
> leads up to the error:
> 
> EXECUTING COMMAND: RenderBody[lug_browse.loop]
> EXECUTING COMMAND: BeforeRenderBody[test/Browse:lug_browse.loop]
>  EXECUTING COMMAND: Block[Body of test/Browse:lug_browse.loop, at
> classpath:com/lugiron/midway/web/components/Browse.tml, line 4]
> EXECUTING COMMAND: CompositeRenderCommand[Start[ ul], Start[ li], Start[
> a]]
> EXECUTING COMMAND: AttributeNS[ href "${determineUrl}"]
> /Users/seth/Library/Application
> Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
> Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"
> 
> If anyone has any suggestions as to what I could try in terms of
> debugging, I'd appreciate it!
> 
> Regards,
> Seth
> 

-- 
View this message in context: http://www.nabble.com/Debugging-Segmentation-Fault-whenever-Inject-PageRenderLinkSource-tp24867051p25123899.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Debugging Segmentation Fault whenever Inject PageRenderLinkSource

Posted by ownedthx <se...@gmail.com>.
Wait!  One more very important piece of info.

It's not just the act of using the service.  I shortened my determineURL
property code; I'm actually making a call to link.addParameter, like so:

public String getDetermineURL() {
        org.apache.tapestry5.Link link =
linkSource.createPageRenderLink("Start");
        link.addParameter("test", "blur");
        return link.toString();
}

If I comment out link.addParameter(), no segfault.  Leave it in, segfault. 


ownedthx wrote:
> 
> 
> Hey there,
> 
> I am trying to use PageRenderLinkSource by Injecting it into a component,
> and then using it in a property getter, like so:
> 
> @Inject
> private PageRenderLinkSource linkSource;
> 
> public String getDetermineURL() {
>         org.apache.tapestry5.Link link =
> linkSource.createPageRenderLink("Start");
>         return link.toString();
> }
> 
> My tml:
> <?xml version="1.0" encoding="UTF-8"?>
> <div t:type="any" t:id="lug_browse"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
> 
>     <t:loop empty="emptyMap" source="mapEntries" value="currentMapEntry">
>         <ul>
>             <li>
>                  ${determineUrl} ${mapEntryName} 
>             </li>
>         </ul>
>     </t:loop>
> 
>     <t:block t:id="emptyMap">
>         blah
>     </t:block>
> </div>
> 
> Whil debugging, I can see the getMapEntries() property be called, and
> then,
> boom:
> /Users/seth/Library/Application
> Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
> Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"
> 
> Only debugging info I have at this time is this:
> 
> 1) If I change my getDetermineURL() method to just 'return ""', then no
> error occurs. In other words, the LinkSource is still @Inject'ed into the
> component, but it's used nowhere in the component, making me think this is
> some sort of IoC related error. 
> 
> 2) If I trace out RenderQueueImpl which command is running, this is what
> leads up to the error:
> 
> EXECUTING COMMAND: RenderBody[lug_browse.loop]
> EXECUTING COMMAND: BeforeRenderBody[test/Browse:lug_browse.loop]
>  EXECUTING COMMAND: Block[Body of test/Browse:lug_browse.loop, at
> classpath:com/lugiron/midway/web/components/Browse.tml, line 4]
> EXECUTING COMMAND: CompositeRenderCommand[Start[ ul], Start[ li], Start[
> a]]
> EXECUTING COMMAND: AttributeNS[ href "${determineUrl}"]
> /Users/seth/Library/Application
> Support/IntelliJIDEA80/JettyIntegration/bin/jetty.sh: line 47:  6709
> Segmentation fault      "${JAVA_HOME}/bin/java" ${JETTY_OPTS} "${@}"
> 
> If anyone has any suggestions as to what I could try in terms of
> debugging,
> I'd appreciate it!
> 
> Regards,
> Seth
> -- 
> View this message in context:
> http://www.nabble.com/Debugging-Segmentation-Fault-whenever-Inject-PageRenderLinkSource-tp24867051p24867051.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Debugging-Segmentation-Fault-whenever-Inject-PageRenderLinkSource-tp3405067p3405129.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org