Mercurial > octave-nkf
annotate doc/interpreter/bugs.txi @ 20595:c1a6c31ac29a
eliminate more simple uses of error_state
* ov-classdef.cc: Eliminate simple uses of error_state.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 06 Oct 2015 00:20:02 -0400 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
19731
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19627
diff
changeset
|
1 @c Copyright (C) 1996-2015 John W. Eaton |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
19627
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
9 @c |
7018 | 10 @c Octave is distributed in the hope that it will be useful, but WITHOUT |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
19627
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
14 @c |
7018 | 15 @c You should have received a copy of the GNU General Public License |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
3294 | 18 |
7018 | 19 @c The text of this file appears in the file BUGS in the Octave |
20 @c distribution, as well as in the Octave manual. | |
3294 | 21 |
22 @ifclear BUGSONLY | |
4167 | 23 @node Trouble |
3294 | 24 @appendix Known Causes of Trouble |
25 @end ifclear | |
26 | |
27 @ifset BUGSONLY | |
28 | |
29 This file documents known bugs in Octave and describes where and how to | |
30 report any bugs that you may find. | |
31 | |
6778 | 32 Copyright (C) 1996, 1997, 2007 John W. Eaton. You may copy, distribute, and |
3294 | 33 modify it freely as long as you preserve this copyright notice and |
34 permission notice. | |
35 | |
4167 | 36 @node Trouble |
3294 | 37 @chapter Known Causes of Trouble with Octave |
38 @end ifset | |
39 | |
40 @cindex bugs, known | |
41 @cindex installation trouble | |
42 @cindex known causes of trouble | |
43 @cindex troubleshooting | |
44 | |
45 This section describes known problems that affect users of Octave. Most | |
46 of these are not Octave bugs per se---if they were, we would fix them. | |
47 But the result for a user may be like the result of a bug. | |
48 | |
49 Some of these problems are due to bugs in other software, some are | |
50 missing features that are too much work to add, and some are places | |
51 where people's opinions differ as to what is best. | |
52 | |
53 @menu | |
54 * Actual Bugs:: Bugs we will fix later. | |
17152
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
55 * Reporting Bugs:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
56 * Service:: |
3294 | 57 @end menu |
58 | |
4167 | 59 @node Actual Bugs |
3294 | 60 @appendixsec Actual Bugs We Haven't Fixed Yet |
61 | |
62 @itemize @bullet | |
63 @item | |
64 Output that comes directly from Fortran functions is not sent through | |
65 the pager and may appear out of sequence with other output that is sent | |
66 through the pager. One way to avoid this is to force pending output to | |
67 be flushed before calling a function that will produce output from | |
68 within Fortran functions. To do this, use the command | |
69 | |
70 @example | |
71 fflush (stdout) | |
72 @end example | |
73 | |
74 Another possible workaround is to use the command | |
75 | |
76 @example | |
9292
aa2e52bd82dd
Fix call to page_screen_output in the Bugs chapter of the manual
Soren Hauberg <hauberg@gmail.com>
parents:
9245
diff
changeset
|
77 page_screen_output (false); |
3294 | 78 @end example |
79 | |
80 @noindent | |
81 to turn the pager off. | |
82 @end itemize | |
83 | |
84 A list of ideas for future enhancements is distributed with Octave. See | |
85 the file @file{PROJECTS} in the top level directory in the source | |
86 distribution. | |
87 | |
4167 | 88 @node Reporting Bugs |
3294 | 89 @appendixsec Reporting Bugs |
90 @cindex bugs | |
91 @cindex reporting bugs | |
92 | |
93 Your bug reports play an essential role in making Octave reliable. | |
94 | |
95 When you encounter a problem, the first thing to do is to see if it is | |
96 already known. @xref{Trouble}. If it isn't known, then you should | |
97 report the problem. | |
98 | |
99 Reporting a bug may help you by bringing a solution to your problem, or | |
100 it may not. In any case, the principal function of a bug report is | |
101 to help the entire community by making the next version of Octave work | |
102 better. Bug reports are your contribution to the maintenance of Octave. | |
103 | |
104 In order for a bug report to serve its purpose, you must include the | |
105 information that makes it possible to fix the bug. | |
106 | |
107 @menu | |
17152
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
108 * Bug Criteria:: |
11257
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
109 * Bug Tracker:: Where to submit your bug report. |
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
110 * Bug Reporting:: How to report a bug effectively. |
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
111 * Sending Patches:: How to send a patch for Octave. |
3294 | 112 @end menu |
113 | |
4167 | 114 @node Bug Criteria |
11257
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
115 @appendixsubsec Have You Found a Bug? |
3294 | 116 @cindex bug criteria |
117 | |
118 If you are not sure whether you have found a bug, here are some guidelines: | |
119 | |
120 @itemize @bullet | |
121 @cindex fatal signal | |
122 @cindex core dump | |
123 @item | |
124 If Octave gets a fatal signal, for any input whatever, that is | |
125 a bug. Reliable interpreters never crash. | |
126 | |
127 @cindex incorrect output | |
128 @cindex incorrect results | |
129 @cindex results, incorrect | |
130 @cindex answers, incorrect | |
131 @cindex erroneous results | |
132 @cindex wrong answers | |
133 @item | |
134 If Octave produces incorrect results, for any input whatever, | |
135 that is a bug. | |
136 | |
137 @cindex undefined behavior | |
138 @cindex undefined function value | |
139 @item | |
140 Some output may appear to be incorrect when it is in fact due to a | |
141 program whose behavior is undefined, which happened by chance to give | |
142 the desired results on another system. For example, the range operator | |
143 may produce different results because of differences in the way floating | |
144 point arithmetic is handled on various systems. | |
145 | |
146 @cindex erroneous messages | |
147 @cindex incorrect error messages | |
148 @cindex error messages, incorrect | |
149 @item | |
150 If Octave produces an error message for valid input, that is a bug. | |
151 | |
152 @cindex invalid input | |
153 @item | |
154 If Octave does not produce an error message for invalid input, that is | |
155 a bug. However, you should note that your idea of ``invalid input'' | |
156 might be my idea of ``an extension'' or ``support for traditional | |
157 practice''. | |
158 | |
159 @cindex improving Octave | |
160 @cindex suggestions | |
161 @item | |
162 If you are an experienced user of programs like Octave, your suggestions | |
163 for improvement are welcome in any case. | |
164 @end itemize | |
165 | |
10450
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
166 @node Bug Tracker |
11257
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
167 @appendixsubsec Where to Report Bugs |
10450
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
168 @cindex bug tracker |
3294 | 169 @cindex reporting bugs |
170 @cindex bugs, reporting | |
171 | |
10450
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
172 To report a bug in Octave, submit a bug report to the Octave bug tracker |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
173 @url{http://bugs.octave.org}. |
3294 | 174 |
175 @strong{Do not send bug reports to @samp{help-octave}}. Most users of | |
10450
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
176 Octave do not want to receive bug reports. |
3294 | 177 |
4167 | 178 @node Bug Reporting |
11257
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
179 @appendixsubsec How to Report Bugs |
3294 | 180 @cindex bugs, reporting |
181 | |
10450
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
182 Submit bug reports for Octave to the Octave bug tracker |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
183 @url{http://bugs.octave.org}. |
3294 | 184 |
185 The fundamental principle of reporting bugs usefully is this: | |
186 @strong{report all the facts}. If you are not sure whether to state a | |
187 fact or leave it out, state it! | |
188 | |
189 Often people omit facts because they think they know what causes the | |
190 problem and they conclude that some details don't matter. Thus, you might | |
191 assume that the name of the variable you use in an example does not matter. | |
192 Well, probably it doesn't, but one cannot be sure. Perhaps the bug is a | |
193 stray memory reference which happens to fetch from the location where that | |
194 name is stored in memory; perhaps, if the name were different, the contents | |
195 of that location would fool the interpreter into doing the right thing | |
196 despite the bug. Play it safe and give a specific, complete example. | |
197 | |
198 Keep in mind that the purpose of a bug report is to enable someone to | |
9081
c79cf77061b7
Cleanup documentation files contrib.texi, bugs.texi, install.texi, emacs.texi
Rik <rdrider0-list@yahoo.com>
parents:
7018
diff
changeset
|
199 fix the bug if it is not known. Always write your bug reports on |
3294 | 200 the assumption that the bug is not known. |
201 | |
202 Sometimes people give a few sketchy facts and ask, ``Does this ring a | |
203 bell?'' This cannot help us fix a bug. It is better to send a complete | |
204 bug report to begin with. | |
205 | |
206 Try to make your bug report self-contained. If we have to ask you for | |
207 more information, it is best if you include all the previous information | |
208 in your response, as well as the information that was missing. | |
209 | |
210 To enable someone to investigate the bug, you should include all these | |
211 things: | |
212 | |
213 @itemize @bullet | |
214 @item | |
215 The version of Octave. You can get this by noting the version number | |
216 that is printed when Octave starts, or running it with the @samp{-v} | |
217 option. | |
218 | |
219 @item | |
220 A complete input file that will reproduce the bug. | |
221 | |
222 A single statement may not be enough of an example---the bug might | |
223 depend on other details that are missing from the single statement where | |
224 the error finally occurs. | |
225 | |
226 @item | |
227 The command arguments you gave Octave to execute that example | |
228 and observe the bug. To guarantee you won't omit something important, | |
19627
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
229 list all the options. |
3294 | 230 |
231 If we were to try to guess the arguments, we would probably guess wrong | |
232 and then we would not encounter the bug. | |
233 | |
234 @item | |
235 The type of machine you are using, and the operating system name and | |
236 version number. | |
237 | |
238 @item | |
239 The command-line arguments you gave to the @code{configure} command when | |
240 you installed the interpreter. | |
241 | |
242 @item | |
243 A complete list of any modifications you have made to the interpreter | |
244 source. | |
245 | |
246 Be precise about these changes---show a context diff for them. | |
247 | |
248 @item | |
249 Details of any other deviations from the standard procedure for installing | |
250 Octave. | |
251 | |
252 @cindex incorrect output | |
253 @cindex incorrect results | |
254 @cindex results, incorrect | |
255 @cindex answers, incorrect | |
256 @cindex erroneous results | |
257 @cindex wrong answers | |
258 @item | |
259 A description of what behavior you observe that you believe is | |
260 incorrect. For example, "The interpreter gets a fatal signal," or, "The | |
261 output produced at line 208 is incorrect." | |
262 | |
263 Of course, if the bug is that the interpreter gets a fatal signal, then | |
264 one can't miss it. But if the bug is incorrect output, we might not | |
265 notice unless it is glaringly wrong. | |
266 | |
267 Even if the problem you experience is a fatal signal, you should still | |
268 say so explicitly. Suppose something strange is going on, such as, your | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
10452
diff
changeset
|
269 copy of the interpreter is out of sync, or you have encountered a bug |
3294 | 270 in the C library on your system. Your copy might crash and the copy |
271 here would not. If you said to expect a crash, then when the | |
272 interpreter here fails to crash, we would know that the bug was not | |
273 happening. If you don't say to expect a crash, then we would not know | |
274 whether the bug was happening. We would not be able to draw any | |
275 conclusion from our observations. | |
276 | |
277 Often the observed symptom is incorrect output when your program is run. | |
278 Unfortunately, this is not enough information unless the program is | |
279 short and simple. It is very helpful if you can include an explanation | |
280 of the expected output, and why the actual output is incorrect. | |
281 | |
282 @item | |
283 If you wish to suggest changes to the Octave source, send them as | |
284 context diffs. If you even discuss something in the Octave source, | |
285 refer to it by context, not by line number, because the line numbers in | |
286 the development sources probably won't match those in your sources. | |
287 @end itemize | |
288 | |
289 Here are some things that are not necessary: | |
290 | |
291 @itemize @bullet | |
292 @cindex bugs, investigating | |
293 @item | |
294 A description of the envelope of the bug. | |
295 | |
296 Often people who encounter a bug spend a lot of time investigating which | |
297 changes to the input file will make the bug go away and which changes | |
298 will not affect it. Such information is usually not necessary to enable | |
299 us to fix bugs in Octave, but if you can find a simpler example to | |
300 report @emph{instead} of the original one, that is a convenience. | |
301 Errors in the output will be easier to spot, running under the debugger | |
9081
c79cf77061b7
Cleanup documentation files contrib.texi, bugs.texi, install.texi, emacs.texi
Rik <rdrider0-list@yahoo.com>
parents:
7018
diff
changeset
|
302 will take less time, etc. Most Octave bugs involve just one function, so |
3294 | 303 the most straightforward way to simplify an example is to delete all the |
304 function definitions except the one in which the bug occurs. | |
305 | |
306 However, simplification is not vital; if you don't want to do | |
307 this, report the bug anyway and send the entire test case you | |
308 used. | |
309 | |
310 @item | |
311 A patch for the bug. Patches can be helpful, but if you find a bug, you | |
312 should report it, even if you cannot send a fix for the problem. | |
313 @end itemize | |
314 | |
4167 | 315 @node Sending Patches |
11257
8d4c57258523
fix some menu problems in the manual
John W. Eaton <jwe@octave.org>
parents:
11255
diff
changeset
|
316 @appendixsubsec Sending Patches for Octave |
3294 | 317 @cindex improving Octave |
318 @cindex diffs, submitting | |
319 @cindex patches, submitting | |
320 @cindex submitting diffs | |
321 @cindex submitting patches | |
322 | |
323 If you would like to write bug fixes or improvements for Octave, that is | |
324 very helpful. When you send your changes, please follow these | |
325 guidelines to avoid causing extra work for us in studying the patches. | |
326 | |
327 If you don't follow these guidelines, your information might still be | |
328 useful, but using it will take extra work. Maintaining Octave is a lot | |
329 of work in the best of circumstances, and we can't keep up unless you do | |
330 your best to help. | |
331 | |
332 @itemize @bullet | |
333 @item | |
334 Send an explanation with your changes of what problem they fix or what | |
335 improvement they bring about. For a bug fix, just include a copy of the | |
336 bug report, and explain why the change fixes the bug. | |
337 | |
338 @item | |
339 Always include a proper bug report for the problem you think you have | |
340 fixed. We need to convince ourselves that the change is right before | |
341 installing it. Even if it is right, we might have trouble judging it if | |
342 we don't have a way to reproduce the problem. | |
343 | |
344 @item | |
345 Include all the comments that are appropriate to help people reading the | |
346 source in the future understand why this change was needed. | |
347 | |
348 @item | |
349 Don't mix together changes made for different reasons. | |
350 Send them @emph{individually}. | |
351 | |
352 If you make two changes for separate reasons, then we might not want to | |
353 install them both. We might want to install just one. | |
354 | |
355 @item | |
356 Use @samp{diff -c} to make your diffs. Diffs without context are hard | |
357 for us to install reliably. More than that, they make it hard for us to | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
10452
diff
changeset
|
358 study the diffs to decide whether we want to install them. Unified diff |
3294 | 359 format is better than contextless diffs, but not as easy to read as |
360 @samp{-c} format. | |
361 | |
362 If you have GNU diff, use @samp{diff -cp}, which shows the name of the | |
363 function that each change occurs in. | |
364 | |
365 @item | |
366 Write the change log entries for your changes. | |
367 | |
368 Read the @file{ChangeLog} file to see what sorts of information to put | |
369 in, and to learn the style that we use. The purpose of the change log | |
370 is to show people where to find what was changed. So you need to be | |
371 specific about what functions you changed; in large functions, it's | |
372 often helpful to indicate where within the function the change was made. | |
373 | |
374 On the other hand, once you have shown people where to find the change, | |
9081
c79cf77061b7
Cleanup documentation files contrib.texi, bugs.texi, install.texi, emacs.texi
Rik <rdrider0-list@yahoo.com>
parents:
7018
diff
changeset
|
375 you need not explain its purpose. Thus, if you add a new function, all |
3294 | 376 you need to say about it is that it is new. If you feel that the |
377 purpose needs explaining, it probably does---but the explanation will be | |
378 much more useful if you put it in comments in the code. | |
379 | |
380 If you would like your name to appear in the header line for who made | |
381 the change, send us the header line. | |
382 @end itemize | |
383 | |
4167 | 384 @node Service |
3294 | 385 @appendixsec How To Get Help with Octave |
386 @cindex help, where to find | |
387 | |
5041 | 388 The mailing list @email{help@@octave.org} exists for the discussion of |
389 matters related to using and installing Octave. If would like to join | |
390 the discussion, please send a short note to | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
10452
diff
changeset
|
391 @email{help-request@@octave.org}. |
3294 | 392 |
393 @strong{Please do not} send requests to be added or removed from the | |
394 mailing list, or other administrative trivia to the list itself. | |
395 | |
10450
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
396 If you think you have found a bug in Octave or in the installation |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
397 procedure, however, you should submit a complete bug report to |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
398 the Octave bug tracker at @url{http://bugs.octave.org}. |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
399 But before you submit a bug report, please read |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
400 @url{http://www.octave.org/bugs.html} to learn how to submit a useful |
91d1e64804e1
point to bugs.octave.org bug tracker instead of bug@octave.org mailing list
John W. Eaton <jwe@octave.org>
parents:
9895
diff
changeset
|
401 bug report. |