question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, I am getting the following crash on iOS.

com.badlogic.gdx.utils.GdxRuntimeException: File not found: gdxvfx/shaders/screenspace.vert (Classpath)
 	at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:142)
 	at com.badlogic.gdx.files.FileHandle.length(FileHandle.java:638)
 	at com.badlogic.gdx.files.FileHandle.estimateLength(FileHandle.java:239)
 	at com.badlogic.gdx.files.FileHandle.readString(FileHandle.java:204)
 	at com.badlogic.gdx.files.FileHandle.readString(FileHandle.java:197)
 	at com.crashinvaders.vfx.gl.VfxGLUtils.compileShader(VfxGLUtils.java:103)
 	at com.crashinvaders.vfx.gl.VfxGLUtils.compileShader(VfxGLUtils.java:79)
 	at com.crashinvaders.vfx.effects.LensFlareEffect.<init>(LensFlareEffect.java:61)

The project works fine on desktop and Android.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
metaphorecommented, Dec 30, 2021

Hi, sorry for not coming back to you earlier on this one. The problem was identified a while ago and still didn’t get any resolution.

The issue here is with the specifics of MobiVM. iOS modules basically don’t pick up the library’s built in asset files (including those shader vert/frag ones).

While there’s technically still no easy fix, one workaround would be to extract the library’s assets and add them to iOS module manually. For that you’d need to

  1. Grab the entire gdx-vfx/effects/assets dir and place it to the root of your iOS submodule.
  2. In your robovm.xml file add a resource configuration entry like so
<config>
  ...
  <resources>
    <resource>
      <directory>assets</directory>
      <includes>
        <include>**</include>
      </includes>
      <skipPngCrush>true</skipPngCrush>
    </resource>
    ...
  </resources>

That should do the trick. Please let me know if you have any issues with that.

0reactions
lucas-kakelecommented, Jul 20, 2022

Thanks!

I copied the code for the time being, replacing the references.

Note for future readers: you have to do it to iOS only. For Android, still use the classpath call. I didn’t test for other platforms but I believe it is a good idea keep using classpath.

Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Crash Detection on iPhone or Apple Watch to call for help ...
Crash Detection is designed to detect severe car crashes—such as front-impact, side-impact, and rear-end collisions, and rollovers—involving ...
Read more >
Reasons why iPhone Apps Are Crashing And How To Fix Them
If your iPhone software is outdated, it can trigger app crashes on your iPhone. Therefore, the best remedy is to update your iPhone...
Read more >
9 Fixes for When Your iPhone Apps Keep Crashing
9 Fixes for When Your iPhone Apps Keep Crashing · 1. Check Your Internet Connection · 2. Close and Relaunch the App ·...
Read more >
Getting iOS crash logs for Day One - Your Journal for Life
To help troubleshoot some bugs, the Day One Team may need you to submit crash logs from your iOS device. iOS instructions (for...
Read more >
6 Ways to Fix iPhone 13 and iOS 15 Apps Crashing - Dr.Fone
Part 1: Restart iPhone to fix iPhone crashing · Part 2: Clear memory and storage on your iPhone. · Part 3: Quit and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found