-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.2.0
-
Component/s: None
-
Labels:None
-
Environment:OS X as well as Linux using the mongo shell
-
Fully Compatible
-
ALL
tomcat@luna334:~$ mongo --port 27019
MongoDB shell version: 2.2.0
connecting to: 127.0.0.1:27019/test
REPLICA1:PRIMARY> ObjectId(ObjectId("4e859938e4b0c81c1411b0c7"))
Tue Sep 11 13:57:09 Assertion: 10448:invalid object id: length
0x511fa1 0x573f0b 0x5648e1 0x70ce24 0x6bdf6c 0x6af9e5 0x6bdaff 0x584c26 0x584ca2 0x5860ae 0x71e6d4 0x4a43e6 0x4a6726 0x7f2f8298cc4d 0x49f5a9
mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x511fa1]
mongo(_ZN5mongo11msgassertedEiPKc+0x9b) [0x573f0b]
mongo() [0x5648e1]
mongo(ZN5mongo21object_id_constructorEP9JSContextP8JSObjectjPlS4+0x2b4) [0x70ce24]
mongo(js_Invoke+0x40c) [0x6bdf6c]
mongo(js_Interpret+0x1305) [0x6af9e5]
mongo(js_Execute+0x36f) [0x6bdaff]
mongo(JS_EvaluateUCScriptForPrincipals+0x66) [0x584c26]
mongo(JS_EvaluateUCScript+0x22) [0x584ca2]
mongo(JS_EvaluateScript+0x6e) [0x5860ae]
mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x144) [0x71e6d4]
mongo(_Z5_mainiPPc+0x2156) [0x4a43e6]
mongo(main+0x26) [0x4a6726]
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f2f8298cc4d]
mongo(__gxx_personality_v0+0x2a1) [0x49f5a9]
Tue Sep 11 13:57:09 Error: invalid object id: length (shell):1
REPLICA1:PRIMARY>
While the expression might be nonsensical it should definitely lead to a proper runtime error not to a stacktrace.
- is duplicated by
-
SERVER-7590 Mongo shell assertion violation when invoking ObjectId() on malformed id
- Closed