osm_flutter icon indicating copy to clipboard operation
osm_flutter copied to clipboard

App crashes upon start

Open mvukojicic opened this issue 2 years ago • 7 comments

I am using the osm plugin with the GetX library, I have implemented the web_socket_channel with the controller and then called it inside the widget where I want to display the map, wrapping it with the OBX widget. App crashes upon building it with no error, just connection lost. While debugging, I found that once I remove the OBX widget wrapping the map, the app is not crashing and the map is working. With StreamBuilder everything is working fine.

Screenshot 2023-06-15 at 10 16 05 Screenshot 2023-06-15 at 10 16 15

mvukojicic avatar Jun 15 '23 08:06 mvukojicic

dont change the location until the map finish initialization we have callbacks to get that map is ready put your code there for post-initialization

liodali avatar Jun 15 '23 08:06 liodali

Hey buddy, thanks for the update, that's the only logical way to use the map :)

mvukojicic avatar Jun 15 '23 08:06 mvukojicic

thats only for setting map after initialisation you can change data freely

liodali avatar Jun 15 '23 17:06 liodali

Cool, I have implemented it and it's working like a charm, the only thing is that at the initial start of the map, it's firstly going to some random location as soon as I receive from web socket coordinates it jumps to the desired location, I don't know if I can fix that somehow, any suggestions maybe?

mvukojicic avatar Jun 16 '23 13:06 mvukojicic

longitude: 72.90299394389103} 2023-07-29 11:16:53.513365+0530 Runner[6445:1281042] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x283aa83f0> to GL_RENDERBUFFER 1 2023-07-29 11:16:53.513807+0530 Runner[6445:1281042] Failed to make complete framebuffer object 8cd6 TANGRAM map.cpp:890: setup GL 2023-07-29 11:16:53.517360+0530 Runner[6445:1281042] fopen failed for data file: errno = 2 (No such file or directory) 2023-07-29 11:16:53.517647+0530 Runner[6445:1281042] Errors found! Invalidating cache... 2023-07-29 11:16:53.535532+0530 Runner[6445:1281042] fopen failed for data file: errno = 2 (No such file or directory) 2023-07-29 11:16:53.535648+0530 Runner[6445:1281042] Errors found! Invalidating cache... TANGRAM hardware.cpp:60: Driver supports map buffer: 1 TANGRAM hardware.cpp:61: Driver supports vaos: 1 TANGRAM hardware.cpp:62: Driver supports rgb8_rgba8: 1 TANGRAM hardware.cpp:63: Driver supports NPOT texture: 0 TANGRAM hardware.cpp:77: Hardware max texture size 4096 TANGRAM hardware.cpp:78: Hardware max combined texture units 8 TANGRAM map.cpp:210: resize: 1125 x 2436 TANGRAM map.cpp:210: resize: 1125 x 2436 Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions PID: 6445, TID: 1281042 Backtrace

3 Flutter 0x0000000108f05f24 _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIN3fml8internal14CopyableLambdaIZN7flutter23GPUSurfaceMetalImpeller12AcquireFrameERK7SkISizeE3$0EENS_9allocatorISB_EEFbRNS5_12SurfaceFrameEPNS5_8DlCanvasEEEclESF_OSH + 584 4 Flutter 0x0000000108dbf6c4 _ZN7flutter12SurfaceFrame6SubmitEv + 84 5 Flutter 0x0000000108956dc4 _ZN7flutter23IOSExternalViewEmbedder11SubmitFrameEP15GrDirectContextNSt21_LIBCPP_ABI_NAMESPACE10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 5836 6 Flutter 0x0000000108d00f48 _ZN7flutter10Rasterizer19DrawToSurfaceUnsafeERNS_20FrameTimingsRecorderERNS_9LayerTreeE + 1348 7 Flutter 0x0000000108d019f8 _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIZN7flutter10Rasterizer13DrawToSurfaceERNS2_20FrameTimingsRecorderERNS2_9LayerTreeEE3$_1NS_9allocatorIS8_EEFvvEEclEv + 28 8 Flutter 0x0000000108c06888 _ZNK3fml10SyncSwitch7ExecuteERKNS0_8HandlersE + 72 9 Flutter 0x0000000108d008a4 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_20FrameTimingsRecorderERNS_9LayerTreeE + 272 10 Flutter 0x0000000108d02974 _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIZN7flutter10Rasterizer4DrawERKNS_10shared_ptrINS2_8PipelineINS2_13LayerTreeItemEEEEENS_8functionIFbRNS2_9LayerTreeEEEEE3$1NS_9allocatorISG_EEFvNS_10unique_ptrIS6_NS_14default_deleteIS6_EEEEEEclEOSM + 312 11 Flutter 0x0000000108d01c44 _ZN7flutter10Rasterizer4DrawERKNSt21_LIBCPP_ABI_NAMESPACE10shared_ptrINS_8PipelineINS_13LayerTreeItemEEEEENS1_8functionIFbRNS_9LayerTreeEEEE + 460 12 Flutter 0x0000000108d18e4c _ZNSt21_LIBCPP_ABI_NAMESPACE10__function6__funcIN3fml8internal14CopyableLambdaIZN7flutter5Shell14OnAnimatorDrawENS_10shared_ptrINS5_8PipelineINS5_13LayerTreeItemEEEEEE3$_0EENS_9allocatorISD_EEFvvEEclEv + 368 13 Flutter 0x0000000108c04ec0 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 568 14 Flutter 0x0000000108c08cbc ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0 + 32 15 CoreFoundation 0x00000001a4ed633c 725E49F4-653B-39BF-9A7A-8A3250911ECB + 844604 16 CoreFoundation 0x00000001a4e929b8 725E49F4-653B-39BF-9A7A-8A3250911ECB + 567736 17 CoreFoundation 0x00000001a4e36558 725E49F4-653B-39BF-9A7A-8A3250911ECB + 189784 18 CoreFoundation 0x00000001a4e83fb0 725E49F4-653B-39BF-9A7A-8A3250911ECB + 507824 19 CoreFoundation 0x00000001a4e88ec0 CFRunLoopRunSpecific + 612 20 GraphicsServices 0x00000001deedf368 GSEventRunModal + 164 21 UIKitCore 0x00000001a737e86c 59CBC9B5-30AE-396E-A269-A986640001BC + 3807340 22 UIKitCore 0x00000001a737e4d0 UIApplicationMain + 340 23 Runner 0x0000000102a548ac main + 64 24 dyld 0x00000001c36aa960 7B63C573-6161-3B33-A3A2-9944BA59722F + 88416 2023-07-29 11:17:27.285899+0530 Runner[6445:1281788] Task <04F8B584-4787-4F20-91F3-B1B365773B0E>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x283aa5f50 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <04F8B584-4787-4F20-91F3-B1B365773B0E>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <04F8B584-4787-4F20-91F3-B1B365773B0E>.<1>" ), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://raw.githubusercontent.com/liodali/osm_flutter/dc7424dacd77f4eced626abf64486d70fd03240d/assets/dynamic-styles.zip, NSErrorFailingURLKey=https://raw.githubusercontent.com/liodali/osm_flutter/dc7424dacd77f4eced626abf64486d70fd03240d/assets/dynamic-styles.zip, _kCFStreamErrorDomainKey=4} ERROR importer.cpp:63: Unable to retrieve 'https://github.com/liodali/osm_flutter/raw/dc7424dacd77f4eced626abf64486d70fd03240d/assets/dynamic-styles.zip': The request timed out. WARNING sceneLoader.cpp:607: No source defined in the yaml scene configuration. 2023-07-29 11:18:56.247204+0530 Runner[6445:1281898] [tcp] tcp_input [C1.1.1.1:3] flags=[R] seq=1826883098, ack=0, win=0 state=LAST_ACK rcv_nxt=1826883098, snd_una=2643550772

SauravSCC avatar Jul 29 '23 05:07 SauravSCC

i will made fix from 0.56+ in ios styles for map will load from asset

liodali avatar Jul 29 '23 13:07 liodali

Thank you for reply and fix problem, actually I change this plugin with another package. This plugin is easy to use but many functionality is not support cross platform and create buggy app

On Sat, 29 Jul 2023 at 18:55, hamza mohamed ali @.***> wrote:

i will made fix from 0.56+ in ios styles for map will load from asset

— Reply to this email directly, view it on GitHub https://github.com/liodali/osm_flutter/issues/419#issuecomment-1656730277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYOEMFXS4WHX6ZGBIYYKF53XSUFNBANCNFSM6AAAAAAZHOYUDE . You are receiving this because you commented.Message ID: @.***>

SauravSCC avatar Aug 02 '23 05:08 SauravSCC