Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rjbrown
Visitor

Compilation Failure

When developing I regularly get a "Compilation Failed" message without so much as a file name or line number. If I do any refactoring at all, inevitably I run into this and can spend forever trying to track down what is wrong (by stripping the files down to nothing, and putting them back piece by piece).

Am I missing something here? I'm not used to compilers that don't give any indication of what is wrong. Is there anything I can do to get a meaningful error message? (or should I just not attempt any refactoring, and only change 2 or 3 lines before compiling?)
0 Kudos
8 REPLIES 8
TheEndless
Channel Surfer

Re: Compilation Failure

Telnet to port 8085 on your Roku to access the debug console which should have information on why the compile failed.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
rjbrown
Visitor

Re: Compilation Failure

I'm using the debug console, and my experience is that I only get runtime errors in it. If it is a compile time error (say, I put a semi-colon at the end of a line because I'm used to javascript/java/c), I get nothing.
0 Kudos
TheEndless
Channel Surfer

Re: Compilation Failure

Syntax errors should definitely be reported in the debug console. For example:

*** ERROR compiling /pkg:/source/screensaver.brs:
Syntax Error. (compile error &h02) in ...P/pkg:/source/screensaver.brs(212)

The above indicates that a syntax error occurred on line 212 of screensaver.brs. To cause this particular error, I added a semi-colon to the end of line 212.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
destruk
Streaming Star

Re: Compilation Failure

I have no idea what you mean by 'refactoring'.
0 Kudos
gonzotek
Visitor

Re: Compilation Failure

"destruk" wrote:
I have no idea what you mean by 'refactoring'.

http://en.wikipedia.org/wiki/Code_refactoring
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
destruk
Streaming Star

Re: Compilation Failure

Thanks Gonzotek - so it's better to 'refactor' working code, with other 'working' code. When the OP changes his assumed working code to something that doesn't work, it fails to compile with no error given. So the trouble OP's trying to convey is that no error shows up in the debugger when it fails to compile, or that his code is broken? For the lack of an error message, my guess would be to try a different program to access the debug console, and verify the IP/port of the roku you're connecting to like TheEndless posted.
0 Kudos
rjbrown
Visitor

Re: Compilation Failure

Thanks I'm seeing it now. That helps a lot.

All I meant by "refactoring" is reorganize large amounts of code, such as when you are starting with someone else's code, which might be messy, and need to clean it up before adding a bunch of new features. In that case there might be a fairly long period between when it compiles, and when it compiles again after the re-org.
0 Kudos
tensen
Visitor

Re: Compilation Failure

When you find what the compilation error is you might want to post it here. Just to see if the specific cause is replicated elsewhere and is a debug issue.

I've only run into compiling issues that haven't given me a line number when I've made a mistake on something that is being parsed. Back when I had the bright idea to try using external .brs files. (Won't be doing that again if I can help it.) But I imagine the same issue would come up if it was a config file, and not a .brs itself.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.