バグ:①開戦時マウスホイール操作でエラー②デバッガで未指定クーポン分岐表示でエラー③デバッガから配付のカード使用後特殊文字テーブル復帰せず

Issue #1010 resolved
ルンバ created an issue

こちらがその時のログです

Version : 4.3 (64-bit) / 2021-01-23 15:40:48
DateTime: 2021-01-23 22:33:02
Traceback (most recent call last):
File ".\cw\thread.py", line 971, in run
File ".\cw\thread.py", line 1024, in _run
File ".\cw\thread.py", line 1035, in main_loop
File ".\cw\eventhandler.py", line 131, in run
File ".\cw\eventhandler.py", line 857, in executing_event
File ".\cw\thread.py", line 4088, in change_battlearea
File ".\cw\animation.py", line 49, in animate_sprite
File ".\cw\sprite\card.py", line 169, in update
File ".\cw\sprite\background.py", line 1538, in update_battlestart
File ".\cw\animation.py", line 64, in animate_sprite
File ".\cw\thread.py", line 1107, in wait_frame
File ".\cw\eventhandler.py", line 122, in run
File ".\cw\eventhandler.py", line 845, in wheel_event
File ".\cw\eventhandler.py", line 623, in f5key_event
File ".\cw\thread.py", line 2458, in show_backlog
File ".\cw\eventhandler.py", line 1294, in init
File ".\cw\eventhandler.py", line 1373, in _update_posdata
File ".\cw\sprite\statusbar.py", line 187, in change
AssertionError

ログを開いてわかったのですが、それ以前にも以下のログと同じものが複数回残っていました。

Version : 4.3 (64-bit) / 2021-01-23 15:40:48

DateTime: 2021-01-23 21:17:40
Traceback (most recent call last):
File ".\cw\frame.py", line 550, in OnEXECFUNC
File ".\cw\debug\debugger.py", line 2608, in func
File ".\cw\debug\debugger.py", line 2686, in _refresh_tree
File ".\cw\debug\debugger.py", line 2757, in create_item
File ".\cw\debug\debugger.py", line 2750, in create_item
File ".\cw\debug\debugger.py", line 2774, in init
File ".\cw\content.py", line 1261, in get_childname
UnboundLocalError: local variable 'ctype' referenced before assignment

これらとの関係は不明なのですが、最新デイリービルドで上書きしてから、セリフメッセージコンテンツの自作特殊文字「#0」等が対応した「font_0」画像に置き換わらず「#0」の文字のままセリフ内で出る症状が出ています。何らかの条件が重なったあとは確実に再現し以後継続する様なのですが、条件が絞れていません。「バトル勝利後にそのようになる、逃走後にはならない」のが条件の一つですがそれだけだと再現しません。「#0」に限らず他の自作特殊文字も一斉にそうなりますがデフォルトの(#Eとかその他)ものは正常に表示されます。本課題のエラーログはこの再現条件調査中、バトルを繰り返していたらおきました。

Comments (10)

  1. k4nagatsuki repo owner

    ご報告ありがとうございます。すべて別の問題のようです。

    最初のログはメッセージログ表示中のエラーのようですが、バトル開始中にマウスホイールを上に回す等の操作があったのだと思います。そのケースでエラーが発生していました。

    ふたつ目のログはデバッガでクーポン分岐のクーポンが1件も指定されていないものを表示しようとした時に発生するエラーのようです。

    最後のものは再現できていないので、再現方法が見つかったら教えていただけると助かります。

  2. ルンバ reporter

    特定できました。

    ①デバグ用の凶悪な召喚獣カードを

    ②デバッガの「手札カードの配布」から入手し

    ③それでバトルに勝利する

    と再現するようです。

    デバッガの「手札カードの配布」から入手しない場合は発生しないようです(召喚獣獲得コンテンツで入手だと発生しない?)

    ①のカードは以下です

    <?xml version="1.0" encoding="UTF-8"?>
    <BeastCards summId="105FFDAC8-393040879290/10000000" paneId="1007FA788-392666768510/10000000" topLevel="true" scenarioPath="G:\CardWirth\Scenario\WSMテスト" scenarioName="WSMテスト" scenarioAuthor="">
    <BeastCard dataVersion="4">
    <Property>
    <Id>5</Id>
    <Name>デバグ</Name>
    <ImagePath/>
    <Description/>
    <LinkId>0</LinkId>
    <Scenario/>
    <Author/>
    <Ability physical="Dex" mental="Aggressive"/>
    <Target allrange="True">Enemy</Target>
    <EffectType spell="False">MagicalPhysic</EffectType>
    <ResistType>Unfail</ResistType>
    <SuccessRate>5</SuccessRate>
    <VisualEffect>None</VisualEffect>
    <Enhance avoid="0" resist="0" defense="0"/>
    <SoundPath/>
    <SoundPath2/>
    <KeyCodes>攻撃\n遠距離攻撃</KeyCodes>
    <Premium>Normal</Premium>
    <UseLimit>0</UseLimit>
    </Property>
    <Motions>
    <Motion type="Damage" element="All" damagetype="Max" value="1"/>
    </Motions>
    <Events/>
    </BeastCard>
    </BeastCards>

  3. ルンバ reporter

    特殊文字「#0」等が対応した「font_0」画像に置き換わらず「#0」の文字のままセリフ内で出る症状の再現ですね。

  4. k4nagatsuki repo owner

    pull request #198

    カード編集ダイアログから配付し、かつシナリオから持ち出していない場合に限り、カード使用後に特殊文字のテーブルが戻らないバグがありました。

  5. ルンバ reporter

    4.3x64に cardwirthpy_20210127_x64 を上書きし起動しようとすると以下の様なエラーで起動できないですね

    ∇ ウィンドウ タイトル ∇
    cx_Freeze: Python error in main script

    ∇ スタティックテキスト ∇
    OK
    Traceback (most recent call last):
    File "C:\Program Files\Python38\lib\site-packages\cx_Freeze\initscripts_startup_.py", line 40, in run
    File "C:\Program Files\Python38\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
    File "cardwirth.py", line 12, in <module>
    File ".\cw_init_.py", line 7, in <module>
    ImportError: bad magic number in 'wx': b'\x00\x00\x00\x00'

  6. k4nagatsuki repo owner

    手許で試したところ問題ないようです(Win 10 Pro 20H2 19042.746)。

    Webブラウザのキャッシュを消すなどしてダウンロードし直しても同じ問題が発生するでしょうか?

  7. ルンバ reporter

    別種のブラウザで落とし直して上書きしたところ正常起動し、症状の解決も確認できました。ありがとうございます。

  8. Log in to comment