mupen64plus / mupen64plus-ui-python

A frontend for Mupen64Plus
http://m64py.sourceforge.net/
GNU General Public License v3.0
247 stars 67 forks source link

M64py does not work anymore since Python 3.10 #191

Closed arbolis closed 2 years ago

arbolis commented 2 years ago

After updating my python packages to the version 3.10 (Arch Linux), m64py does not work anymore.

The command m64py -v returns

__  __                         __   _  _   ____  _           
|  \/  |_   _ _ __   ___ _ __  / /_ | || | |  _ \| |_   _ ___ 
| |\/| | | | | '_ \ / _ \ '_ \| '_ \| || |_| |_) | | | | / __|
| |  | | |_| | |_) |  __/ | | | (_) |__   _|  __/| | |_| \__ \
|_|  |_|\__,_| .__/ \___|_| |_|\___/   |_| |_|   |_|\__,_|___/
             |_|                                               

M64Py - A frontend for Mupen64Plus version 0.2.5

Frontend: INFO: attached to library 'Mupen64Plus Core' version 2.5.0
Frontend: INFO: includes support for Dynamic Recompiler.
Video: Getting value card_id
Video: Getting value force_polygon_offset
Video: Getting value polygon_offset_factor
Video: Getting value polygon_offset_units
Video: Getting value vsync
Video: Getting value ssformat
Video: Getting value show_fps
Video: Getting value clock
Video: Getting value clock_24_hr
Video: Getting value wrpResolution
Video: Getting value wrpVRAM
Video: Getting value wrpFBO
Video: Getting value wrpAnisotropic
Video: Getting value ghq_fltr
Video: Getting value ghq_cmpr
Video: Getting value ghq_enht
Video: Getting value ghq_hirs
Video: Getting value ghq_enht_cmpr
Video: Getting value ghq_enht_tile
Video: Getting value ghq_enht_f16bpp
Video: Getting value ghq_enht_gz
Video: Getting value ghq_enht_nobg
Video: Getting value ghq_hirs_cmpr
Video: Getting value ghq_hirs_tile
Video: Getting value ghq_hirs_f16bpp
Video: Getting value ghq_hirs_gz
Video: Getting value ghq_hirs_altcrc
Video: Getting value ghq_cache_save
Video: Getting value ghq_cache_size
Video: Getting value ghq_hirs_let_texartists_fly
Video: Getting value ghq_hirs_dump
Video: Getting value alt_tex_size
Video: Getting value use_sts1_only
Video: Getting value force_calc_sphere
Video: Getting value correct_viewport
Video: Getting value increase_texrect_edge
Video: Getting value decrease_fillrect_edge
Video: Getting value texture_correction
Video: Getting value pal230
Video: Getting value stipple_mode
Video: Getting value stipple_pattern
Video: Getting value force_microcheck
Video: Getting value force_quad3d
Video: Getting value clip_zmin
Video: Getting value clip_zmax
Video: Getting value fast_crc
Video: Getting value adjust_aspect
Video: Getting value zmode_compare_less
Video: Getting value old_style_adither
Video: Getting value n64_z_scale
Video: Getting value optimize_texrect
Video: Getting value ignore_aux_copy
Video: Getting value hires_buf_clear
Video: Getting value fb_read_alpha
Video: Getting value useless_is_useless
Video: Getting value fb_crc_mode
Video: Getting value filtering
Video: Getting value fog
Video: Getting value buff_clear
Video: Getting value swapmode
Video: Getting value aspect
Video: Getting value lodmode
Video: Getting value fb_smart
Video: Getting value fb_hires
Video: Getting value fb_read_always
Video: Getting value read_back_to_screen
Video: Getting value detect_cpu_write
Video: Getting value fb_get_info
Video: Getting value fb_render
Unhandled Python exception
zsh: abort (core dumped)  m64py -v

I made sure that mupen64plus works fine, the problem really comes from M64py. I hope there is a quick and easy fix... Thank you!

gen2brain commented 2 years ago

Doesn't look related to the python version at all. Did you test mupen64plus with the same plugins and did you try to change the plugin? Is it 3.9 or 3.10, works fine for me on 3.9.8. Also, there is a core dump, can you send details about the crash?

arbolis commented 2 years ago

First of all, thank you very much for the (fast!) response gen2brain. I was on IRC in the Arch Linux channel to seek for some help, and other people, who had never installed neither M64py nor mupen64plus faced the same problem (core dump), and they were the ones who figured out it was a Python related problem.

I can run "mupen64plus name_of_rom" just fine, the game will start (albeit with glitched graphics, but this was always the case... and m64py was my only way to fix those, by tweaking the graphics settings, that I cannot access anymore now, since the program won't run properly).

All was working with Python 3.9 (dot something). It is when I passed to 3.10 (dot 1) that things stopped to work.

I didn't know core dumps left some debugging files. I attach one of the binaries of the crashes I had. (I am guessing they are pretty similar).

ezyzip.zip

gen2brain commented 2 years ago

This should be fixed now.

arbolis commented 2 years ago

It is, I have just tested it, no problem so far. You're very kind, thank you very much for the fix.

gui-ibanhez commented 2 years ago

I experienced the same problem today. I think the problem is caused by this single line (number 179) on the file src/m64py/frontend/mainwindow.py cw, ch = (dwidth/2)-(width/2), (dheight/2)-(height/2)

I fixed the problem changing it to: cw, ch = (dwidth//2)-(width//2), (dheight//2)-(height//2)

akien-mga commented 2 years ago

@gen2brain Got this reported downstream: https://bugs.mageia.org/show_bug.cgi?id=30221

If there are no outstanding issues preventing a release, may I suggest tagging 0.2.6 or similar so that distro packagers pick up the Python 3.10 compatible version? For now I'll backport the patches but a tagged release would be better :)

Zixiken commented 1 year ago

I had this issue with python 3.11, and @gui-ibanhez 's fix solved the issue for me.

Edit: Ignore me, I thought I had pulled the latest.