- PR -

長い文字列の定数があるとビルドでVS.NET2002が落ちる

1
投稿者投稿内容
Ten.
ベテラン
会議室デビュー日: 2003/04/03
投稿数: 67
投稿日時: 2003-07-01 18:08
こんにちは

VS.NET2002のC#で開発しています。

長い文字列を定数として定義していると、ビルド中にVS.NET2002が
エラーで終了してしまい、困っています。

何文字でエラーになるか試してみたところ、2037文字目でエラーと
なりました。(使用した文字は半角数字です)

イベントログには2件のエラーログが登録されていました。
(ソースは Microsoft Development Environment )

1件目はイベントID 1000 でメッセージは以下のとおりでした。
Faulting application devenv.exe, version 7.0.9466.0, faulting module kernel32.dll, version 5.1.2600.1106, fault address 0x00013887.

2件目はイベントID 1001 でメッセージは以下のとおりでした。
Fault bucket 22412573.

また、2038文字以上だと何も表示されずVS.NET2002が終了してしまい、
イベントログにも何も書き込まれていませんでした。

これはVS.NET2002のバグなのでしょうか?

何か知っている方がいましたらお願いします。

[ メッセージ編集済み 編集者: zakey 編集日時 2003-07-01 18:10 ]
キョウ
常連さん
会議室デビュー日: 2003/04/30
投稿数: 49
投稿日時: 2003-07-01 18:41
私も同じ状況に遭遇しました。
分割する事で対応しましたが。
バグなんですか?
cats
大ベテラン
会議室デビュー日: 2002/11/29
投稿数: 221
お住まい・勤務地: 東京
投稿日時: 2003-07-02 08:48
VS.NET 2003では、4000文字でも大丈夫でした。

コード:
public class Class1
{
    const string sss = "...";
    public static void Main(string[] args)
    {
        Console.WriteLine(sss.Length); 
    }
}



(実際には1行が2046文字を超えないように改行しています)
Ten.
ベテラン
会議室デビュー日: 2003/04/03
投稿数: 67
投稿日時: 2003-07-02 10:33
返答ありがとうございました。

VS.NET2002のバグの可能性が高そうですね。

その他のバグなども修正されているようなので、
VS.NET2003へのバージョンアップを検討してみます。
未記入
会議室デビュー日: 2006/03/01
投稿数: 1
投稿日時: 2006-03-01 07:30
以下の文章は私の(アメリカ人)の主人が書いたものです。
お役に立てればと思い、英語のまま返答させていただきます。
どなたかに訳していただければ、おわかりになるかと思います。


I am getting the same error message when running a .net net com compatible when it is loaded in vb6.

After I initially installed VS 2005, I was able to debug in vs. 2005 by going to tools-->options debugging and turning CLR and native debugging off. Then I went to vs. 2002 and turn CLR and native debugging on.

Now this has changed. I have to turn debugging off in vs2002 and turn in on in vs. 2005. I can no longer start my com compatible project in vs. 2002 and set vb6 as the startup application. Instead I have to start vb6, compile my vs2002 com compatible project with debugger.break() where I want them. Play around with your debugging settings in both environments and see what works best for you. You may have to do the same thing: let your application start with debugger.break statements and use the vs. 2005 as your debugging environment.

Hope this helps.
aetos
会議室デビュー日: 2005/01/27
投稿数: 16
投稿日時: 2007-05-27 15:11
古いスレですが、SP1適用済みのVS.NET 2003でも同じ症状が出たのでageます。
宣言に const をつけなければ落ちませんでした。
1

スキルアップ/キャリアアップ(JOB@IT)