debrouxl / tilibs

TILP (formerly GtkTiLink) can transfer data between Texas Instruments graphing calculators and a computer. It works with all link cables (parallel, serial, Black/Gray/Silver/Direct Link) and it supports the TI-Z80 series (73..86), the TI-eZ80 series (83PCE, 84+CE), the TI-68k series (89, 92, 92+, V200, 89T) and the Nspire series (Nspire Clickpad / Touchpad / CX, both CAS and non-CAS)
http://lpg.ticalc.org/prj_tilp
63 stars 23 forks source link

TiLP suddenly closes #47

Open PrivacyDragon opened 3 years ago

PrivacyDragon commented 3 years ago

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 commented 3 years ago

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:

Thanks in advance :)

PrivacyDragon commented 3 years ago

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