71 posts
Posted 27 October 2015 - 01:11 AM
Over the last few days me and a few friends have been playing on my server and have noticed a few bugs, they have been listed below:
- Computers unable to load new (new meaning it loads everything from rom/apis without fault) API's. We do not receive an error when loading the API however os.loadAPI returns nil.
- Certain parts of monitors wont display anything. So far it has happened to the top quarter of a 4(h)x5(w) monitor and the top three quarters of a 4(h)x5(w) monitor.
I have removed all mods except CC from my client and I still get the error in SP. Here is a list of the mods I am using:
- Computercraft 1.74
- Open Peripherals (OpenModsLib 0.8 and AIO 5)
- CCTweaks (0.2.3.1)
- BiblioCraft (1.11.2)
- Forge Multipart (1.2.0.345)
Thank you in advance for your help!UPDATE: Often, in the logs I see things like
[01:13:39] [Client thread/WARN] [CCTweaks]: Cannot find custom rewrite /org/squiddev/cctweaks/core/patch/BlockPeripheral_PatchBase.class
Edited on 27 October 2015 - 12:18 AM
7083 posts
Location
Tasmania (AU)
Posted 27 October 2015 - 01:51 AM
The monitor bug is known, and is triggered by adding/removing blocks from the frame. Changing the text scale and then setting it back to what you want it to be sorts it out.
Beats me what's up with os.loadAPI(), it should be working ok unless some other mod is somehow messing with it (what about resource packs?). You can review its source
here - as you can see, it shouldn't be capable of returning anything other than true or false. Did you specifically type() check it?
1426 posts
Location
Does anyone put something serious here?
Posted 27 October 2015 - 07:54 AM
[01:13:39] [Client thread/WARN] [CCTweaks]: Cannot find custom rewrite /org/squiddev/cctweaks/core/patch/BlockPeripheral_PatchBase.class
That isn't important/anything to worry about: I'm checking for all classes starting with BlockPeripheral, and so BlockPeripheralBase is also found despite I've never patched it. CCTweak's binary mode shouldn't be mucking anything up - though it is the only mod I can think of that does anything fancy on that list. Have you enabled luaJC by mistake? - that can cause issues.
However, the fact that it only happens with CC is very odd.
71 posts
Posted 27 October 2015 - 10:55 AM
[01:13:39] [Client thread/WARN] [CCTweaks]: Cannot find custom rewrite /org/squiddev/cctweaks/core/patch/BlockPeripheral_PatchBase.class
That isn't important/anything to worry about: I'm checking for all classes starting with BlockPeripheral, and so BlockPeripheralBase is also found despite I've never patched it. CCTweak's binary mode shouldn't be mucking anything up - though it is the only mod I can think of that does anything fancy on that list. Have you enabled luaJC by mistake? - that can cause issues.
However, the fact that it only happens with CC is very odd.
I haven't changed the settings.
The monitor bug is known, and is triggered by adding/removing blocks from the frame. Changing the text scale and then setting it back to what you want it to be sorts it out.
Beats me what's up with os.loadAPI(), it should be working ok unless some other mod is somehow messing with it (what about resource packs?). You can review its source
here - as you can see, it shouldn't be capable of returning anything other than true or false. Did you specifically type() check it?
No, I didn't type check it. But I will do that ASAP!
Edited on 27 October 2015 - 09:55 AM
71 posts
Posted 27 October 2015 - 11:05 AM
The monitor bug is known, and is triggered by adding/removing blocks from the frame. Changing the text scale and then setting it back to what you want it to be sorts it out.
Beats me what's up with os.loadAPI(), it should be working ok unless some other mod is somehow messing with it (what about resource packs?). You can review its source
here - as you can see, it shouldn't be capable of returning anything other than true or false. Did you specifically type() check it?
This is very strange, os.loadAPI does return something, and it returns a boolean; which is true. However, using the API functions return a nil statement. Also, the trick to fix the monitor didnt work…
7083 posts
Location
Tasmania (AU)
Posted 27 October 2015 - 11:12 PM
This is very strange, os.loadAPI does return something, and it returns a boolean; which is true. However, using the API functions return a nil statement.
You might've got an "attempt to index nil" error ("no such API table to index into"), or an "attempt to call nil" error ("API table exists but that function isn't in there"); they're quite different.
It may be worth providing the name of the API along with its content.
Also, the trick to fix the monitor didnt work…
Did you specifically
change the text scale? Just doing mon.setTextScale(whatEverItAlreadyWas) won't work.
71 posts
Posted 28 October 2015 - 12:26 AM
This is very strange, os.loadAPI does return something, and it returns a boolean; which is true. However, using the API functions return a nil statement.
You might've got an "attempt to index nil" error ("no such API table to index into"), or an "attempt to call nil" error ("API table exists but that function isn't in there"); they're quite different.
It may be worth providing the name of the API along with its content.
Also, the trick to fix the monitor didnt work…
Did you specifically
change the text scale? Just doing mon.setTextScale(whatEverItAlreadyWas) won't work.
I did specifically change the scale, I even write something in that scale. In a project I'm working on to remake the rednet API but with encryption I load the new rednet API and then ran rednet.send() however that returns the error
startup:4: attemt to index ? (a boolean value)
Edited on 27 October 2015 - 11:27 PM
957 posts
Location
Web Development
Posted 28 October 2015 - 12:49 AM
In a project I'm working on to remake the rednet API but with encryption I load the new rednet API
Could you post the code of the test program and the API you wrote?
(You can put it on
pastebin and link it here if they are more than a few hundred lines)
I've got a funny feeling you did this:
local api = os.loadAPI("apiFileName")
api.funcName()
You need to do this:
local isLoaded = os.loadAPI("apiFileName") --# os.loadAPI returns true or false, depending on whether or it actually was able to load the API
apiFileName.funcName()
71 posts
Posted 28 October 2015 - 12:51 AM
In a project I'm working on to remake the rednet API but with encryption I load the new rednet API
Could you post the code of the test program and the API you wrote?
(You can put it on
pastebin and link it here if they are more than a few hundred lines)
I've got a funny feeling you did this:
local api = os.loadAPI("apiFileName")
api.funcName()
You need to do this:
local isLoaded = os.loadAPI("apiFileName") --# os.loadAPI returns true or false, depending on whether or it actually was able to load the API
apiFileName.funcName()
WOW. That's exactly what I did. It's also what both me and other people did. Must be a common error….. so sorry to post this here although it was a code error.
957 posts
Location
Web Development
Posted 28 October 2015 - 01:17 AM
WOW. That's exactly what I did. It's also what both me and other people did. Must be a common error….. so sorry to post this here although it was a code error.
It was the 'attempt to index ? (a boolean value)' error that tipped me off; It basically said you were using a boolean as a table. And why would you be doing that? Well if you used the result of os.loadAPI! ;)/>
There are pros and cons to 'os.loadAPI' working the way it currently does. If it were up to me, I'd probably have it return the API, rather than put it into the global table, but it isn't up to me.
Regarding the text scale thing, try changing it to a different text scale, then back to the original BEFORE writing anything.
If that doesn't work, well make sure you've got the monitor attached to the computer I guess.. Usually the text scale thing works.
524 posts
Location
Cambridge, England
Posted 11 December 2015 - 03:44 PM
the monitor bug is fixed in 1.75, the os.loadAPI thing is misuse. closing