Mittens 2014 will take place in a villa in Portugal, from 19-26 July. Please visit the thread to reserve a space!


AGS Engine Ports

Porting AGS to various platforms; platform-specific issues

Bug Issue: Resonance crashes on Linux

Pages: [1]

BigMc

  • AGSer
  • Posts: 246
« on: 20 Jul 2012, 13:23 »
This bug is for reporting crashes of Resonance on Linux.
« Last Edit: 14 Oct 2012, 01:31 by BigMc »

Tea23

  • AGSer
  • Posts: 6
« Reply #1 on: 07 Sep 2012, 17:11 »
I just finished Resonance in Arch 64bit, a lengthy game. I had one random crash and that was at loading a savegame.

I didn't think to run it via console at the time, though, and so any output generated has been lost. After that crash I ran from the command line each time just in case but experienced no further crashes.

BigMc

  • AGSer
  • Posts: 246
« Reply #2 on: 07 Sep 2012, 17:18 »
EDIT: Changed the original bug description because everybody is reporting Resonance crahses here.
« Last Edit: 14 Oct 2012, 01:33 by BigMc »

Issue updated by BigMc
« Reply #3 on: 22 Sep 2012, 19:08 »
  • Version changed from 64bit to github.com/adventuregamestudio/ags, 64bit, main, refactory

devadatta

  • AGSer
  • Posts: 0
« Reply #4 on: 05 Oct 2012, 05:26 »
Hi! I'm not sure my problem goes here, but I use AGS on Ubuntu 12.04. When I play Resonance it always chrashed when I get to a certain place (trying to read e-mails on the secretary's computer). I have really no idea what it depends on and have tried changing settings, running wine, using su, recompile AGS but it hasn't changed anything. I'm grateful for any kind of help and I'm sorry if I posted in the wrong forum or thread. Here's a part of the error message:

AGS: Loading room 21
*** buffer overflow detected ***: ags terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7fd8e261c907]
/lib/x86_64-linux-gnu/libc.so.6(+0x109800)[0x7fd8e261b800]
ags(_Z19prepare_text_scriptP10ccInstancePPc+0xb4)[0x4b9144]
ags(_Z28run_script_function_if_existP10ccIn stancePcilll+0x53)[0x4cdae3]
ags(_Z22run_text_script_iparamP10ccInstance Pcl+0x54)[0x4ce0d4]
ags(_Z13process_eventP13EventHappened+0x28e)[0x4cff2e]
ags(_Z16processalleventsiP13EventHappened+0x77)[0x4d0787]
ags(_Z13update_eventsv+0x14)[0x4d07c4]
ags(_Z8mainloopbP22IDriverDependantBitmapii+0x261)[0x4d2191]
ags(_Z14main_game_loopv+0x38)[0x4d2658]
ags(_Z30initialize_start_and_play_gameiPKc+0x138)[0x4daa98]
ags(_Z17initialize_engineiPPc+0x1706)[0x4dc526]
ags(main+0x181)[0x43ce91]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fd8e253376d]
ags[0x43e0e5]
======= Memory map: ========
« Last Edit: 05 Oct 2012, 11:51 by BigMc »

BigMc

  • AGSer
  • Posts: 246
« Reply #5 on: 05 Oct 2012, 11:55 »
Hi, thanks for reporting. It says I edited your message, because I tried to split it off this bug by editing the title. It didn't work. Don't be afraid to file a new bug if you are not certain that you have encountered an existing one.

Crimson Wizard

  • AGSer
  • Posts: 3,955
  • not et suppotreD
« Reply #6 on: 05 Oct 2012, 13:44 »
devadatta said he was running game in Wine too, does this mean he was running windows version?

(sorry, I am linux noob :))
« Last Edit: 05 Oct 2012, 13:44 by Crimson Wizard »

BigMc

  • AGSer
  • Posts: 246
« Reply #7 on: 05 Oct 2012, 13:57 »
Yes, but given that most people running Resonance on Windows don't seem to have this problem, I would first ask for a verification.
devadatta, did you run the game successfully on Wine and really experienced the same crash then?

EDIT: And is it possible to split bug reports?
« Last Edit: 05 Oct 2012, 13:59 by BigMc »

Crimson Wizard

  • AGSer
  • Posts: 3,955
  • not et suppotreD
« Reply #8 on: 05 Oct 2012, 14:30 »
Yes, but given that most people running Resonance on Windows don't seem to have this problem, I would first ask for a verification.
How many people could run windows version of Resonance using JJS's branch? Personally I find this not very probable anyone did, since there was no reason to use newer engine.
devadatta, have you run Resonance under Wine using new engine or original Resonance.exe on its own?
Also perhaps it's worth to mention which exactly branch did you build (64bit, main, other?)

BigMc

  • AGSer
  • Posts: 246
