Problem with latest SDK - camera view not working while scanning?


We are using the latest version of the Structure SDK. Over the last few days, we have seen the the camera preview when doing a scan showing a solid green. Scanning is still working but without being able to view the real world properly. Quitting the app or powering the device on & off does usually clear up the issue.

Has anyone else experienced a problem like this?

1 Like

Could you generate a screen recording so we can take a look?


Don’t have a screen recoding but here is an image.

We are going to make a video from a screen recording - how can we share it with you?

@adrian.glover Post a link to Dropbox or Youtube. You can DM myself & Jim if you’d like to keep the link private.

Hey Mark,

Good to hear from you – I saw that you went to Occipital, hope that is going well for you.

Fyi – you probably ment to address this to Adrian Glover ; )


Adrian Ferrier
Development Manager
Trimble Geospatial / XYZ
Simulation – Optimization – Visualization
2500 Northwinds Parkway, Suite 425
Alpharetta, Georgia 30009 USA
770.772.3570 Main
770.545.5702 Cell

1 Like

Any solution to this? We’re experiencing a similar problem when we modify the example app to do a scan, close the view and then do a second scan. The second scan will have a green background that flickers, sometimes showing the normal video feed.


Have you upgraded to 0.6.1?



Thanks, I did now, but it didn’t solve the problem unfortunately.

Do you ever see the green screen using the unmodified Scanner sample?

  • Jim

Hi, what iOS device are you using? Are able to reproduce the issue pretty consistently, or is it just happening sometimes?

No, I never see it using the unmodified Scanner sample (but also haven’t tried modifying it). It is reproducible using @n6xej 's Swift port of the Scanner app and some additional screens which open before and after scanning. It never happens when I just scan, press the reset button and scan again, but it does happen when the app “starts over” so to speak. My hardware is an iPad Air 2, and this is the application flow, where [Scanning] and [MeshViewing] are the screens from the Scanner app:

[Start Screen] -> [Scanning] -> [MeshViewing] -> [Exit Screen] -> back to start

The error that is thrown when the green screen happens is glError 501 (GL_INVALID_VALUE), in method renderSceneForDepthFrame of ViewController+OpenGL.swift

Given when a value parameter is not a legal value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, where other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.

I assume it has something to do with how those other screens open, or how the scanner initializes, something seems to perhaps either not get cleaned up properly or initialized twice. Is green perhaps the default color for a shader error, like the bright pink in Unity? As I’m new to Swift, and just started working with the Scanner SDK, and debugging with STWirelessLog is painful to say the least, I’m still in the process of figuring out what is happening.

@adrian.glover did you ever figure out what caused your green screen?

I found my problem: I forgot to call MeshViewController.dismissView() - now that I do, there are no more green artefacts.

1 Like

@saskia where did you place MeshViewController.dismissView()? I am running into the same issue with the green screen. I have tried placing the dismissView() line in a variety of places, but it either dismisses before the email of the scan is sent or it doesn’t fix the green screen error. I have also tried unwind segues and that did not fix the green screen error either. I am also using @n6xej 's Swift port of the Scanner app, so I figured you would be a good person to ask.

For more context, I have a series of views before the scanner view. I am using push segues to go through the views before the scanner and then am using a modal segue to get to the scanner view controller and then another modal segue to get to the mesh view controller. After the email is sent I segue to a confirmation page, which then segues back to the home page. I have tried dismissing the scanning view controllers after sending the email, on the confirmation page, and also on the home page and none of them seemed to work. Thanks in advance!