Export fine, but not import.

About PR usage and development, and about the POP format.
Post Reply
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Export fine, but not import.

Post by fp »

I've been using the PR.sh script to get it to work so far - and I've made a few custom sprites here and there.

I was ready to try and import everything back in, but it always gets hung on DIGISOUND, even though i've never edited the sounds - I would have expected a new error from the stuff I've made. For science I tried exporting and reimporting the EXACT same thing without any changes and I get the same error, so it's not anything I've done to the edited files.

Code: Select all

Importing '/home/fp/Desktop/PoP/apoplexy/prince/CONFIG.DAT' from '/home/fp/Desktop/PoP/apoplexy/prince/resources'
Result: Success (0)
Importing '/home/fp/Desktop/PoP/apoplexy/prince/DIGISND1.DAT' from '/home/fp/Desktop/PoP/apoplexy/prince/resources'
free(): invalid pointer
PR.sh: line 34: 15136 Aborted                 (core dumped) $PR/pr -f --resource=$PR/resources.xml --import=$RES $POP/*.DAT
Done.
Is the .sh file just messed up, or is there something wrong with the files being put back in? I dunno - but it exists.
Gonna be working on s'more changes in the meantime, if anyone could help me out here, that'd be appreciated. -fp
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5657
Joined: April 9th, 2009, 10:58 pm

Re: Export fine, but not import.

Post by Norbert »

My first guess is that PR doesn't understand that CONFIG.DAT is a configuration file. Try temporarily moving it to another directory and rerunning the import. Either way, to help us fix the issue, can you say from where you downloaded Prince of Persia?

By the way, for David, I think that "FILE* outputStream;" in console/main.c requires "extern " in front of it, to prevent a duplicate definition of outputStream (main.c#L51).
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Re: Export fine, but not import.

Post by fp »

Norbert wrote: December 10th, 2022, 11:08 am My first guess is that PR doesn't understand that CONFIG.DAT is a configuration file. Try temporarily moving it to another directory and rerunning the import. Either way, to help us fix the issue, can you say from where you downloaded Prince of Persia?

By the way, for David, I think that "FILE* outputStream;" in console/main.c requires "extern " in front of it, to prevent a duplicate definition of outputStream (main.c#L51).
iirc, I just got it from the popot website.
https://www.popot.org/get_the_games.php?game=1

If I didn't, then maybe from https://www.myabandonware.com/game/prince-of-persia-pd ? But I doubt it.

I got a different error when taking out the config, but it does still exit out, I think?

Code: Select all

Importing '/home/fp/Desktop/PoP/apoplexy/prince/DIGISND1.DAT' from '/home/fp/Desktop/PoP/apoplexy/prince/resources'
'landing hard.wav' has errors, skipped
PR.sh: line 34:  5778 Segmentation fault      (core dumped) $PR/pr -f --resource=$PR/resources.xml --import=$RES $POP/*.DAT
Done.
EDIT - yeah it did do something alright - broke everything :p Prince is no longer loading and is stuck at "insert disc 1" now, even though it's installed instead of on floppies. Strange.
"I don't exactly think, therefore I don't exactly am."
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5657
Joined: April 9th, 2009, 10:58 pm

Re: Export fine, but not import.

Post by Norbert »

If you can private message me the exact PoP package that fails the import. This should allow me to replicate the issue, and debug it through inspection of the dumped core and modification of PR the code. I tested import with the 1.4 package from Myabandonware.com (and Popot.org), and that works fine for me, so something must've changed in your local package since.
David
The Prince of Persia
The Prince of Persia
Posts: 2790
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Export fine, but not import.

Post by David »

Norbert wrote: December 10th, 2022, 11:08 am By the way, for David, I think that "FILE* outputStream;" in console/main.c requires "extern " in front of it, to prevent a duplicate definition of outputStream (main.c#L51).
Done: https://github.com/NagyD/PR/commit/0dbc ... 09fd53eec8
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Re: Export fine, but not import.

Post by fp »

Norbert wrote: December 10th, 2022, 6:41 pm If you can private message me the exact PoP package that fails the import. This should allow me to replicate the issue, and debug it through inspection of the dumped core and modification of PR the code. I tested import with the 1.4 package from Myabandonware.com (and Popot.org), and that works fine for me, so something must've changed in your local package since.
I can send you my whole thing, if that's what you mean - i'll do it later tonight, as I'm currently out and about for my birthday.

I probably just made a small error on my part, knowing me.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5657
Joined: April 9th, 2009, 10:58 pm

Re: Export fine, but not import.

Post by Norbert »

I looked at the package you sent me via private message.
Where did you get PR from (particularly resources.xml)?

I think it's the old 1.3, but with some .wav and .mid filenames renamed.
Certainly nothing standard, so if you run intro problems, that's probably why.
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Re: Export fine, but not import.

Post by fp »

Norbert wrote: December 11th, 2022, 11:42 am I looked at the package you sent me via private message.
Where did you get PR from (particularly resources.xml)?

I think it's the old 1.3, but with some .wav and .mid filenames renamed.
Certainly nothing standard, so if you run intro problems, that's probably why.
It just kinda popped up when I first ran PR, i think? or it came with the source code when I built it with the make file.
"I don't exactly think, therefore I don't exactly am."
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5657
Joined: April 9th, 2009, 10:58 pm

Re: Export fine, but not import.

Post by Norbert »

Where did you get the source code of PR?
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Re: Export fine, but not import.

Post by fp »

Norbert wrote: December 11th, 2022, 7:46 pm Where did you get the source code of PR?
https://www.popot.org/other_useful_tools.php?tool=PR

although the make file didnt work out of the box, i had to ask for help in fixing it up.

iirc this is also where the shell script is.
"I don't exactly think, therefore I don't exactly am."
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5657
Joined: April 9th, 2009, 10:58 pm

Re: Export fine, but not import.

Post by Norbert »

fp wrote: December 11th, 2022, 8:58 pm
Norbert wrote: December 11th, 2022, 7:46 pm Where did you get the source code of PR?
https://www.popot.org/other_useful_tools.php?tool=PR

although the make file didnt work out of the box, i had to ask for help in fixing it up.

iirc this is also where the shell script is.
Thank you for the information.
Can you tell me which link (number) you clicked to get the PR source code?
See the attached image.
I understand you got the shell script (4), but I'm still curious which PR you downloaded.
I'm asking because your resources.xml is certainly not from the most recent version of PR.
Together we can figure out where your XML is from, and how it got customized. :)
Attachments
PR.png
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Re: Export fine, but not import.

Post by fp »

Norbert wrote: December 11th, 2022, 9:49 pm
fp wrote: December 11th, 2022, 8:58 pm
Norbert wrote: December 11th, 2022, 7:46 pm Where did you get the source code of PR?
https://www.popot.org/other_useful_tools.php?tool=PR

although the make file didnt work out of the box, i had to ask for help in fixing it up.

iirc this is also where the shell script is.
Thank you for the information.
Can you tell me which link (number) you clicked to get the PR source code?
See the attached image.
I understand you got the shell script (4), but I'm still curious which PR you downloaded.
I'm asking because your resources.xml is certainly not from the most recent version of PR.
Together we can figure out where your XML is from, and how it got customized. :)
sorry, im doin' other things irl rn, thanks for going through this with me lmao
uh, number two, iirc. i tend to just click the first reult unless something gets messed up with it and other sources reccomend an earlier version due to later ones messing it up. if it helps, i could also PM the source code I have on my SSD still - i never got rid of it lol
"I don't exactly think, therefore I don't exactly am."
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5657
Joined: April 9th, 2009, 10:58 pm

Re: Export fine, but not import.

Post by Norbert »

fp wrote: December 12th, 2022, 1:48 amsorry, im doin' other things irl rn, thanks for going through this with me lmao
uh, number two, iirc. i tend to just click the first reult unless something gets messed up with it and other sources reccomend an earlier version due to later ones messing it up. if it helps, i could also PM the source code I have on my SSD still - i never got rid of it lol
I think we're good.
Simply use the latest PR, with the latest resources.xml, and the error you ran into will disappear. :)
User avatar
fp
Sheikh
Sheikh
Posts: 23
Joined: November 28th, 2022, 5:51 pm
Location: Somewhere Over the Rainbow
Contact:

Re: Export fine, but not import.

Post by fp »

Norbert wrote: December 12th, 2022, 8:41 am
fp wrote: December 12th, 2022, 1:48 amsorry, im doin' other things irl rn, thanks for going through this with me lmao
uh, number two, iirc. i tend to just click the first reult unless something gets messed up with it and other sources reccomend an earlier version due to later ones messing it up. if it helps, i could also PM the source code I have on my SSD still - i never got rid of it lol
I think we're good.
Simply use the latest PR, with the latest resources.xml, and the error you ran into will disappear. :)
My main issue is buildin' it - last time, the make file decided to error out on me - I'll try rebuilding it, seeing if i get the error, and then see if it'll work - thanks for going through all this dumb shenanigans w/ me :p

EDIT - after making some small changes to things, nearly everything is fixed that I wanted to do - only thing I'm messing up at this point is the bit depth for the BMP images. Thanks for the help!
Post Reply