Giter Site home page Giter Site logo

Comments (15)

DavidArayan avatar DavidArayan commented on July 3, 2024 1

Greetings,

Thank you for the information. I'll continue digging. I have a suspicion that it may have something to do with the "ref" keyword, which is redundant considering IntersectionResult is a class. It's likely left over from when I changed IntersectionResult from a struct into a class. I'll write back once I've got a tested fix.

from ezy-slice.

DavidArayan avatar DavidArayan commented on July 3, 2024

Greetings,

Thank you for the report. EzySlice should work wherever Unity can compile, since it's all written in C# with no external dependencies. I'll investigate this bug and get back to you.

from ezy-slice.

DavidArayan avatar DavidArayan commented on July 3, 2024

Greetings,

This is an interesting bug. Essentially it's saying that IntersectionResult is null which doesn't make sense because that instance shouldn't be deallocating for the duration of the slice. Have you by chance modified the source in any way? I'll continue digging.

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

Hello,
I have not changed anything in the source code, and for your information, I have only tested it on only android build.

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

Thank you in advance

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

HI David,
Have you rectified the issue?@DavidArayan

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

@DavidArayan
Hi David,
Have you resolved the mentioned issue, I am doing a sample project using your slicing framework so please look into it once.

from ezy-slice.

DavidArayan avatar DavidArayan commented on July 3, 2024

Greetings ymrg3307,

Apologies for the delay. I've sourced an Android device and will test and fix.

from ezy-slice.

DavidArayan avatar DavidArayan commented on July 3, 2024

Greetings ymrg3307,

I've tested on my end and didn't get any crashes. I did however fix a small issue on master branch. If you get the time, pull it down and try again. Other things to try are.

  1. Switch between Il2CPP and Mono backends to see if it makes a difference
  2. Check to make sure the android device is not running out of memory. I performed my test using a Samsung Galaxy s8 which is a high end device
  3. Try out a new example in Runtime Scene Example from the Example repository and see if you still get the crash.

Let me know how things go.

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

@DavidArayan The game is building fine the problem is the slicing is not working when I am playing it in my target platform,
Anyway I will try the things you have told and will let you know..

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

@DavidArayan
Hi David,
First of all thanks for the help, you are providing me :)
I pulled the latest version of the Ezyslice after that
I have found two solutions for this problem
1.)Changing the scripting backend from mono to IL2CPP solved the problem.
2.)Without changing scripting backend I enabled development build and enabled script debugging in build settings which also solved the problem, Weird but I don't know the for this

Can you explain to me why the 1st solution solved the problem

from ezy-slice.

DavidArayan avatar DavidArayan commented on July 3, 2024

Greetings ymrg3307,

Glad the problem got sorted! my Unity version defaults to the IL2CPP so I haven't actually tried mono myself. I know that mono is slowly being deprecated by the Unity team and IL2CPP is the way to go.

As for why it works, I'm not too sure. Hopefully someone with more experience with each backend can shed some light into the issue. The error from your logs actually occurs in a very odd place, the object that is causing the null reference cannot be null since the code never sets that object's reference to be null anywhere. I'm only doing guesstimates here so take this with a grain of salt..

  1. Memory pressure actually forces Unity and/or Android to somehow deallocate the object prematurely at runtime, even though it shouldn't. This could be a bug in the mono backend?
  2. The Garbage Collector prematurely deallocates the object, setting it to null which causes the rest of the code to crash. This should also never happen and if it does, then it's also a mono bug?

Other weird scenarios which "might" occur is that you are somehow destroying the Mono Script which is executing the slicing code, but I don't see how this can be done considering the whole thing is single threaded. Only way to do this would be outside of the main thread, and even then Unity shouldn't allow something like that to happen.

I'll keep this open for a while and see if someone with a bit more background on the Mono vs IL2CPP backends could provide a better answer!

from ezy-slice.

ymrg3307 avatar ymrg3307 commented on July 3, 2024

Hi david,
thank you for the explanation

from ezy-slice.

nemesiscy avatar nemesiscy commented on July 3, 2024

Wow i just faced this issue as well... The only solution so far is to change backend scripting to IL2CPP?

from ezy-slice.

DavidArayan avatar DavidArayan commented on July 3, 2024

Unfortunately that seems to be the case nemesiscy, for the moment anyway. I'll look into this issue a bit further when time permits, I hate guesstimating when it comes down to code.

from ezy-slice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.