Menu | VisualVoice / Troubleshooting | |
About Artistic Vision People Teams Contact us Publications Media Images/Movies Opportunities Related Links |
TroubleshootingMAX MAX is a difficult programming language to debug. That said, there are a few places to check which, in many cases, can quickly resolve the issues. The MAX window, accessed from MAX's "window" menu option, displays errors upon startup of MAX, startup of patchers, and execution. Often, startup errors will point to a missing resource, such as a patcher or class, which MAX cannot find. MAX looks for files in its own folders (on Brahms this is under BrahmsOSX:/Applications/Max5/ ) and also allows the user to specify paths to check. To add a path, select File Preferences from Options in the main menu. Adding a folder causes MAX to check that folder when it is looking for subpatchers, or classes referenced by a patcher. Note that if multiple files with the same name exist in the path, there is no way to know which one MAX will use, so be sure to check the contents of folders before adding them to the path. Another common error, which halts execution and may cause MAX to freeze, is the stack overflow. Stack overflows occur either when objects in MAX are connected in a loop ( an object is generating output which triggers input to the same object, triggering output... ) or when an object is being sent information too quickly (an example might be an object receiving a periodic "bang" message from a metronome object every 5 milliseconds). If MAX does not freeze, the MAX window will display the object type that caused the stack overflow in its left-hand column, and double-clicking on that entry in the MAX window will open the patcher and highlight the object that caused the error. MXJ MXJ refers to Java-coded objects which can be implemented in MAX. These can be debugged using the debugging tool in Eclipse. Unfortunately, it may be the case that a class works well from Eclipse, but not so in MAX, or that certain behaviours (such as inlet behaviours) can only be well assessed from MAX. In this case the best way to debug is by putting print statements in strategic locations in the Java code, which will then appear in the MAX window. In order to do this quickly, MAX should be referred to the Eclipse workspace to search for class files. The file max.java.config.txt, located on Brahms at BrahmsOSX:/Applications/Max5/Cycling '74/java/max.java.config.txt, allows the user to specify paths to jar files or class files with entries like max.dynamic.class.dir /Users/diva/Documents/workspace/max/bin The file contains different types of entries, and descriptions for them. Uncomment one of these, and specify a path, to tell MAX where to look. Note that Java Virtual Machine options, such as increasing memory allocation, can also be specified in this file. For a user's guide to the classes and methods available to code MAX objects in Java, please see the MXJ api, located on Brahms at BrahmsOSX:/Applications/Max5/java-doc/api/index.html Java Pure Java code can be debugged from Eclipse, using the debugging tool. The Java API can be found on the web, detailing the function of all core and optional classes and methods. For java 1.5, the API is located at: http://java.sun.com/j2se/1.5.0/docs/api/ |
|
View Edit Attributes History Attach Print Search Page last modified on August 26, 2008, at 02:49 PM |