Skip to main content

How to see the debug information when the disc is played in TotalMedia?

3 replies [Last post]
nikkizeng
Offline
Joined: 2009-05-27
Points: 0

Hi,

I have a question about Xlet application debugging. How can I check the debug message sent by the Xlet when the disc is being played in a player, such as TotalMedia? Has anyone tried to debug an Xlet before? Looking forward to your opinions! Thank you very much!

-nikki

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gent2k7
Offline
Joined: 2007-06-25
Points: 0

Hi Nikki !

Firstly, be sure that you have a BD-J debug enabled version of TMT/PowerDVD (see http://wiki.java.net/bin/view/Mobileandembedded/BDJPCPlayers to see how to get them).

A BD-J Enabled version consists mainly in redirecting JVM messages through some tube (it make no difference wether this tube is a file or a "port").

There are basically 2 ways of debbuging:
- you can print some message on some PrintStream (e.g. System.[out|err].print(...)) and get it back, either on a textfile or through some "listener"-application (such as Dbgview at http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx)
- you can use an IDE (Netbeans, Eclipse, ...) that allows you to attach a "debugger".

Get PrintStream messages
--------------------------------------------------------------------------------------------------------------------
It consists in using a java.io.PrintStream in your code and get messages back. This is a basic and simple way to debug applications, but it has its limits.

- if your PrintStream is System.[out|err], you can get these messages through Dbgview.
- you can create your own PrintStream and send your messages to a textfile, to another computer (using network), directly on screen.

- PowerDVD creates javaLog.txt in C:\Documents and Settings\[user_name] that contains such messages. But you won't be able to open it while PDVD is opened. So you can use Dbgview instead, or you can use cmd.exe, but it's rather unpractical.
- TMT allows you to select wether you want to send those messages to System or to a file : C:\Program Files\ArcSoft\TotalMedia Theatre 3\BDJ\jvmoption_CVM.cfg
# -Dlog.newLevel let you choose the level of informations : 0=none, 1=using DVBTestLog, 2=using DVBTestLog & errorLog, 3=all log
-Dlog.newLevel=[0|1|2|3]
# Dlog.outputLevel let you choose the output stream : 0=output to view tools(e.g. DebugView), 1=output to file
-Dlog.outputLevel=[0|1]

* how to use cmd :
Start/Run... : cmd.exe
cd "C:\Documents and Settings\[user_name]"
type javaLog.txt

(Note that the file size cannot riuse above 2Mb, you'll have to delete it from time to time...)

* how to use Dbgview
Just run Dbgview. What's convenient with it is you can use filters (Edit:Filters/Highlight - Ctrl+L) to select what messages you want to get. E.g. if all the messages you send to PrintStream begin with "xxx", then you can either Highlight thoses messages, or display only them.

Use Debugger
--------------------------------------------------------------------------------------------------------------------
Personnaly, I use Netbeans as BD-J IDE. So I'll tell you how it works under it, but this should be the same under any other (Eclipse,...).
A debugger allows you to see, while the application is running, its state. It handles multiple-thread applications.

Basically, the JMV sends informations to IDE through a port. The IDE will get them back and determine what code the xlet is executing.

You can even "pause" you application to see the state of parameters? When you compile it, you can enter "line breakpoints" on instructions. They're used to pause the application when it's at the point of executing that instruction. You can choose to "step into" a function (this will allow you to see how the app reacts, step by step, to every command).

To run it, simply use the "Attach Debugger" (or remote), set port given by the software : TMT : 7800, PDVD : 8000

nikkizeng
Offline
Joined: 2009-05-27
Points: 0

Hi,

Thank you very much for the detailed reply!! It's so clear. Now the first thing I need to do is to get the debug version of TMT.

-nikki

krramanan3
Offline
Joined: 2011-09-14
Points: 0

Hi Nikki,

Did you get the TMT player? If so can you let me know, how can we contact them to get the debugable TMT player?

We wrote a mail but no response from them yet.

Thanks in advance.

Ramanan