Losing Data from a .blend again!

This is the second time I’ve started work a menu system in the game engine and Blender decides to start deleting parts of it :x What’s causing this?

This time I can provide a .blend to demonstrate:

http://www.blending-online.co.uk/Legacy_V001.blend

Check the console as you open the file.

It’s quite a significant bug to lose data from your .blend files, and needs to be looked into as soon as possible. This isn’t a new bug either, 2.25 does the exact same thing.

Those startup screens look quite nice - I like the fading effect.

But why is there only a problem for that button and what data is actually being lost? I clicked on the button 3 object in the 3d view and the only thing I saw missing was the actual box that represents button 3. Is that happening when you save the file?

If you think there is a bug, you have to say what the exact problem is and it’s good if you make up a method to reproduce it. Maybe you typed in a certain Python control sequence and Blender didn’t save it or something.

BTW, the rollover on button 2 looks a bit misplaced i.e. it doesn’t change when you roll the mouse over the bottom half of the button.

The mesh data of button 3, as well as it’s mouse over version is erased and replaced with an empty. All logic bricks are left intact on that empty though.

I’m finding it extremely difficult to reproduce this bug. What causes it is a complete mystery to me. Everything done on that particular button isn’t really any different from other buttons, so I believe this may be a problem with managing the objects of a .blend file.

I’m going to run a few more tests to try isolate a method of reproducing this bug. I also have another file of a completely separate menu system I was working on which suffered from the exact same problem, and effectively killed development on it. Each time I tried to replace a button, it deleted another one.

Yes I knew about this, it’s because the ‘Back’ button on the controls screen is placed partially over the top of it, so it blocks the raycast of the mouse. This was a work in progress before this bug hit, so a lot isn’t working as a completed menu system would.

Here’s yet the same effect in a completely separate file. I’ve cleaned out everything which isn’t needed, except for some animations (which are difficult, if not impossible to remove from a file), and found a method to reproduce the bug.

http://www.blending-online.co.uk/Data_Bug2.zip

To Reproduce:

Set the ‘Normal Button’ actuator to Menu_Button_New (should be open in the lower part of the screen upon loading). Save the file and reload it. It will then erase the first button.

If you then duplicate one of the other buttons and name/setup the logic bricks in the exact same way the erased button was set up, it will then erase the copied button again upon save/reloading.

What occurs here leads me to believe this is an issue with replacing the mesh of objects which have been duplicated. Maybe a datablock not being saved properly.

Has no one else encountered this bug before? Also could someone please submit a bug report on blender.org? I’m having problems registering an account there so I’d appreciate it if someone could report this for me.

did you find any solution for this problem? or was it identified as an actual bug?

though i am not working in the game engine, i am having what may be a similar problem, and i would like to determine if it is in fact the same thing. in my case, objects are not being recognized by scripts. the object meshes have been duplicated and modified, from imported meshes. i am not certain that these problems are related, but it does sound like a similar issue, to me.

i am going to try to examine your files, to get an idea of your problem. hopefully i don’t end up learning something in the process! :wink:

jim ww

It erased the second button for me i.e. the Menu_Button_Load button after typing in Menu_Button_New like you said.

Hmmm, it seems to be erasing the original button for me - not the copied one. Like if I duplicate Menu_Button_Exit to make a duplicate called Menu_button_Exit.001. Then in the logic channel of the duplicate, I put under replace mesh, Menu_Button_New. I save the file and reload and the original Menu_Button_Exit disappears but Menu_Button_Exit.001 is intact.

Either way, that does appear to be what’s happening. I actually had something like this in Maya 4.5 where I duplicated half my model and mirrored it in the axis. Then I applied a smooth proxy to the left half of my model. It did everything fine and saved but when it loaded, the original half of my model had disappeared and I had a file error but the duplicate was ok. The way I got round it was to change the order I did things in. Instead of making a duplicate first, I made the proxy then duplicated the original. I think it was a bug there too because it seems to work ok in Maya 5.

That sort of thing wouldn’t work here, though. I thought that using the make duplicates real item in the clear/apply menu might work but it doesn’t - I think that’s meant for unlinking linked duplicates. I think it just happens with duplicates too, I tried making a new button with the same logic and it was fine. It happens with linked duplicates just the same.

So to summarize, the bug is that when you use Python to make an “edit object” actuator replace a mesh, which has been duplicated, it saves the file ok but it gives an error on loading it.

If Blender files were ascii instead of binary, it would be much easier to debug what was going wrong in the save file.

It erased the second button for me i.e. the Menu_Button_Load button after typing in Menu_Button_New like you said.

Sorry yes, it is that button. The button which is duplicated from is the one which is always erased, in this case the ‘New’ Button was copied from the ‘Load’ Button.

So to summarize, the bug is that when you use Python to make an “edit object” actuator replace a mesh, which has been duplicated, it saves the file ok but it gives an error on loading it.

Using python isn’t related to the problem, but this is a good description of the problem. It definately is an issue with saving datablocks.

When you set the actuator to Menu_Button_New, go look at the editing window of the Load button. You will see that it’s datablock has gone red, which means it will be deleted.

A possible workaround for this bug is to press the F button, which will save the datablock even if it’s not used.

I have observed that, in the import-from-library code, if the specified object cannot be found it is silently replaced by an Empty.

similar seems true of constraints, if they are of an invalid type they are replaced with null constraints