Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 : Stonesense crashes when resizing window #69

Closed
jeancallisti opened this issue May 8, 2020 · 2 comments
Closed

Windows 10 : Stonesense crashes when resizing window #69

jeancallisti opened this issue May 8, 2020 · 2 comments

Comments

@jeancallisti
Copy link

Note: I have dual screens but I don't know if it's related.

Scenario :

  • Start DF with DFHack
  • Start stonesense.
    - You can resize stonesense window as long as it's in the splash screen
  • Load a saved game
  • stonesense redraws the scene and everything works : scroll, change Z, etc.
  • With the mouse, maximize the stonesense window or simply resize it by dragging the corners (enlarge size or reduce size)
    Expected : The window gets resized properly
    Observed (Faulty) : Stonesense raises an exception (and crashes)

Details :

  • The exception happens deep inside d3d9.dll

Unhandled exception at 0x00007FF8ACC54C15 (d3d9.dll) in Dwarf Fortress.exe: 0xC0000005: Access violation reading location 0x0000000000000088.

The call stack is :

    d3d9.dll!00007ff8acc54c15()	Unknown
    d3d9.dll!00007ff8acd3d59f()	Unknown
    d3d9.dll!00007ff8acd26993()	Unknown
    d3d9.dll!00007ff8acd188bd()	Unknown
    stonesense.plug.dll!_al_d3d_prepare_for_reset(struct ALLEGRO_DISPLAY_D3D *)	Unknown
    stonesense.plug.dll!_al_d3d_update_render_state�()	Unknown
    stonesense.plug.dll!_al_d3d_update_render_state�()	Unknown
    stonesense.plug.dll!al_set_clipping_rectangle�()	Unknown
    stonesense.plug.dll!al_set_clipping_rectangle�()	Unknown
    stonesense.plug.dll!al_draw_tinted_scaled_bitmap�()	Unknown
    stonesense.plug.dll!WorldSegment::DrawAllTiles() Line 292	C++
    stonesense.plug.dll!paintboard() Line 1146	C++
    stonesense.plug.dll!main_loop(ALLEGRO_DISPLAY * display, Overlay * ovrlay, ALLEGRO_EVENT_QUEUE * queue, ALLEGRO_THREAD * main_thread, DFHack::color_ostream & con) Line 302	C++
    stonesense.plug.dll!stonesense_thread(ALLEGRO_THREAD * main_thread, void * parms) Line 558	C++

The exception happens while calling this stonesense code :

al_draw_tinted_scaled_bitmap(
    (ALLEGRO_BITMAP*) todraw[i].drawobject,
    todraw[i].tint,
    todraw[i].sx,
    todraw[i].sy,
    todraw[i].sw,
    todraw[i].sh,
    todraw[i].dx,
    todraw[i].dy,
    todraw[i].dw,
    todraw[i].dh,
    todraw[i].flags );

Please note : there doesn't seem to be any issue with any of the fields of todraw. Allegro compains internally, inside the Direct3D primitive. Maybe because it's drawing outside of the screen? The issue still happens when enlarging the window.

@Nekkowe
Copy link

Nekkowe commented Dec 30, 2020

I have the same issue in the current release, including being able to resize just fine in the splash screen but not outside of it.

@lethosor
Copy link
Member

Consolidating with #38

@lethosor lethosor closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants