opened
Hromon
username_0
Cannot be override in Mono VoxelStream on CustomSteam.
SCharp says that the VoxelStream class cannot be override, as it is not marked as virtual.
Cannot be overrait in Mono VoxelStream on CustomSteam
issue
created
Zylann
username_1
Does it work if you don't mark it override?
comment
created
Hromon
username_0
Well, at least it doesn't crash)
comment
created
Zylann
username_1
The function isn't exposed as `virtual`, however the module detects if your script has a function of that name and calls it (might be confusing, should look for a better way).
Can I see your code?
comment
created
Hromon
username_0
Yes
"невозможно переопределить наследуемый член, так как он не помечен как virtual, abstract или override" -> "it is not possible to override the inherited member since it is not marked as virtual, abstract or override"
![image](https://user-images.githubusercontent.com/29508584/67151778-4ddf1e80-f2d3-11e9-87e3-74c1ec31f96d.png)
comment
created
Zylann
username_1
Oh, joys of Godot naming convention and C# naming conventions... I think it doesn't work because your function is called `EmergeBlock` (pascal case) while the module expects the method to be called `emerge_block` (snake case). I wonder what was done for other Godot functions tbh.
comment
created
Hromon
username_0
I tried to understand the source, but I still did not understand how it determines the availability of classes and methods
comment
created
Zylann
username_1
The function should be called `generate_block` now https://github.com/username_1/godot_voxel/blob/3ec2275ffb09ec3d578da7e2c07fb87e5d28794c/generators/voxel_generator.cpp#L21
comment
created
Hromon
username_0
I'll try it now.
comment
created
Hromon
username_0
I compiled Godot 3.2 stable and got error in start empty project:
CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[0] GDMono::is_runtime_initialized (F:\Programm\GodotComp\godot-master\modules\mono\mono_gd\gd_mono.h:214)
[1] GDMono::is_runtime_initialized (F:\Programm\GodotComp\godot-master\modules\mono\mono_gd\gd_mono.h:214)
[2] GDMonoUtils::ScopeThreadAttach::ScopeThreadAttach (F:\Programm\GodotComp\godot-master\modules\mono\mono_gd\gd_mono_utils.cpp:634)
[3] CSharpLanguage::debug_get_current_stack_info (F:\Programm\GodotComp\godot-master\modules\mono\csharp_script.cpp:562)
[4] ScriptDebuggerRemote::_err_handler (F:\Programm\GodotComp\godot-master\scene\debugger\script_debugger_remote.cpp:486)
[5] _err_print_error (F:\Programm\GodotComp\godot-master\core\error_macros.cpp:88)
[6] _err_print_error (F:\Programm\GodotComp\godot-master\core\error_macros.cpp:99)
[7] ClassDB::bind_methodfi (F:\Programm\GodotComp\godot-master\core\class_db.cpp:1232)
[8] ClassDB::bind_method<MethodDefinition,bool (__cdecl VoxelGeneratorImage::*)(void)const > (F:\Programm\GodotComp\godot-master\core\class_db.h:234)
[9] VoxelGeneratorImage::_bind_methods (F:\Programm\GodotComp\godot-master\modules\voxel\generators\voxel_generator_image.cpp:73)
[10] VoxelGeneratorImage::initialize_class (F:\Programm\GodotComp\godot-master\modules\voxel\generators\voxel_generator_image.h:9)
[11] ClassDB::register_class<VoxelGeneratorImage> (F:\Programm\GodotComp\godot-master\core\class_db.h:177)
[12] register_voxel_types (F:\Programm\GodotComp\godot-master\modules\voxel\register_types.cpp:48)
[13] register_module_types (F:\Programm\GodotComp\godot-master\modules\register_module_types.gen.cpp:162)
[14] Main::setup2 (F:\Programm\GodotComp\godot-master\main\main.cpp:1356)
[15] Main::setup (F:\Programm\GodotComp\godot-master\main\main.cpp:1146)
[16] widechar_main (F:\Programm\GodotComp\godot-master\platform\windows\godot_windows.cpp:150)
[17] _main (F:\Programm\GodotComp\godot-master\platform\windows\godot_windows.cpp:184)
[18] main (F:\Programm\GodotComp\godot-master\platform\windows\godot_windows.cpp:196)
[19] __scrt_common_main_seh (d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[20] BaseThreadInitThunk
-- END OF BACKTRACE --
comment
created
blockspacer
username_2
Provide used godot_voxel and Godot commit hashes (`git rev-parse HEAD`), please.

And what do you mean by empty project?

Maybe you want to create separate issue about GDMono support with Godot 3.2
comment
created
Zylann
username_1
Maybe godot bind syntax changed or C# bind bugged?

The bind syntax didnt change as far as I know. The master branch of this module has always been developped with the latest Godot version. If something is wrong at runtime, Godot tried to tell us but the message didnt get through because of the Mono crash :p
comment
created
Zylann
username_1
Ok just found out the problem, it's actually the line before the crash dump reported.
Going to fix it soon
comment
created
Zylann
username_1
I fixed the binding in 88d170adff2c9e5e057b34aa0be7fdae08aab0db, you can try again now
comment
created
Hromon
username_0
This is strange...

![image](https://user-images.githubusercontent.com/29508584/73462384-c783af80-438c-11ea-8c3e-8deb2bba54e6.png)
comment
created
Hromon
username_0
o/
After a long time, I sat down again to experiment with voxels and decided to download your module, I really like it, but it still refuses to work with mono
![image](https://user-images.githubusercontent.com/29508584/84656140-e25d5780-af1a-11ea-8fba-9fd26c1e2fd0.png)
![image](https://user-images.githubusercontent.com/29508584/84656164-ed17ec80-af1a-11ea-8c78-869f6ec18aef.png)
![image](https://user-images.githubusercontent.com/29508584/84656205-fdc86280-af1a-11ea-962d-314b114d17fb.png)

:\
comment
created
Zylann
username_1
Did you try the original workaround I proposed? https://github.com/username_1/godot_voxel/issues/81#issuecomment-544200858
comment
created
Hromon
username_0
it's not work, because generated lib don't have method "emerge_block"
comment
created
Zylann
username_1
@username_0 I know, but as I explained, the module *does expect a method with that name* and calls it anyways.
comment
created
Hromon
username_0
I understand, but i don't have opportunity to override method :C
comment
created
Zylann
username_1
@username_0 don't use `override`, that's the point. It's not bound as virtual, instead the module calls it by name.
comment
created
Hromon
username_0
Ok, thx, i'm try
comment
created
Hromon
username_0
Crash(

![image](https://user-images.githubusercontent.com/29508584/84669803-f5c5ee00-af2d-11ea-9c21-844d6ead7aa7.png)
comment
created
Zylann
username_1
What does the mono log says?
comment
created
Hromon
username_0
comment
created
Zylann
username_1
Well I have no idea what Mono is trying to tell us here.
comment
created
Hromon
username_0
I too :D
comment
created
blockspacer
username_2
1. Try release build
2. Try new mono or Godot version

see https://forums.xamarin.com/discussion/69205/ios-crash-error
comment
created
Hromon
username_0
I tryed and don't work(
comment
closed
Hromon
username_0
issue
reopened
Hromon
username_0
Cannot be override in Mono VoxelStream on CustomSteam.
SCharp says that the VoxelStream class cannot be override EmergeBlock method, as it is not marked as virtual.
Cannot be override in Mono VoxelStream on CustomSteam
issue
created
blockspacer
username_2
@username_0 try to send bug to C# / mono authors. Seems like issue C# / mono related (at least error message may be more helpful)
comment
created
Zylann
username_1
This issue contains two problems:

- `VoxelStream` and `VoxelGenerator` methods can't be overriden in C#. This was caused by the absence of virtual method binding. Now you may use `VoxelStreamScript` or `VoxelGeneratorScript`, which do have such binding, so now these may work in C#.

- Godot's C# module causes the engine to crash if any (recoverable) error occurs while registering a class of a completely unrelated module. The cause is that C# tries to retrieve the stack trace, which makes no sense because the error occurred internally during registration, at a time where the C# module did not even initialize? This is an issue I reported here: https://github.com/godotengine/godot/issues/35740
comment
closed
Zylann
username_1
issue
created
Zylann
username_1
I'm going to close this for now. If the second issue mentionned in my second comment shows up again I'll update the issue in Godot's repo.
comment