[GH-ISSUE #261] Owner (character-rights = 3) Spawning Items crashes client #10856

Closed
opened 2026-06-04 12:20:38 +00:00 by Dark98 · 12 comments
Owner

Originally created by @Sch4ff3r on GitHub (Dec 10, 2019).
Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/261

Spawns item but also crashes client. When logging back in, the item is shown.

Originally created by @Sch4ff3r on GitHub (Dec 10, 2019). Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/261 Spawns item but also crashes client. When logging back in, the item is shown.
Dark98 added the Difficulty: Easy label 2026-06-04 12:20:38 +00:00
Author
Owner

@DPSCryptic commented on GitHub (Dec 10, 2019):

what do you mean with this?

<!-- gh-comment-id:564026458 --> @DPSCryptic commented on GitHub (Dec 10, 2019): what do you mean with this?
Author
Owner

@Sch4ff3r commented on GitHub (Dec 10, 2019):

If my rights are set as 3.
When I ::item 1 1 example, when hitting enter, it crashes client.

<!-- gh-comment-id:564026914 --> @Sch4ff3r commented on GitHub (Dec 10, 2019): If my rights are set as 3. When I ::item 1 1 example, when hitting enter, it crashes client.
Author
Owner

@dginovker commented on GitHub (Dec 10, 2019):

Setting your rights to 2 works. I have no idea what 3 is.

edit: Apparently 3 should also work.

<!-- gh-comment-id:564076703 --> @dginovker commented on GitHub (Dec 10, 2019): Setting your rights to 2 works. I have no idea what 3 is. edit: Apparently 3 should also work.
Author
Owner

@DPSCryptic commented on GitHub (Dec 10, 2019):

3 = owner

<!-- gh-comment-id:564089142 --> @DPSCryptic commented on GitHub (Dec 10, 2019): 3 = owner
Author
Owner

@Gptaqbc commented on GitHub (Dec 10, 2019):

Item ID: 1 is the toolkit. No need to spawn that(most likely not implemented). Try 995, it's coins. If that doesnt work, there is a problem somewhere :P

<!-- gh-comment-id:564099449 --> @Gptaqbc commented on GitHub (Dec 10, 2019): Item ID: 1 is the toolkit. No need to spawn that(most likely not implemented). Try 995, it's coins. If that doesnt work, there is a problem somewhere :P
Author
Owner

@dginovker commented on GitHub (Dec 11, 2019):

I can't reproduce this on my localhost. Spawning works just fine:

image

Running Java 1.8 by OpenJDK on Linux

<!-- gh-comment-id:564387380 --> @dginovker commented on GitHub (Dec 11, 2019): I can't reproduce this on my localhost. Spawning works just fine: ![image](https://user-images.githubusercontent.com/32943174/70594257-e98f5b80-1bad-11ea-918a-70f123a4018e.png) Running Java 1.8 by OpenJDK on Linux
Author
Owner

@Sch4ff3r commented on GitHub (Dec 11, 2019):

Running Windows 10-64 bit still crashes.

<!-- gh-comment-id:564429689 --> @Sch4ff3r commented on GitHub (Dec 11, 2019): Running Windows 10-64 bit still crashes.
Author
Owner

@RedSparr0w commented on GitHub (Dec 11, 2019):

Cannot reproduce locally either.

Java 1.8
Windows 10 64 bit

<!-- gh-comment-id:564770882 --> @RedSparr0w commented on GitHub (Dec 11, 2019): Cannot reproduce locally either. `Java 1.8` `Windows 10 64 bit`
Author
Owner

@Gptaqbc commented on GitHub (Dec 12, 2019):

Windows 7 Java 1.8. I never encountered any issue :/

<!-- gh-comment-id:565077081 --> @Gptaqbc commented on GitHub (Dec 12, 2019): Windows 7 Java 1.8. I never encountered any issue :/
Author
Owner

@dginovker commented on GitHub (Dec 13, 2019):

@Sch4ff3r open a command prompt and run java --version - what's the exact version it states? Also, is there any error message in the server or client that might help identify the crash?

<!-- gh-comment-id:565540617 --> @dginovker commented on GitHub (Dec 13, 2019): @Sch4ff3r open a command prompt and run `java --version` - what's the exact version it states? Also, is there any error message in the server or client that might help identify the crash?
Author
Owner

@dginovker commented on GitHub (Dec 26, 2019):

I actually was able to reproduce this issue again, after #293 as well.

Spawned item 8839 on a character-rights = 2 and got this stacktrace in the client:

 Exception in thread "Thread-1" java.lang.ArrayIndexOutOfBoundsException: 8839
        at ItemDef.forID(ItemDef.java:193)
        at ItemDef.getSprite(ItemDef.java:2062)
        at Game.drawInterface(Game.java:7861)
        at Game.drawTabArea(Game.java:1726)
        at Game.drawGameScreen(Game.java:7559)
        at Game.processDrawing(Game.java:8402)
        at RSApplet.run(RSApplet.java:132)
        at Game.run(Game.java:4298)
        at java.lang.Thread.run(Thread.java:748)

Might be related, might not. Either way, easy fix.

<!-- gh-comment-id:569089480 --> @dginovker commented on GitHub (Dec 26, 2019): I actually was able to reproduce this issue again, after #293 as well. Spawned item `8839` on a character-rights = 2 and got this stacktrace in the client: ``` Exception in thread "Thread-1" java.lang.ArrayIndexOutOfBoundsException: 8839 at ItemDef.forID(ItemDef.java:193) at ItemDef.getSprite(ItemDef.java:2062) at Game.drawInterface(Game.java:7861) at Game.drawTabArea(Game.java:1726) at Game.drawGameScreen(Game.java:7559) at Game.processDrawing(Game.java:8402) at RSApplet.run(RSApplet.java:132) at Game.run(Game.java:4298) at java.lang.Thread.run(Thread.java:748) ``` Might be related, might not. Either way, easy fix.
Author
Owner

@RedSparr0w commented on GitHub (Dec 27, 2019):

That’s a separate issue, the highest item ID is 7955.
If you spawn anything above that, it won’t exist.

<!-- gh-comment-id:569353150 --> @RedSparr0w commented on GitHub (Dec 27, 2019): That’s a separate issue, the highest item ID is 7955. If you spawn anything above that, it won’t exist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2006-Scape/2006Scape#10856