Source: Creating files on save

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Source: Creating files on save

Post by Raziel »

Hi guys, maybe someone can spare a little bit of their time.

I'm trying to access a samba mount and use that as a repository for saved games from ScummVM.

In parallel i'm helping with the further development of my platforms samba installment.

I'm as far as being able to load and save games to the share, but not to create new states.

In short:
- If i try to save anything to a completely blank share, ScummVM will crash on trying to create the "timestamps" file (if i manually copy the file over first, it works fine, until)
- i try to create a NEW save state which isn't there, ScummVM will crash again on trying to create it.


So, my question would be, if someone could please tell me
- in what way ScummVM is "creating" a (yet missing) save state/timestamp
- where in the code this happens and
- why it is crashing on failing to do so instead of giving me an error/warning

I know it might be probably solved through our samba development, but i'd still be happy to get an error/warning instead of a crash

Thanks a lot
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

I think the timestamps file is related to the "cloud" feature. I disable that feature when building (I disable all of libcurl actually)
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

It's not the timestamps file per se, but all files that need to be "created".
As i wrote if i copy the timestamps over it works until a new save state for any game has to be created.

Any pointers to the part of code that "creates" i.e. a save state from a newly installed game?
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

It's crashing in backends/saves/savefile.cpp, line 50

return _wrapped->write(dataPtr, dataSize);

Anything i could try (printf?) to furhter see why it's crashing?

dataPtr is 0x47478cf0
dataSize is 0x4
if that helps
User avatar
Raziel
ScummVM Porter
Posts: 1517
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Post by Raziel »

Solved internally in the smbfs code.

Thanks for the help
Post Reply