« Reply #9 on: 05 Oct 2012, 14:37 »
I think he used the original Resonance.exe.
« Last Edit: 05 Oct 2012, 14:37 by BigMc »

pwiecz

  • AGSer
  • Posts: 0
« Reply #10 on: 13 Oct 2012, 13:58 »
I've had the same issue using ags built from the main branch of the github.com/adventuregamestudio/ags under Ubuntu 12.04
What's interesting is that if rebuilt the ags changing gcc optimization level from O2 to O0 the game passed that point that devadatta had problem with.

Hope that helps,
Piotr

Crimson Wizard

  • AGSer
  • Posts: 3,955
  • not et suppotreD
« Reply #11 on: 13 Oct 2012, 20:39 »
I've had the same issue using ags built from the main branch of the github.com/adventuregamestudio/ags under Ubuntu 12.04
What's interesting is that if rebuilt the ags changing gcc optimization level from O2 to O-0 the game passed that point that devadatta had problem with.

Hope that helps,
Piotr

NOTE: the "O" & "0" symbols combo make afro-smile :)

Anyway, now when you mention this I remember I've read following in commentary to engine source:
Quote
C-Script run-time interpreter (c) 2001 Chris Jones

You must DISABLE OPTIMIZATIONS AND REGISTER VARIABLES in your compiler
when compiling this, or strange results can happen.

Issue updated by BigMc
« Reply #12 on: 14 Oct 2012, 01:31 »
  • Issue renamed from "64bit branch crashes randomly on Linux" to "Resonance crashes on Linux"

pwiecz

  • AGSer
  • Posts: 0
« Reply #13 on: 14 Oct 2012, 10:41 »
I've had the same issue using ags built from the main branch of the github.com/adventuregamestudio/ags under Ubuntu 12.04
What's interesting is that if rebuilt the ags changing gcc optimization level from O2 to O-0 the game passed that point that devadatta had problem with.

Hope that helps,
Piotr

NOTE: the "O" & "0" symbols combo make afro-smile :)

Anyway, now when you mention this I remember I've read following in commentary to engine source:
Quote
C-Script run-time interpreter (c) 2001 Chris Jones

You must DISABLE OPTIMIZATIONS AND REGISTER VARIABLES in your compiler
when compiling this, or strange results can happen.

I think I've found a problem. It seems to be really a buffer overflow.
In Engine/ac.cpp in the main branch and in Enging/script/script.cpp in the refactor branch it's assumed that the function name will be at most 29 characters long
(there is scfunctionname[30] variable defined there).
And the function name Resonance is trying to call is 30 characters long "lstEmailSubject_OnSelectionCha" (or was stripped to 30 characters by the ags engine).

Anyway, changing "scfunctionname[30]" to "scfunctionname[31]" fixes the crash.
« Last Edit: 14 Oct 2012, 17:50 by pwiecz »

Crimson Wizard

  • AGSer
  • Posts: 3,955
  • not et suppotreD
« Reply #14 on: 01 Feb 2013, 23:05 »
So, how is situation here? May this issue be considered resolved?

s_d

  • AGSer
  • Posts: 98
« Reply #15 on: 23 Feb 2013, 00:19 »
Yes, close it.  scfunctionname[] array is almost used nowhere any more (only in cc_instance.cpp...  now functionName is used in most places), and where either of them are used, the array is now of MAX_FUNCTION_NAME_LEN size (plus one for null).

It would be good to verify that the Editor limits function names to the same length (currently 60 bytes), to be certain, but this particular issue appears resolved.  CW, you're a Windows guy... do you know your way around C# well enough to verify that the editor will not accept function names longer than 60?

Crimson Wizard

  • AGSer
  • Posts: 3,955
  • not et suppotreD
« Reply #16 on: 23 Feb 2013, 16:08 »
Yes.
Code: C
  1. public const int MAX_EVENT_HANDLER_LENGTH = 30;
  2.  

Crimson Wizard

  • AGSer
  • Posts: 3,955
  • not et suppotreD
« Reply #17 on: 26 Mar 2013, 08:41 »
Ok, closed.
  • Status changed from New to Closed
  • Fixed Version changed from (none) to github.com/adventuregamestudio/ags, master

Pages: [1]

Issue Details

  • Reported
    20 Jul 2012, 13:23
  • Updated
    26 Mar 2013, 08:41
  • View Status
    Public
  • Type
    Bug
  • Status
    Closed
  • Priority
    Normal
  • Version
    github.com/adventuregamestudio/ags, 64bit, main, refactory
  • Fixed in
    github.com/adventuregamestudio/ags, master
  • Assigned to
    (none)
  • Category
    64 bit

Tags



Powered by: SMF Project Tools 0.5.3 © Niko Pahajoki 2007-2011