Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS built from the source code of 3.2.4 beta6 load texture failed when compress mode set to lossy #45349

Closed
alexzheng opened this issue Jan 21, 2021 · 5 comments

Comments

@alexzheng
Copy link

alexzheng commented Jan 21, 2021

Godot version:

3.2.4 beta6 source code

OS/device including version:

Issue description:

Steps to reproduce:

  1. set the compress mode to Lossy when import a jpg image , keep default for other settings
    2.Export an Xcode project in 3.2.4 beta6, it can run
    3.build a library (.a) from the source code from https://downloads.tuxfamily.org/godotengine/3.2.4/beta6/godot-3.2.4-beta6.tar.xz
    4.replace the library file with the custom one
    5.run the project, it crashed:

when change the compress mode to Lossless for the image, it can run with that custom library file.

the stack info:

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x0000000104b3de14 Idiom`StreamTexture::_load_data(String const&, int&, int&, int&, int&, int&, Ref<Image>&, int) + 1300
    frame #2: 0x0000000104b3e398 Idiom`StreamTexture::load(String const&) + 88
    frame #3: 0x0000000104b3ee9c Idiom`ResourceFormatLoaderStreamTexture::load(String const&, String const&, Error*) + 56
    frame #4: 0x000000010507f3c8 Idiom`ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) + 168
    frame #5: 0x000000010507bc50 Idiom`ResourceFormatImporter::load(String const&, String const&, Error*) + 124
    frame #6: 0x000000010507f3c8 Idiom`ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) + 168
    frame #7: 0x000000010507fc28 Idiom`ResourceLoader::load(String const&, String const&, bool, Error*) + 768
    frame #8: 0x0000000104b08cdc Idiom`ResourceInteractiveLoaderText::poll() + 7796
    frame #9: 0x000000010507dec4 Idiom`ResourceFormatLoader::load(String const&, String const&, Error*) + 424
    frame #10: 0x000000010507f3c8 Idiom`ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) + 168
    frame #11: 0x000000010507fc28 Idiom`ResourceLoader::load(String const&, String const&, bool, Error*) + 768
    frame #12: 0x0000000104b08cdc Idiom`ResourceInteractiveLoaderText::poll() + 7796
    frame #13: 0x000000010507dec4 Idiom`ResourceFormatLoader::load(String const&, String const&, Error*) + 424
    frame #14: 0x000000010507f3c8 Idiom`ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) + 168
    frame #15: 0x000000010507fc28 Idiom`ResourceLoader::load(String const&, String const&, bool, Error*) + 768
    frame #16: 0x00000001045facd8 Idiom`Main::start() + 8560
    frame #17: 0x00000001045d5b08 Idiom`OSIPhone::start() + 20
    frame #18: 0x00000001045e30a8 Idiom`-[GodotViewRenderer setupView:] + 176
    frame #19: 0x00000001045de260 Idiom`-[GodotView drawView] + 332
    frame #20: 0x0000000106274f44 GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 172
    frame #21: 0x000000018aacd9e8 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 664
    frame #22: 0x000000018aba6eac QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 280
    frame #23: 0x0000000187754dd0 CoreFoundation`__CFMachPortPerform + 176
    frame #24: 0x0000000187779fe8 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
    frame #25: 0x0000000187779378 CoreFoundation`__CFRunLoopDoSource1 + 596
    frame #26: 0x000000018777308c CoreFoundation`__CFRunLoopRun + 2360
    frame #27: 0x000000018777221c CoreFoundation`CFRunLoopRunSpecific + 600
    frame #28: 0x000000019f276784 GraphicsServices`GSEventRunModal + 164
    frame #29: 0x000000018a1b0fe0 UIKitCore`-[UIApplication _run] + 1072
    frame #30: 0x000000018a1b6854 UIKitCore`UIApplicationMain + 168
    frame #31: 0x00000001045d9470 Idiom`main + 128
    frame #32: 0x00000001874326b0 libdyld.dylib`start + 4
(lldb) 

Minimal reproduction project:

@Calinou
Copy link
Member

Calinou commented Jan 21, 2021

@alexzheng Does it work if you use the official iOS export template?

@alexzheng
Copy link
Author

alexzheng commented Jan 21, 2021

It works use the official iOS export template.
However, it crashed when I replace the .a file with my build lib file. I did not change any code in the source code and my build lib file can works in any project if the compress mode is not set to Lossy.

@alexzheng
Copy link
Author

And my custom lib built from 3.2.3 source code, can run fine for that project, which import texture using compress mode set to Lossy.

@clayjohn
Copy link
Member

Can you provide more information about your custom library? It is clear that it is causing the issue somehow.

@alexzheng
Copy link
Author

After a clean build, it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants