Author Topic: Oh Nspire-Lua, you so crazy!  (Read 5843 times)

0 Members and 1 Guest are viewing this topic.

Offline NecroBumpist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 130
  • Rating: +14/-5
  • Master of Lua
    • View Profile
Oh Nspire-Lua, you so crazy!
« on: October 08, 2011, 05:41:25 pm »
I was trying to make a Lua IDE when i came across this bug with text rendering.
Keep in mind this happens much faster in real time.

Spoiler For probable cause:
The negative symbol is what I'm typing, and it is likely a two byte character, however, when I backspace, I only remove one byte at a time, and this causes it to read whatever comes after the string in RAM I'm assuming.
« Last Edit: October 08, 2011, 05:41:57 pm by NecroBumpist »
Developing Lua scripts for the NSpire ?
Check out the Necrotorium
Need a few routines to run faster ? Checkout the MODS Lua Assembly Toolkit.
Need to save space for your scripts ? Checkout LuaSrcDiet

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Oh Nspire-Lua, you so crazy!
« Reply #1 on: October 08, 2011, 05:54:09 pm »
Interesting.

I've come across things like this but it appears that TI fixed most of these memory-hacking stuff (in the upcoming version).



I can also assume you're right about direc tmemory reading and somehintg like forcing a cast to a string output, with the correspondig ascii code being some chinese chars.....


Can you see more of the memory by dumping it thourgh nspire_emu / ncubate and try to see what could match with the chinese char's ascii number ?
« Last Edit: October 08, 2011, 05:56:26 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Oh Nspire-Lua, you so crazy!
« Reply #2 on: October 08, 2011, 06:52:47 pm »
Hmmis that bug also on the ti-nspire cx?
This used to contain a signature.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Oh Nspire-Lua, you so crazy!
« Reply #3 on: October 08, 2011, 07:33:39 pm »
In case this is helpful, here's the first character that appears and keeps flashing:



http://www.fileformat.info/info/unicode/char/6d40/index.htm


The UTF-8 is 0xE6 0xB5 0x80.
« Last Edit: October 08, 2011, 07:34:09 pm by Deep Thought »




Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Oh Nspire-Lua, you so crazy!
« Reply #4 on: October 09, 2011, 02:35:01 pm »
I have encountered this bug before (I actually need to fix my Lua Console to support utf-8 :p), and the solution is to use TI's added string functions, uchar, ubyte and usub.
They should work just the same as their original counterparts :)

As for reading memory, its only a few bytes, so not so useful. But nevertheless, quite interesting :D

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Re: Oh Nspire-Lua, you so crazy!
« Reply #5 on: October 11, 2011, 05:41:13 pm »
If it's any help, that's the chinese Qu character.
Don't know what it means... :P

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Oh Nspire-Lua, you so crazy!
« Reply #6 on: October 11, 2011, 05:46:09 pm »
I think it means alcohol.
Sig wipe!

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: Oh Nspire-Lua, you so crazy!
« Reply #7 on: October 12, 2011, 08:27:01 am »
This happened to me really often, when I was playing with a little text editor that I made.
I even stored chinese characters in an external string :)
« Last Edit: October 12, 2011, 08:27:33 am by Chockosta »

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Oh Nspire-Lua, you so crazy!
« Reply #8 on: December 07, 2011, 05:09:06 pm »
It's the character qu. And yes it is related to alcohol.