<p>"Just clicked on the Items menu option from within a game and it crashed! Never saw that before, can't reproduce it."</p>
<pre><code>######### Report bf14f9b3-de2e-441e-af42-c906c3431960 #########
           Upload time 2019-08-15 08:43:40 UTC
            Crash time 2019-08-15 20:42:19 UTC
               AppName OHRRPGCE-Game
       ExceptionModule C:\Users\paul.LEDOMAIN\Desktop\PH\kbb\game.exe
      ExceptionAddress 0x5d1cd3
     MemoryUsageKbytes 37468
       OperatingSystem Windows 7 Professional Build 7601
           GeoLocation en-us
             UserEmail paulc***@gmail.com
    ProblemDescription Just clicked on the Items menu option from within a game and it crashed! Never saw that before, can't reproduce it.
                 Build OHRRPGCE wip 20190520.11162 gfx_directx+sdl+fb/music_sdl FreeBASIC 1.05.0 (01-31-2016) GCC 5.3.0 x86 pdb  Built on vampirecell -g -gen gcc Win32 32-bit
           Extra files g_debug.txt g_debug_archive.txt
     Backend init info gfx_directx
   Spawned from Custom V OHRRPGCE,4,11162,OHRRPGCE wip 20190520
          Playing game C:\Users\paul.LEDOMAIN\Desktop\PH\kbb\Walthros2019.rpg
             Game name Walthros: Renewal
               Symbols ohrrpgce-symbols-win-music_sdl-r11162-2019-05-20-wip.7z
            Git commit 5c8147641
                   CPU x86 GenuineIntel family 6 model 61 stepping 4, 4 cores
             Exception EXCEPTION_ACCESS_VIOLATION_READ
Minidump crash address 0x20
        Crashed thread 0
g_debug_archive errors 2

----- Tail of g_debug.txt -----
6386.0  Unknown store name: "disabled"
6386.0  Unknown store name: "disabled"
6386.1  Unknown store name: "disabled"
6386.1  Unknown store name: "disabled"
too much debug() output, not printing any more messages

----- Stacktrace -----
@ TOP_LEFT_PLANK        (plankmenu.bas:379 + 0x0)
    377   sl = planks(i)
    378   IF sl->ScreenX <= best->ScreenX ANDALSO sl->ScreenY <= best->ScreenY THEN
 -> 379    best = sl
    380   END IF
@ ITEM_SCREEN_REFRESH   (menustuf.rbas:2373 + 0x5)
   2371  ELSE
   2372   st.ps.cur = top_left_plank(st.ps)
 ->2373  END IF
   2374  update_item_plank st.ps.cur, st
@ ITEM_SCREEN           (menustuf.rbas:2577 + 0x8)
   2575  load_slice_collection st.ps.m, SL_COLLECT_ITEMSCREEN
   2576  item_screen_refresh st
 ->2577 
   2578  show_virtual_gamepad()
@ ACTIVATE_MENU_ITEM    (game.bas:2833 + 0x5)
   2831      CASE spItems
   2832       menu_text_box = item_screen()
 ->2833       IF menu_text_box > 0 THEN
   2834        'Currently, menus and textboxes interfere with each other badly
@ PLAYER_MENU_KEYS + 0x32d 
@ main                  (game.bas:778 + 0x5)
    776  update_menu_items
    777  player_menu_keys()
 -> 778  'debug "after menu key handling:"
    779 
@ [game.exe + 0x126d]
@ [ntdll.dll + 0x39902]
@ [ntdll.dll + 0x398d5]
</code></pre>
<p>Examined the minidump and found <code>find_all_planks</code> returned an array of 603 plank slices, as expected, but <code>planks(0)</code> is NULL, causing the crash. Looking at  <code>find_all_planks</code> I am certain that it can not possibly put a NULL pointer in the array, and it wipes it before starting.<br>
The only possibility I can see is that during either the REDIM in <code>find_all_planks</code> or the callback it calls, some memory got scribbled over, due to preexisting memory corruption.</p>
<p>g_debug.txt was full of "Unknown store name: "disabled"" messages, so any error messages were lost.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/25?email_source=notifications&email_token=AMWGWZRL4BSZJHFHCVTRT63QEY7CVA5CNFSM4IMEJUPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFSNMYQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZVKLOEBUWTEWXVFDKDQEY7CVANCNFSM4IMEJUPA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AMWGWZWOM2IZA2YPXGWWC33QEY7CVA5CNFSM4IMEJUPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFSNMYQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/25?email_source=notifications\u0026email_token=AMWGWZRL4BSZJHFHCVTRT63QEY7CVA5CNFSM4IMEJUPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFSNMYQ",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/25?email_source=notifications\u0026email_token=AMWGWZRL4BSZJHFHCVTRT63QEY7CVA5CNFSM4IMEJUPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFSNMYQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>