Skip to content

draw_text() errors out with invalid pointer. #643

@Mungari

Description

@Mungari

Bug Report

Following the tutorial. I'm doing the score section, I copy-pasted the code and it errors out with an invalid pointers and dumps the core.

I thought I had problems with a variable, but even with normal text it sometimes errors out.

Platform: Fedora 31
Arcade version: arcade==2.3.15
Python version: 3.7

Stack trace as per journalctl:

Process 7112 (python) of user 1000 dumped core.
                                                      
Stack trace of thread 7112:
#0  0x00007ff074f08625 raise (libc.so.6)
#1  0x00007ff074ef18d9 abort (libc.so.6)
#2  0x00007ff074f4c4af __libc_message (libc.so.6)
#3  0x00007ff074f53a9c malloc_printerr (libc.so.6)
#4  0x00007ff074f53d4c munmap_chunk (libc.so.6)
#5  0x00007ff062c8ec73 _ZN19hb_ot_map_builder_tD2Ev (libharfbuzz.so.0)
 #6  0x00007ff062cba78d _ZN18hb_ot_shape_plan_t5init0EP9hb_face_tPK19hb_shape_plan_key_t (libharfbuzz.so.0)
#7  0x00007ff062cc7f3d hb_shape_plan_create2 (libharfbuzz.so.0)
#8  0x00007ff062cc87f3 hb_shape_plan_create_cached2 (libharfbuzz.so.0)
#9  0x00007ff062cc89e3 hb_shape_full (libharfbuzz.so.0)
 #10 0x00007ff062dc5067 raqm_layout (libraqm.so.0)
 #11 0x00007ff06330c6e6 n/a (/home/birbautoma/.local/share/virtualenvs/arcade_test-dGCImsUz/lib64/python3.7/site-packages/PIL/_imagingf>

Actual behavior:

Expected behavior:

Print the score to the screen

Steps to reproduce/example code:

score_text = f"Score: {self.score}"
        arcade.draw_text(score_text, 10 + self.view_left, 10 + self.view_bottom,
                         arcade.csscolor.WHITE, 18)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions