In a very special case (see below) i can make the ASL file requester (called from within scummvm) display random characters in the path section, see here:
I also had RO[Y:7ðRÖð(sâ Y:6Y:6°|ÕH and ]Ž(_ð`°d __°}øÈ in two other tests...so completely random.
I don't know if this is a bug in string.gadget, input.gadget, whatever.gadget, ASL itself or maybe coming from an uninitialized ASL window within the scummvm impolementation?
So if anyone wants to shed some light...especially OS4 betatesters as i remember some similar input.gadget problem which has been fixed in beta (iirc) in the meantime
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
if (ConfMan.hasKey("browser_lastpath")) {
strncpy(pathBuffer, ConfMan.get("browser_lastpath").c_str(), sizeof(pathBuffer) - 1);
}
If i understand that correctly it will *read* the browser_lastpath variable (if found?) and add it as a default path to the ASL path input field in line 68, correct?
If that is correct then, in this special scenario, there is no browser_lastpath variable set (because we are missing the scummvm.ini file that normally provides it)
So, it should not find/use that variable...but it seems it still does...or it's not using it, fails to set a default path and still continues to read random memory...maybe because of the pathBuffer not being initialized?
Now to know how to set a default pathBuffer...any ideas? Is it sufficient to do something like this:
pathBuffer = 'SYS:';
in line 53?
Thank you
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Thats what i'm suspecting...i'll try and see if that is the culprit.
Thanks
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Thank you, i'll try your suggestions, but i rather not drop the browser_lastpath functionality.
I guess i'll have to try and fix it from where it comes in the code (IF it is the culprit)
Thank you for the suggestions
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
The sys: solution triggers a warning about about cutting off before nullptr was read or something like that and the adapted strncpy line didn't fix it either.
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Problem is that printf didn't show anything. Looks like I need to use scummvm's own debug command.
Not at home, so will take some time
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
then there are two solutions maybe (btw. this seems to be a scummvm implemented function so might work differently regarding null-termination)
since you are using the .c_str() you should have null termination automatically but... change the sizeof(pathBuffer) -1; to sizeof(pathBuffer); since the -1 could remove the the null termination.
you should probably printout pathBuffer in hexadecimal form so that any white space is 'visible', you could use good old sprintf() + printf() or sprintf() + anything that prints text to the console
the second solution is to add the null termination with '\0' if it is C++ or modern C then you just use +'\0';
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Thank you, I may get back to you once i can test again.
all printf versions doesn't seem to print anything, dunno why yet.
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
instead of using printf() try fprintf(stderr,...) then the system shouldn't que it (I remember seeing this behavior when doing something a bit more complicated real-time stuff it held all output until the process had ended then it spit it out into a freshly opened console which auto-closed pretty much as soon as all output and been written) or use DBG().
instead of using printf() try fprintf(stderr,...) then the system shouldn't que it (I remember seeing this behavior when doing something a bit more complicated real-time stuff it held all output until the process had ended then it spit it out into a freshly opened console which auto-closed pretty much as soon as all output and been written) or use DBG().
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Works fine here with both a local build from yesterday and 2.6.0 (which is going to be live soon - both on ScummVM.org and on OS4Depot/AmiUpdate)
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg