Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20231210 (309eecc62) Equipment is only installed on an empty ship #5702

Open
LucMorizur opened this issue Jan 2, 2024 · 4 comments
Open

Comments

@LucMorizur
Copy link

Hi, and many thanks for Pioneer 🙂!

Observed behaviour

I recently (first days of December) downloaded new files and compiled them to test, I wanted to describe a bug (strange cargo behaviour) which may have been corrected in last versions, as suggested @impaktor .
I started from Mars, cheated with Lua console so to have enough money to immediately buy a big ship (Deneb), which was the ship with which I was having the cargo bug, and started a route to Titan, where I thought that station Port Makenzie was military and thus offering many nice equipments, but it appears it has changed nowadays.

In around the middle of the trip, the game freezes with the following message:

[T] modules/TradeShips/Trader.lua:19: equipment is only installed on an empty ship
stack traceback:
␤[C]: in function 'assert'
␤[T] modules/TradeShips/Trader.lua:19: in Function 'addEquip'
␤[T] modules/TradeShips/Events.lua:143: in Function 'cb'
␤[T] libs/Event.lua:34: in function '?'
␤[T] libs/Event.lua:185: in function <[T] libs/Event.lua:180>

Which is shown at the end of attached output.txt file; and followed by a "Frame instance deletion" message and Pioneer window closing.

Expected behaviour

Reach Titan with no hang up

Steps to reproduce

I could reproduce three times exactly the same behaviour.

My pioneer version (and OS):
Pioneer: 20231210 (309eecc)
Machine: Acer Aspire V3-575G
OS:
Linux 5.19.0-1027-lowlatency x86_64 GNU/Linux (Ubuntu Studio)
Ubuntu 22.04.3 LTS jammy
Qt 5.15.3
KDE 5.92.0
kf5-config 1.0
plasmashell 5.24.7
X.Org X Server 1.21.1.4

My output.txt (required) and game save (optional, but recommended)
output.txt
opengl.txt
_autosave1.zip

@Max5377
Copy link
Contributor

Max5377 commented Jan 19, 2024

@LucMorizur Did you do something else besides what you described above? This error was happening mainly after saving and loading the game. Can't seem to reproduce it on current master.

@Web-eWorks
Copy link
Member

@Gliese852 TradeShips/Event.lua#149 - is there a reason a damaged ship is having duplicates of its equipment items installed upon docking at a station?

Additionally, the calls to SetHullPercent / SetFuelPercent in the surrounding area really should have an explicit numeric constant - relying on the non-obvious default variable handling makes for much harder to read code. (SetHullPercent() -> set hull to what percent?)

@LucMorizur
Copy link
Author

@Max5377 I don't remember having done something else than what I described. Especially this time I tried to do things very rapidly and efficiently, so to be quickly able to test the "cargo disappearing bug". So I immediately cheated with Lua console so to have enough money to buy a Deneb. Obviously before leaving I bought some equipments, like something like 20 additional passenger cabins, don't ask me why — I like to always have enough cabins to taxi big groups, so I always immediately add this equipment. Also I must have bought some heavy atmospheric shield, a radar, an automatic pilot if none was provided, a profit analyser or detector (I shall put the language in English too, so to have exact same words)... But normally speaking I did nothing more.

As soon as possible I'll reload current master, re-compile it, and do the same test, and tell you here if the same bug appears.

@Gliese852
Copy link
Contributor

@Web-eWorks it was almost like this before me and was carefully moved to the new code. But, perhaps, once before Trader.addEquip (addShipEquip) was smarter and could, when called again on the same ship, restore equipment lost due to damage. (although it seems that in Pioneer you cannot lose equipment if damaged). So, I think the most correct answer is for historical reasons and this line is not needed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants