[0.15.3] Some paintings are broken (PAINT.DAT data)

Moderators will move topics here from Help & Support once an issue has been confirmed and enough information provided to reproduce.
Post Reply
User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

[0.15.3] Some paintings are broken (PAINT.DAT data)

Post by pango »

In a recent stream, Talonhatesnames couldn't "use" the Wayrest painting to demonstrate its magic nature to the audience.
After some debugging, it turns out it's not a regression, but some painting descriptions that cannot be generated (raise and exception), so it happened by "chance".

Debugging: InitPaintingInfo
message = 51714
-> paintingIndex = 70
->
paintingRecord = { 8, 14, 255, 255, 255, 255, 255, 255, 255, 255,
5, 8, 9, 255, 255, 255, 255, 255, 255, 255,
5, 8, 9, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }

Issue here is that all bytes in range 30 .. 39 are equal to 255, so GetPaintingRecordPart() gets no choice for %pp2 macro, and raises an exception, breaking interactions with the painting.
I think this is the only paintingIndex with that issue (out of 180).
I have no idea what classic does in that case.
Attachments
SAVE4121.zip
(279.68 KiB) Downloaded 90 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [0.15.3] Some paintings are broken (PAINT.DAT data)

Post by pango »

I submitted a PR

As noted, it's quite possible that classic does not generate text (= empty string) for the %pp2 macro that has no defined alternative. That would require adding special cases, though.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.15.3] Some paintings are broken (PAINT.DAT data)

Post by Interkarma »

I love it when a bug report comes with a PR. :D

Good work tracking that down Pango. I appreciate the help, thank you!

Post Reply