deurell / roomscanner

The WWDC22 demo of the Roomplan api is based on UIKit/Storyboards. I find that hard to read so I rewrote it in pure SwiftUI. Maybe it'll help someone out there.
MIT License
57 stars 7 forks source link

View returns black with error code in console #3

Open chaert-s opened 1 year ago

chaert-s commented 1 year ago

I am trying to implement this in my app (thanks btw for even converting this into swiftui code!), but I get really weird errors: first off, I am trying to implement this where the view is accessed from a non root view, but further down a navigation stack. And no matter how I try to implement it, once of the following things happens:

  1. the start session button is grayed out and if I go into the Session view directly the buttons are not there and the view is empty (I find this particularly strange as there I no .disabled property anywhere so how is the button disabling itself? What black magic is this?)
  2. I can hit the start scan button, the camera turns on and all the buttons are there, but the view is empty/black and in the debugging console I get the error:

[32728:3992202] [API] Call to RETransformComponentSetLocalSRT contains NaN. Skipping. [API] Failed to create 0x88 image slot (alpha=1 wide=1) (client=0xfb0f08ba) [0x5 (os/kern) failure]

I am running this on an iPad Pro with a LiDAR Scanner and as long as I run your project AS IS, everything works. But when I try to implement it into my app, it stops working and gives the errors mentioned above...(I navigate to the room scan feature from a home screen using a navigation stack. removing the extra navigation stack from the ContentView of your code changes nothing). If you have any idea on how to fix this, I'd be super grateful!

Cheers!

deurell commented 1 year ago

Thanks for reaching out. It's hard to tell without source code. If you have a GitHub repo for it I could have a look when I have some time available. Have a nice day!

HardikTecocraft commented 1 year ago

Hello When I press on StartScan I didn't see any view after navigating it means the camera features don't start.