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

Jsoncpp Crashes on linking #51

Closed
KorigamiK opened this issue Sep 27, 2022 · 14 comments
Closed

Jsoncpp Crashes on linking #51

KorigamiK opened this issue Sep 27, 2022 · 14 comments

Comments

@KorigamiK
Copy link
Contributor

The jsoncpp library make the application crash on load. The application builds but doesn't run. I'm not able to find debug messages either.

What could be the fix?

@sharkwouter
Copy link
Member

Thanks for reporting. Is this on real hardware or on PPSSPP? I have seen crashes on the latter.

@KorigamiK
Copy link
Contributor Author

Thanks for reporting. Is this on real hardware or on PPSSPP? I have seen crashes on the latter.

This was PPSSPP. I'll get back to you as I check on the actual actual hardware.

@KorigamiK
Copy link
Contributor Author

So I checked the app on my psp and the same issue is present. The app instantly crashes on start. There's not even any exception shown in psplink.

@sharkwouter
Copy link
Member

Thanks for testing, I'll look into it.

@sharkwouter
Copy link
Member

I am able to reproduce this.

@KorigamiK
Copy link
Contributor Author

I am able to reproduce this.

Thanks for confirming. I was afraid I built the libraries wrongly. Please update if you are able to pinpoint the error.

@sharkwouter
Copy link
Member

I'm having a bit of a hard time figuring this one out. I'm trying to debug it, but gdb is giving me a strange error. I don't know if this means gdb is broken or that this is showing the actual problem:

wouterwijsman@XPS13:~/Sources/hello-json-cpp$ psp-gdb ./hello_world
GNU gdb (GDB) 11.0.50.20210718-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=psp".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./hello_world...
(gdb) target remote :10001
Remote debugging using :10001
_start (args=0, argp=0x0) at crt0_prx.c:102
102    crt0_prx.c: No such file or directory.
(gdb) bt
#0  _start (args=0, argp=0x0) at crt0_prx.c:102

I'm using this project for testing: https://github.com/sharkwouter/hello-json-cpp

@KorigamiK
Copy link
Contributor Author

Just to confirm, you're running this over in psplink right?

@sharkwouter
Copy link
Member

Yes, you run debug ./hello_world.prx in pspsh and then I do the above.

@sharkwouter
Copy link
Member

Is this still the case? I saw you use jsoncpp in one of your projects. Did you do anything specific to get it working?

@KorigamiK
Copy link
Contributor Author

I believe this is still the case.

The compilation finishes with no issues, but the app crashes if there's any call to the Json namespace, so I don't define any usage of this library when building for the PSP.

I would like to test this with an older SDK version since the package you created must have worked at that specific time. This might be worth investigating.

@sharkwouter
Copy link
Member

Last time I tested this, this was not always the case. I'm not sure what makes it so at all. Perhaps the coming newlib changes would improve this.

@bucanero
Copy link
Contributor

bucanero commented Jul 8, 2023

A bit unrelated, but for JSON parsing, on PS4 homebrews I've been using this cJSON library: https://github.com/DaveGamble/cJSON

I can try to port this simple ANSI C library to pspsdk, at least to offer a working alternative to JSON parsing while we fix this Jsoncpp. (also useful for anyone who doesn't want to use C++)

@sharkwouter
Copy link
Member

Actually, this was fixed. Cjson should work as well, though. Would be cool to have a port of it.

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

3 participants