Occasionally a segmentation fault when switching 'CUSTOM ARTWORK' graphics

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Occasionally a segmentation fault when switching 'CUSTOM ARTWORK' graphics

Post by BryanFRitt »

Occasionally(not that often), when switching 'CUSTOM ARTWORK' graphics theme or when switching levelsets that would do this, I've gotten a segmentation fault; on the screen there was a message about a config file. (Should have taken screenshot at least one of these times, but didn't) EDIT: Could this have been caused by me playing around with these config files?
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555710778 in CreateScaledBitmaps (bitmaps=0x55555b79ad70, zoom_factor=1, tile_size=32, create_small_bitmaps=1)
at system.c:1258
1258 old_width = old_bitmap->width;
After restarting Rocks'n'Diamonds things seem to fine. Haven't gotten it enough to notice more of a pattern to help reproduce it.
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Occasionally a segmentation fault when switching 'CUSTOM ARTWORK' graphics

Post by Holger »

Very interesting, and should indeed not happen! :-o

It would be very worth knowing which custom artwork sets were loaded last (or about to be loaded) when this happens.

It could either be a "general" programming bug that happens when changing custom artwork sets "too often" (that is, it should of course not happen, but is an existing program bug that happens if a valid action is repeated many times, triggering a bug only in such cases).

Or it could be a bug that occurs when processing "invalid" custom graphics configuration files ("graphicsinfo.conf" files). That means that a configuration file contains some "invalid" values for certain options that would result in buggy behavior, which should be prevented by the program, but isn't.

I could imagine that it is hard or impossible to deterministically reproduce this crash, but it would help to know all custom artwork sets that were used between starting the game and the program finally crashing.

At least the crash message you quoted gives a good hint at which part of the program the crash occurred -- thanks for this information!
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: Occasionally a segmentation fault when switching 'CUSTOM ARTWORK' graphics

Post by BryanFRitt »

Holger wrote: Mon Jan 16, 2023 3:08 pm It could either be a "general" programming bug that happens when changing custom artwork sets "too often" (that is, it should of course not happen, but is an existing program bug that happens if a valid action is repeated many times, triggering a bug only in such cases).
Those times I think I was applying different custom artwork sets quickly; so this may be what happened for these cases.
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
Post Reply