[SOLVED]_renpysteam.pyd crash if Steam client is not running

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

[SOLVED]_renpysteam.pyd crash if Steam client is not running

#1 Post by iichan_lolbot »

Code:

Code: Select all

    try:
        import _renpysteam as steam
        steam.init()
        steam.retrieve_stats()
    except:
        steam = None
Test case:
0. Prepare game to work with Steam, steam_api.dll & Lib\_renpysteam.pyd added to lib\windows-i686
1. Shut down Steam client
2. Run game containing this code

Expected result:
Some exception is caught during import / during init / during communication, so steam var is None

Actual result:
APPCRASH event happens.

Versions:
RenPy 6.99.11
Windows 7
steam_api.dll & _renpysteam.pyd - from some random RenPy game from steam, attached

APPCRASH text:

Code: Select all

  Имя события проблемы:	APPCRASH
  Имя приложения:	travnica.exe
  Версия приложения:	0.0.0.0
  Отметка времени приложения:	5586cc5c
  Имя модуля с ошибкой:	_renpysteam.pyd
  Версия модуля с ошибкой:	0.0.0.0
  Отметка времени модуля с ошибкой:	554f6e6b
  Код исключения:	c0000005
  Смещение исключения:	00001c61
  Версия ОС:	6.1.7601.2.1.0.256.1
  Код языка:	1049
  Дополнительные сведения 1:	0a9e
  Дополнительные сведения 2:	0a9e372d3b4ad19135b953a78882e789
  Дополнительные сведения 3:	0a9e
  Дополнительные сведения 4:	0a9e372d3b4ad19135b953a78882e789
Attachments
crash.zip
(107.48 KiB) Downloaded 81 times

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: [SOLVED]_renpysteam.pyd crash if Steam client is not run

#2 Post by iichan_lolbot »

UPD: Sorry, my code is just wrong, steam.init() does not throw any exceptions, so right code is something like this:

Code: Select all

    try:
        import _renpysteam as steam
        if  not steam.init():
            raise
        steam.retrieve_stats()
    except:
        steam = None

Post Reply

Who is online

Users browsing this forum: No registered users