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

[Regression] AttractMode Lockup (FeFileInputStream) #440

Closed
Enverex opened this issue Apr 30, 2018 · 3 comments
Closed

[Regression] AttractMode Lockup (FeFileInputStream) #440

Enverex opened this issue Apr 30, 2018 · 3 comments

Comments

@Enverex
Copy link
Contributor

Enverex commented Apr 30, 2018

I'm not sure what's triggered this to be an issue, but recently I noticed AttractMode would lock up if I browsed to a game that didn't have a complete set of artwork.

I bisected the issue back to this commit - 826ff62

Now that commit isn't recent and I've definitely been using AttractMode since then, so I'm wondering if some system library change has caused this (file streaming) to suddenly fail.

The problem manifests itself like so: If you browse to a game that doesn't have all the artwork that the theme looks for, AttractMode just seems to lock up indefinitely. No errors, it just freezes.

Here's a backtrace after waiting a few minutes after the freeze (I triggered the interupt):

Thread 1 "attract" received signal SIGINT, Interrupt.
0x00005555555f28f0 in FeFileInputStream::read(void*, long long) ()
(gdb) bt
#0  0x00005555555f28f0 in FeFileInputStream::read(void*, long long) ()
#1  0x00007ffff7b89a5d in (anonymous namespace)::read(void*, char*, int) () from /usr/lib/libsfml-graphics.so.2.4
#2  0x00007ffff7ba22d6 in stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int) () from /usr/lib/libsfml-graphics.so.2.4
#3  0x00007ffff7ba6186 in stbi__load_and_postprocess_8bit(stbi__context*, int*, int*, int*, int) () from /usr/lib/libsfml-graphics.so.2.4
#4  0x00007ffff7bacedd in sf::priv::ImageLoader::loadImageFromStream(sf::InputStream&, std::vector<unsigned char, std::allocator<unsigned char> >&, sf::Vector2<unsigned int>&) () from /usr/lib/libsfml-graphics.so.2.4
#5  0x00007ffff7bb8eb9 in sf::Texture::loadFromStream(sf::InputStream&, sf::Rect<int> const&) () from /usr/lib/libsfml-graphics.so.2.4
#6  0x0000555555659bcf in FeTextureContainer::try_to_load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) ()
#7  0x000055555565b1f5 in FeTextureContainer::load_from_archive(char const*, char const*) ()
#8  0x000055555565827e in FeImage::setFileName(char const*) ()
#9  0x000055555569f56a in long long Sqrat::SqMember<FeImage, void>::Func1<char const*, true>(SQVM*) ()
#10 0x00005555556d49ab in SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, bool&) ()
#11 0x00005555556da70e in SQVM::Call(SQObjectPtr&, long long, long long, SQObjectPtr&, unsigned long long) ()
#12 0x00005555556b9b38 in sq_call ()
#13 0x000055555568f8db in Sqrat::sqVarSet(SQVM*) ()
#14 0x00005555556d49ab in SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, bool&) ()
#15 0x00005555556da70e in SQVM::Call(SQObjectPtr&, long long, long long, SQObjectPtr&, unsigned long long) ()
#16 0x00005555556dc432 in SQVM::FallBackSet(SQObjectPtr const&, SQObjectPtr const&, SQObjectPtr const&) ()
#17 0x00005555556dc615 in SQVM::Set(SQObjectPtr const&, SQObjectPtr const&, SQObjectPtr const&, long long) ()
#18 0x00005555556d9055 in SQVM::Execute(SQObjectPtr&, long long, long long, SQObjectPtr&, unsigned long long, SQVM::ExecutionType) ()
#19 0x00005555556da673 in SQVM::Call(SQObjectPtr&, long long, long long, SQObjectPtr&, unsigned long long) ()
#20 0x00005555556b9b38 in sq_call ()
#21 0x0000555555675dd4 in FeVM::on_tick() ()
#22 0x00005555555ed9ec in main ()
@Enverex Enverex changed the title [Regression] AttractMode Lockup [Regression] AttractMode Lockup (FeFileInputStream) Apr 30, 2018
mickelson added a commit that referenced this issue May 25, 2018
- I am unable to recreate issue #440 but I noticed that the frontend is
  attempting to load image files set from layout scripts without first
  checking if the file exists.  I have added code to check if the file
  exists before trying to run it, perhaps this will fix the issue.
@mickelson
Copy link
Owner

HI, thanks for the report. I am unable to recreate this lockup myself but I have found a potential cause that I have now fixed in the code. I would appreciate it if you could try the latest code in the master banch and let me know if it might address this issue.

cheers

@Enverex
Copy link
Contributor Author

Enverex commented May 25, 2018

Fantastic. That seems to work, thanks @mickelson

I have a feeling this is triggered by a new(er) version of SMFL and Arch is likely ahead of the versioning curve there so we got hit first. What an odd change.

@Enverex
Copy link
Contributor Author

Enverex commented Jun 1, 2018

Found a secondary issue to this; whilst this fixed file browsing, the issue still seems to trigger when the screensaver runs so it looks like you need to add the file-exists checks there too.

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

2 participants