Author Topic: [FIXED] Crash when opening ufopedia in Battlescape  (Read 4481 times)

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
[FIXED] Crash when opening ufopedia in Battlescape
« on: November 11, 2017, 05:10:28 pm »
Now that the main thread is locked and there's no "issues" link on the Github page, where to gather the bug reports on OXCE+?

The problem I encountered is non-critical, but funny. If earnings and monthly income exceed 2^31 (2 147 483 648), there's a warning that you need to sell something to avoid taking credit. To reproduce, load the attached savegame and wait for the end of the month. (It was created with "The X-Com Files" mod, but the bug reproduces without it fine.) No warning for vanilla or OXCE.

P.S. Non-critical, because the sum does NOT warp around to -2^31 at the end of the month. It remains positive.
« Last Edit: February 02, 2023, 03:04:43 pm by Meridian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Where to report OXCE+ bugs?
« Reply #1 on: November 11, 2017, 05:13:59 pm »
Pick a high enough number and any system will collapse... :P (I assume it's not possible to make that much money without cheating?)

But a separate bug report thread may be a good idea. I guess the only reason it hasn't been stared yet is 1) most bugs are reported to modders, not directly to Meridian, and 2) there are very few bugs in OXCE+. ;)

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Where to report OXCE+ bugs?
« Reply #2 on: November 11, 2017, 05:33:12 pm »
Pick a high enough number and any system will collapse... :P (I assume it's not possible to make that much money without cheating?)

Define "cheating" :) I did skip missions in debug mode, which meant highest score and spending nothing on ammo. Funding countries reached the cap by 2000-2001. (Note: this mod starts in December 1996.) Though I lost 4 of them to infiltration. Plus workshops. I reached 2^31 by mid-2002.

I think this sum is reachable if you don't go to Cydonia, but continue playing long enough and with good results.

As for big numbers, C++ compilers of 1990s had no trouble with integers from -2^31-1 to +2^31. Most modern compilers can handle -2^63-1 to +2^63 if the programmer uses the right types. By the way, so could Borland compilers that were used for the original X-Com games of 1990s.

But a separate bug report thread may be a good idea. I guess the only reason it hasn't been stared yet is 1) most bugs are reported to modders, not directly to Meridian, and 2) there are very few bugs in OXCE+. ;)
This particular bug is not related to any mod and does not reproduce in vanilla, OXC or OXCE.



Unrelated bug about OXCE+ compilation.

cmake checks that yaml-cpp version should be above or below 0.5.2. But that no longer seems to work — oxce3.5-plus-proto branch refuses to build with 0.5.1.

The condition should be "yaml-cpp version above 0.5.2".



Another unrelated bug. Quick search in inventory may give false positives, especially for single-letter queries. For example find "Bone Club" for "w". Observed on Gentoo Linux with "Extended+-3.9c-61d22e5-2017-10-10-xenial-x86_64" build from lxnt.wtf. See the attached _autobattle_.asav (requires X-Com Files mod).



For the new engine version (3088e4ac6 from 2017-12-12):



Pressing "u" in Battlescape causes a crash. To reproduce, start a "New Battle" and press "u". Observed for "X-COM Files" mod and without any mods. Not applicable to OXC and OXCE, where "u" doesn't work. See "Ufopedia-crash.log".



CRITICAL BUG. When battle ends, unconscious enemies seem to count as dead rather than captured. To reproduce, start a battle without mods and then stun everybody. (Or just press Ctrl-D and Ctrl-J.) — Debriefing lists all stunned enemies as dead.
« Last Edit: December 19, 2017, 03:18:39 am by tkzv »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9093
    • View Profile
Re: Where to report OXCE+ bugs?
« Reply #3 on: December 21, 2017, 03:15:42 pm »
Pressing "u" in Battlescape causes a crash. To reproduce, start a "New Battle" and press "u". Observed for "X-COM Files" mod and without any mods. Not applicable to OXC and OXCE, where "u" doesn't work. See "Ufopedia-crash.log".

It doesn't crash for me (just doesn't work)... I see what the issue most probably is and will fix it.

CRITICAL BUG. When battle ends, unconscious enemies seem to count as dead rather than captured. To reproduce, start a battle without mods and then stun everybody. (Or just press Ctrl-D and Ctrl-J.) — Debriefing lists all stunned enemies as dead.

This happens only in XcomFiles... for reasons... working on it, it will take a few days and will require a new version of XcomFiles too.

It should NOT happen anywhere else.
Tested without mods and works fine for me, see attached.

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Where to report OXCE+ bugs?
« Reply #4 on: December 22, 2017, 07:58:00 pm »
Tested without mods and works fine for me, see attached.
My bad. Didn't notice that "New Battle" always kills prisoners.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9093
    • View Profile
Re: Where to report OXCE+ bugs?
« Reply #5 on: December 27, 2017, 11:57:04 am »
Pressing "u" in Battlescape causes a crash. To reproduce, start a "New Battle" and press "u". Observed for "X-COM Files" mod and without any mods. Not applicable to OXC and OXCE, where "u" doesn't work. See "Ufopedia-crash.log".

Fixed: https://github.com/MeridianOXC/OpenXcom/commit/bc0410b4cadc2be91f39138d2059d0d1a35effbe