# Passing Activity Stub to (other) Activity Method Blows Call Stack

**URL:** https://community.temporal.io/t/passing-activity-stub-to-other-activity-method-blows-call-stack/807
**Category:** Community Support
**Created:** [October 21, 2020, 8:41pm UTC](https://community.temporal.io/t/passing-activity-stub-to-other-activity-method-blows-call-stack/807 "2020-10-21T20:41:21Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![alec](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/alec/32/376_2.png) [@alec](https://community.temporal.io/u/alec)
#### Post date: [October 21, 2020, 9:01pm UTC](https://community.temporal.io/t/passing-activity-stub-to-other-activity-method-blows-call-stack/807/3 "2020-10-21T21:01:59Z")

</div>

Yes – the business logic is to get live data from our workflow execution while it is running – ideally we would be able to get a stream of the logs from the process using a query method. As for code, I have a snippet:

```
[within workflow class implementation] 
private val singerActivities: SingerActivityInterface = Workflow
        .newActivityStub(SingerActivityInterface::class.java,
                ActivityOptions.newBuilder() 
.setScheduleToCloseTimeout(Duration.ofDays(1)).build())
private val singerActivityCallback: SingerActivityCallBackInterface =
            Workflow.newActivityStub(SingerActivityCallBackInterface::class
                    .java, ActivityOptions.newBuilder()
                    .setScheduleToCloseTimeout(Duration.ofDays(1))
                    .build())
............. [within Workflow method] ..................
singerResult = singerActivities.tapToTarget(singerConfig,
                    singerActivityCallback, singerResult)

```

Inside of the tapToTarget method, there are calls to a method to process the logs line-by-line and in each line, a method from singerActivityCallback is called. In practice, though, this causes a stack overflow error

---

_[View the full topic](https://community.temporal.io/t/passing-activity-stub-to-other-activity-method-blows-call-stack/807)._
