0

I was playing around with Renderscript, and then I Deleted my .rs files from my source. I also deleted the raw folder in my res folder, that had a few .bc files, unfortunately now I keep getting:

[2013-08-18 15:16:43 - Zart3] error: error reading '/Users/me/workspace/Zart3/src/RSAttempt.rs'

I can't find any other traces, I've refreshed the app, etc, no luck. What step am I missing?

StackOverflowed
  • 5,854
  • 9
  • 55
  • 119

2 Answers2

0

I closed Eclipse, and restarted. Still errors. After rebooting, opened Eclipse and no errors. shrugs.

StackOverflowed
  • 5,854
  • 9
  • 55
  • 119
  • 1
    It's called Eclipse because the occasions in which it functions as expected are about as prevalent as the occasions in which the moon blocks out the sun. – Tonithy Aug 20 '13 at 17:53
  • 1
    @Tonithy lol, I'm not sure about that. I've at least seen the moon get blocked out in my lifetime. – StackOverflowed Aug 20 '13 at 18:01
0

At build time, RenderScript compiles your .rs files to bytecode (.bc) in PROJECT/res/raw/, which is rolled into your apk. At runtime, the bytecode is compiled to executable binary by libRSDriverArm.so.

Sometimes Eclipse forgets to delete/update these bytecode files. In your case, it still had a recipe to build PROJECT/res/raw/RSAttempt.bc which depended on RSAttempt.rs. It was throwing that error because it couldn't find the dependency because you deleted it. Rebooting and opening Eclipse probably triggered a project clean, which occasionally (but not always D:) mops up those bytecode files.

In my case Eclipse just stopped compiling new bytecode files. This resulted in segfaults @ 0xdeadbaad, Calling invoke on bad script and other errors that were useless/nobody has ever heard of, because I was trying to call functions from the (properly regenerated) java reflection classes that were not in the older version of the bytecode. Build time: silence.

Now I use a shell script to periodically delete *.bc throughout my workspace.

Kietz
  • 1,186
  • 11
  • 19