Skip to content

fix PX_Initialize bug#125

Open
dududuguo wants to merge 1 commit intomatrixcascade:masterfrom
dududuguo:master
Open

fix PX_Initialize bug#125
dududuguo wants to merge 1 commit intomatrixcascade:masterfrom
dududuguo:master

Conversation

@dududuguo
Copy link

Fix #119

Fix SEGV crash when screen size is too small

When screen dimensions are less than 25x25, PX_Object_ScrollAreaCreate() returns PX_NULL, but PainterEngine_Initialize() did not properly handle this case and continued execution with an uninitialized memory pool pointer (mp). This led to a SEGV crash when the null pointer was later dereferenced.

by:

  1. Adding null pointer check for mp in PX_Object_FireworkKICreate()
  2. Initializing mp to NULL in PainterEngine_Initialize()
  3. Adding proper error handling when mp initialization fails:
    • Add error messages for failed memory pool initialization
    • Add message indicating minimum window size requirement (24x24)
    • Return PX_FALSE to prevent further execution with invalid mp

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

Successfully merging this pull request may close these issues.

[BUG] SEGV on unknown address

1 participant