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

Support for AWT double buffering #100

Open
mbaracz opened this issue Sep 6, 2020 · 1 comment
Open

Support for AWT double buffering #100

mbaracz opened this issue Sep 6, 2020 · 1 comment

Comments

@mbaracz
Copy link

mbaracz commented Sep 6, 2020

CheerpJ is initializing

java.lang.NullPointerException
	at java.awt.Component$FlipBufferStrategy.getDrawGraphics(Unknown Source) 
        at processing.awt.PSurfaceAWT.render(Unknown Source)
        at processing.awt.PSurfaceAWT$SmoothCanvas.paint(Unknown Source)
        at sun.awt.RepaintArea.paintComponent(Unknown Source)
        at sun.awt.RepaintArea.paint(Unknown Source)
        at com.leaningtech.cheerpj.CheerpJComponentPeer.handleEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
<!doctype html>
<html>
<head>
    <title>some title</title>
    <script src="https://cjrtnc.leaningtech.com/2.1/loader.js" crossorigin="anonymous"></script>
</head>
<body></body>
<script>
      cheerpjInit();
      cheerpjCreateDisplay(innerWidth, innerHeight);
      cheerpjRunJar("application.jar");
</script>
</html>
@alexp-sssup
Copy link
Member

This application requires AWT double buffering, which is not currently supported.

@alexp-sssup alexp-sssup changed the title NPE for swing app with processing Support for AWT double buffering Sep 9, 2020
JeremyLeland added a commit to JeremyLeland/JeremyLeland.github.io that referenced this issue Feb 3, 2021
Got it working with a minor tweak! (changed BufferStrategy from double buffering to single, since CheerpJ doesn't support double buffering in awt yet -- see leaningtech/cheerpj-meta#100)
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

2 participants