AshitaXI / Ashita

Issue tracker and wiki for the Ashita project.
https://ashitaxi.com/
6 stars 1 forks source link

Imgui crash[BUG] #40

Closed Jyouya closed 1 year ago

Jyouya commented 1 year ago

Ashita Version (Type /ashita in-game to get this.) 4.0.0.6

FFXI Version (Type /version in-game to get this.) Unknown

Windows Version (ie. Start > About Your PC) Windows 10, build 19044.2846

Describe The Bug Getting a crash related to imgui sporadically (every few days). The addons plugin will throw an exception and unload.

addons threw an exception in event Present.  Exception: EXCEPTION_ACCESS_VIOLATION (C0000005). [PTR: 6C8F336E]

Following this, I am able to reload addons, but any calls to the imgui api will crash addons again with the same error until I restart the client.

Steps To Reproduce No known way to reproduce the initial state; it has happened while there was no user input, and no imgui window on screen (although hxui configures its settings menu every frame, even if it's not displayed). Once the initial crash has happened, any imgui api call will reproduce it, such as:

imgui.PushStyleColor(ImGuiCol_WindowBg, { 0, 0.06, .16, .9 });

Screenshots imgui crash

atom0s commented 1 year ago

ImGui's 'Push' style API calls are expected to have an accompanying 'Pop' call of the same name. For example, PushStyleColor expects a PopStyleColor to happen as well, otherwise you will have an invalid stack at the end of the ImGui frame which will cause it to error.

Keep in mind, if you have any kind of early-exit out of an ImGui call, you need to cleanup all open cases of these kinds of calls along with any kind of 'Begin' API calls and similar as well.