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

[Flutter] Exception when loading atlas file #2290

Closed
coderXiezhiheng opened this issue May 12, 2023 · 2 comments
Closed

[Flutter] Exception when loading atlas file #2290

coderXiezhiheng opened this issue May 12, 2023 · 2 comments
Assignees
Labels

Comments

@coderXiezhiheng
Copy link

coderXiezhiheng commented May 12, 2023

Expanded(
flex: 7,
child: Transform.scale(
scale: 0.5,
child: SpineWidget.fromFile(
"/data/user/0/com.jinma.code/app_flutter/1.0.0/animate/spineboy.atlas",
"/data/user/0/com.jinma.code/app_flutter/1.0.0/animate/spineboy_pro.skel",
controller,
),
),
),

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected extension byte (at offset 17)
E/flutter (13020): #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747:7)
E/flutter (13020): #1 Utf8Decoder.convert (dart:convert/utf.dart:351:42)
E/flutter (13020): #2 Utf8Codec.decode (dart:convert/utf.dart:63:20)
E/flutter (13020): #3 Atlas._load (package:spine_flutter/spine_flutter.dart:112:36)
E/flutter (13020):
E/flutter (13020): #4 SkeletonDrawable.fromFile (package:spine_flutter/spine_flutter.dart:3939:17)
E/flutter (13020):
E/flutter (13020): #5 _SpineWidgetState.loadFromAsset (package:spine_flutter/spine_widget.dart:424:22)
E/flutter (13020):

image

[√] Flutter (Channel stable, 3.7.11, on Microsoft Windows [版本 10.0.22621.963], locale zh-CN)
• Flutter version 3.7.11 on channel stable at D:\flutter_sdk\flutter_windows_3.7.11-stable\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f72efea43c (4 weeks ago), 2023-04-11 11:57:21 -0700
• Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1
• Pub download mirror https://mirror.sjtu.edu.cn/dart-pub
• Flutter download mirror https://mirror.sjtu.edu.cn

Unable to display local Spine animation, parse local spine animation file exception

@badlogic
Copy link
Collaborator

Did you accidentially change the file encoding of spineboy.atlas? It has to be UTF-8.

@badlogic badlogic changed the title SpineWidget.fromFile The component appears Unhandled Exception: FormatException: Unexpected extension byte (at offset 17) [Flutter] Exception when loading atlas file May 22, 2023
@badlogic badlogic self-assigned this May 22, 2023
@badlogic badlogic added the bug label May 22, 2023
@badlogic
Copy link
Collaborator

Please provide the files you want to load and I'll re-open the issue.

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

No branches or pull requests

2 participants