José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 1 | # Reporting bugs # |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 2 | |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 3 | Before reporting, please skim through the known issues below. |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 4 | |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 5 | Report any issues on [github](https://github.com/apitrace/apitrace/issues), |
| 6 | always including the following information: |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 7 | |
| 8 | * operating system name and version |
| 9 | |
| 10 | * OpenGL/D3D driver name and version |
| 11 | |
| 12 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 13 | # Known issues # |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 14 | |
| 15 | These are issues that the developers are already aware of, but for which there |
| 16 | is no immediate plan to address them, because either: |
| 17 | |
| 18 | * they stem from architectural limitations that are difficult to overcome |
| 19 | and/or time-consuming; |
| 20 | |
| 21 | * they are corners cases that are thought to be of very little practical use; |
| 22 | |
| 23 | * merely lack of time/opportunity. |
| 24 | |
| 25 | That said, feel free to file an issue and/or send an email to the mailing list |
| 26 | if: |
| 27 | |
José Fonseca | 2cca1ad | 2013-06-14 11:14:06 +0100 | [diff] [blame] | 28 | * you want discuss the rationale, propose your ideas on how to address it, or |
| 29 | volunteer to work on it; |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 30 | |
José Fonseca | 2cca1ad | 2013-06-14 11:14:06 +0100 | [diff] [blame] | 31 | * a known issue is important for you and you would like to see it addressed |
| 32 | sooner rather than later. |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 33 | |
| 34 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 35 | ## Tracing ## |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 36 | |
| 37 | * Fake calls may be emitted in the trace, in order to provide complete |
| 38 | information for retracing. The typical case is OpenGL vertex arrays in user |
| 39 | memory (as opposed to VBOs): where glXxxPointer calls will be deferred, |
| 40 | glInterleavedArrays will be decomposed, etc. |
| 41 | |
| 42 | This should not affect the rendered output, but it may use different paths in |
| 43 | the OpenGL driver, exercising different paths and with different performance |
| 44 | characteristics. |
| 45 | |
| 46 | There is no way to distinguish the fake calls from those actually |
| 47 | made by the application yet. |
| 48 | |
José Fonseca | 4fcb5dd | 2013-06-11 16:11:40 +0100 | [diff] [blame] | 49 | * Huge traces will be generated for applications that make extensive use of |
| 50 | immediate mode drawing (ie., glBegin/glEnd), use vertex/element arrays in |
José Fonseca | 2cca1ad | 2013-06-14 11:14:06 +0100 | [diff] [blame] | 51 | user memory, or generate a lot of dynamic vertex data per frame. This is |
| 52 | because large quantities of (often redundant) data will be recorded over and |
| 53 | over; and although the traces are compressed, the compression algorithms used |
| 54 | aim a good performance/compression balance, hence fail to identify and remove |
| 55 | the redundancy at this scale. |
José Fonseca | 4fcb5dd | 2013-06-11 16:11:40 +0100 | [diff] [blame] | 56 | |
| 57 | However, this should not be a problem for modern OpenGL applications that |
| 58 | make an efficient use of VBOs and vertex shaders. |
| 59 | |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 60 | * On MacOSX, the internal OpenGL calls done by GLU are not traced yet. |
| 61 | |
| 62 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 63 | ## Retracing ## |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 64 | |
José Fonseca | 4fcb5dd | 2013-06-11 16:11:40 +0100 | [diff] [blame] | 65 | * Replaying can take substantially more CPU due to the overhead of reading the |
| 66 | trace file from disk. |
| 67 | |
| 68 | However, the overhead should not be significant for modern 3D applications |
| 69 | that do efficient use of VBOs and vertex shaders. The communication between |
| 70 | CPU to GPU can easily be a bottleneck on the powerful discrete GPUs of |
| 71 | nowadays, and trace overhead tend to be propotional so it is not a |
| 72 | coincidence that applications that are optimized for modern GPUs will also be |
| 73 | traced and replayed efficiently. |
| 74 | |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 75 | * glretrace needs to infer window sizes from glViewport calls, because calls |
| 76 | that create/resize windows happen outside of OpenGL and are not traced. |
| 77 | Therefore window will be missing if the application relies on the default |
| 78 | viewport instead of explicitly invoking glViewport; or it will to too big if |
| 79 | the window is shrunk. Most apps call glViewport before rendering. |
| 80 | |
| 81 | * OS specific OpenGL APIs (WGL, GLX, CGL, etc), are not retraced literally, but |
| 82 | instead partially emulated. This is by design, to allow traces to be |
| 83 | retraced on any OS, as the focus is on the OS-independent parts of OpenGL API. |
| 84 | |
| 85 | * There is no guarantee that the same visual that was used on tracing will be |
| 86 | used for retracing OpenGL. Actually currently, glretrace will always choose |
| 87 | a standard 32bit RGBA, 24bit depth, 8bit alpha, double buffer visual. Unless |
| 88 | overridden on command line. |
| 89 | |
José Fonseca | 2cca1ad | 2013-06-14 11:14:06 +0100 | [diff] [blame] | 90 | * OpenGL context sharing is not fully respected -- all contexts are assumed to |
| 91 | share state. This is by far the most common case though. |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 92 | |
| 93 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 94 | ## GUI ## |
José Fonseca | 2f634d5 | 2011-10-25 09:57:01 +0100 | [diff] [blame] | 95 | |
| 96 | * Not all types of arguments can be edited. |
| 97 | |
| 98 | |
| 99 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 100 | # Proprietary/confidential applications # |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 101 | |
| 102 | Issues should be preferably filed on github to facilitate collaborative |
| 103 | development and for future reference. |
| 104 | |
| 105 | Access to applications source code is not required -- binaries are sufficient. |
| 106 | |
| 107 | If the bug happens with a proprietary application, and you don't want to |
| 108 | publicly release the application and/or any data collected from it, then |
| 109 | alternatively you can provide the necessary application and/or data via e-mail, |
| 110 | to *jose dot r dot fonseca at gmail dot com*. |
| 111 | |
| 112 | If it is not technically/legally feasible for you to provide application and/or |
| 113 | data at all, then you must be either: |
| 114 | |
| 115 | * develop and provide a test application, stripped-down of all |
| 116 | proprietary/confidential data, but that can reproduce the issue; |
| 117 | |
| 118 | * be willing/able to do the investigation of the issue, namely to identify the |
| 119 | root cause of the issue (e.g., which OpenGL call is not properly handled and |
| 120 | why), using all necessary tools (such as debuggers). |
| 121 | |
| 122 | Failure to do so will render the apitrace authors powerless to address the |
| 123 | issue. |
| 124 | |
| 125 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 126 | # Attachments # |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 127 | |
| 128 | github issue tracker doesn't support attachments. |
| 129 | |
| 130 | Please attach long logs to https://gist.github.com/ and paste the URL into the |
| 131 | issue description. |
| 132 | |
José Fonseca | 2cca1ad | 2013-06-14 11:14:06 +0100 | [diff] [blame] | 133 | For big attachments, such as traces, please upload them temporarily to a web |
José Fonseca | 42545d0 | 2015-01-20 14:51:43 +0000 | [diff] [blame] | 134 | server you control, or use a file upload service such as [Google |
| 135 | Drive](https://www.google.com/drive/) or [Dropbox](https://dropbox.com/) and |
| 136 | paste the URL into the issue description. |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 137 | |
| 138 | Trace files are only slightly compressed (for performance reasons). You can |
| 139 | further reduce their size when attaching/uploading by compressing with |
| 140 | [XZ](http://tukaani.org/xz/) or [7-Zip](http://www.7-zip.org/). |
| 141 | |
| 142 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 143 | # Bugs on tracing # |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 144 | |
| 145 | For bugs that happen while tracing (e.g., crashes while tracing the |
| 146 | application, or incorrect traces) please: |
| 147 | |
| 148 | * provide information on how to obtain the application; |
| 149 | |
| 150 | * describe how you were using it when the issue happened. |
| 151 | |
| 152 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 153 | # Bugs on retracing/GUI # |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 154 | |
| 155 | For bugs on retracing (e.g. crashes when retracing the application, |
| 156 | incorrect inconsistent rendering, or viewing with the GUI) please: |
| 157 | |
| 158 | * provide the trace file; |
| 159 | |
| 160 | * describe the results you got, and what results you were expecting. |
| 161 | |
| 162 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 163 | # Obtaining stack back-traces # |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 164 | |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 165 | Please rebuild apitrace with debugging information, by passing |
José Fonseca | 5c101c9 | 2013-07-12 07:48:22 +0100 | [diff] [blame] | 166 | `-DCMAKE_BUILD_TYPE=Debug` to cmake, or editing its value in `CMakeCache.txt` |
| 167 | and rebuilding. |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 168 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 169 | ## Linux ## |
José Fonseca | 217c55f | 2015-01-20 15:39:50 +0000 | [diff] [blame] | 170 | |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 171 | To obtain a stack back-trace, run the application with gdb from a terminal: |
| 172 | |
| 173 | $ gdb --args application arg1 arg2 ... |
| 174 | (gdb) run |
| 175 | ... |
| 176 | (gdb) bt |
José Fonseca | 217c55f | 2015-01-20 15:39:50 +0000 | [diff] [blame] | 177 | ... |
| 178 | (gdb) quit |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 179 | |
José Fonseca | 217c55f | 2015-01-20 15:39:50 +0000 | [diff] [blame] | 180 | To trace an application inside GDB invoke apitrace as: |
José Fonseca | 5c101c9 | 2013-07-12 07:48:22 +0100 | [diff] [blame] | 181 | |
José Fonseca | 5fc6cb7 | 2014-05-23 22:15:36 +0100 | [diff] [blame] | 182 | apitrace trace --verbose --debug application arg1 ... |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 183 | |
José Fonseca | e34099b | 2011-09-19 09:29:08 +0100 | [diff] [blame] | 184 | See also more detailed and Distro specific instructions: |
| 185 | |
| 186 | * http://wiki.debian.org/HowToGetABacktrace |
| 187 | |
| 188 | * https://wiki.ubuntu.com/Backtrace |
| 189 | |
| 190 | * http://fedoraproject.org/wiki/StackTraces |
| 191 | |
| 192 | * http://live.gnome.org/GettingTraces |
| 193 | |
| 194 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 195 | ## Mac OS X ## |
José Fonseca | 217c55f | 2015-01-20 15:39:50 +0000 | [diff] [blame] | 196 | |
Jose Fonseca | 733daf7 | 2015-01-23 18:24:22 +0000 | [diff] [blame] | 197 | Before you can debug you must first enable developer mode on the machine if you |
| 198 | haven't done so before: |
| 199 | |
| 200 | sudo /usr/sbin/DevToolsSecurity --enable |
| 201 | |
José Fonseca | 217c55f | 2015-01-20 15:39:50 +0000 | [diff] [blame] | 202 | To trace an application inside LLDB and obtain a stack backtrace invoke apitrace as: |
| 203 | |
| 204 | $ apitrace trace --verbose --debug application arg1 ... |
| 205 | ... |
| 206 | (lldb) bt |
| 207 | ... |
| 208 | (lldb) quit |
| 209 | |
| 210 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 211 | ## Windows ## |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 212 | |
José Fonseca | ff3abc6 | 2011-09-27 10:20:05 +0100 | [diff] [blame] | 213 | See: |
José Fonseca | 05ba419 | 2011-09-17 21:18:57 +0100 | [diff] [blame] | 214 | |
José Fonseca | 2208f5a | 2015-02-05 12:05:11 +0000 | [diff] [blame] | 215 | * <https://developer.mozilla.org/en/how_to_get_a_stacktrace_with_windbg> |