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

JBR-6771 BoxLayout throws mysterious NPEs due to previous exceptions #326

Closed

Conversation

stachenov
Copy link

This isn't really a bug, more like an inconvenience that masks real bugs.

The checkRequests method only does layout initialization
if it isn't initialized already. However, when an exception
is thrown during the initialization, the layout may end up
in a half-initialized state.

Fix this by using the field that is initialized the last to check
if the layout is initialized. If that field is null, it may mean
that the layout isn't initialized or that the last attempt
failed midway. Then we try again. This attempt can,
of course, break for the same reason as the previous one,
but in that case we'll at least get a stack trace pointing
to a real cause of the error and not some mysterious NPE
that seems to be impossible from the logic.

@mkartashev mkartashev self-requested a review March 4, 2024 08:13
@vprovodin vprovodin force-pushed the main branch 2 times, most recently from d32cd9e to b304693 Compare March 6, 2024 00:03
avu and others added 27 commits March 7, 2024 01:03
Initialize currentDisplayID on AWTWindow creation
…he UnixFileSystem, which might not be the case
…s full screen

This includes displaySync changes as well as fixes for JBR-5157 and JBR-5321.
Use separate glyph cache for each MTLContext instance. Refactored MTLGlyphCache
…nnouncer_nativeAnnounce

Stop using the JNIEnv instance bound to EDT in the AppKit thread.

(cherry picked from commit 0f49341)
… queue

Added command queue and provided synchronization between the command queues
…uffer and a specific shader (vert_txt_col)

fix crash in J2DDemo with advanced paints + artefacts with texture background
…ronization in metal (MBP 16'' x64)

Removed NSLock and moved all operations to the AppKit thread
@mkartashev
Copy link
Collaborator

Merged into main, jbr21, jbr17.

@mkartashev mkartashev closed this Apr 15, 2024
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.

None yet