# Img.line() crash in Safari

**URL:** <https://discourse.processing.org/t/img-line-crash-in-safari/34251>\
**Category:** p5.js\
**Created:** [December 22, 2021, 8:31pm UTC](https://discourse.processing.org/t/img-line-crash-in-safari/34251 "2021-12-22T20:31:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roberthodgin](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@roberthodgin](https://discourse.processing.org/u/roberthodgin)\
**Post date:** [December 22, 2021, 8:31pm UTC](https://discourse.processing.org/t/img-line-crash-in-safari/34251/1 "2021-12-22T20:31:03Z")

</div>

Hello. I am working on a p5js piece and having good success. Everything works beautifully in Chrome on desktop and mobile. However, in Safari and on iPhone, the project crashes. I have narrowed it down to one line:  
`bg.line( this.x, this.y, this.px, this.py );`

I am making sure my this.x, this.y, this.px and this.py values are good. I am making sure the distance between these two points is non-zero. I am not sure what else to try. I realize this might be a bit too vague, but maybe someone else has experienced this and remembers a solution?

It is proving to be challenging to debug because in the P5JS editor in safari, when I run the project, it goes for a few frames then either freezes the window, or triggers a rapid refresh of the browser a couple times before throwing a error.

Thanks,  
Robert

---

<div class="post-metadata">

**Author:** ![KumuPaul](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kumupaul/32/13072_2.png) [@KumuPaul](https://discourse.processing.org/u/KumuPaul)\
**Post date:** [December 23, 2021, 8:31pm UTC](https://discourse.processing.org/t/img-line-crash-in-safari/34251/2 "2021-12-23T20:31:00Z")

</div>

I don’t think this has anything to do with the line function itself. You’ll need to share a minimal reproducible example for anybody to be of any assistance.
