Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Weird Android error?
Started by tppellegrini2 Feb 11 2019 12:52 PM

6 replies to this topic
android ios mobile help runtime error bug weird
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

tppellegrini2

[GLOBAL: userInfoPane.html]
tppellegrini2
  • Observer

  • 8 posts
  • Corona SDK

Hi all, I decided to make a topic about this because I can't seem to solve the issue here.

So, I have a fully functional and finished mobile game that is already out on the iOS App Store.

Now, the problem is that when build and played through android I get a weird runtime error which is the one in the file I attached. 

Now, I honestly don't know much about android and its "things" because here the error I get is in Users/jenkins/slaveroot/android bla bla bla and it goes to a composer.lua file.

The error seems to be in the newImageSheet command I used (total of 2 times). 

The point is: everything works. It works in the simulator and it works on iOS. Why doesn't it work on Android? 

The "width and height" values that I gave are okay, otherwise it wouldn't even work in the simulator as this happened to me before.

So yeah, really I have no idea what the issue could be. Help would be appreciated. 

 

https://imgur.com/a/YLJDQTQ



[TOPIC: post.html]
#2

richard11

[GLOBAL: userInfoPane.html]
richard11
  • Contributor

  • 304 posts
  • Corona SDK

Not something I've experienced myself, but I'm wondering if your spritesheet is too large. Android has a 2048x2048 limit as far as I understand from the imagesheet docs.

[TOPIC: post.html]
#3

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 524 posts
  • Corona SDK

In case of these "weird bugs" that point to specific lines, it is usually helpful to provide at least some code so that we wouldn't simply have to guess. :P

Well, anyway, my guess is that you've mistyped it. The simulator isn't case sensitive, and I don't believe that iOS is either, but Android is. Check that the names match in your app's folder and in your code.



[TOPIC: post.html]
#4

tppellegrini2

[GLOBAL: userInfoPane.html]
tppellegrini2
  • Observer

  • 8 posts
  • Corona SDK

those aren't specific lines. The error is generated in a file I don't have, it gets generated in the android device. My files.lua don't exceed 1000 lines so that's not even possible



[TOPIC: post.html]
#5

tppellegrini2

[GLOBAL: userInfoPane.html]
tppellegrini2
  • Observer

  • 8 posts
  • Corona SDK

{
    width = 120,
    height = 215.0,
    numFrames = 92,
    }


{	
    width = 158,
    height = 143.75,
    numFrames = 20
}

those are my NewImageSHeet #2 argument that points to the option. Here I see no problem, and the simulator and iOS are okay with that too 


[TOPIC: post.html]
#6

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,686 posts
  • Corona SDK

Have you tried it without the decimals, just to double check?

[TOPIC: post.html]
#7

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 524 posts
  • Corona SDK

Yeah, decimals are impossible. Those width and height numbers represent pixels and you cannot realistically have a fraction of a pixel.

But, what I was referring to with the case sensitivity and the lines of code were the name(s) of your image sheet(s) and the lines where you load them and create the images with. For instance, let's assume that you are trying to load the following image sheet:

 
local imageSheet = graphics.newImageSheet( "characterSheet.png", options )

Now, if the image sheet's actual name was "CharacterSheet.png", i.e. capital C versus lowercase c, then non-case sensitive systems would still load it without problems. However, Android is case sensitive and having "C" instead of "c" in the filename means that the game won't find the image sheet.
 
The easiest way to check that you don't have any issues here is to just change the name of the file in the project folder to all lowercase and do the same in code. If it starts working, then you've found your problem.



[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: android, ios, mobile, help, runtime, error, bug, weird