Comments (5)
Thanx for the report I'll investigate it. and add the possibility to catch errors.
from dart-tags.
I've just encountered something similar, where I can not handle the error in my code, with a NoSuchMethodError exception in id3v2.dart.
frame
, in the code below could be null it seems.
final frame = ff.getFrame(fr);
final m = frame.decode(fr);
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 ID3V2Reader.parseValues
package:dart_tags/…/readers/id3v2.dart:71
#2 Reader.read.<anonymous closure>
package:dart_tags/…/readers/reader.dart:13
#3 _rootRunUnary (dart:async/zone.dart:1194:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1097:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:150:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:703:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:732:32)
#8 Future._addListener.<anonymous closure> (dart:async/future_impl.dart:400:9)
#9 _rootRun (dart:async/zone.dart:1186:13)
#10 _CustomZone.run (dart:async/zone.dart:1090:19)
#11 _CustomZone.runGuarded (dart:async/zone.dart:994:7)
#12 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1034:23)
#13 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#14 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
from dart-tags.
Another problem I found is that tags might be broken. In the one case the tag name was the actual description and that caused an error too. I wrapped that block at line 71 in a try/catch and it seems to now get through without problems.
final frame = ff.getFrame(fr);
final m = frame?.decode(fr);
try {
if (m?.key != null && m?.value != null) {
if (m?.value is KeyEntity) {
if (tags[m.key] == null) {
tags[m.key] = {m.value.key: m.value};
} else {
tags[m.key][m.value.key] = m.value;
}
} else {
tags[m.key] = m.value;
}
}
} catch (ex) {}
from dart-tags.
I encounter the same error as moda20 in a specific scenario in src/frames/id3v2/comm_frame.dart decodeBody
:
enc
is not UTF16- first 4 bytes of the frame are 0x00
- therefore
splitIndex
is 0
=>sublist(3, splitIndex)
crashes
My guess is that data.indexOf(0x00)
would need the start
parameter set to 3.
Is there any chance that this will be fixed? I could send you the mp3 file for debugging.
from dart-tags.
Same here as all of you. Also cannot catch any exceptions
from dart-tags.
Related Issues (20)
- Decode HOT 3
- Ram Consumption HOT 9
- Lyrics Tag showing undefined characters [working solution implemented already] HOT 4
- Picture tag is no longer being extracted HOT 3
- 32 bit integer frame size for USLT ?? HOT 3
- Error on 'Other' APIC picture type HOT 3
- DTB- Can't parse Chinese/Japanese/Korean characters
- Can this library write tags to files ?
- Can't set null tags
- DTB- Invalid value not in range HOT 2
- Web Support? HOT 2
- Non-ASCII Glyphs don't work. HOT 1
- DTB- Bitrate not found in the tags HOT 1
- DTB-It can't decode album cover image of some mp3 files. HOT 1
- Parse and return the POPM frame
- DTB-Crashes on ID3 2.2.0
- Can this be used if the mp3 file is remote i.e a url? HOT 1
- Can't get album cover if image size is over or equal 1 mb
- Unable to catch error "Unhandled Exception: NoSuchMethodError: The method 'decode' was called on null."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-tags.