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

TiLP suddenly closes #47

Open
PrivacyDragon opened this issue Nov 10, 2020 · 2 comments
Open

TiLP suddenly closes #47

PrivacyDragon opened this issue Nov 10, 2020 · 2 comments

Comments

@PrivacyDragon
Copy link

Recently when I try to use TiLP to put programs on my calculator or get them from calc to laptop, TiLP closes after getting the content of my calculator.
So I start TiLP, that goes well, I can also just get the screen or calc info.
But then when I try to load the calculator's content, directly after it's loaded or even just before, TiLP closes.
It happens frequently last time...

Calc:TI 84+ CE(-T Python Edition) OS: 5.6.0.0020
Laptop OS: Linux, OpenSuse Leap 15.1

I ran TiLP via gdb and made a screenshot of the result when it suddenly closed :
Screenshot_20201109_210231

@debrouxl
Copy link
Owner

Interesting, thanks for the report :)

Given that ram isn't nullptr upon function entry, it looks like params[0]->data is nullptr, which should occur only if the calculator returns... interesting data.
On the experimental2 branch, I happen to have added some code to defend against bad input from the calculator in that function (and others), which should prevent the particular crash I envision from the output you're getting. However, at the time of this writing, I advise against using the experimental2 branch for production purposes: I know that I added some bugs when reworking the memory allocation flow in the 84+ DUSB / 89T / Nspire code several weeks ago.

So - in order to simultaneously work around your problem and help debug the issue, you would need to:

  • edit calc_84p.c, which is in the source directory created by install_tilp.sh when you ran it, defaulting to $HOME/lpg/tilibs/trunk/libticalcs/src/ , in order to surround those *ram = ... and *flash = ... lines with if (params[0]->data != NULL) { *ram = ...; } and if (params[1]->data != NULL) { *flash = ...; }, respectively;
  • from the libticalcs root (again, defaulting to $HOME/lpg/tilibs/trunk/libticalcs), run make install;
  • run tilp again under the same conditions. If that still crashes, please run p params[0] and p params[0]->data, and copy-paste the result here.

Thanks in advance :)

@debrouxl debrouxl transferred this issue from debrouxl/tilp_and_gfm Nov 10, 2020
@PrivacyDragon
Copy link
Author

Hmm,Yesterday I first tried again, but then there wasn't any problem.
Strange?
But next time it happens I'll try that.

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