JP2013041571A - Integration apparatus, program creation device, program - Google Patents
Integration apparatus, program creation device, program Download PDFInfo
- Publication number
- JP2013041571A JP2013041571A JP2012111680A JP2012111680A JP2013041571A JP 2013041571 A JP2013041571 A JP 2013041571A JP 2012111680 A JP2012111680 A JP 2012111680A JP 2012111680 A JP2012111680 A JP 2012111680A JP 2013041571 A JP2013041571 A JP 2013041571A
- Authority
- JP
- Japan
- Prior art keywords
- program
- error
- file
- error message
- code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000010354 integration Effects 0.000 title abstract 3
- 238000001514 detection method Methods 0.000 claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 15
- 238000000034 method Methods 0.000 claims description 33
- 230000015654 memory Effects 0.000 claims description 21
- 230000010365 information processing Effects 0.000 claims description 13
- 230000005540 biological transmission Effects 0.000 claims description 4
- 230000007547 defect Effects 0.000 claims 6
- 230000006835 compression Effects 0.000 abstract description 6
- 238000007906 compression Methods 0.000 abstract description 6
- 230000006870 function Effects 0.000 description 44
- 238000004891 communication Methods 0.000 description 40
- 238000010586 diagram Methods 0.000 description 23
- 238000012423 maintenance Methods 0.000 description 19
- 230000008569 process Effects 0.000 description 14
- 238000011161 development Methods 0.000 description 13
- 230000008859 change Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 101100162210 Aspergillus parasiticus (strain ATCC 56775 / NRRL 5862 / SRRC 143 / SU-1) aflM gene Proteins 0.000 description 1
- 101100102500 Caenorhabditis elegans ver-1 gene Proteins 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000001276 controlling effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
- G06F11/0769—Readable error formats, e.g. cross-platform generic formats, human understandable formats
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
Abstract
Description
本発明は、プログラムの実行時に不具合を検出するとエラーメッセージを表示する組み込み機器で関する。 The present invention relates to an embedded device that displays an error message when a failure is detected during execution of a program.
コンピュータが搭載された機器がプログラムを実行した際に、なんらかのエラーが生じるとエラーメッセージを表示することがある。エラーメッセージの表示は、ユーザにエラーの発生を通知するという意義があるが、さらに進んでエラーの原因をユーザに通知するという意義を含む場合がある。 An error message may be displayed when an error occurs when a computer-equipped device executes a program. The display of the error message has a meaning of notifying the user of the occurrence of the error, but may include a meaning of further proceeding to notify the user of the cause of the error.
図1は、従来のエラーメッセージの一例を示す図である。記述1はエラーの発生をユーザに通知するメッセージであり、記述2は代表的な対応方法を通知するメッセージであり、記述3はエラーの原因をユーザに通知するという意義を含むメッセージである。記述3がどのように表示されるかはソフトウェアによるが、表示可能な情報量に制限がある場合が多い。このため、記述3はコード化されており、ユーザはマニュアルなどでコードに対応したエラー内容を参照することでエラーの原因を把握する。また、ユーザはサポートセンターにコードを通知することで、サポートセンターがエラーの原因をユーザに知らせることも可能になる。
FIG. 1 is a diagram illustrating an example of a conventional error message.
このようなエラーの原因の解析はユーザによっては面倒な作業となる場合がある。このため、コードとエラー内容を、プログラムを実行する機器内に保持する技術が知られている(例えば、特許文献1参照。)。特許文献1には、事象と故障部位を対応付けるテーブルを有するデバイス診断装置について開示されている。機器内にテーブルを有することで、ユーザがエラーの原因を特定したい場合に、解析マニュアルを参照したり、サポートセンターに問い合わせる必要性を低減できる。
Analysis of the cause of such an error may be troublesome for some users. For this reason, a technique for holding a code and error contents in a device that executes a program is known (for example, see Patent Document 1).
しかしながら、従来、エラーの発生時に表示されるコードは、大雑把なエラー原因やエラー発生箇所を特定することは可能でも、ソースファイル上でエラーの発生箇所をピンポイントに特定することができないという問題があった。すなわち、従来のコードはエラー原因が異なっていても同じようなエラーであれば同じコードになってしまい、どのようなエラーが発生したかを一意に特定するための情報までは有していない。これは、特許文献1のように装置内にテーブルを有していても同じであり、コードが有する情報量が少ないと、故障部位を正確に特定することは困難である。
Conventionally, however, the code displayed when an error occurs can identify the cause of the error or the location where the error occurred, but the error location cannot be pinpointed on the source file. there were. That is, even if the cause of the error is different, the conventional code becomes the same code if the error is similar, and does not have information for uniquely specifying what kind of error has occurred. This is the same even if a table is provided in the apparatus as in
例えば、プログラムの開発時にはIDE(統合開発環境)を用いることで、プログラムにエラーがあるとIDEが行番号を表示してくれる場合がある。また、コンパイル時にも文法上のエラーがあれば行番号を表示してくれる。しかしながら、IDEをそのまま機器に組み込むことは実行速度やリソースの制約上、困難である。また、コンパイル後のプログラムには行番号が付されていないので、機器がプログラムを実行する段階ではエラー発生時に実行しているプログラムの行番号の特定が困難であった。これは、インタプリタ言語でも同様であり、編集時のソースコードにIDEが行番号を付していても、実行時のインタプリタ言語は行番号を有していないことが一般的である。 For example, when a program is developed, IDE (Integrated Development Environment) is used, and IDE may display a line number if there is an error in the program. Also, if there is a grammatical error during compilation, the line number is displayed. However, it is difficult to incorporate IDE into a device as it is because of restrictions on execution speed and resources. In addition, since line numbers are not assigned to the compiled program, it is difficult to specify the line number of the program being executed when an error occurs at the stage where the device executes the program. This is the same in the interpreter language, and even if IDE assigns a line number to the source code at the time of editing, it is general that the interpreter language at the time of execution does not have a line number.
また、エラーの発生箇所をピンポイントに特定するため、例えばエラーログを利用してユーザやサポートセンターがエラーの原因を解析することも考えられる。エラーログには障害の発生状況、表示されたエラーメッセージ等が含まれる。多くのプログラムは、エラーログを生成しているので、エラーログがあれば少なくともエラーメッセージよりエラー原因の特定は容易である。 In addition, in order to pinpoint the location where an error has occurred, for example, it is conceivable that a user or a support center analyzes the cause of the error using an error log. The error log includes a failure occurrence status, a displayed error message, and the like. Many programs generate an error log, so if there is an error log, it is easier to identify the cause of the error than at least the error message.
しかしながら、エラーログはユーザが解析するには複雑なため、ユーザがエラーログからエラー原因を特定することは困難な場合が多い。また、汎用型のコンピュータでなく、組み込み装置の場合、そもそもユーザがエラーログにアクセスすることが困難である。 However, since the error log is complicated for the user to analyze, it is often difficult for the user to identify the cause of the error from the error log. Further, in the case of an embedded device instead of a general-purpose computer, it is difficult for the user to access the error log in the first place.
また、機器がエラーログをサポートセンターに送信することでサポートセンターがエラーログを解析することは技術的には可能である。しかし、詳細な情報が含まれているエラーログを外部に送信することに抵抗を感じるユーザは少なくない。また、ユーザがエラーログの解析が可能な場合でもユーザにエラーログを見せることは、機器の詳細な解析を可能にする場合があり、必ずしも好ましい方策ではない。 In addition, it is technically possible for the support center to analyze the error log by transmitting the error log to the support center. However, many users feel resistance to sending an error log including detailed information to the outside. Further, even when the user can analyze the error log, showing the error log to the user may enable detailed analysis of the device, which is not always a preferable measure.
本発明は、上記課題に鑑み、エラー発生時に表示されるコードから、ソフトウェアのエラー発生箇所を特定することが可能な組み込み装置を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide an embedded device that can specify an error occurrence location of software from a code displayed when an error occurs.
本発明は、プログラムの実行時に不具合を検出するとエラーメッセージを表示する組み込み機器であって、前記プログラムを実行する中央処理装置と、前記プログラムとして複数のファイルが結合された実行可能な圧縮ファイルを記憶するプログラム記憶手段と、命令の実行結果を格納するアドレスの記憶内容に基づき不具合を検出する不具合検出手段と、前記不具合検出手段が不具合を検出した場合、命令に記述されている、前記プログラムのバージョン情報、前記ファイルのファイル識別情報、及び、実行中の命令の前記ファイルにおける行番号、を含むエラーメッセージを表示装置に出力するエラーメッセージ表示手段と、を有する。 The present invention is an embedded device that displays an error message when a failure is detected during execution of a program, and stores a central processing unit that executes the program and an executable compressed file in which a plurality of files are combined as the program Program storage means, failure detection means for detecting a failure based on the stored contents of an address for storing an instruction execution result, and the version of the program described in the instruction when the failure detection means detects a failure Error message display means for outputting to the display device an error message including information, file identification information of the file, and a line number of the command being executed in the file.
エラー発生時に表示されるコードから、ソフトウェアのエラー発生箇所を特定することが可能な組み込み装置を提供することができる。 It is possible to provide an embedded device that can identify the error occurrence location of software from the code displayed when an error occurs.
以下、本発明を実施するための形態について説明する。 Hereinafter, modes for carrying out the present invention will be described.
〔概略〕
まず、本実施形態のプログラム実行機器が表示するエラーメッセージについて説明する。
図2は、本実施形態のエラーメッセージの一例を示す図である。エラーメッセージには、以下の3つの記述とOKボタンが表示されている。
記述1:「エラーが発生しました」
記述2:「サポートセンターにご連絡ください。」
記述3:0511−01C−0
本実施形態のエラーメッセージは、記述3にソースファイルの行番号が含まれる点に特徴の一つがある。記述3の"01C"はソースファイルの行番号を16進数で表示したものである。"05"はプログラムのバージョンであり、"11"はエラーが発生したファイルの名前である。以下では、記述3全体をエラーコードと称することとする。
[Outline]
First, an error message displayed by the program execution device of this embodiment will be described.
FIG. 2 is a diagram illustrating an example of an error message according to the present embodiment. The error message displays the following three descriptions and an OK button.
Description 1: “An error has occurred”
Description 2: “Please contact the support center.”
Description 3: 0511-01C-0
The error message of this embodiment is characterized in that
エラー発生時にコンピュータが実行した命令には行番号が含まれていない場合がほとんどであるが、その命令がソースファイルにおいて何行目に相当するかが記述3に含まれることになる。したがって、ユーザが記述3をサポートセンター等に通知すれば、サポートセンター等はエラーが発生した命令をピンポイントで特定でき、エラー原因を早期に解析することが可能になる。
In most cases, the instruction executed by the computer when an error occurs does not include a line number, but
なお、図2では、エラーコードがエラーメッセージ内に含まれているが、エラーコードは、エラーメッセージが表示される前後にエラーメッセージとは独立に表示されてもよい。また、エラーコードのプログラムのバージョン、ファイルの名前、及び、行番号を別々に表示してもよい。 In FIG. 2, the error code is included in the error message. However, the error code may be displayed independently of the error message before and after the error message is displayed. The error code program version, file name, and line number may be displayed separately.
また、本実施形態のエラーとは、プログラムが検出しうる不具合、換言すると想定内の不具合をいう。これに対し、そもそもエラーメッセージの表示が困難となる想定外の不具合(例えばプログラムがハングアップするようなバグ、ハード的にプログラムの実行そのものが困難になるような不具合)は含まれない。 An error in the present embodiment refers to a problem that can be detected by the program, in other words, an expected problem. On the other hand, unexpected problems that make it difficult to display an error message in the first place (for example, bugs that cause the program to hang up or problems that make it difficult to execute the program in hardware) are not included.
〔エラー発生時の対応例〕
図3は、プログラム実行機器にエラーが発生した場合にエラー原因が解析されるまでの流れを示す図の一例である。
1.エラーが発生し、プログラム実行機器がエラーメッセージを表示する。これにより、ユーザはエラーの発生に気付く。
2.ユーザがエラーメッセージによりエラー原因を特定でき、復旧した場合は、ユーザは継続してプログラム実行機器を使用する。
[Example of actions when an error occurs]
FIG. 3 is an example of a diagram showing a flow until an error cause is analyzed when an error occurs in the program execution device.
1. An error occurs and the program execution device displays an error message. As a result, the user notices the occurrence of an error.
2. When the user can identify the cause of the error from the error message and recover, the user continues to use the program execution device.
一方、ユーザがエラーメッセージを目視したりマニュアルなどで調べても、エラー原因が分からず復旧できない場合、障害情報(エラーメッセージ、プログラムのバージョン、エラーの発生状況、エラーログ等)をプログラム実行機器メーカのサポートセンターに通知する。通知には電話や電子メールを用いる方法がある。なお、復旧できない場合に限らず、ユーザは障害情報をサポートセンターに通知することが可能である。多くのプログラム実行機器は再起動することで復旧自体は可能なためである。
3.サポートセンターは、障害情報からエラー原因を解析する。サポートセンターだけではユーザにプログラム実行機器を復旧させることができない場合、又は、エラー原因を特定できない場合、プログラム実行機器メーカの開発区に障害情報を通知する。
4.開発区では、障害情報を元にエラー原因の解析・対策を行う。
5.開発区は、サポートセンターに解析結果を報告する。
6.サポートセンターはユーザに解析結果と、必要であれば対策を通知する。
On the other hand, if the user cannot visually check the error message or examine it manually to find out the cause of the error and cannot recover, the failure information (error message, program version, error occurrence status, error log, etc.) is displayed. Notify your support center. Notification can be made by telephone or e-mail. Note that the user can notify the support center of failure information, not limited to the case where recovery is not possible. This is because many program execution devices can be restored by restarting.
3. The support center analyzes the cause of the error from the failure information. When the support center alone cannot restore the program execution device to the user or when the cause of the error cannot be specified, the failure information is notified to the development area of the program execution device manufacturer.
4). In the development zone, error cause analysis and countermeasures are performed based on the failure information.
5. The development zone reports the analysis results to the support center.
6). The support center notifies the user of the analysis result and, if necessary, the countermeasure.
ここで、「4.」の解析では、開発区にとって、障害情報に多くの情報が含まれているほどエラー原因の解析が容易である。しかし、例えば、上記の障害情報は全てが入手可能とは限らず、入手の困難性には差異がある。 Here, in the analysis of “4.”, the cause of the error is easier for the development zone as the failure information contains more information. However, for example, not all of the above failure information is available, and there is a difference in difficulty of obtaining.
(i)障害の発生状況(なんの操作で起きたか、その前後に行っていた操作は、ハードウェア環境は、等)
(ii)ユーザに表示されたエラーメッセージ
(iii)障害の発生したプログラムのバージョン
(iv)エラーログ
例えば、(i)はユーザがプログラム実行機器の動作状態を観察していれば取得可能だが、観察していないと最小限の情報しか得られない。また、障害の発生状況は、詳細であればあるほど好ましいが、詳細になればなるほど情報を得るのが難しくなる。
(i) Occurrence status of the failure (what operation occurred, operation performed before and after that, hardware environment, etc.)
(ii) Error message displayed to the user
(iii) The version of the program in which the failure occurred
(iv) Error log For example, (i) can be obtained if the user observes the operating state of the program execution device, but if it is not observed, only minimal information can be obtained. Further, the more detailed the occurrence of the failure is, the more preferable, but the more detailed, the more difficult it is to obtain information.
(ii)のエラーメッセージは、プログラム実行機器がハングアップなどしなければ、多くの場合は表示されるので、ユーザやサポートセンターが取得することは容易である。しかしながら、上記のとおり、ユーザやサポートセンターがエラー原因を解析する上で十分な情報が含まれてはいなかった。 Since the error message (ii) is displayed in many cases unless the program execution device hangs up, it is easy for the user or support center to obtain. However, as described above, sufficient information was not included for the user or the support center to analyze the cause of the error.
(iii) 開発区にとってはプログラムのバージョンが分かることで、バージョンに特有のエラー原因を比較的容易に推定できる場合がある。バージョンに特有のエラー原因は他のプログラム実行機器やユーザからも報告済みの可能性が高いためである。ユーザがバージョンを取得するには、起動時や起動後常にバージョンが表示されるプログラムを除くと、ユーザの意識的な操作が必要である。 (iii) By knowing the program version for the development area, it may be relatively easy to estimate the cause of the error specific to the version. The reason for the error specific to the version is that there is a high possibility that it has already been reported from other program execution devices or users. In order for the user to acquire the version, a user's conscious operation is required except for a program whose version is always displayed at the time of startup or after startup.
また、バージョンが判明することで、プログラムを構成する各種のファイルのバージョンも判明するので、特定のファイルに起因するエラー原因を解析しやすくなる。 In addition, since the versions are known, the versions of various files that make up the program are also found, which makes it easy to analyze the cause of an error caused by a specific file.
(iv)のエラーログは、(i)〜(iii)すべての情報を含みうる。エラーログは、エラーの詳細な原因と発生箇所を特定するための情報、特に詳細な解析を行うには必須の情報であるエラーが発生したファイルの名前、プログラムのバージョンを含んでいる。したがって、開発区としては、これを取得することが一番望ましいが、一番取得が難しい情報でもある。理由は上述したとおり、ユーザは外部に提供することを好まず、また機器メーカとしてもユーザに容易にアクセスさせたくないためである。 The error log of (iv) can include all the information (i) to (iii). The error log includes information for specifying the detailed cause and location of the error, in particular, the name of the file in which the error has occurred and the version of the program, which are indispensable information for detailed analysis. Therefore, it is most desirable for a development zone to acquire this, but it is also the most difficult information to acquire. The reason is that, as described above, the user does not like to provide it to the outside, and the device manufacturer does not want the user to easily access it.
本実施形態では、開発区がエラーログを入手することが困難な状況下でも、エラーメッセージに含まれるエラーコードから、エラーログと同等の情報をサポートセンターが入手することを可能にする。すなわち、エラーコードには、プログラムのバージョン、エラーが発生したファイルの名前、及び、ソースファイルの行番号とが含まれているため、開発区では、エラーの発生箇所(どのファイルのどの箇所を実行中か)をピンポイントで特定することができる。 In this embodiment, the support center can obtain information equivalent to the error log from the error code included in the error message even in a situation where it is difficult for the development zone to obtain the error log. In other words, the error code includes the version of the program, the name of the file in which the error occurred, and the line number of the source file. Can be pinpointed.
〔構成例〕
<プログラム実行機器>
後述するように、ソースファイルの行番号を表示するため、プログラム実行機器が実行するプログラムにはすでに行番号が含まれている。このため、本実施形態のプログラム実行機器は、スタンドアロン型、ネットワークを介して接続されたクライアント端末、又は、サーバ等、どのような形態でプログラムを実行するものでもよい。
[Configuration example]
<Program execution device>
As will be described later, since the line number of the source file is displayed, the program executed by the program execution device already includes the line number. For this reason, the program execution device of the present embodiment may execute the program in any form such as a stand-alone type, a client terminal connected via a network, or a server.
図4(a)はスタンドアロン型のプログラム実行機器として情報処理装置100の概略斜視図の一例を、図4(b)はMFP200の概略斜視図の一例をそれぞれ示す。いずれも内部にCPUとプログラムを有し、CPUがプログラムを実行することでプログラムに特有の処理を実行する。そして、何らかのエラーが生じた場合、情報処理装置100又はMFP(Multifunction Peripheral)200はエラーコードを表示する。
4A illustrates an example of a schematic perspective view of the
図4(c)は、コミュニケーションシステム301の概略構成図の一例である。ネットワークを介して複数のコミュニケーション端末(以下、区別する場合、コミュニケーション端末A、Bという)300及びサーバ400が接続されている。コミュニケーション端末Aは、ある地域(例えばアメリカ合衆国)に、コミュニケーション端末Bは別の地域(例えば日本)にあり、サーバ400を介してネットワーク経由で通信可能に接続されている。
FIG. 4C is an example of a schematic configuration diagram of the
コミュニケーション端末A,Bは、それぞれ、カメラ、マイク及びスピーカを有し、さらに表示装置とローカルに接続されている。コミュニケーション端末Aの近くのユーザが発した音声はコミュニケーション端末Aのマイクが集音して電気信号に変換した後、コミュニケーション端末Bに送信する。コミュニケーション端末Bのスピーカは、電気信号を音声に変換してスピーカから出力する。カメラが撮影した映像についても同様であり、コミュニケーション端末Aは、コミュニケーション端末Aのカメラが撮影した映像を電気信号に変換してコミュニケーション端末Bに送信する。コミュニケーション端末Bは電気信号を映像に変換して、表示装置に表示する。したがって、異なる地域のユーザ同士が、音声及び映像を使用して互いにコミュニケーションすることが可能になる。なお、表示装置としては、例えば、プロジェクタや液晶ディスプレイがある。このようなコミュニケーションシステム301の具体例としてはテレビ会議システムが知られている。
Each of the communication terminals A and B has a camera, a microphone, and a speaker, and is connected locally to the display device. The voice uttered by the user near the communication terminal A is collected by the microphone of the communication terminal A and converted into an electrical signal, and then transmitted to the communication terminal B. The speaker of the communication terminal B converts the electrical signal into sound and outputs it from the speaker. The same applies to the video captured by the camera, and the communication terminal A converts the video captured by the camera of the communication terminal A into an electrical signal and transmits it to the communication terminal B. The communication terminal B converts the electrical signal into a video and displays it on the display device. Therefore, users in different regions can communicate with each other using audio and video. Examples of the display device include a projector and a liquid crystal display. As a specific example of such a
図4のプログラム実行機器のうち、MFP200やコミュニケーション端末300は組み込み機器と呼ばれる。本実施形態のエラーメッセージは、ユーザがプログラム実行機器に対し行える操作が少ない組み込み機器において特に有効である。なお、組み込み機器の明確な定義は一般に規定されていないが、例えば、一般的な情報処理装置(PC:Personal Computer)を含まないことが挙げられる。
Among the program execution devices in FIG. 4, the
図5は、情報処理装置100又はMFP200のハードウェア構成図の一例を示す。なお、MFP200のハードウェア構成図はプログラム20を実行する部分のみを取り出して説明するのであり、図示する以外にスキャナ、プロッタ又はファクシミリなどの機能を有している。
FIG. 5 shows an example of a hardware configuration diagram of the
情報処理装置100又はMFP200は、装置全体の動作を制御するCPU201、IPL(Initial Program Loader)や静的なデータを記憶したROM202、CPU201のワークエリアとして使用されるRAM203、CPU201が実行するプログラム20や各種データを記憶するHD204、CPU201の制御にしたがってHD204に対する各種データの読み出し又は書き込みを制御するHDD(Hard Disk Drive)205、フラッシュメモリ等の記録メディア206に対するデータの読み出し又は書き込み(記憶)を制御するメディアドライブ207、カーソル、メニュー、ウィンドウ、文字、又は画像などの各種情報を表示するディスプレイ208、通信ネットワーク2を利用してデータ伝送をするためのネットワークI/F209、文字、数値、各種指示などの入力のための複数のキーを備えたキーボード211、各種指示の選択や実行、処理対象の選択、カーソルの移動などを行うマウス212、着脱可能な記録媒体の一例としてのCD−ROM(Compact Disc Read Only Memory)213等に対する各種データの読み出し又は書き込みを制御するCD−ROMドライブ214、及び、上記各構成要素を図5に示されているように電気的に接続するためのアドレスバスやデータバス等のバスライン210を備えている。
The
なお、プログラム20は、インストール可能な形式又は実行可能な形式のファイルで、上記記録メディア206やCD−ROM213等のコンピュータで読み取り可能な記録媒体に記録して流通させるようにしてもよい。また、プログラム20は、不図示のサーバからインストール可能な形式又は実行可能な形式のファイルで情報処理装置100又はMFP200に配布されてもよい。
Note that the
図6は、コミュニケーション端末300のハードウェア構成図の一例である。図6に示されているように、本実施形態のコミュニケーション端末300は、コミュニケーション端末全体の動作を制御するCPU101、IPLや静的なデータ等を記憶したROM102、CPU101のワークエリアとして使用されるRAM103、プログラム20、画像データ、及び、音声データ等の各種データを記憶するフラッシュメモリ104、CPU101の制御にしたがってフラッシュメモリ104に対する各種データの読み出し又は書き込みを制御するSSD(Solid State Drive)105、フラッシュメモリ等の記録メディア106に対するデータの読み出し又は書き込み(記憶)を制御するメディアドライブ107、端末10の宛先を選択する場合などに操作される操作ボタン108、端末10の電源のON/OFFを切り換えるための電源スイッチ109、通信ネットワーク2を利用してデータ伝送をするためのネットワークI/F(Interface)111を備えている。なお、記録メディア106は、コミュニケーション端末300に対して着脱自在な構成となっている。
FIG. 6 is an example of a hardware configuration diagram of the
また、コミュニケーション端末300は、CPU101の制御に従って被写体を撮像して画像データを得る内蔵型のカメラ112、このカメラ112の駆動を制御する撮像素子I/F113、音声を入力する内蔵型のマイク114、音声を出力する内蔵型のスピーカ115、CPU101の制御に従ってマイク114及びスピーカ115との間で音声信号の入出力を処理する音声入出力I/F116、CPU101の制御に従って外付けの表示装置120に画像データを伝送するディスプレイI/F117、各種の外部機器を接続するための外部機器接続I/F118、及び、上記各構成要素を図6に示されているように電気的に接続するためのアドレスバスやデータバス等のバスライン110を備えている。
The
図の表示装置120は、被写体の画像や操作用アイコン等を表示する液晶や有機ELによって構成された液晶ディスプレイであるが、プロジェクタでもよい。表示装置120は、ケーブル120cによってディスプレイI/F117に接続される。
The
なお、カメラやマイク、スピーカは、コミュニケーション端末300に内蔵されている必要はなく、USB(Universal Serial Bus)ケーブル等によって外部機器接続I/F118に接続される外付けタイプのものでもよい。
The camera, the microphone, and the speaker do not need to be built in the
また、上記フラッシュメモリ104には、常時、プログラム20が記憶されているわけではない。これは、コミュニケーションシステム301の場合、サーバ400からコミュニケーション端末300の型に最適なプログラム20がダウンロードされるためである。しかしながら、エラーメッセージを出力するプログラム20の実行時はフラッシュメモリ104に記憶されているので、プログラム20はコミュニケーション端末300と一体とみなすこともできる。
The
プログラム20は、インストール可能な形式又は実行可能な形式のファイルで、上記記録メディア106等のコンピュータで読み取り可能な記録媒体に記録した状態にて流通させることもできる。
The
<プログラム作成装置>
本実施形態では、プログラム実行機器(情報処理装置100、MFP200、コミュニケーション端末300)が実行するプログラム20に、ソースファイルの行番号が含まれている。したがって、この特別なプログラム20を作成する装置が存在する(以下、プログラム作成装置という)。プログラム作成装置は汎用的なOS(例えば、Windows(登録商標)、UNIX(登録商標)、Linux(登録商標))が動作する情報処理装置であればよく、図5の情報処理装置100と機能的には大きな違いがない場合もある。しかし、一般にプログラム作成装置はメーカ内にあるため、プログラム20を実行するプログラム実行機器とは区別される。
<Program creation device>
In the present embodiment, the line number of the source file is included in the
図7(a)はプログラム作成装置500の概略斜視図の一例を、図7(b)はプログラム作成装置500のハードウェア構成図の一例をそれぞれ示す。プログラム作成装置500はそれぞれバスで相互に接続されているCPU501、RAM502、ROM503、記憶媒体装着部504、通信装置505、入力装置506、描画制御部507、及び、HDD508を有する。CPU501は、OS(Operating System)やビルドツール511をHDD508から読み出して実行することで種々の機能を提供すると共に、補正済み原稿画像データの生成処理を行う。
7A shows an example of a schematic perspective view of the
RAM502はCPU501がビルドツール511を実行する際に必要なデータを一時保管する作業メモリ(主記憶メモリ)になり、ROM503はBIOS(Basic Input Output System)やOSを起動するためのIPL、静的なデータが記憶されている。
The
記憶媒体装着部504には記憶媒体510が着脱可能であり、記憶媒体510に記録されたデータを読み込み、HDD508に記憶させる。また、記憶媒体装着部504は、HDD508に記憶されたデータを記憶媒体510に書き込むこともできる。記憶媒体510は例えば、USDメモリ、SDカード等である。
A
入力装置506は、キーボードやマウス、トラックボールなどであり、プログラム作成装置500へのユーザの様々な操作指示を受け付ける。HDD508は、SSD等の不揮発メモリでもよく、OS、ビルドツール511などの各種のデータが記憶されている。
The
通信装置505は、インターネットなどのネットワークに接続するためのNIC(Network Interface Card)であり、例えば、イーサネット(登録商標)カードである。
The
描画制御部507は、CPU501がビルドツール511を実行してグラフィックメモリに書き込んだ描画コマンドを解釈して、画面を生成しディスプレイ509に描画する。
The
ビルドツール511は、インストール可能な形式又は実行可能な形式のファイルで、上記記憶媒体510に記録した状態又は不図示のサーバから配布されることができる。
The
〔機能ブロック〕
図8は、プログラム作成装置500及びプログラム実行機器の機能ブロック図の一例を示す。プログラム作成装置500はビルドツール511を用いてソースファイルをビルドし、プログラム20を作成する。ビルドツール511は、コンパイル部12、リンケージ部15、圧縮部16、ファイルコード生成部11、バージョン受付部13、及び、コード置き換え部14を有する。このうちコード置き換え部14は、独立に存在してもよいし、コンパイル部12が機能の一部として有していてもよい。
[Function block]
FIG. 8 shows an example of a functional block diagram of the
コンパイル部12、リンケージ部15、及び、圧縮部16は、いずれもビルドツール511が提供する公知の機能である。すなわち、コンパイル部12は、C、C++、JAVA(登録商標、以下省略)などで記述されたソースファイルをコンパイルし、ソースファイル単位で、オブジェクトモジュールファイルを作成する。そして、リンケージ部15は、複数のオブジェクトモジュールファイルをリンクすることでオブジェクトファイルを作成する。
The compile
また、圧縮部16は、指定されたディレクトリ構造を含め、ディレクトリ内のファイルを結合して圧縮する。圧縮されたファイルには例えば「*.jar」「*.war」「*.exe」という拡張子が付される。圧縮されたファイルがプログラム20である。プログラム実行機器は圧縮されたプログラム20を解凍して実行することもできるが、そのまま実行ファイルとして実行することができる。
The compression unit 16 combines and compresses files in the directory including the designated directory structure. For example, extensions of “* .jar”, “* .war”, and “* .exe” are attached to the compressed file. The compressed file is the
ビルドツール511は、ビルドファイル22により動作内容が規定される。ビルドファイル22はXMLで記述され、ソースファイルをどのようにビルドしてプロジェクト(本実施形態のプログラム20)を生成するかのビルド方法を定義している。
・記述B1は、"programA"というプロジェクト名を定義している。
・記述B2は変数名を定義しており、files、home、bin、jsというディレクトリ名を変数に格納している。なお、filesとhomeはすでにある。
・記述B3は、binとjsというディレクトリを作ることを定義している。
・記述B4は、files内のソースファイルをコンパイルしてbinというファイルにコピーすることを定義している。
・記述B5は、files内のcalk.jsというファイルをjsというディレクトリにコピーすることを定義している。
・記述B6は、home以下のディレクトリとファイルを圧縮して「programA.war」という圧縮ファイルを生成することを定義している。
The operation content of the
Description B1 defines the project name “program A”.
Description B2 defines variable names, and directory names of files, home, bin, and js are stored in the variables. Files and home already exist.
Description B3 defines the creation of bin and js directories.
Description B4 defines that the source file in files is compiled and copied to a file called bin.
Description B5 defines copying a file called calk.js in files to a directory called js.
Description B6 defines that a compressed file called “programA.war” is generated by compressing a directory and files under home.
ビルドツール511は、開発者がビルドの開始を指示すると、このようなビルドファイル22を読み込んでビルドを開始する。ビルドファイル22は開発者が記述することもできるし、ビルドツール511が開発中の各ソースファイルのファイル内容などを解析して自動的に作成することも可能である。
When the developer gives an instruction to start a build, the
ファイルコード生成部11は、ビルド対象の全てのファイルを特定し、ファイルに重複しないファイルコード(識別情報)を対応づけて、ファイルコードテーブル21を生成する。図8のビルドファイル22では、コンパイル対象のfilesディレクトリのファイル、コピー元のファイルcalk.js、がビルド対象の全てのファイルとなる。したがって、filesディレクトリのファイルに重複しないファイルコードを付与すればよい。
The file
図9は、ファイルコードテーブル21の一例を示す。ファイルコードテーブル21は、プログラム20を構成する元となった全てのソースファイルに重複しないファイルコードが対応づけられている。ファイルコード生成部11は、例えば、ビルドファイル22を参照して、記述B4によりコンパイルされるfilesの全てのソースファイル、記述B5のコピー元のソースファイルを抽出する。そして、各ファイル名にファイルコードを付与する。
FIG. 9 shows an example of the file code table 21. In the file code table 21, file codes that are not duplicated are associated with all source files that constitute the
なお、ファイルコードテーブル21は開発者が作成してもよく、この場合、ファイルコード生成部11は不要である。
The file code table 21 may be created by a developer. In this case, the file
バージョン受付部13は、開発者からプログラム20のバージョンの入力を受け付ける。プログラム20のバージョンについては後述する。
The
また、コード置き換え部14は、各ファイルに記述されている特定の関数を、プログラム20のバージョン、ファイルコード、及び、ソースファイルの行番号(16進数に変換後)、にて置き換える。すなわち、エラーコードを生成する。この置き換えにより、プログラム20はエラー発生時にソースファイルの行番号の表示が可能になる。
The
コード置き換え部14が、コンパイル部12にあるか、コンパイル部12の外部にあるかは、ビルド対象のファイルがコンパイルを必要とするか否かの違いに対応するためであり処理内容は同じである。例えば、JavaScript(登録商標、以下省略)で記述されたファイルはコンパイルされないので、コンパイル部12の外部にあるコード置き換え部14がエラーコードを生成する。C++やJAVAで記述されたファイルはコンパイルされるので、コンパイル部12のコード置き換え部14がエラーコードを生成する。コード置き換え部14がコンパイル前にエラーコードを生成するのであれば、コンパイル部12の外部にあるコード置き換え部14のみを搭載してもよい。
Whether the
ビルドツール511がこのようにして生成したプログラム20は、プログラム20に特有の様々な機能の他に、エラー検出部18及びエラーメッセージ表示部19を有する。エラー検出部18は、if文などにより変数の内容を判定してエラーの発生を検出する。エラーメッセージ表示部19は、エラー発生を検出して、エラーメッセージをディスプレイ208,120に描画する。
The
また、プログラムDL部17は、主にコミュニケーション端末300に搭載される。例えば、コミュニケーション端末300の電源がオンになると、IPLが起動してプログラムDL部17をCPU101に実行させる。プログラムDL部17は、例えばFTPコマンドで予め既知のサーバ400のIPアドレスを指定してサーバ400と接続し、getコマンドでプログラム20のファイル名を指定してサーバ400からプログラム20をダウンロードする。
The
なお、コミュニケーション端末300の電源がオフにされる際、コミュニケーション端末300はプログラム20をフラッシュメモリ104から消去する。これにより、電源オフ中に、コミュニケーション端末300からプログラム20が盗難されることを防止できる。
Note that when the
〔プログラムのバージョン〕
図10は、プログラム20のバージョンについて説明する図の一例である。ある程度の規模のプログラム20は、複数のソースファイルからビルドという処理を経て生成される。図では、main.cppというC++言語のソースファイル、base.hというmain.cppが使用するヘッダファイル、calk.jsというJavaScriptのソースファイル(JavaScriptはコンパイルされないがビルドの対象なのでソースファイルという)等から1つのプログラム20が構成されることが図示されている。
[Program version]
FIG. 10 is an example of a diagram for explaining the version of the
ビルドとは、これらのファイルを組み合わせて「実行可能ファイル」を作成することをいう。ビルドを行うのは、開発者が使用するプログラム作成装置500である。一般には、MakeやANT等のビルドツール511が市販されており、プログラム作成装置500がビルドツール511を実行することでプログラム20である実行可能ファイルが作成される(例えば、*.war、*.jar、*.exe等のファイル)。
Build means creating an “executable file” by combining these files. The build is performed by the
そして、この複数のファイルの各バージョンの組み合わせによって、プログラム20のバージョンが管理される。例えば、calk.jsのバージョンだけが変わった場合(calk.jsだけが更新され、他のファイルに変更がない場合)、calk.jsのバージョンによってプログラム20のバージョンが更新されていく。図では以下のようになっている。
calk.js Ver1:プログラムのバージョン 0.1.0.0
calk.js Ver2:プログラムのバージョン 0.1.0.1
calk.js VerX:プログラムのバージョン 0.2.0.5
プログラム20のバージョンは、例えばビルド時に開発者がビルドツール511に対し設定するようになっている。プログラム20のバージョンは、開発者が各ソースファイルのバージョンと共に記録するなどして管理することもできるが、専用のバージョン管理システムが利用されることが多い。バージョン管理システムとしては、例えば、フリーウェアのCVS(Concurrent Versions System)、SVN(Subversion)、Git等や、商用のVisualSourceSafe(登録商標)等が知られている。SVNの場合、プログラム20のバージョンは、例えば以下のようにして付与される。
The version of the
calk.js Ver1: Program version 0.1.0.0
calk.js Ver2: Program version 0.1.0.1
calk.js VerX: Program version 0.2.0.5
The version of the
s1)開発者は、バージョン管理システムのコマンド(import)を使用して、ソースファイルがツリー状に登録されているディレクトリ構造をリポジトリに登録する。リポジトリは、各資源(ソースファイル等)の格納場所である。この時、バージョン管理システムはプロジェクトに初期のバージョンとしてリビジョン1を与える。
s1) The developer registers a directory structure in which source files are registered in a tree form in the repository by using a version management system command (import). The repository is a storage location for each resource (such as a source file). At this time, the version control system gives
s2)開発者が、ソースファイルの1つ以上を編集する場合がある。開発者が、編集後のソースファイルの組み合わせを記録しておきたいと考えると、開発者は、バージョン管理システムのコマンド(commit)を使用して、編集結果をリポジトリに反映させる。バージョン管理システムはプロジェクトのリビジョンを増やして2にする。また、ソースファイルに新しいバージョンを付与する。 s2) The developer may edit one or more of the source files. When a developer wants to record a combination of source files after editing, the developer uses a version control system command (commit) to reflect the edited result in the repository. The version control system increases the project revision to 2. A new version is given to the source file.
s3)開発者が、各ソースファイルをビルドすることでプロジェクトからプログラム20を作成する場合、バージョン管理システムのコマンド(copy)を使用して、タグ名を与える。タグ名を与えることで、各ソースファイルのその時のバージョン又はバージョン違いのソースファイルそのものがタグ名に関連付けてバージョン管理システムにより記憶される。一般には、「タグ名=プログラム20のバージョン」のように付与される。
s3) When the developer creates the
タグ名を付与することで、プログラム20のバージョンが分かれば、バージョン管理システムはビルドに用いられた各ソースファイルを一意に特定できる。
By giving the tag name, if the version of the
以降は、タグ名を付与した時からディレクトリ構造とソースファイルの内容を変えないようにして(新規の変更を加えないようにして)、開発者の操作により、ビルドツール511がビルドを行う。ビルドの実行時、開発者は、タグ名をプログラム20のバージョンとして指定する。
Thereafter, the
後に、プログラム20のバージョンに対応したソースファイルを取り出すには、バージョン管理システムに対し、開発者がタグ名を指定して、ソースファイルを特定させる。
Later, in order to retrieve the source file corresponding to the version of the
なお、ビルドとバージョン管理が行えるIDEもあるので、必ずしもビルドツール511とバージョン管理システムを別に用意する必要はない。
Since there are IDEs that can perform build and version management, it is not always necessary to prepare the
図11は、ビルドツール511が生成するバージョン管理テーブルの一例を示す。ビルドツール511は、各ソースファイルのバージョン又はタイムスタンプ等を取得し、開発者が設定したプログラム20のバージョンに対応づけて登録する。したがって、プログラム20のバージョンが検出されれば、バージョン管理テーブルを参照することで、そのバージョンのプログラム20を構成する各ファイルのバージョンが特定される。バージョン管理テーブルは開発区で管理される。
FIG. 11 shows an example of a version management table generated by the
なお、図10のソースファイルは、各ソースファイルの種類(例えば記述言語)が同じではないが、ビルドツール511が、単一の種類(例えば、C++言語で記述されたファイルのみ)のファイルだけをビルドする場合もある。この場合、ビルドツール511はコンパイルとリンクのみを行う。このような一部のみの処理をビルドと呼ぶか、例えばコンパイルと呼ぶかは呼称だけの相違に過ぎず、ソースファイルが単一の種類しかなくても、プログラム実行機器は同様に行番号を表示することができる。
Note that the source files in FIG. 10 are not the same in the type (for example, description language) of each source file, but the
〔エラーコード〕
図12はエラーコードの一例を示す図である。図12ではエラーコード全体で10桁としている。左から桁番号を付して説明する。エラーコードの上位2桁は、プログラム20のバージョンの下2桁が入っている。例えば、プログラム20のバージョンが0.2.0.5 であれば"05" となる。下2桁だけとしているのは、エラーコードが長くなりすぎてユーザがサポートセンターに通知する際に間違えることを抑制するためである。ちなみに、エラーコードに"−"(ハイフン)が入っているのも、エラーコードを見やすくするためであり、ハイフン自体に意味はない。
〔Error code〕
FIG. 12 is a diagram illustrating an example of an error code. In FIG. 12, the entire error code is 10 digits. A description will be given with digit numbers from the left. The upper two digits of the error code contain the last two digits of the
バージョンの付け方のルールにもよるが、開発者が10進数で1つずつバージョンをインクリメントする場合、下2桁だけで100通りのバージョンを識別できる。したがって、バージョンの下2桁だけで、エラーコードを解析する上では十分な容量である。 Depending on the rules for versioning, when the developer increments the version one by one in decimal, 100 versions can be identified with only the last two digits. Therefore, only the last two digits of the version are sufficient for analyzing the error code.
エラーコードの第3−4桁の2文字は、エラーメッセージを出力したソースファイルのファイルコードである。ファイルコードは、図9にて説明したようにソースファイルのファイル名を識別する重複しない16進数である。16進で2桁あれば、255個のファイルを識別することができる。大規模なプログラム20ではファイルコードが不足するが、一般的な規模のプログラム20では十分である。また、ファイルコードが不足する場合は、5桁目のハイフンを利用するなどして、桁数を増やすことで対応する。なお、ファイル名をファイルコード化して表示するのは、エラーコードの長さをできるだけ短くするためだけでなく、ファイル名からプログラム20の機能などの情報がユーザ等に把握されることを防ぐためである。
The two characters of the third to fourth digits of the error code are the file code of the source file that output the error message. The file code is a non-overlapping hexadecimal number that identifies the file name of the source file as described with reference to FIG. If there are 2 digits in hexadecimal, 255 files can be identified. The large-
第6−8桁の3文字は、エラーメッセージを出力したソースファイルの行番号を16進で示す。16進数で3桁の場合、最大で4096行を表現することができる。1つのソースファイルのコード量が大きい場合には不足するが、一般的には不足することは多くない。また4096行では不足する場合、9桁目のハイフンを利用するなどして桁数を増やすことで対応する。行番号を16進数で表示するのはエラーコードの長さを短くするためである。 The 6th to 8th three characters indicate the line number of the source file that output the error message in hexadecimal. In the case of 3 digits in hexadecimal, a maximum of 4096 lines can be expressed. This is insufficient when the amount of code of one source file is large, but generally it is not often insufficient. In addition, if the 4096 lines are insufficient, a 9th digit hyphen is used to increase the number of digits. The reason why the line number is displayed in hexadecimal is to shorten the length of the error code.
第10桁の1文字は、任意の1文字である。ソースファイルの開発者が、例えば、エラー原因の解析に有効な情報をソースファイルの作成時に記述しておくために利用する。開発者にとっては、任意の1文字によりさらにエラー原因を解析しやすくなる。 One character of the 10th digit is an arbitrary character. This is used by the developer of the source file to describe, for example, information useful for analyzing the cause of the error when creating the source file. For developers, it is easier to analyze the cause of an error with an arbitrary character.
〔ソースファイル例〕
図13は、ソースファイルの記述例を説明する図の一例である。図のソースファイルには1つずつ大きくなる整数の行番号が付されている。実際のソースファイル自体には行番号が含まれないが、IDEやエディターは開発者を支援するため一行目から連番を付して表示する。
[Example of source file]
FIG. 13 is an example of a diagram illustrating a description example of a source file. The source file in the figure has an integer line number that increases by one. The actual source file itself does not include line numbers, but IDEs and editors display serial numbers from the first line to support the developer.
図13では、エラーメッセージの表示に「printErrorDialog」という関数が使用されている(11,28,105行目)。この関数がプログラム実行機器により実行されると、プログラム実行機器は図2のようなフォーマット(記述1〜3を有し、OKボタンが1つある)のエラーメッセージを表示する。
In FIG. 13, a function “printErrorDialog” is used to display an error message (
この関数は引数を3つ取る。
printErrorDialog(errorTitle1,errorMessage1,createCode(_reason);
1番目の引数のerrorTitle1は図2の記述1を指定し、2番目の引数のerrorMessage1は記述2を指定する。errorTitle1、errorMessage1には不図示の行で文字列が設定されており、文字列はRAM203,103、HD204、フラッシュメモリ104の所定のアドレスに記憶されている。プログラム実行機器は、この関数を実行すると、errorTitle1にて紐付けられたアドレスの文字列、及び、errorMessage1にて紐付けられたアドレスの文字列をRAM203,103、HD204、フラッシュメモリ104から読み出す。
This function takes three arguments.
printErrorDialog (errorTitle1, errorMessage1, createCode (_reason);
The first argument errorTitle1 specifies the
「printErrorDialog」関数の3つ目の引数createCode()が、記述3に対応し、エラーコードとの置き換え対象となる。createCode()は、エラーコードを作るための関数であり引数を1つ取る。printErrorDialogの実行時には、文字列になっているのでcreateCode()は関数として機能しない。したがって、関数でなく変数とエラーコードを置き換えてもよい。createCode()関数は、従来のエラーメッセージにおけるエラーコードを表示する関数なので、この関数とエラーコードを置き換えれば、開発者は元のソースファイルを活用して本実施例のエラーコードを表示するようにソースコードを変更できる。
The third argument “createCode ()” of the “printErrorDialog” function corresponds to the
コード置き換え部14はcreateCode()をプログラム20のバージョン、ファイルコード及び行番号に置き換え、createCode()の引数をエラーコードの任意の一文字に置き換える。任意の一文字は、11行目と28行目のcreateCode()では変数として与えられ、105行目では文字定数"2"として与えられている。3行目に記述があるように「_reason='0'」と記述されているので、11行目と28行目のcreateCode()を置き換えると、任意の1文字は"0"となる。これに対し、105行目のcreateCode()を置き換えると、任意の1文字は"2"となる。任意の一文字が何を意味するかはソースファイルの開発者が一文字とその内容を対応づけたテーブルなどで管理している。
The
図13では、11,28,105行目に合計3つの「printErrorDialog」関数が記述されている。エラーの発生場所や発生状況によって(すなわち、直前の処理に応じて)、開発者は引数を変えるので、記述1や記述2の内容も変わる。当然ながら、11行目と28行目のように、複数の「printErrorDialog」関数が同じ引数を有することもある。
In FIG. 13, a total of three “printErrorDialog” functions are described in the 11th, 28th, and 105th lines. Since the developer changes the argument depending on the location and situation of the error (that is, depending on the immediately preceding process), the contents of
このように記述1と2だけでは、同じメッセージを使っている箇所が複数あると、開発者でもどこから出力されたエラーメッセージか区別が難しいか、又は、まったく区別できない。しかしながら、本実施形態のようにエラーコードをソースコードに埋め込んでおくことで、エラーメッセージの記述1,2は同じでも、どのソースファイルのどの箇所(行)から出力されたエラーメッセージかを一意に判別することができる。
As described above, if there are a plurality of portions using the same message only by
例えば、エラーコードに28行という行番号が含まれていれば、開発者は、出力されたエラーメッセージは、ソースファイルの28行目の「printErrorDialog」関数により表示されたことを特定できる。したがって、開発者はソースファイルの28行目の近くにエラー発生の原因となった処理があったことを特定できる。図13の例ではエラーが発生した処理はエラーコードに含まれる行番号の数行前にある。 For example, if the error code includes a line number of 28 lines, the developer can specify that the output error message is displayed by the “printErrorDialog” function on the 28th line of the source file. Therefore, the developer can specify that there is a process causing the error near the 28th line of the source file. In the example of FIG. 13, the process in which an error has occurred is several lines before the line number included in the error code.
「printErrorDialog」関数の直前には例えばif文によるエラー発生の判定処理が記述されている。エラー発生の判定処理は、開発者が判定処理の直前の処理において発生しうるエラーを想定し、そのようなエラーが生じたか否かを検出するために最適な判定条件が記述されている。例えば、11行目のエラーメッセージが表示されるのは、変数operationにfailedという値が設定された場合であり、28行目のエラーメッセージが表示されるのは、変数errorOccurredに"0"以外の値が設定されていた場合であり、105行目のエラーメッセージが表示されるのは、変数getValueにnull(何も設定されていない)という値が設定された場合である。したがって、処理に特有のエラーを確実に検出することができる。変数operation、変数errorOccurred、変数getValueは実際にはRAM203,103、HD204、フラッシュメモリ104の所定のアドレスに記憶されている。プログラム実行機器が変数名によりこのアドレスにアクセスすればエラーの発生を判定できる。
Immediately before the “printErrorDialog” function, for example, an error occurrence determination process by an if statement is described. In the error occurrence determination process, an error that can occur in the process immediately before the determination process is assumed by the developer, and an optimal determination condition is described for detecting whether such an error has occurred. For example, the error message on the 11th line is displayed when the value “failed” is set in the variable operation, and the error message on the 28th line is displayed except for “0” in the variable errorOccurred. The value is set, and the error message on the 105th line is displayed when the variable getValue is set to a value of null (nothing is set). Therefore, an error peculiar to the processing can be reliably detected. The variable operation, variable errorOccurred, and variable getValue are actually stored at predetermined addresses in the
なお、if文によるエラー発生の判定は一例であり、例えばSwitch文によりエラー発生を判定してもよい。 Note that the determination of the occurrence of an error by an if statement is an example, and the occurrence of an error may be determined by a Switch statement, for example.
図14は、エラーコードに置き換えられた後のソースファイルの一例を示す図である。図13と比較すると分かるように、
11 行目のCreateCode(_Reason)が0511−00B−0
28 行目のCreateCode(_Reason)が0511−01C−0
105行目のCreateCode('2')が 0511−069−2
にそれぞれ置き換えられている。
FIG. 14 is a diagram illustrating an example of a source file after being replaced with an error code. As can be seen by comparing with FIG.
The 11th line CreateCode (_Reason) is 0511-00B-0
CreateCode (_Reason) on
CreateCode ('2') on
Has been replaced respectively.
〔動作手順〕
図15は、プログラム作成装置500がエラーコードを生成する手順を示すフローチャート図の一例である。なお、この処理手順はコード置き換え部14がコンパイル部12の外にある場合を例示するが、コンパイル部12のコード置き換え部14が処理する場合も実行のタイミングが異なるだけで処理内容は同じである。
[Operation procedure]
FIG. 15 is an example of a flowchart illustrating a procedure in which the
開発者は、各ファイルをビルドするに当たり、ビルド後のプログラム20のバージョンをプログラム作成装置500に設定する(S10)。プログラム作成装置500のバージョン受付部13はバージョンの入力を受け付ける。
When building each file, the developer sets the version of the
次に、ファイルコード生成部11は、ファイルコードテーブル21を作成する(S20)。ビルド対象のソースファイルはビルドファイル22から特定することができる。上図の例では、filesディレクトリの下位のファイルが相当する。
Next, the file
次に、コード置き換え部14は、ファイルコードテーブル21の作成対象となったソースファイルを順番に読み出す(S30)。これにより、現在着目しているソースファイルのファイルコードが特定される。
Next, the
コード置き換え部14は、新たなソースファイルを読み出すと、1行目から順番に命令を読み出す(S40)。1つの命令が2行以上にわたって記述されていても、1行ずつ読み出す。すなわち、命令の書式や文法には影響されずに読み出せばよいが、1〜2行のずれはエラー原因の特定の大きな障害とはならないので、行を跨いた1つの命令の全体を読み出してもよい。
When the
次に、コード置き換え部14は、読み出した行にcreateCode()関数が含まれているか否かを判定する(S50)。createCode()関数の引数はどのような値でもよいし、なくてもよい。
Next, the
createCode()関数が含まれていない場合(S50のNo)、処理はステップS40に戻る。 When the createCode () function is not included (No in S50), the process returns to step S40.
createCode()関数が含まれている場合(S50のYes)、コード置き換え部14は、エラーコードを作成する(S60)。エラーコードの作成には、プログラム20のバージョン、ファイルコード及び行番号を用いる。上述した任意の一文字は置き換えても置き換えなくてもよい。コード置き換え部14は、開発者がプログラム作成装置500に入力しているプログラム20のバージョンを取得し、下位の2桁を抽出する。次に、現在着目しているファイルのファイル名に対応づけられたファイルコードをファイルコードテーブル21から読み出す。次に、現在読み出している行をそのまま行番号として、16進数に変換する。また、createCode()関数の引数があれば任意の一文字を特定する。なお、エラーが生じた処理は数行前であるので、現在読み出している行から数行を引いた値を行番号として16進数に変換してもよい。そしてこれらの文字列とハイフンを予め定められた桁に配置することで、エラーコードを作成する。
When the createCode () function is included (Yes in S50), the
コード置き換え部14は、作成したエラーコードでcreateCode()関数を置き換える(S70)。
The
そして、コード置き換え部14は、1つのソースファイルの最終行まで到達したか否かを判定する(S80)。最終行まで到達していない場合(S80のNo)、処理はステップS40に戻る。最終行まで到達した場合(S80のYes)、処理はステップS90に進む。
Then, the
最終行まで到達すると、コード置き換え部14は、ビルド対象の全てのファイル(ファイルコードテーブル21の全てのソースファイル)について処理したか否かを判定する(S90)。
When reaching the last line, the
ビルド対象の全てのソースファイルを処理するまでは(S90のNo)、ステップS30からの処理を繰り返す。ビルド対象の全てのファイルを処理した場合(S90のYes)、ビルド部はファイルを結合して圧縮する(S100)。より具体的には、コンパイルするソースファイルに対してはコンパイル部12がコンパイルし、リンケージ部15がリンクし特定のディレクトリに保存する。また、ビルドツール511はコピーするだけでよいソースファイルを特定のディレクトリにコピーする。最終的に圧縮部16がビルドファイルで指定されるディレクトリ以下の複数のファイルを結合して圧縮する。こうすることで、実行ファイルであるプログラム20が作成される。
Until all the source files to be built are processed (No in S90), the processing from step S30 is repeated. When all the files to be built have been processed (Yes in S90), the build unit combines and compresses the files (S100). More specifically, the compiling
作成されたプログラム20は、記憶媒体又はネットワークを経由してプログラム実行機器にインストールされる。コミュニケーション端末300の場合は、電源オンによりサーバ400からダウンロードされる。
The created
図16は、プログラム実行機器がプログラム20を実行した際にエラーメッセージを表示する手順を示すフローチャート図の一例である。
FIG. 16 is an example of a flowchart illustrating a procedure for displaying an error message when the program execution device executes the
プログラム実行機器は、分岐やサブルーチンなどの呼び出しがなければプログラム20をアドレス順に実行する(S110)。
If there is no branch or subroutine call, the program execution device executes the
そして、if文などのエラー検出部18はエラーが検出されたか否かを判定する(S120)。エラー検出部18がエラーを検出した場合(S120のYes)、エラーメッセージ表示部19がエラーメッセージを作成する(S130)。具体的には、PrintErrorDialog関数の1つめの引数であるerrorTitle1に対応づけて記憶されている文字列をRAM203,103、HD204、フラッシュメモリ104から読み出し、2つめの引数であるerrorMessage1に対応づけて記憶されている文字列をRAM203,103、HD204、フラッシュメモリ104から読み出す。また、3つの引数である例えば「0511−00B−0」という文字列をRAM203,103、HD204、フラッシュメモリ104から読み出す。各記述1〜3の配置位置は、開発者がPrintErrorDialog関数の属性としてソースファイルの作成時に指定している。
Then, the
エラーメッセージ表示部19はエラーメッセージをディスプレイ208,120等に表示する(S140)。これにより図2に示したようにエラーコードにおいてエラーが発生した行番号が表示されるので、ユーザはエラーコードをサポートセンターに通知することができる。ユーザがOKボタンを押下すると、プログラム実行機器はPrintErrorDialog関数の次の命令から処理を再開する。
The error
サポートセンターや開発区はバージョン管理テーブルを参照して、エラーコードに含まれるプログラム20のバージョンに対応づけられた各ファイルのバージョンを特定する。次に、サポートセンターや開発区はファイルコードテーブル21を参照して、エラーコードに含まれるファイルコードに対応づけられたファイル名を特定する。これにより、エラーが発生したソースファイルとそのバージョンを特定できる。サポートセンターや開発区は、エラーコードに含まれる行番号によりソースファイルにおけるエラーの発生箇所を特定する。したがって、エラーの発生した命令をピンポイントに特定できたことになる。
The support center or development zone refers to the version management table and identifies the version of each file associated with the version of the
本実施例では、実施例1とは別のエラーコードを表示するプログラム実行機器及びプログラム作成装置について説明する。 In the present embodiment, a program execution device and a program creation device that display error codes different from those in the first embodiment will be described.
〔エラーコード〕
図17は、本実施例のエラーコードの一例を示す図である。図17のエラーコードは、全体で12桁としている。左から桁番号を付して説明する。本実施例では、エラーコードの1−4桁の4文字にエラー番号が付されていることに特徴がある。
〔Error code〕
FIG. 17 is a diagram illustrating an example of an error code according to the present embodiment. The error code in FIG. 17 has a total of 12 digits. A description will be given with digit numbers from the left. This embodiment is characterized in that an error number is assigned to four characters of 1-4 digits of the error code.
エラー番号は、エラー内容を一意に(又はいくつかのエラーをまとめて)識別する識別情報である。実施例1のエラーコードは、開発者がソースコードを参照してエラーコードを解析することが前提であった。ユーザは、サポートセンターにメッセージとエラーコードを通知するが、メッセージやエラーコードが長い場合や似たようなメッセージ又はエラーコードが多数ある場合、正しく通知できないおそれがある。 The error number is identification information that uniquely identifies the error content (or collects several errors). The error code of the first embodiment is based on the premise that the developer analyzes the error code with reference to the source code. The user notifies the support center of the message and the error code. However, when the message or error code is long or there are many similar messages or error codes, there is a possibility that the user cannot be notified correctly.
エラーコードの上位4桁はこの課題を解決するためのものである。また、プログラム実行機器のメーカがエラー番号に対応したエラー内容及び解決策が記述されたマニュアルをユーザサイドに配布したり、エラー番号からエラー内容及び解決策を表示するWebページを用意しておくことが可能になる。ユーザがエラーコードの上位4桁に基づきマニュアル等を参照することで、サポートセンターに連絡することなくプログラムの不具合の要因を解消する機会を得られる可能性を増やすことができる。 The upper 4 digits of the error code are for solving this problem. In addition, the manufacturer of the program execution device should distribute a manual describing the error contents and solutions corresponding to the error numbers to the user side, and prepare a Web page that displays the error contents and solutions from the error numbers. Is possible. By referring to the manual or the like based on the upper 4 digits of the error code, the user can be more likely to have an opportunity to eliminate the cause of the program failure without contacting the support center.
エラーコードの5桁目のハイフンは、エラー番号とその他を区分するための記号である。必ずしもハイフンである必要はなく"_"" "(スペース)、":""/"等でもよい。また、ハイフン等がなければエラー番号を記述できないわけではない。 The hyphen in the fifth digit of the error code is a symbol for distinguishing the error number from others. It does not necessarily have to be a hyphen, and may be "_" "" (space), ":" "/", or the like. Also, it is not impossible to describe error numbers without hyphens.
6,7桁の2文字は、図12のエラーコードの1,2桁と同じもの(プログラム20のバージョンの下2桁)であり、8,9桁の2文字は、図12のエラーコードの3,4桁と同じもの(エラーメッセージを出力したソースファイルのファイルコード)である。 The two characters of 6 and 7 digits are the same as the 1 and 2 digits of the error code in FIG. 12 (the last 2 digits of the version of the program 20), and the 2 characters of 8 and 9 digits are the error code of FIG. It is the same as 3 or 4 digits (file code of the source file that output the error message).
図12のエラーコードの5桁目のハイフンは、図17のエラーコードでは省略されている。これは、図17のエラーコードではハイフンを5桁目のハイフンの1つとすることで、エラー番号とそれ以外のコードを明確化するためである。エラーコード以外のコード(6−12桁)は実施例1と同様に開発区が使用する。また、ハイフンを省くことでエラーコードが長くなりすぎることを抑制できる。 The hyphen in the fifth digit of the error code in FIG. 12 is omitted in the error code in FIG. This is because the error number and other codes are clarified by setting the hyphen to one of the fifth digit hyphens in the error code of FIG. The code other than the error code (6-12 digits) is used by the development zone in the same manner as in the first embodiment. Also, omitting the hyphen can prevent the error code from becoming too long.
10−12桁の3文字は、図12のエラーコードの6−8桁と同じもの(ソースファイルの行番号)である。 Three characters of 10-12 digits are the same as the 6-8 digits of the error code in FIG. 12 (line number of the source file).
なお、図12のエラーコードの9,10桁は削除されている。これは、エラーコードが長くなることを防ぐためである。ただし、削除せずに図17のエラーコードの13,14桁に追加してもよい。 The 9th and 10th digits of the error code in FIG. 12 are deleted. This is to prevent the error code from becoming long. However, the error code of FIG. 17 may be added to the 13th and 14th digits without being deleted.
また、エラー番号は上位1−4桁に記述されているが、エラー番号の位置は上位1−4桁に限られない。エラー番号以外の、プログラム20のバージョン及びソースファイルの行番号の記述位置も図17の例に限定されない。また、エラー番号の桁数は4桁に限らず、3桁以下、又は、5桁以上としてもよい。
The error number is described in the upper 1-4 digits, but the position of the error number is not limited to the upper 1-4 digits. The description position of the version of the
〔ソースファイル例〕
図18は、ソースファイルの記述例を説明する図の一例である。図18において図13との共通部はその主要部を説明する。実施例1と同様に「printErrorDialog」という関数がエラーメッセージを表示する関数である。しかし、本実施例のprintErrorDialog関数は2つの引数を取る。
[Source file example]
FIG. 18 is an example of a diagram illustrating a description example of a source file. In FIG. 18, the common parts with FIG. Similar to the first embodiment, a function “printErrorDialog” is a function for displaying an error message. However, the printErrorDialog function of this embodiment takes two arguments.
1番目の引数のerror1(又はerror2)には、エラー番号テーブルにより、予めエラー番号と紐づけられている。また、1番目の引数がエラー番号に対応づけられたため、実施例1で1番目の引数が対応づけられていた記述1及び2番目の引数が対応づけられていた記述2は1番目の引数に紐付く形でエラー番号テーブルに登録されている。このため、実施例1の2番目の引数が省略される。
The first argument error1 (or error2) is associated with an error number in advance by the error number table. In addition, since the first argument is associated with the error number,
3番目の引数createCode()は、エラーコードとの置き換え対象となる。なお、本実施例では、エラーコードに任意の1文字が含まれないので、createCode()の引数は使用されない。 The third argument createCode () is to be replaced with an error code. In the present embodiment, since an arbitrary character is not included in the error code, the argument of createCode () is not used.
図19は、1番目の引数とエラー番号、記述1及び記述2が対応づけられたエラー番号テーブル31の一例を示す図である。エラー番号テーブル31は、プログラム作成装置500の例えばHDD508、及び、プログラム実行機器のHD204、SSD105などに記憶されている。エラー番号テーブル31は「errorName」「errorNumber」「errorTitle」「errorMessage」の各フィールドを有する。
「errorName」:「printErrorDialog」関数の1番目の引数となりうる値が登録されている
「errorNumber」:エラーコードにおけるエラー番号が登録されている
「errorTitle」:エラー名(エラーの簡単な内容)が登録されている
「errorMessage」:エラーメッセージ(エラーの具体的な内容)が登録されている
このようにソースファイルのprintErrorDialog関数の1番目の引数が「errorName」として登録されている。なお、エラーメッセージの記述1には「errorTitle」が、記述2には「errorMessage」がそれぞれ表示される。
FIG. 19 is a diagram showing an example of the error number table 31 in which the first argument is associated with the error number,
“ErrorName”: The value that can be the first argument of the “printErrorDialog” function is registered. “ErrorNumber”: The error number in the error code is registered. “ErrorTitle”: The error name (simple contents of the error) is registered. "ErrorMessage": Error message (specific content of error) is registered In this way, the first argument of the printErrorDialog function of the source file is registered as "errorName". The
コード置き換え部14は、1番目の引数に基づきエラー番号テーブル31を参照し、エラー番号と記述1、2を読み出す。また、createCode()を、エラー番号、プログラム20のバージョン、ファイルコード及び行番号に置き換える。これにより、createCode()はエラーコードに置き換えられる。
The
図20は、エラーコードに置き換えられた後のソースファイルの一例を示す図である。図18と比較すると分かるように、
11 行目のCreateCode()が"0001−051100B"
28 行目のCreateCode()が"0001−051101C"
105行目のCreateCode()が"0002−0511069"
にそれぞれ置き換えられている。
FIG. 20 is a diagram illustrating an example of a source file after being replaced with an error code. As can be seen by comparing with FIG.
The 11th line CreateCode () is "0001-051100B"
CreateCode () on
CreateCode () on the 105th line is "0002-0511069"
Has been replaced respectively.
上述したように、エラーコードの1−4桁がエラー番号に置き換えられている。 As described above, the 1-4 digits of the error code are replaced with the error number.
〔動作手順〕
図21は、プログラム作成装置500がエラーコードを生成する手順を示すフローチャート図の一例である。図21の手順は、ステップS55が追加されている点で図15と異なっている。
[Operation procedure]
FIG. 21 is an example of a flowchart illustrating a procedure in which the
すなわち、ソースファイルから読み出した行にcreateCode()関数が含まれている場合(S50のYes)、コード置き換え部14は、エラー番号テーブル31を参照してエラー番号を特定する(S55)。すなわち、コード置き換え部14はcreateCode()関数を第2引数とするprintErrorDialog関数の1番目の引数(図18ではerror1又はerror2)を読み出す。
That is, when the createCode () function is included in the line read from the source file (Yes in S50), the
そして、エラー番号テーブル31において1番目の引数が「errorName」に登録されているレコードの「errorNumber」を読み出す。これがエラー番号になる。また、コード置き換え部14は、図15の手順と同様に、プログラム20のバージョン、ファイルコード及び行番号を特定する。これにより、図17のエラーコードを生成できる。
Then, “errorNumber” of the record whose first argument is registered in “errorName” in the error number table 31 is read. This is the error number. Further, the
コード置き換え部14は、作成したエラーコードでcreateCode()関数を置き換える(S70)。以降の処理は実施例1と同様である。
The
図22は、プログラム実行機器がプログラム20を実行した際にエラーメッセージを表示する手順を示すフローチャート図の一例である。
FIG. 22 is an example of a flowchart illustrating a procedure for displaying an error message when the program execution device executes the
プログラム実行機器は、分岐やサブルーチンなどの呼び出しがなければプログラム20をアドレス順に実行する(S110)。
If there is no branch or subroutine call, the program execution device executes the
そして、if文などのエラー検出部18はエラーが検出されたか否かを判定する(S120)。エラー検出部18がエラーを検出した場合(S120のYes)、エラーメッセージ表示部19が、エラー番号テーブル31において、PrintErrorDialog関数の1番目の引数が「errorName」に登録されているレコードの「errorTitle」「errorMessage」を読み出す(S125)。
Then, the
次いで、エラーメッセージ表示部19がエラーメッセージを作成する(S130)。具体的には、2番目の引数である例えば「0001−051100B」という文字列をRAM203,103、HD204、フラッシュメモリ104から読み出す。これが記述3であり、「errorTitle」を記述1、「errorMessage」を記述2として、エラーメッセージを作成する。各記述1〜3の配置位置は、開発者がPrintErrorDialog関数の属性としてソースファイルの作成時に指定している。
Next, the error
エラーメッセージ表示部19はエラーメッセージをディスプレイ208,120等に表示する(S140)。これにより、エラー番号が含まれるエラーコードがエラーメッセージの一部として表示される。
The error
したがって、ユーザはエラーコードをサポートセンターに通知することができる。また、マニュアルやWebページからエラー番号に基づきエラー内容や解決策を調べることが可能になる。ユーザがOKボタンを押下すると、プログラム実行機器はPrintErrorDialog関数の次の命令から処理を再開する。 Therefore, the user can notify the support center of the error code. Further, it becomes possible to check error contents and solutions based on error numbers from a manual or a web page. When the user presses the OK button, the program execution device resumes processing from the next instruction of the PrintErrorDialog function.
このように、本実施例のプログラム実行機器及びプログラム作成装置によれば、実施例1の効果に加えて、ユーザがエラー内容や解決策を調べることを可能にできる。 As described above, according to the program execution device and the program creation device of the present embodiment, in addition to the effects of the first embodiment, the user can check the error content and the solution.
本実施例では、エラーメッセージをサポートセンターに通知するプログラム実行機器について説明する。 In this embodiment, a program execution device that notifies an error message to a support center will be described.
図23は、エラー通知システム700の構成図の一例を示す。ネットワークを介して複数のプログラム実行機器が、サポートセンターの保守用の端末600と通信可能に接続されている。サポートセンターの保守用の端末600のハードウェア構成は情報処理装置100と同じであるため図示は省略する。
FIG. 23 shows an example of a configuration diagram of the
プログラム実行機器にはサポートセンターの保守用の端末600のIPアドレスが予め登録されている。IPアドレスでなくURLにてサポートセンターの保守用の端末600を特定してもよい。また、プログラム実行機器には、識別情報が予め登録されている。この識別情報は、プログラム実行機器を一意に特定するための情報であり、数値、アルファベット若しくは記号をそれぞれ単独で組み合わせたもの、又は、これらの任意の1つ以上を組み合わせたものである。
In the program execution device, the IP address of the
プログラム実行機器は、エラーメッセージをサポートセンターに通知する際、識別情報をサポートセンターに送信する。 When notifying the error message to the support center, the program execution device transmits identification information to the support center.
サポートセンターの保守用の端末600は、識別情報に対応づけられたユーザ情報を有している。ユーザ情報は、企業名、部署名、住所及び連絡先などの情報である。サポートセンターは識別情報によりプログラム実行機器のユーザを特定し、アフターサービスなどを提供することができる。
The support
なお、ユーザによっては、識別情報からユーザ情報が特定されることを好まないユーザも存在する。よって、ユーザは、プログラム実行機器による識別情報の自動送信の禁止を、プログラム実行機器に設定可能になっている。または、識別情報を自動的に送信することは許可しても、ユーザがユーザ情報の登録を禁止するようにサポートセンターに依頼することが可能になっている。 Some users do not like the user information specified from the identification information. Therefore, the user can set prohibition of automatic transmission of identification information by the program execution device to the program execution device. Alternatively, even if the automatic transmission of the identification information is permitted, the user can request the support center to prohibit the registration of the user information.
また、サポートセンターの保守用の端末600は、エラー番号テーブル31とエラー詳細情報を記憶している。エラー番号テーブル31は、実施例2と同じものである。エラー詳細情報は、エラー番号に対応づけてエラーの詳細な内容を有している。すなわち、エラー詳細情報は、エラー番号テーブル31の「errorTitle」「errorMessage」よりもさらに詳細な情報である。
The support
サポートセンターの保守用の端末600がエラー番号テーブル31を有することで、保守用の端末600は、プログラム実行機器から受信したエラー番号によりエラーメッセージを端末600のディスプレイに表示することができる。また、保守用の端末600は、プログラム実行機器から受信したエラー番号によりエラー詳細情報を端末600のディスプレイに表示することができる。また、サポートセンターの保守用の端末600はプログラム実行機器の識別情報又はプログラム実行機器のユーザ情報を表示することもできる。
Since the
したがって、プログラム実行機器のユーザが、エラーコードをサポートセンターに通知しなくてもサポートセンターにおいて、エラーメッセージだけでなく、エラーが発生したプログラム実行機器(又はユーザ)を特定でき、さらに、エラーが発生したプログラムコードの命令をピンポイントで特定できる。 Therefore, even if the user of the program execution device does not notify the support center of the error code, the support center can identify not only the error message but also the program execution device (or user) in which the error has occurred, and an error has occurred. The program code instructions can be pinpointed.
図24は、プログラム実行機器とサポートセンターの保守用の端末600の動作手順を示すフローチャート図の一例である。
FIG. 24 is an example of a flowchart showing an operation procedure of the program execution device and the
プログラム実行機器がプログラムを実行した際、エラーが発生する(S210)。実施例2で説明したように、プログラム実行機器はエラーメッセージを作成する。本実施例のプログラム実行機器は、エラーメッセージの全体又はエラーメッセージのうち少なくともエラーコード、及び、識別情報をサポートセンターの保守用の端末600に送信する(S220)。
When the program execution device executes the program, an error occurs (S210). As described in the second embodiment, the program execution device creates an error message. The program execution device according to the present embodiment transmits the entire error message or at least the error code and the identification information of the error message to the
サポートセンターの保守用の端末600は、識別情報とエラーコードを受信する(S230)。
The support
サポートセンターの保守用の端末600は、エラーコードから1−4桁のエラー番号を取り出す(S240)。
The
サポートセンターの保守用の端末600は、エラー番号に基づきエラー番号テーブル31を参照しエラーメッセージを作成し、また、エラー番号に基づきエラー詳細情報を読み出す(S250)。
The
サポートセンターの保守用の端末600は、識別情報・エラーメッセージ・エラー詳細情報をディスプレイに表示する(S260)。
The
以上のように、本実施例のエラー通知システム700は、プログラム実行機器が識別情報とエラーコードを送信し、サポートセンターの保守用の端末600が識別情報を表示することでエラーが発生したプログラム実行機器を特定できる。また、エラーメッセージを表示するので、エラーが発生したプログラムコードの命令をピンポイントで特定できる。また、エラー詳細情報を表示するので、サポートセンターがエラー内容を特定し解決策を把握することができる。
As described above, in the
11 ファイルコード生成部
12 コンパイル部
13 バージョン受付部
14 コード置き換え部
15 リンケージ部
16 圧縮部
17 プログラムDL部
18 エラー検出部
19 エラーメッセージ表示部
20 プログラム
31 エラー番号テーブル
100 情報処理装置
200 MFP
300 コミュニケーション端末
301 コミュニケーションシステム
400 サーバ
500 プログラム作成装置
600 サポートセンターの保守用の端末
700 エラー通知システム
DESCRIPTION OF
300
Claims (13)
前記プログラムを実行する中央処理装置と、
前記プログラムとして複数のファイルが結合された実行可能な圧縮ファイルを記憶するプログラム記憶手段と、
命令の実行結果を格納するアドレスの記憶内容に基づき不具合を検出する不具合検出手段と、
前記不具合検出手段が不具合を検出した場合、命令に記述されている、前記プログラムのバージョン情報、前記ファイルのファイル識別情報、及び、実行中の命令の前記ファイルにおける行番号、を含むエラーメッセージを表示装置に出力するエラーメッセージ表示手段と、を有する組み込み機器。 An embedded device that displays an error message when a failure is detected during program execution.
A central processing unit for executing the program;
Program storage means for storing an executable compressed file in which a plurality of files are combined as the program;
A failure detection means for detecting a failure based on the stored contents of the address storing the execution result of the instruction;
When the defect detection means detects a defect, an error message including version information of the program, file identification information of the file, and a line number in the file of the instruction being executed is displayed in the instruction. An embedded device having an error message display means for outputting to the apparatus.
ことを特徴とする請求項1又は2記載の組み込み機器。 The error message display means reads the version information, the file identification information, and the line number described in the program from a predetermined address of a memory included in the embedded device, and a predetermined position of the error message. To place in the
The embedded device according to claim 1, wherein the embedded device is a device.
ことを特徴とする請求項3記載の組み込み機器。 The error message display means is associated with the first character string associated with the first argument of the instruction described in the program and the second argument of the instruction described in the program. The second character string is read from a predetermined address of the memory included in the embedded device and is arranged at a predetermined position of the error message.
The embedded device according to claim 3.
ことを特徴とする請求項4記載の組み込み機器。 The first character string is a character string meaning that a failure has occurred, and the second character string is a character string meaning a corresponding method,
The embedded device according to claim 4.
前記エラーメッセージ表示手段は、前記プログラムに記述されている命令の第一の引数に前記エラーテーブルで対応づけられている前記第一の文字列、及び、前記第二の文字列を読み出し、前記エラーメッセージの予め定められた位置に配置する、
ことを特徴とする請求項3記載の組み込み機器。 Corresponding to the first argument of the instruction described in the program, it has an error table in which the first character string and the second character string are registered,
The error message display means reads the first character string and the second character string associated with the first argument of an instruction described in the program in the error table, and Place it at a predetermined position in the message,
The embedded device according to claim 3.
ことを特徴とする請求項6記載の組み込み機器。 The first character string is a character string meaning an error name, and the second character string is a character string meaning an error content.
The embedded device according to claim 6.
前記複数のファイル、及び、結合対象の前記ファイルを指定するファイル指定情報を記憶するファイル記憶手段と、
前記プログラムのバージョン情報の入力を受け付けるバージョン情報受付手段と、
前記ファイル指定情報が指定する前記複数のファイルのそれぞれにファイル識別情報を付与してファイル識別テーブルを作成する識別テーブル作成手段と、
前記ファイルに記述された所定の記号を、前記バージョン情報受付手段が受け付けた前記バージョン情報、前記ファイル識別テーブルに登録されている前記ファイルのファイル識別情報、及び、該記号が記述されている行又は付近の行の行番号、で置き換える記号置き換え手段と、
を有するプログラム作成装置。 A program creation device for creating a compressed file that can be executed by combining a plurality of files,
File storage means for storing the plurality of files and file designation information for designating the files to be combined;
Version information receiving means for receiving input of version information of the program;
Identification table creating means for creating a file identification table by giving file identification information to each of the plurality of files designated by the file designation information;
A predetermined symbol described in the file, the version information received by the version information receiving means, the file identification information of the file registered in the file identification table, and a line in which the symbol is described, or Symbol replacement means to replace with the line number of a nearby line,
A program creation device having
前記プログラムとして複数のファイルが結合された実行可能な圧縮ファイルを記憶するプログラム記憶手段と、を有し、
プログラムの実行時に不具合を検出するとエラーメッセージを表示する組み込み機器に、
命令の実行結果を格納するアドレスの記憶内容に基づき不具合を検出する不具合検出ステップと、
前記不具合検出手段が不具合を検出した場合、命令に記述されている、前記プログラムのバージョン情報、前記ファイルのファイル識別情報、及び、実行中の命令の前記ファイルにおける行番号、を含むエラーメッセージを表示装置に出力するエラーメッセージ表示ステップと、
を実行させるプログラム。 A central processing unit for executing the program;
Program storage means for storing an executable compressed file in which a plurality of files are combined as the program,
An embedded device that displays an error message when a problem is detected during program execution
A defect detection step for detecting a defect based on the stored contents of the address storing the execution result of the instruction;
When the defect detection means detects a defect, an error message including version information of the program, file identification information of the file, and a line number in the file of the instruction being executed is displayed in the instruction. An error message display step to output to the device;
A program that executes
前記プログラムのバージョン情報の入力を受け付けるバージョン情報受付ステップと、
前記ファイル指定情報が指定する前記複数のファイルのそれぞれにファイル識別情報を付与してファイル識別テーブルを作成する識別テーブル作成ステップと、
前記ファイルに記述された所定の記号を、前記バージョン情報受付手段が受け付けた前記バージョン情報、前記ファイル識別テーブルに登録されている前記ファイルのファイル識別情報、及び、該記号が記述されている行又は付近の行の行番号、で置き換える記号置き換えステップと、
を実行させるプログラム。 A file storage means for storing file designation information for designating a plurality of files and a file to be combined, and a program creation device for creating a single compressed file by combining a plurality of files;
A version information receiving step for receiving input of version information of the program;
An identification table creating step of creating a file identification table by giving file identification information to each of the plurality of files designated by the file designation information;
A predetermined symbol described in the file, the version information received by the version information receiving means, the file identification information of the file registered in the file identification table, and a line in which the symbol is described, or A symbol replacement step to replace with the line number of a nearby line,
A program that executes
複数のファイルが結合された圧縮ファイルに、当該プログラムのバージョン情報、前記ファイルのファイル識別情報、及び、実行中の命令の前記ファイルにおける行番号、が記述されている、ことを特徴とするプログラム。 A program created by the program creation device according to claim 10,
A program characterized in that version information of the program, file identification information of the file, and line number in the file of an instruction being executed are described in a compressed file in which a plurality of files are combined.
Priority Applications (7)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012111680A JP6163707B2 (en) | 2011-07-15 | 2012-05-15 | Embedded device, program creation device, program |
EP12814793.1A EP2732372A4 (en) | 2011-07-15 | 2012-07-04 | Embedded apparatus, program generation apparatus, and program |
CN201280034319.5A CN103649924A (en) | 2011-07-15 | 2012-07-04 | Embedded apparatus, program generation apparatus, and program |
PCT/JP2012/067631 WO2013011878A1 (en) | 2011-07-15 | 2012-07-04 | Embedded apparatus, program generation apparatus, and program |
US14/130,137 US20140143615A1 (en) | 2011-07-15 | 2012-07-04 | Embedded apparatus, program generation apparatus, and program |
CA2842095A CA2842095A1 (en) | 2011-07-15 | 2012-07-04 | Embedded apparatus, program generation apparatus, and program |
AU2012285083A AU2012285083B2 (en) | 2011-07-15 | 2012-07-04 | Embedded apparatus, program generation apparatus, and program |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011157183 | 2011-07-15 | ||
JP2011157183 | 2011-07-15 | ||
JP2012111680A JP6163707B2 (en) | 2011-07-15 | 2012-05-15 | Embedded device, program creation device, program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013041571A true JP2013041571A (en) | 2013-02-28 |
JP6163707B2 JP6163707B2 (en) | 2017-07-19 |
Family
ID=47558056
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012111680A Expired - Fee Related JP6163707B2 (en) | 2011-07-15 | 2012-05-15 | Embedded device, program creation device, program |
Country Status (7)
Country | Link |
---|---|
US (1) | US20140143615A1 (en) |
EP (1) | EP2732372A4 (en) |
JP (1) | JP6163707B2 (en) |
CN (1) | CN103649924A (en) |
AU (1) | AU2012285083B2 (en) |
CA (1) | CA2842095A1 (en) |
WO (1) | WO2013011878A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016063520A (en) * | 2014-09-22 | 2016-04-25 | 東芝ライテック株式会社 | Consumer electronics controller, consumer electronics control system, and consumer electronics control method |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6151664B2 (en) * | 2014-05-26 | 2017-06-21 | ファナック株式会社 | Numerical controller |
JP2017041831A (en) | 2015-08-21 | 2017-02-23 | 株式会社リコー | Communication system, communication management system, communication management method, and program |
US10437659B2 (en) * | 2017-03-03 | 2019-10-08 | Silicon Laboratories, Inc. | Built-in context error variables |
JP7039377B2 (en) * | 2018-04-18 | 2022-03-22 | キヤノン株式会社 | Information processing device, control method of information processing device, and program |
CN110751797A (en) * | 2019-09-30 | 2020-02-04 | 南京紫津融畅信息科技服务有限公司 | ATM system fault processing method, system and storage medium |
CN116521411B (en) * | 2023-03-27 | 2023-11-17 | 广东保伦电子股份有限公司 | Method, device and medium for detecting program error and resetting embedded device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001146062A (en) * | 1999-11-19 | 2001-05-29 | Seiko Epson Corp | Print system and printer |
JP2006040222A (en) * | 2004-07-30 | 2006-02-09 | Fujitsu Ltd | Message display method and message display system |
JP2007122429A (en) * | 2005-10-28 | 2007-05-17 | Matsushita Electric Ind Co Ltd | Information providing system, device, and method |
JP2010039796A (en) * | 2008-08-06 | 2010-02-18 | Fujitsu Ltd | Apparatus, method and program for collecting logging information |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5732275A (en) * | 1996-01-11 | 1998-03-24 | Apple Computer, Inc. | Method and apparatus for managing and automatically updating software programs |
US5974454A (en) * | 1997-11-14 | 1999-10-26 | Microsoft Corporation | Method and system for installing and updating program module components |
US8201162B2 (en) * | 2001-03-19 | 2012-06-12 | Sony Corporation | Software updating system, software updating method, and software updating program |
US7165202B2 (en) * | 2001-03-22 | 2007-01-16 | Landesk Software Limited | Method and apparatus to perform customized error handling |
US7472254B2 (en) * | 2003-10-10 | 2008-12-30 | Iora, Ltd. | Systems and methods for modifying a set of data objects |
US8261246B1 (en) * | 2004-09-07 | 2012-09-04 | Apple Inc. | Method and system for dynamically populating groups in a developer environment |
EP1887759B1 (en) * | 2005-06-15 | 2011-09-21 | Huawei Technologies Co., Ltd. | Method and system for realizing automatic restoration after a device failure |
US20070162796A1 (en) * | 2006-01-10 | 2007-07-12 | Mediatek Inc. | Method and portable device for testing electronic device |
US20070277167A1 (en) * | 2006-05-23 | 2007-11-29 | International Business Machines Corporation | System and method for computer system maintenance |
JP2008015568A (en) * | 2006-06-30 | 2008-01-24 | Toshiba Corp | Maintenance system, control method for maintenance system, host server, and computer readable storage medium storing program of host server |
US20080184073A1 (en) * | 2007-01-31 | 2008-07-31 | Inventec Corporation | Power on self test method |
US7765432B2 (en) * | 2007-03-07 | 2010-07-27 | Microsoft Corporation | Reporting diagnostic information for code of an application program interface |
JP2009157457A (en) * | 2007-12-25 | 2009-07-16 | Optim Corp | Terminal device, fault diagnosis method and program |
US20090013208A1 (en) * | 2008-03-31 | 2009-01-08 | Dimuzio Thomas M | Real time automated exception notification and reporting solution |
US20100205486A1 (en) * | 2009-02-06 | 2010-08-12 | Inventec Corporation | System and method of error reporting |
US9372784B2 (en) * | 2009-02-20 | 2016-06-21 | International Business Machines Corporation | Test system configuration method and system |
JP5541092B2 (en) * | 2010-03-03 | 2014-07-09 | 株式会社リコー | Transmission terminal, transmission method, and program for transmission terminal |
-
2012
- 2012-05-15 JP JP2012111680A patent/JP6163707B2/en not_active Expired - Fee Related
- 2012-07-04 CN CN201280034319.5A patent/CN103649924A/en active Pending
- 2012-07-04 WO PCT/JP2012/067631 patent/WO2013011878A1/en active Application Filing
- 2012-07-04 AU AU2012285083A patent/AU2012285083B2/en not_active Ceased
- 2012-07-04 EP EP12814793.1A patent/EP2732372A4/en not_active Withdrawn
- 2012-07-04 US US14/130,137 patent/US20140143615A1/en not_active Abandoned
- 2012-07-04 CA CA2842095A patent/CA2842095A1/en not_active Abandoned
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001146062A (en) * | 1999-11-19 | 2001-05-29 | Seiko Epson Corp | Print system and printer |
JP2006040222A (en) * | 2004-07-30 | 2006-02-09 | Fujitsu Ltd | Message display method and message display system |
JP2007122429A (en) * | 2005-10-28 | 2007-05-17 | Matsushita Electric Ind Co Ltd | Information providing system, device, and method |
JP2010039796A (en) * | 2008-08-06 | 2010-02-18 | Fujitsu Ltd | Apparatus, method and program for collecting logging information |
Non-Patent Citations (1)
Title |
---|
さかきけい: "J2ME Wireless SDK for the DoJaでiアプリを作る", SOFTWAREDESIGN, vol. 第128号, JPN6016017574, 18 June 2001 (2001-06-18), JP, pages 122 - 132, ISSN: 0003315687 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016063520A (en) * | 2014-09-22 | 2016-04-25 | 東芝ライテック株式会社 | Consumer electronics controller, consumer electronics control system, and consumer electronics control method |
Also Published As
Publication number | Publication date |
---|---|
AU2012285083B2 (en) | 2015-09-17 |
US20140143615A1 (en) | 2014-05-22 |
CN103649924A (en) | 2014-03-19 |
AU2012285083A1 (en) | 2014-01-09 |
JP6163707B2 (en) | 2017-07-19 |
CA2842095A1 (en) | 2013-01-24 |
EP2732372A4 (en) | 2016-10-12 |
EP2732372A1 (en) | 2014-05-21 |
WO2013011878A1 (en) | 2013-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6163707B2 (en) | Embedded device, program creation device, program | |
US8880660B2 (en) | Information-processing device, communication system, computer readable medium, and information-processing method | |
US9591164B2 (en) | Image processing apparatus, non-transitory storage media and control method thereof for generating operation screen to utilize various applications for executing image processing functions | |
JP5282677B2 (en) | Compatibility evaluation apparatus, compatibility evaluation method, and program | |
US8797338B2 (en) | Platform agnostic screen capture tool | |
JP2005267650A (en) | Management method of complex machine, management system of complex machine, program and recording medium | |
JP2004185595A (en) | Information processor and program therefor | |
JP2010191687A (en) | Shortcut management unit and method, and program | |
JP2009037589A (en) | Program determining apparatus, program determining method and program | |
JP2008123195A (en) | Failure prevention device and program | |
JP2004185593A (en) | Image forming apparatus and application execution method | |
JP2004185594A (en) | Image forming apparatus and program execution method | |
JP2009020609A (en) | Image forming apparatus, program control method, and program | |
JP2010134705A (en) | Apparatus, log recording control method, and program | |
JP4976329B2 (en) | Device capable of executing additional program, failure analysis support method, and failure analysis support program | |
JP2002215420A (en) | Image forming device, process monitoring method, debugging method and program for making computer execute these methods | |
CN109358972B (en) | Log management method and device of middleware client and computer system | |
JP2014056547A (en) | Counter-failure support device, counter-failure support system, counter-failure support method, and counter-failure support program | |
JP2005234987A (en) | Development source server, software trouble responding system and software trouble responding method | |
JP4957506B2 (en) | Management program, information processing apparatus, and information processing system | |
US8930910B2 (en) | Information processing apparatus, information processing method, and program | |
JP4542180B2 (en) | Image forming apparatus, program, and recording medium | |
JP2020009026A (en) | Management system, information processing apparatus, setting management method, and program | |
JP2019079354A (en) | Information processing apparatus and program | |
JP5263358B2 (en) | Information processing apparatus, program control method, and control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150415 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160517 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160715 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161220 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170217 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170523 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170605 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6163707 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |