|
Goombert
|
|
Reply #1 Posted on: May 26, 2014, 04:57:32 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Is inheritance involved?
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #3 Posted on: May 26, 2014, 06:00:21 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
From what I understand egofree, instance activation/deactivation was broke somewhat before I touched anything too, I'll take a look at it when I have time, I'm aware I need to work out some of the kinks in that.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #5 Posted on: May 31, 2014, 02:18:50 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Hey egofree, I was going to attempt fixing this today but I was unable to reproduce the crash. As you can see in the screenshot below I made a small example with an object that deactivates the instances, I tried both with it deactivating itself and without it deactivating itself. Neither crashed the game, and both properly deactivated instances within the region. Please provide me with a minimal test case that reproduces the issue or give me some simple exact steps to make an example which exhibits the crash. For reference, here is the documentation for the function in question: http://enigma-dev.org/docs/Wiki/Instance_deactivate_region
|
|
« Last Edit: May 31, 2014, 02:24:56 pm by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
egofree
|
|
Reply #6 Posted on: May 31, 2014, 03:24:47 pm |
|
|
Joined: Jun 2013
Posts: 601
|
Please provide me with a minimal test case that reproduces the issue or give me some simple exact steps to make an example which exhibits the crash.
I've uploaded a test project in my second message. But did you notice that i said this problem happens only in the creation code of the room ? The first test was with Windows 8.1 at the office. I did more tests at home : - On Windows 7 64 bits it crashes ENIGMA. - On Linux Mint KDE 64 bits, it doesn't crash the application, but it closes the window. But as i understand it should not be the case as i wrote the following method : instance_deactivate_region(0,0,100,100,true,true); In the enigma wiki, it's written the last parameter is : notme boolean whether to deactivate the instance calling the function (optional, default set to true) So the application should not deactivate itself ? Update: Here is a screenshot:
|
|
« Last Edit: May 31, 2014, 03:27:06 pm by egofree »
|
Logged
|
|
|
|
Goombert
|
|
Reply #7 Posted on: May 31, 2014, 03:26:30 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Oh, holy fuck, I guess that's a major design flaw on GM's part. Try calling it with that parameter false.
In the mean time, I'll ask Josh what to do.
|
|
« Last Edit: May 31, 2014, 03:28:44 pm by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
egofree
|
|
Reply #8 Posted on: May 31, 2014, 03:32:28 pm |
|
|
Joined: Jun 2013
Posts: 601
|
Oh, holy fuck, I guess that's a major design flaw on GM's part. Try calling it with that parameter false.
Yes, with the parameter false, it's doesn't crash ! But in this case, the application should close, no ? Are you sure it's a design flaw from GM ? Or is it ENIGMA engine ? I don't have now GM installed on my PC, but i don't remember any problem with this function with GM. Perhaps it's not that serious, the last parameter is not taken into account or it's not tested correctly (false is taken as true, and vice versa)
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #9 Posted on: May 31, 2014, 03:47:08 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Run a test egofree and make sure that it properly deactivates the instances when called from room create with that parameter set to false. And by design flaw, I mean yes it is because the function is designed to be called by an instance, yet it's possible in GM and ENIGMA to call the function from the room creation code.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #11 Posted on: May 31, 2014, 03:54:21 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Ok good, I am not sure what to about this though to fix it.
The reason it crashes with that parameter true is because the deactivate functions check the instance event iterator, and one obviously does not exist for the room creation code, because it's not an instance. A simple solution I guess is to create one for the scope anyway since it's used to fire the roomstart events and shit.
To add to this I also tried some other thought experiments suggested by Josh.
I called the following in GM8.1 in the Room Create code.
instance_destroy(); It did nothing and showed no debug messages.
instance_deactivate_all(true); Behaved as expected and showed no debug messages.
show_message(string(id)); Reported 0.
show_message(string(self.id)); Reported 0.
show_message(string(sprite_index)); Reported -1.
|
|
« Last Edit: May 31, 2014, 04:05:54 pm by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
|
Goombert
|
|
Reply #14 Posted on: June 05, 2014, 02:20:51 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Yes as onpon just said, I guess we should just create a dummy instance for the scope.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|