Segfault when launching

Bug #467730 reported by Jean-André Santoni
58
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Ren'Py
Fix Released
Medium
Tom Rothamel
Fedora
New
Undecided
Unassigned
renpy (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

On a Karmic fresh install, I get the following warnings and error when launching renpy:

/usr/share/games/renpy/renpy/parser.py:29: DeprecationWarning: the sets module is deprecated
  import sets
/usr/share/games/renpy/renpy/script.py:31: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Fatal Python error: (pygame parachute) Segmentation Fault
Abandon

Tags: lucid
Revision history for this message
Tom Rothamel (renpytom) wrote :

Could you try the build from http://www.renpy.org/?

Thanks.

Revision history for this message
izhar (kagesenshi-87) wrote :

reproducable on Fedora 11 - renpy 6.9.0/6.9.1

full static binary release from renpy.org works ok if using the provided python interpreter .. but i compiled from the source as i was trying to package it up ..

bug only happen if installed with the _renpy.so modules ... if the modules are not installed, renpy runs fine (but of course, without nice menus / screenshot support / audiovideo support )

bug does not occur in renpy 6.8.1 ..

bug in the new ffmpeg based module ??

Revision history for this message
Tom Rothamel (renpytom) wrote :

I don't know what's going on, offhand. I do have several patches I apply to ffmpeg to make it work properly, so maybe one of them is missing on Fedora?

The Ren'Py dependencies are available in bazaar, as lp:~renpytom/renpy/renpy-deps .

Changed in renpy:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → renpytom (renpytom)
Revision history for this message
izhar (kagesenshi-87) wrote :

erm ... are the patches heading to upstream ffmpeg???

looking at ffmpeg-av_cold.patch, seems like it made the conditional to define the same value in both conditions.

as for ffmpeg-ogg-size.patch

if not (size > MAX_PAGE_SIZE): end = size

vs

if not (size > MAX_PAGE_SIZE): end = 0

ure changing it so that end of file equals to 0 ??

both doesnt quite make sense to me though ... but i believe you know better on why the patch do it .. however, will this break other applications if ffmpeg is applied with these patch?

for packaging in distros, introducing patches like this imo, is quite risky as many other applications also depends on ffmpeg, and might break if ffmpeg doesnt behave like how it supposed to behave.

Any way to fix this inside renpy itself?

Revision history for this message
Tom Rothamel (renpytom) wrote :

av_cold shouldn't matter on Linux, but was necessary to compile on Windows with the compiler I'm using, where the cold attribute is broken.

The ogg-size patch fixes ffmpeg to always read in the duration of an ogg file. Without this, the function will seek to the end of the file, not read in the last granule, and hence not set the duration properly for an ogg file that is less than 65307 bytes long. IIRC, I sent this patch in a while ago, not sure what's happening with it.

Thinking about this a little more, it's possible that this problem relates to some seek issues I fixed a while ago. Can you go to:

http://www.renpy.org/wiki/renpy/releases/6.9.3

and grab the updated version of loader.py listed in the 2009-10-03 update?

Revision history for this message
Frederic Muller (fred-beijinglug) wrote :

Hi!

Downloaded the loader.py from http://bazaar.launchpad.net/~renpytom/renpy/main/annotate/750/renpy/loader.py and replaced it in /usr/share/games/renpy/renpy/ but the application still segfaults. I'm using karmic.

What else do you need us to try?
Thanks

Revision history for this message
Tom Rothamel (renpytom) wrote :

Hm... I'm using Karmic too, so it's weird that this doesn't work.

Question: Is this running on a netbook?

Revision history for this message
Tom Rothamel (renpytom) wrote :

Apparently this only happens on i386 systems. But I've been able to repeat it, so that's something.

Revision history for this message
Tom Rothamel (renpytom) wrote :

While I'm not sure what the original problem was, it looks like using the module source code from 6.10 will fix this problem. I did rewrite some of the transform code in that release, and it looks like the segfault was happening in transform32_mmx.

I would suggest just using the module directory from lp:renpy. It's the most up to date, and I just checked in all the generated files. It also includes fixes that allow sound and video to work with libswscale0.

Tom Rothamel (renpytom)
Changed in renpy:
status: Triaged → In Progress
Revision history for this message
Frederic Muller (fred-beijinglug) wrote :

Hi! Sorry I thought I would get email notifications (I guess I didn't subscribe). I am not sure how to "use" the module directory. Downloaded all the code but then I'm stuck. Thanks.

Fred

Revision history for this message
Tom Rothamel (renpytom) wrote :

Basically, you have to grab lp:renpy, grab your distribution's package source, and replace the module directory in the package source with the one from lp:renpy. Then rebuild the package.

Revision history for this message
Frederic Muller (fred-beijinglug) wrote :

HI! That's slightly above my skill level. I'll give it a try still, and report back my failure or success. Thank you.

Revision history for this message
Tom Rothamel (renpytom) wrote :

If you don't want to build Ren'Py yourself, you can also download Ren'Py and its updates from http://www.renpy.org/.

Revision history for this message
Frederic Muller (fred-beijinglug) wrote :

ok, the download did work fine. But I thought we were trying to troubleshoot/fix the Ubuntu package which segfaults (on some systems only apparently) so no users can use a working version from the repositories. In that perspective I'm willing to help test more or do some stuff. Just let me know.

affects: ubuntu → renpy (Ubuntu)
Revision history for this message
Tom Rothamel (renpytom) wrote :

Really, the correct fix would be for the maintainers to either upgrade their version of Ren'Py, or to take the new module and backport the module from the current version. There's not too much I can do on my end to make that happen.

Revision history for this message
Micah Gersten (micahg) wrote :

New upstream release should fix the segfault according to the maintainer. Medium priority as it's a universe package.

Changed in renpy (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Tom Rothamel (renpytom) wrote :

Please either take the module from 6.10, or wait to take 6.10.1, which will be out in a week or so. 6.10 has some problems in it, which make it hard to recommend for distribution.

Revision history for this message
C-quel (c-quel) wrote :

Hello all,

I actually experienced this segfault a few weeks ago when trying RenPy on Kubuntu Karmic (yes, I'm finally getting into visual novels). However, due to time constraints, I chose instead to simply download 6.9.3 into my home directory and work from it from there -- suffice to say, everything worked.

Then recently while launching it, I accidentally double-clicked on renpy.py rather than renpy.sh, and got some strange behavior (including no sound). It was then that I recalled that in the Ubuntu packaged version of renpy, there is no renpy.sh -- in fact, the symlink in /usr/games/ only references renpy.py.

So doing a little grafting work (kdesudo dolphin) with /usr/share/games/renpy in one window and the extracted contents of renpy-6.9.3 in the other, I simply made a moved in a copy of renpy.sh into /usr/share/games/renpy. And double-clicking on that actually made RenPy run (with sound and all)! ^___^

Hopefully someone can try this out in Ubuntu proper (or Fedora), but I was quite happy to stumble over what currently seems like a very simple fix. ^^
Course, this is only half the story since the renpy and renpy-demo (if you have it installed) symlinks still won't work since they point to the wrong thing.

I've attached samples of replacement launchers for /usr/games/renpy and /usr/games/renpy-demo that work for me, again hopefully you can recreate the success in Ubuntu proper.

For even more fun you can also copy the jedit folder in renpy-6.9.3 and paste it into /usr/share/games/renpy to get the Edit Script piece working (because at least in Jaunty, Renpy seemed to ignore jedit proper), but of course that lies outside the scope of this bug. ^^;;

In any event, hope this helps!
[Even though I did fix it on my system, I'm still sticking with 6.9.3 just cause I like it.] ;)

Kiri (kiri)
tags: added: lucid
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

The version included in Lucid still seg faults on startup, but renpy works fine in Maverick and later releases of Ubuntu.

--
Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Natty Narwhal.

This is a significant bug in Ubuntu. If you need a fix for the bug in previous versions of Ubuntu, please do steps 1 and 2 of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in renpy (Ubuntu):
status: Triaged → Fix Released
Tom Rothamel (renpytom)
Changed in renpy:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.