jsettlers / settlers-remake

A Remake of "The Settlers III" for Windows, Linux, Mac and Android
http://www.settlers-android-clone.com
MIT License
355 stars 101 forks source link

Rendering with WGL crashes when switching to full screen (ALT+ENTER) #748

Open andreas-eberle opened 6 years ago

andreas-eberle commented 6 years ago

When I switch to fullscreen (ALT+ ENTER), I get the exception below thrown indefinitely. Furthermore, nothing is rendered and the error continous when I switch back from full screen to normal.

Main draw handler cought throwable: java.lang.NullPointerException at go.graphics.swing.opengl.LWJGLDrawContext.startWriteGeometry(LWJGLDrawContext.java:453) at jsettlers.graphics.map.draw.Background.drawMapContent(Background.java:1195) at jsettlers.graphics.map.MapContent.drawBackground(MapContent.java:594) at jsettlers.graphics.map.MapContent.drawContent(MapContent.java:292) at go.graphics.region.Region.drawRegion(Region.java:103) at go.graphics.area.Area.drawRegionAt(Area.java:139) at go.graphics.area.Area.drawArea(Area.java:127) at go.graphics.swing.AreaContainer.draw(AreaContainer.java:70) at go.graphics.swing.contextcreator.JAWTContextCreator$1.paint(JAWTContextCreator.java:82) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358) at java.awt.Component.dispatchEventImpl(Component.java:4965) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

andreas-eberle commented 6 years ago

@paulwedeck: Please have a look.

andreas-eberle commented 6 years ago

@paulwedeck: The following patch fixes the full screen for me. fix-wgl-fullscreen.txt

paulwedeck commented 6 years ago

d9e5169 should solve it

tehKaiN commented 5 years ago

I can't reproduce error on win10, so probably it's solved