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

All projects only show blank window #279

Closed
LexVerheesen opened this issue Nov 19, 2018 · 16 comments
Closed

All projects only show blank window #279

LexVerheesen opened this issue Nov 19, 2018 · 16 comments
Assignees
Labels

Comments

@LexVerheesen
Copy link

Bug Report

Actual behavior:

Arcade stopped working for me. When running a project (even examples) the only thing that shows is a blank window with the given dimensions without the given background color.

I don't get any warnings or errors in my console, not even in verbose mode. The program does seem to run. Placing breakpoints shows the delta_time changing.

I tried upgrading and downgrading python (3.6.5_1, 3.7.1) and arcade (1.3.4, 2.0.0a1), but without success. I tried running Pyglet (1.3.2, 1.4.0b1) examples, but this gives me the same blank screen.
As far as I know my setup/configuration hasn't change.

I'm running out of ideas and would really appreciate any help. Please let me know if there's anything else I can do to would make things easier.

Steps to reproduce/example code:

Running an example:
python -m arcade.examples.starting_template

My setup/configuration:

python -V
Python 3.7.1`
pip3 list
Package                                 Version
--------------------------------------- -------
arcade                                  2.0.0a1
astroid                                 2.0.4
future                                  0.17.1
isort                                   4.3.4
lazy-object-proxy                       1.3.1
mccabe                                  0.6.1
numpy                                   1.15.4
Pillow                                  5.3.0
pip                                     18.1
pyglet                                  1.4.0b1
pylint                                  2.1.1
pyobjc                                  5.1.1
pyobjc-core                             5.1.1
pyobjc-framework-Accounts               5.1.1
pyobjc-framework-AddressBook            5.1.1
pyobjc-framework-AdSupport              5.1.1
pyobjc-framework-AppleScriptKit         5.1.1
pyobjc-framework-AppleScriptObjC        5.1.1
pyobjc-framework-ApplicationServices    5.1.1
pyobjc-framework-Automator              5.1.1
pyobjc-framework-AVFoundation           5.1.1
pyobjc-framework-AVKit                  5.1.1
pyobjc-framework-BusinessChat           5.1.1
pyobjc-framework-CalendarStore          5.1.1
pyobjc-framework-CFNetwork              5.1.1
pyobjc-framework-CloudKit               5.1.1
pyobjc-framework-Cocoa                  5.1.1
pyobjc-framework-Collaboration          5.1.1
pyobjc-framework-ColorSync              5.1.1
pyobjc-framework-Contacts               5.1.1
pyobjc-framework-ContactsUI             5.1.1
pyobjc-framework-CoreAudio              5.1.1
pyobjc-framework-CoreAudioKit           5.1.1
pyobjc-framework-CoreBluetooth          5.1.1
pyobjc-framework-CoreData               5.1.1
pyobjc-framework-CoreLocation           5.1.1
pyobjc-framework-CoreMedia              5.1.1
pyobjc-framework-CoreMediaIO            5.1.1
pyobjc-framework-CoreML                 5.1.1
pyobjc-framework-CoreServices           5.1.1
pyobjc-framework-CoreSpotlight          5.1.1
pyobjc-framework-CoreText               5.1.1
pyobjc-framework-CoreWLAN               5.1.1
pyobjc-framework-CryptoTokenKit         5.1.1
pyobjc-framework-DictionaryServices     5.1.1
pyobjc-framework-DiscRecording          5.1.1
pyobjc-framework-DiscRecordingUI        5.1.1
pyobjc-framework-DiskArbitration        5.1.1
pyobjc-framework-DVDPlayback            5.1.1
pyobjc-framework-EventKit               5.1.1
pyobjc-framework-ExceptionHandling      5.1.1
pyobjc-framework-ExternalAccessory      5.1.1
pyobjc-framework-FinderSync             5.1.1
pyobjc-framework-FSEvents               5.1.1
pyobjc-framework-GameCenter             5.1.1
pyobjc-framework-GameController         5.1.1
pyobjc-framework-GameKit                5.1.1
pyobjc-framework-GameplayKit            5.1.1
pyobjc-framework-ImageCaptureCore       5.1.1
pyobjc-framework-IMServicePlugIn        5.1.1
pyobjc-framework-InputMethodKit         5.1.1
pyobjc-framework-InstallerPlugins       5.1.1
pyobjc-framework-InstantMessage         5.1.1
pyobjc-framework-Intents                5.1.1
pyobjc-framework-IOSurface              5.1.1
pyobjc-framework-iTunesLibrary          5.1.1
pyobjc-framework-LatentSemanticMapping  5.1.1
pyobjc-framework-LaunchServices         5.1.1
pyobjc-framework-libdispatch            5.1.1
pyobjc-framework-LocalAuthentication    5.1.1
pyobjc-framework-MapKit                 5.1.1
pyobjc-framework-MediaAccessibility     5.1.1
pyobjc-framework-MediaLibrary           5.1.1
pyobjc-framework-MediaPlayer            5.1.1
pyobjc-framework-MediaToolbox           5.1.1
pyobjc-framework-ModelIO                5.1.1
pyobjc-framework-MultipeerConnectivity  5.1.1
pyobjc-framework-NaturalLanguage        5.1.1
pyobjc-framework-NetFS                  5.1.1
pyobjc-framework-Network                5.1.1
pyobjc-framework-NetworkExtension       5.1.1
pyobjc-framework-NotificationCenter     5.1.1
pyobjc-framework-OpenDirectory          5.1.1
pyobjc-framework-OSAKit                 5.1.1
pyobjc-framework-Photos                 5.1.1
pyobjc-framework-PhotosUI               5.1.1
pyobjc-framework-PreferencePanes        5.1.1
pyobjc-framework-PubSub                 5.1.1
pyobjc-framework-QTKit                  5.1.1
pyobjc-framework-Quartz                 5.1.1
pyobjc-framework-SafariServices         5.1.1
pyobjc-framework-SceneKit               5.1.1
pyobjc-framework-ScreenSaver            5.1.1
pyobjc-framework-ScriptingBridge        5.1.1
pyobjc-framework-SearchKit              5.1.1
pyobjc-framework-Security               5.1.1
pyobjc-framework-SecurityFoundation     5.1.1
pyobjc-framework-SecurityInterface      5.1.1
pyobjc-framework-ServiceManagement      5.1.1
pyobjc-framework-Social                 5.1.1
pyobjc-framework-SpriteKit              5.1.1
pyobjc-framework-StoreKit               5.1.1
pyobjc-framework-SyncServices           5.1.1
pyobjc-framework-SystemConfiguration    5.1.1
pyobjc-framework-UserNotifications      5.1.1
pyobjc-framework-VideoSubscriberAccount 5.1.1
pyobjc-framework-VideoToolbox           5.1.1
pyobjc-framework-Vision                 5.1.1
pyobjc-framework-WebKit                 5.1.1
setuptools                              39.0.1
six                                     1.11.0
wrapt                                   1.10.11
system_profiler

Software:

    System Software Overview:

      System Version: macOS 10.14.1 (18B75)
      Kernel Version: Darwin 18.2.0
      Time since boot: 1:41

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro11,3
      Processor Name: Intel Core i7
      Processor Speed: 2,6 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 6 MB
      Memory: 16 GB
      Boot ROM Version: 149.0.0.0.0
      SMC Version (system): 2.19f12

Graphics/Displays:

    Intel Iris Pro:

      Chipset Model: Intel Iris Pro
      Type: GPU
      Bus: Built-In
      VRAM (Dynamic, Max): 1536 MB
      Vendor: Intel
      Device ID: 0x0d26
      Revision ID: 0x0008
      Automatic Graphics Switching: Supported
      gMux Version: 4.0.8 [3.2.8]
      Metal: Supported, feature set macOS GPUFamily1 v4
      Displays:
        Color LCD:
          Display Type: Built-In Retina LCD
          Resolution: 2880 x 1800 Retina
          Framebuffer Depth: 24-Bit Color (ARGB8888)
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: No

    NVIDIA GeForce GT 750M:

      Chipset Model: NVIDIA GeForce GT 750M
      Type: GPU
      Bus: PCIe
      PCIe Lane Width: x8
      VRAM (Dynamic, Max): 2048 MB
      Vendor: NVIDIA (0x10de)
      Device ID: 0x0fe9
      Revision ID: 0x00a2
      ROM Revision: 3776
      Automatic Graphics Switching: Supported
      gMux Version: 4.0.8 [3.2.8]
      Metal: Supported, feature set macOS GPUFamily1 v4
@pvcraven
Copy link
Member

I have seen something similar once before. Specifically with a student, running Windows on the same exact computer type that I develop on. I haven't seen it happen on a Mac. I'll see if there's a way I can get some additional OpenGL diagnostic info printed out.

@pvcraven
Copy link
Member

pvcraven commented Nov 21, 2018

Can you run python -m pyglet.info and paste the results here?

@pvcraven pvcraven self-assigned this Nov 21, 2018
@LexVerheesen
Copy link
Author

Thank you for your quick reply.

python -m pyglet.info
Python
------------------------------------------------------------------------------
sys.version: 3.7.1 (default, Nov 12 2018, 22:16:50)
[Clang 10.0.0 (clang-1000.11.45.5)]
sys.platform: darwin
sys.maxint: 9223372036854775807
objc.__version__: 5.1.1
os.getcwd(): /Users/username/Code/GitHub/arcade

pyglet
------------------------------------------------------------------------------
pyglet.version: 1.4.0b1
pyglet.compat_platform: darwin
pyglet.__file__: /Users/username/Code/GitHub/arcade/.venv/lib/python3.7/site-packages/pyglet/__init__.py
pyglet.options['audio'] = ('directsound', 'openal', 'pulse', 'silent')
pyglet.options['debug_font'] = False
pyglet.options['debug_gl'] = True
pyglet.options['debug_gl_trace'] = False
pyglet.options['debug_gl_trace_args'] = False
pyglet.options['debug_graphics_batch'] = False
pyglet.options['debug_lib'] = False
pyglet.options['debug_media'] = False
pyglet.options['debug_texture'] = False
pyglet.options['debug_trace'] = False
pyglet.options['debug_trace_args'] = False
pyglet.options['debug_trace_depth'] = 1
pyglet.options['debug_trace_flush'] = True
pyglet.options['debug_win32'] = False
pyglet.options['debug_x11'] = False
pyglet.options['graphics_vbo'] = True
pyglet.options['shadow_window'] = True
pyglet.options['vsync'] = None
pyglet.options['xsync'] = True
pyglet.options['xlib_fullscreen_override_redirect'] = False
pyglet.options['darwin_cocoa'] = True
pyglet.options['search_local_libs'] = True

pyglet.window
------------------------------------------------------------------------------
display: <pyglet.canvas.cocoa.CocoaDisplay object at 0x104409668>
screens[0]: CocoaScreen(x=0, y=0, width=1920, height=1080)
screens[1]: CocoaScreen(x=-1920, y=0, width=1920, height=1200)
config['double_buffer'] = 1
config['stereo'] = 0
config['buffer_size'] = 32
config['aux_buffers'] = 0
config['sample_buffers'] = 0
config['samples'] = 0
config['red_size'] = 0
config['green_size'] = 0
config['blue_size'] = 0
config['alpha_size'] = 8
config['depth_size'] = 24
config['stencil_size'] = 0
config['accum_red_size'] = 0
config['accum_green_size'] = 0
config['accum_blue_size'] = 0
config['accum_alpha_size'] = 0
config['major_version'] = 2
config['minor_version'] = 1
config['forward_compatible'] = None
config['debug'] = None
context: CocoaContext()

window.context._info
------------------------------------------------------------------------------
gl_info.get_version(): 2.1 NVIDIA-12.0.19 355.11.10.50.10.103
gl_info.get_vendor(): NVIDIA Corporation
gl_info.get_renderer(): NVIDIA GeForce GT 750M OpenGL Engine
gl_info.get_extensions():
   GL_APPLE_aux_depth_stencil
   GL_APPLE_client_storage
   GL_APPLE_element_array
   GL_APPLE_fence
   GL_APPLE_float_pixels
   GL_APPLE_flush_buffer_range
   GL_APPLE_flush_render
   GL_APPLE_object_purgeable
   GL_APPLE_packed_pixels
   GL_APPLE_pixel_buffer
   GL_APPLE_rgb_422
   GL_APPLE_row_bytes
   GL_APPLE_specular_vector
   GL_APPLE_texture_range
   GL_APPLE_transform_hint
   GL_APPLE_vertex_array_object
   GL_APPLE_vertex_array_range
   GL_APPLE_vertex_point_size
   GL_APPLE_vertex_program_evaluators
   GL_APPLE_ycbcr_422
   GL_ARB_color_buffer_float
   GL_ARB_depth_buffer_float
   GL_ARB_depth_clamp
   GL_ARB_depth_texture
   GL_ARB_draw_buffers
   GL_ARB_draw_elements_base_vertex
   GL_ARB_draw_instanced
   GL_ARB_fragment_program
   GL_ARB_fragment_program_shadow
   GL_ARB_fragment_shader
   GL_ARB_framebuffer_object
   GL_ARB_framebuffer_sRGB
   GL_ARB_half_float_pixel
   GL_ARB_half_float_vertex
   GL_ARB_imaging
   GL_ARB_instanced_arrays
   GL_ARB_multisample
   GL_ARB_multitexture
   GL_ARB_occlusion_query
   GL_ARB_pixel_buffer_object
   GL_ARB_point_parameters
   GL_ARB_point_sprite
   GL_ARB_provoking_vertex
   GL_ARB_seamless_cube_map
   GL_ARB_shader_objects
   GL_ARB_shader_texture_lod
   GL_ARB_shading_language_100
   GL_ARB_shadow
   GL_ARB_sync
   GL_ARB_texture_border_clamp
   GL_ARB_texture_compression
   GL_ARB_texture_compression_rgtc
   GL_ARB_texture_cube_map
   GL_ARB_texture_env_add
   GL_ARB_texture_env_combine
   GL_ARB_texture_env_crossbar
   GL_ARB_texture_env_dot3
   GL_ARB_texture_float
   GL_ARB_texture_mirrored_repeat
   GL_ARB_texture_non_power_of_two
   GL_ARB_texture_rectangle
   GL_ARB_texture_rg
   GL_ARB_transpose_matrix
   GL_ARB_vertex_array_bgra
   GL_ARB_vertex_blend
   GL_ARB_vertex_buffer_object
   GL_ARB_vertex_program
   GL_ARB_vertex_shader
   GL_ARB_window_pos
   GL_ATI_separate_stencil
   GL_ATI_texture_env_combine3
   GL_ATI_texture_float
   GL_ATI_texture_mirror_once
   GL_EXT_abgr
   GL_EXT_bgra
   GL_EXT_bindable_uniform
   GL_EXT_blend_color
   GL_EXT_blend_equation_separate
   GL_EXT_blend_func_separate
   GL_EXT_blend_minmax
   GL_EXT_blend_subtract
   GL_EXT_clip_volume_hint
   GL_EXT_debug_label
   GL_EXT_debug_marker
   GL_EXT_depth_bounds_test
   GL_EXT_draw_buffers2
   GL_EXT_draw_range_elements
   GL_EXT_fog_coord
   GL_EXT_framebuffer_blit
   GL_EXT_framebuffer_multisample
   GL_EXT_framebuffer_multisample_blit_scaled
   GL_EXT_framebuffer_object
   GL_EXT_framebuffer_sRGB
   GL_EXT_geometry_shader4
   GL_EXT_gpu_program_parameters
   GL_EXT_gpu_shader4
   GL_EXT_multi_draw_arrays
   GL_EXT_packed_depth_stencil
   GL_EXT_packed_float
   GL_EXT_provoking_vertex
   GL_EXT_rescale_normal
   GL_EXT_secondary_color
   GL_EXT_separate_specular_color
   GL_EXT_shadow_funcs
   GL_EXT_stencil_two_side
   GL_EXT_stencil_wrap
   GL_EXT_texture_array
   GL_EXT_texture_compression_dxt1
   GL_EXT_texture_compression_s3tc
   GL_EXT_texture_env_add
   GL_EXT_texture_filter_anisotropic
   GL_EXT_texture_integer
   GL_EXT_texture_lod_bias
   GL_EXT_texture_mirror_clamp
   GL_EXT_texture_rectangle
   GL_EXT_texture_sRGB
   GL_EXT_texture_sRGB_decode
   GL_EXT_texture_shared_exponent
   GL_EXT_timer_query
   GL_EXT_transform_feedback
   GL_EXT_vertex_array_bgra
   GL_IBM_rasterpos_clip
   GL_NV_blend_square
   GL_NV_conditional_render
   GL_NV_depth_clamp
   GL_NV_fog_distance
   GL_NV_fragment_program2
   GL_NV_fragment_program_option
   GL_NV_light_max_exponent
   GL_NV_multisample_filter_hint
   GL_NV_point_sprite
   GL_NV_texgen_reflection
   GL_NV_texture_barrier
   GL_NV_vertex_program2_option
   GL_NV_vertex_program3
   GL_SGIS_generate_mipmap
   GL_SGIS_texture_edge_clamp
   GL_SGIS_texture_lod

pyglet.gl.glu_info
------------------------------------------------------------------------------
glu_info.get_version(): 1.3 MacOSX
glu_info.get_extensions():

pyglet.gl.glx_info
------------------------------------------------------------------------------
GLX not available.

pyglet.media
------------------------------------------------------------------------------
audio driver: <pyglet.media.drivers.openal.adaptation.OpenALDriver object at 0x10942f358>

pyglet.media.ffmpeg
------------------------------------------------------------------------------
FFmpeg not available.

pyglet.media.drivers.openal
------------------------------------------------------------------------------
Library: <CDLL '/System/Library/Frameworks/OpenAL.framework/OpenAL', handle 7fac0f203e60 at 0x1094295c0>
Version: 1.1
Extensions:
   ALC_EXT_CAPTURE
   ALC_ENUMERATION_EXT
   ALC_EXT_MAC_OSX
   ALC_EXT_ASA
   ALC_EXT_ASA_DISTORTION
   ALC_EXT_ASA_ROGER_BEEP

pyglet.input.wintab
------------------------------------------------------------------------------
WinTab not available.

PS
I anonymized the paths by replacing the username

@pvcraven
Copy link
Member

Did you do a Mac system update recently? I've heard 3rd/4th hand the people making the SDL library noted that Mac broke something with OpenGL contexts.

@LexVerheesen
Copy link
Author

LexVerheesen commented Nov 21, 2018

My most recent updates:
macOS 10.14; 26-09-18 08:01
macOS 10.14.1; 06-11-18 19:30

If I recall correctly I've used arcade with succes after both updates. Not sure what else might have changed.

Searching for macOS 10.14 (Mojave) and SDL gave me some results that might help:
https://discourse.libsdl.org/t/macos-10-14-mojave-issues/25060
Seems to be fixed in:
https://discourse.libsdl.org/t/sdl-2-0-9-released/25228

I'm not entirely sure how Arcade and Pyglet are connected to SDL.
I thought Pyglet used openGL? openGL seems to be deprecated in macOS Mojave: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html

Edit
Found another bug report: https://groups.google.com/forum/#!topic/pyglet-users/h2VDq-DFX5c

@pvcraven
Copy link
Member

If you call set_window_size sometime after creating the window, is it still blank?

@LexVerheesen
Copy link
Author

Couldn't find a set_window_size function.

Tried the following without succes:

import arcade

SCREEN_WIDTH = 1200
SCREEN_HEIGHT = 600

class MyGame(arcade.Window):

    def __init__(self, width, height):
        super().__init__(width, height)

        arcade.set_background_color(arcade.color.AMAZON)

    def on_draw(self):
        arcade.start_render()

    def update(self, delta_time):
        pass

def main():
    game = MyGame(SCREEN_WIDTH, SCREEN_HEIGHT)
    
    # DEBUG: 
    game.set_size(SCREEN_WIDTH, SCREEN_HEIGHT)
    arcade.set_window(game)

    arcade.run()

if __name__ == "__main__":
    main()

Also tried swapping game.set_size and arcade.set_window and both lines without the other.

@philippkeller
Copy link

Yes, same issue here. I'm also on OSX 10.14.1 with python 3.7.1. The window stays blank, e.g. when calling python3 -m arcade.examples.drawing_primitives.

Also, when closing the blank window I get a segmentation fault:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 232, in 'calling callback function'
  File "/usr/local/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1181, in dealloc
    @DeallocationObserver.rawmethod('v')
KeyboardInterrupt
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 232, in 'calling callback function'
  File "/usr/local/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1120, in objc_method
    args = convert_method_arguments(encoding, args)
  File "/usr/local/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1000, in convert_method_arguments
    new_args.append(ObjCInstance(a))
  File "/usr/local/lib/python3.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 921, in __new__
    if not isinstance(object_ptr, c_void_p):
RecursionError: maximum recursion depth exceeded while calling a Python object
[1]    38412 segmentation fault  python3 -m arcade.examples.drawing_primitives

@pvcraven
Copy link
Member

pvcraven commented Nov 24, 2018

@philippkeller , can you runpython3 -m arcade.examples.asteroid_smasher?

This is with arcade 1.3.4 and 2.0.0a3 both?

@pvcraven pvcraven added the bug label Nov 24, 2018
@philippkeller
Copy link

I've tried on 1.3.7 and 2.0.0a3, they both show the same issue.

Pygame has the same issue, a temporary workaround is to use python from miniconda. The blank window is solved, but the segfault at the end is still happening.

@pvcraven
Copy link
Member

Any update on the status of this?

@philippkeller
Copy link

I think this will not be fixed very fast. On the pygame thread there's no update, and here they claim it depends on a SDL release which takes another few months

@philippkeller
Copy link

Oh, I need to correct myself!

brew upgrade sdl2

seems to fix the issue of the blank window for the standard python3 binary. But the segfault at the end is still a remaining issue for me

@LexVerheesen
Copy link
Author

The solution @philippkeller gave also worked for me.

@pvcraven
Copy link
Member

Closed with 2.0 release.

@dmcdrmtt
Copy link

What I have seen is in every instance of example code for Arcade there is never a line that reads: arcade.finish_render()

Without that all i ever see are white screens, once added the screens will then show background color, images and/or sprites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants