Skip to content

no problem in 3.11.3. i have problem 3.12 #4739

@mumin16

Description

@mumin16

Description

my code line:
ImGui::InputInt( "Length", (int *)default_json["length"].get_ptr<json::number_integer_t *>());

error, imgui_widgets.cpp line 2173:

int ImGui::DataTypeFormatString(char* buf, int buf_size, ImGuiDataType data_type, const void* p_data, const char* format)
{
// Signedness doesn't matter when pushing integer arguments
if (data_type == ImGuiDataType_S32 || data_type == ImGuiDataType_U32)
return ImFormatString(buf, buf_size, format, (const ImU32)p_data);

Exception has occurred: Exception
Exception 0xc0000005 encountered at address 0x7ff749d422ee: Access violation reading location 0x00000000

Reproduction steps

my code line:
ImGui::InputInt( "Length", (int *)default_json["length"].get_ptr<json::number_integer_t *>());

Expected vs. actual results

int ImGui::DataTypeFormatString(char* buf, int buf_size, ImGuiDataType data_type, const void* p_data, const char* format)
{
// Signedness doesn't matter when pushing integer arguments
if (data_type == ImGuiDataType_S32 || data_type == ImGuiDataType_U32)
return ImFormatString(buf, buf_size, format, (const ImU32)p_data);

Minimal code example

Error messages

Exception has occurred: Exception
Exception 0xc0000005 encountered at address 0x7ff749d422ee: Access violation reading location 0x00000000

Compiler and operating system

clang , windows

Library version

3.12

Validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions